You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is somewhat related to #46 but not quite. I would like the same secret key to work for DH and for signing. One way to do it is this:
Generate a DH keypair with: nacl.box.keyPair()
Get the signing secret key from the DH secret key as a seed:
secretKey_sign = nacl.sign.keyPair.fromSeed(secretKey_DH),
the first 32 bytes will be the same as secretKey_DH
Get the signing public key from the signing secret key with: nacl.sign.keyPair.fromSecretKey(secretKey_sign)
Now, the signer can do this and end up with two different public keys to give out, but it would be cleaner if the rest of the world could get one public key from the other. I guess the main difficulty is that those are points on different curves: a Montgomery curve for DH, and an Edwards curve for signatures, so that the process might require reversing one of the secret key -> public key generation steps.
But since the two curves are intimately related, perhaps the two public keys are related in some way that would allow calculating one from the other directly. Is there a possibility of this?
Thanks!
The text was updated successfully, but these errors were encountered:
This is somewhat related to #46 but not quite. I would like the same secret key to work for DH and for signing. One way to do it is this:
secretKey_sign = nacl.sign.keyPair.fromSeed(secretKey_DH),
the first 32 bytes will be the same as secretKey_DH
Now, the signer can do this and end up with two different public keys to give out, but it would be cleaner if the rest of the world could get one public key from the other. I guess the main difficulty is that those are points on different curves: a Montgomery curve for DH, and an Edwards curve for signatures, so that the process might require reversing one of the secret key -> public key generation steps.
But since the two curves are intimately related, perhaps the two public keys are related in some way that would allow calculating one from the other directly. Is there a possibility of this?
Thanks!
The text was updated successfully, but these errors were encountered: