Open jasonrbriggs opened 7 years ago
Am I missing something obvious here? If I take a ed25519.nim generated random key, plug it into https://tweetnacl.js.org/#/sign, it generates a different signature. And the signature it then generates is not even verifiable on that site. But if I then take the ed25519.nim signature, it does verify.
Something funny about private key generation that I'm missing?
Hey,
I honestly haven't done much with this library yet, and such your bug is unfamiliar to me. I'd suggest looking at the embedded upstream project here: https://github.com/orlp/ed25519/ - Maybe there's implementation differences?
It would be better to check the library with the test vectors given in the RFC 8032. An implementation is correct when it gives the same output.
I'm trying to test signing/verifying between this nim library and a javascript implementation (this one: https://tweetnacl.js.org). I'm getting a weird error and hoping you might see if I'm doing something wrong/stupid.
Basically I'm creating a key using ed25519.nim, signing a string, encoding the pub/prv key, decoding them back and then verifying the signature with the result. So far so good:
That echoes
true
as you might expect.Then using this page https://tweetnacl.js.org/#/sign, I create a random key, sign the same string, then add these to my code:
true
again, as expected.Finally, try signing with this new key:
And I get
false
?? Which doesn't make sense to me. Any clues as to what might be wrong here?