mirror of
https://github.com/cathugger/mkp224o.git
synced 2026-01-26 19:22:09 -06:00
amd64-{51-30k,64-24k} impls should work now
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user