Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement nacl.sign.keyPair.fromSeed. #46

Merged
merged 2 commits into from Aug 3, 2014
Merged

Implement nacl.sign.keyPair.fromSeed. #46

merged 2 commits into from Aug 3, 2014

Conversation

dchest
Copy link
Owner

@dchest dchest commented Jul 27, 2014

Allows deriving a new sign key pair deterministically from a 32-byte
seed. Introduces a tiny change to the low-level crypto_sign_keypair():
a new argument that indicates that sk already contains seed bytes;
however crypto_sign_keypair() interface behaves exactly the same as
before if this argument is not truthful (e.g. not set).

Closes #37.


I don't like changing low-level things, even though this change is tiny :( Another way to do this would be to copy crypto_sign_keypair into crypto_sign_seeded_keypair or something like it, but dropping randombytes inside; however while it doesn't change the original implementation, it introduces another 16 lines of useless code. I won't merge this until more thinking.

@dchest
Copy link
Owner Author

dchest commented Jul 28, 2014

Should we also introduce nacl.box.keyPair.fromSeed? It would actually just call fromSecretKey, as for nacl.box there's no actual difference, however there is a semantic difference.

Allows deriving a new sign key pair deterministically from a 32-byte
seed. Introduces a tiny change to the low-level crypto_sign_keypair():
a new argument that indicates that sk already contains seed bytes;
however crypto_sign_keypair() interface behaves exactly the same as
before if this argument is not truthful (e.g. not set).

Closes #37.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add nacl.sign.keyPair.fromSeed
1 participant