jlouis / enacl

Erlang bindings for NaCl / libsodium
MIT License
197 stars 59 forks source link

Is there a way to compute pubkey from privkey? #37

Closed ghost closed 5 years ago

ghost commented 5 years ago

👋

That is, is there a way to compute public from enacl:sign_keypair()'s secret? If some kind of seed is used, is there a way to provide it?

ghost commented 5 years ago

Found https://github.com/jedisct1/libsodium-doc/blob/master/public-key_cryptography/public-key_signatures.md#extracting-the-seed-and-the-public-key-from-the-secret-key

Can't find crypto_sign_ed25519_sk_to_pk being used in any nif, though.

ghost commented 5 years ago

Seems to have worked. https://github.com/jlouis/enacl/pull/38