dazoe/ed25519

Possible keypair bug

Closed this issue · 1 comments

Why do you use

 mysecret[0] &= 248;
 mysecret[31] &= 63;
 mysecret[31] |= 64;

to calculate the private key in crypto_sign_keypair when Bernstein, uses

 mysecret[0] &= 248;
 mysecret[31] &= 127;
 mysecret[31] |= 64;

I did notice it was different. When looking at SUPERCOP it has both.
ref uses &=127 and ref10 uses &=63. This code is based on ref10 so will use &=63