Fix fe_init implementation to appear for small Ed25519

This commit is contained in:
Sean Parkinson 2018-01-17 09:59:01 +10:00
parent e8179b29ff
commit c09d972012
3 changed files with 6 additions and 11 deletions

View File

@ -1294,9 +1294,6 @@ then
fi
AM_CONDITIONAL([BUILD_CURVE25519], [test "x$ENABLED_CURVE25519" = "xyes"])
AM_CONDITIONAL([BUILD_CURVE25519_SMALL], [test "x$ENABLED_CURVE25519_SMALL" = "xyes"])
# ED25519
AC_ARG_ENABLE([ed25519],
[AS_HELP_STRING([--enable-ed25519],[Enable ED25519 (default: disabled)])],
@ -1316,6 +1313,7 @@ then
then
AM_CFLAGS="$AM_CFLAGS -DED25519_SMALL"
ENABLED_ED25519_SMALL=yes
ENABLED_CURVE25519_SMALL=yes
ENABLED_ED25519=yes
fi
@ -1332,6 +1330,9 @@ AM_CONDITIONAL([BUILD_ED25519], [test "x$ENABLED_ED25519" = "xyes"])
AM_CONDITIONAL([BUILD_ED25519_SMALL], [test "x$ENABLED_ED25519_SMALL" = "xyes"])
AM_CONDITIONAL([BUILD_FEMATH], [test "x$ENABLED_FEMATH" = "xyes"])
AM_CONDITIONAL([BUILD_GEMATH], [test "x$ENABLED_GEMATH" = "xyes"])
AM_CONDITIONAL([BUILD_CURVE25519], [test "x$ENABLED_CURVE25519" = "xyes"])
AM_CONDITIONAL([BUILD_CURVE25519_SMALL], [test "x$ENABLED_CURVE25519_SMALL" = "xyes"])
# FP ECC, Fixed Point cache ECC
AC_ARG_ENABLE([fpecc],

View File

@ -241,17 +241,11 @@ endif
if BUILD_GEMATH
if BUILD_ED25519_SMALL
src_libwolfssl_la_SOURCES += wolfcrypt/src/ge_low_mem.c
if !BUILD_CURVE25519_SMALL
src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_low_mem.c
endif
else
src_libwolfssl_la_SOURCES += wolfcrypt/src/ge_operations.c
if !BUILD_FEMATH
src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_operations.c
endif
if BUILD_CURVE25519_SMALL
src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_operations.c
endif
endif
endif

View File

@ -55,14 +55,14 @@ void lm_copy(byte* x, const byte* a)
x[i] = a[i];
}
#ifdef CURVE25519_SMALL
#ifndef FREESCALE_LTC_ECC
void fe_init()
{
}
#endif
#ifdef CURVE25519_SMALL
/* Double an X-coordinate */
static void xc_double(byte *x3, byte *z3,
const byte *x1, const byte *z1)