forked from wolfSSL/wolfssl
Starting 128-bit FE implementation
This commit is contained in:
@ -41,6 +41,9 @@
|
||||
#include <wolfcrypt/src/misc.c>
|
||||
#endif
|
||||
|
||||
#ifdef FE_128BIT
|
||||
#include "fe_x25519.c"
|
||||
#else
|
||||
/*
|
||||
fe means field element.
|
||||
Here the field is \Z/(2^255-19).
|
||||
@ -1407,6 +1410,7 @@ void fe_cmov(fe f, const fe g, int b)
|
||||
f[8] = f8 ^ x8;
|
||||
f[9] = f9 ^ x9;
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE ED25519 or CURVE25519 */
|
||||
#endif /* not defined CURVED25519_SMALL */
|
||||
|
||||
|
@ -43,6 +43,8 @@ Bounds on each t[i] vary depending on context.
|
||||
#ifdef CURVED25519_SMALL
|
||||
#define F25519_SIZE 32
|
||||
typedef byte fe[32];
|
||||
#elif defined(FE_128BIT)
|
||||
typedef int64_t fe[5];
|
||||
#else
|
||||
typedef int32_t fe[10];
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user