From 11c4fa947dafffbb94cdc4fad4862235f36cef2d Mon Sep 17 00:00:00 2001 From: Greg Alexander Date: Sun, 14 Dec 2014 16:43:39 -0500 Subject: [PATCH] somehow #define LTC_SOURCE 1 (which should really be in all libtomcrypt .c files to be the same as how its native Makefile does it) makes the ltc_ecc_mulmod_timing et al work --- dropbear/libtomcrypt/src/headers/tomcrypt_custom.h | 2 +- dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c | 1 + dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c | 1 + dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c | 1 + dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dropbear/libtomcrypt/src/headers/tomcrypt_custom.h b/dropbear/libtomcrypt/src/headers/tomcrypt_custom.h index fafde84..cbfaeb3 100644 --- a/dropbear/libtomcrypt/src/headers/tomcrypt_custom.h +++ b/dropbear/libtomcrypt/src/headers/tomcrypt_custom.h @@ -139,7 +139,7 @@ #ifdef DROPBEAR_ECC #define MECC #define LTC_ECC_SHAMIR -// #define LTC_ECC_TIMING_RESISTANT +#define LTC_ECC_TIMING_RESISTANT #define MPI #define LTM_DESC #ifdef DROPBEAR_ECC_256 diff --git a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c index ac1c24f..57fb9fa 100644 --- a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c +++ b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c @@ -14,6 +14,7 @@ * All curves taken from NIST recommendation paper of July 1999 * Available at http://csrc.nist.gov/cryptval/dss.htm */ +#define LTC_SOURCE 1 #include "tomcrypt.h" /** diff --git a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c index b94a50c..edf3052 100644 --- a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c +++ b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c @@ -14,6 +14,7 @@ * All curves taken from NIST recommendation paper of July 1999 * Available at http://csrc.nist.gov/cryptval/dss.htm */ +#define LTC_SOURCE 1 #include "tomcrypt.h" /** diff --git a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c index c8e359f..2add6ac 100644 --- a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c +++ b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c @@ -14,6 +14,7 @@ * All curves taken from NIST recommendation paper of July 1999 * Available at http://csrc.nist.gov/cryptval/dss.htm */ +#define LTC_SOURCE 1 #include "tomcrypt.h" /** diff --git a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c index f0b3e1d..fbf3f68 100644 --- a/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c +++ b/dropbear/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c @@ -14,6 +14,7 @@ * All curves taken from NIST recommendation paper of July 1999 * Available at http://csrc.nist.gov/cryptval/dss.htm */ +#define LTC_SOURCE 1 #include "tomcrypt.h" /**