dchest/tweetnacl-js — pull request #46 by dchest (2014-07-27 19:27:40+00:00)
Title: Implement nacl.sign.keyPair.fromSeed.

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.