简体   繁体   中英

curve 25519 scalar multiplication library

I am porting some backend/sdk to nodejs/typescript and I came along a blocker, the source uses libsodium function crypto_scalarmult_curve25519() which has an equivalent in Go as well thru crypto/curve25519 ( ScalarMult ).

It's been hour since I was looking a similar version in nodejs/typescript, I even tried the javascript version of libsodium ; which pointed me to libsodium-wrapper , which unfortunately the function I am looking for ( crypto_scalarmult_curve25519 ) is missing and not supported. crypto library nor the node-forge does not have curve scalar multiplication as well.

Is there any alternative in javascript/typescript?

found a very lightweight curve25519 library for typescript. https://github.com/harveyconnor/curve25519-js/

by default the scalar multiplication functions is not exposed to outside user of the library, so i need to export it from the source to be used.

answering my question for others to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM