lyubo / react-native-sodium

ISC License
61 stars 46 forks source link

Add crypto_scalarmult_base #16

Closed adbario closed 5 years ago

adbario commented 5 years ago

Implements crypto_scalarmult_base which can be used to compute the public key given a secret key previously generated with crypto_box_keypair().

Reference: https://libsodium.gitbook.io/doc/public-key_cryptography/authenticated_encryption#key-pair-generation

lyubo commented 5 years ago

Thanks for the PR. Not a big issue, but I think it is a good idea to keep function argument names consistent with the original libsodum names. In this particular case, names are q and n. Also, can you spare some more time and add a test case in the companion project react-native-sodium-example?