mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-12-05 21:27:13 -06:00
add amd64-{51-30k,64-24k} from SUPERCOP, now use autoconf
This commit is contained in:
13
ed25519/amd64-51-30k/ge25519_pack.c
Normal file
13
ed25519/amd64-51-30k/ge25519_pack.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "fe25519.h"
|
||||
#include "sc25519.h"
|
||||
#include "ge25519.h"
|
||||
|
||||
void ge25519_pack(unsigned char r[32], const ge25519_p3 *p)
|
||||
{
|
||||
fe25519 tx, ty, zi;
|
||||
fe25519_invert(&zi, &p->z);
|
||||
fe25519_mul(&tx, &p->x, &zi);
|
||||
fe25519_mul(&ty, &p->y, &zi);
|
||||
fe25519_pack(r, &ty);
|
||||
r[31] ^= fe25519_getparity(&tx) << 7;
|
||||
}
|
||||
Reference in New Issue
Block a user