amd64-{51-30k,64-24k} impls should work now

This commit is contained in:
cathugger
2017-09-27 15:41:59 +03:00
parent 59f318aa64
commit 966cf38205
16 changed files with 135 additions and 66 deletions

View File

@@ -11,21 +11,15 @@ int crypto_sign(
)
{
unsigned char pk[32];
unsigned char az[64];
unsigned char nonce[64];
unsigned char hram[64];
ge_p3 R;
memmove(pk,sk + 32,32);
crypto_hash_sha512(az,sk,32);
az[0] &= 248;
az[31] &= 63;
az[31] |= 64;
crypto_sign_pubkey(pk,sk);
*smlen = mlen + 64;
memmove(sm + 64,m,mlen);
memmove(sm + 32,az + 32,32);
memmove(sm + 32,sk + 32,32);
crypto_hash_sha512(nonce,sm + 32,mlen + 32);
memmove(sm + 32,pk,32);
@@ -35,7 +29,7 @@ int crypto_sign(
crypto_hash_sha512(hram,sm,mlen + 64);
sc_reduce(hram);
sc_muladd(sm + 32,hram,az,nonce);
sc_muladd(sm + 32,hram,sk,nonce);
return 0;
}