forked from wolfSSL/wolfssl
Only implement and call fe_init when available
This commit is contained in:
@ -67,7 +67,9 @@ int wc_curve25519_make_key(WC_RNG* rng, int keysize, curve25519_key* key)
|
||||
if (keysize != CURVE25519_KEYSIZE)
|
||||
return ECC_BAD_ARG_E;
|
||||
|
||||
#ifndef FREESCALE_LTC_ECC
|
||||
fe_init();
|
||||
#endif
|
||||
|
||||
/* random number for private key */
|
||||
ret = wc_RNG_GenerateBlock(rng, key->k.point, keysize);
|
||||
@ -430,9 +432,9 @@ int wc_curve25519_init(curve25519_key* key)
|
||||
#ifdef FREESCALE_LTC_ECC
|
||||
XMEMSET(key->k.pointY, 0, key->dp->size);
|
||||
XMEMSET(key->p.pointY, 0, key->dp->size);
|
||||
#endif
|
||||
|
||||
#else
|
||||
fe_init();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -295,7 +295,9 @@ int wc_ed25519_init(ed25519_key* key)
|
||||
|
||||
XMEMSET(key, 0, sizeof(ed25519_key));
|
||||
|
||||
#ifndef FREESCALE_LTC_ECC
|
||||
fe_init();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -57,9 +57,11 @@ void lm_copy(byte* x, const byte* a)
|
||||
|
||||
|
||||
#ifdef CURVE25519_SMALL
|
||||
#ifndef FREESCALE_LTC_ECC
|
||||
void fe_init()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Double an X-coordinate */
|
||||
static void xc_double(byte *x3, byte *z3,
|
||||
|
Reference in New Issue
Block a user