From 7320eb46d471b908b5251aa1d459ec32cb888370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 23 Jun 2015 00:13:02 +0200 Subject: [PATCH] Remove references to some Montgomery curves After all it looks like those won't become standard. --- include/mbedtls/compat-1.3.h | 12 ------------ include/mbedtls/config.h | 3 --- include/mbedtls/ecp.h | 3 --- library/ecp.c | 5 +---- library/version_features.c | 9 --------- scripts/data_files/rename-1.3-2.0.txt | 6 ------ 6 files changed, 1 insertion(+), 37 deletions(-) diff --git a/include/mbedtls/compat-1.3.h b/include/mbedtls/compat-1.3.h index 3c0f15118..d2c261234 100644 --- a/include/mbedtls/compat-1.3.h +++ b/include/mbedtls/compat-1.3.h @@ -159,18 +159,9 @@ #if defined MBEDTLS_ECP_DP_BP512R1_ENABLED #define POLARSSL_ECP_DP_BP512R1_ENABLED MBEDTLS_ECP_DP_BP512R1_ENABLED #endif -#if defined MBEDTLS_ECP_DP_M221_ENABLED -#define POLARSSL_ECP_DP_M221_ENABLED MBEDTLS_ECP_DP_M221_ENABLED -#endif #if defined MBEDTLS_ECP_DP_M255_ENABLED #define POLARSSL_ECP_DP_M255_ENABLED MBEDTLS_ECP_DP_M255_ENABLED #endif -#if defined MBEDTLS_ECP_DP_M383_ENABLED -#define POLARSSL_ECP_DP_M383_ENABLED MBEDTLS_ECP_DP_M383_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_M511_ENABLED -#define POLARSSL_ECP_DP_M511_ENABLED MBEDTLS_ECP_DP_M511_ENABLED -#endif #if defined MBEDTLS_ECP_DP_SECP192K1_ENABLED #define POLARSSL_ECP_DP_SECP192K1_ENABLED MBEDTLS_ECP_DP_SECP192K1_ENABLED #endif @@ -1051,10 +1042,7 @@ #define POLARSSL_ECP_DP_BP256R1 MBEDTLS_ECP_DP_BP256R1 #define POLARSSL_ECP_DP_BP384R1 MBEDTLS_ECP_DP_BP384R1 #define POLARSSL_ECP_DP_BP512R1 MBEDTLS_ECP_DP_BP512R1 -#define POLARSSL_ECP_DP_M221 MBEDTLS_ECP_DP_M221 #define POLARSSL_ECP_DP_M255 MBEDTLS_ECP_DP_M255 -#define POLARSSL_ECP_DP_M383 MBEDTLS_ECP_DP_M383 -#define POLARSSL_ECP_DP_M511 MBEDTLS_ECP_DP_M511 #define POLARSSL_ECP_DP_MAX MBEDTLS_ECP_DP_MAX #define POLARSSL_ECP_DP_NONE MBEDTLS_ECP_DP_NONE #define POLARSSL_ECP_DP_SECP192K1 MBEDTLS_ECP_DP_SECP192K1 diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 33b20c04b..6f346cedf 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -421,10 +421,7 @@ #define MBEDTLS_ECP_DP_BP256R1_ENABLED #define MBEDTLS_ECP_DP_BP384R1_ENABLED #define MBEDTLS_ECP_DP_BP512R1_ENABLED -//#define MBEDTLS_ECP_DP_M221_ENABLED // Not implemented yet! #define MBEDTLS_ECP_DP_M255_ENABLED -//#define MBEDTLS_ECP_DP_M383_ENABLED // Not implemented yet! -//#define MBEDTLS_ECP_DP_M511_ENABLED // Not implemented yet! /** * \def MBEDTLS_ECP_NIST_OPTIM diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index bac1bd007..f24558d23 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -62,10 +62,7 @@ typedef enum MBEDTLS_ECP_DP_BP256R1, /*!< 256-bits Brainpool curve */ MBEDTLS_ECP_DP_BP384R1, /*!< 384-bits Brainpool curve */ MBEDTLS_ECP_DP_BP512R1, /*!< 512-bits Brainpool curve */ - MBEDTLS_ECP_DP_M221, /*!< (not implemented yet) */ MBEDTLS_ECP_DP_M255, /*!< Curve25519 */ - MBEDTLS_ECP_DP_M383, /*!< (not implemented yet) */ - MBEDTLS_ECP_DP_M511, /*!< (not implemented yet) */ MBEDTLS_ECP_DP_SECP192K1, /*!< 192-bits "Koblitz" curve */ MBEDTLS_ECP_DP_SECP224K1, /*!< 224-bits "Koblitz" curve */ MBEDTLS_ECP_DP_SECP256K1, /*!< 256-bits "Koblitz" curve */ diff --git a/library/ecp.c b/library/ecp.c index a80274722..8703be0e4 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -98,10 +98,7 @@ static unsigned long add_count, dbl_count, mul_count; #define ECP_SHORTWEIERSTRASS #endif -#if defined(MBEDTLS_ECP_DP_M221_ENABLED) || \ - defined(MBEDTLS_ECP_DP_M255_ENABLED) || \ - defined(MBEDTLS_ECP_DP_M383_ENABLED) || \ - defined(MBEDTLS_ECP_DP_M511_ENABLED) +#if defined(MBEDTLS_ECP_DP_M255_ENABLED) #define ECP_MONTGOMERY #endif diff --git a/library/version_features.c b/library/version_features.c index 47d93fd71..20586fd1a 100644 --- a/library/version_features.c +++ b/library/version_features.c @@ -226,18 +226,9 @@ static const char *features[] = { #if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) "MBEDTLS_ECP_DP_BP512R1_ENABLED", #endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_M221_ENABLED) - "MBEDTLS_ECP_DP_M221_ENABLED", -#endif /* MBEDTLS_ECP_DP_M221_ENABLED */ #if defined(MBEDTLS_ECP_DP_M255_ENABLED) "MBEDTLS_ECP_DP_M255_ENABLED", #endif /* MBEDTLS_ECP_DP_M255_ENABLED */ -#if defined(MBEDTLS_ECP_DP_M383_ENABLED) - "MBEDTLS_ECP_DP_M383_ENABLED", -#endif /* MBEDTLS_ECP_DP_M383_ENABLED */ -#if defined(MBEDTLS_ECP_DP_M511_ENABLED) - "MBEDTLS_ECP_DP_M511_ENABLED", -#endif /* MBEDTLS_ECP_DP_M511_ENABLED */ #if defined(MBEDTLS_ECP_NIST_OPTIM) "MBEDTLS_ECP_NIST_OPTIM", #endif /* MBEDTLS_ECP_NIST_OPTIM */ diff --git a/scripts/data_files/rename-1.3-2.0.txt b/scripts/data_files/rename-1.3-2.0.txt index d0820b0ec..59dda2054 100644 --- a/scripts/data_files/rename-1.3-2.0.txt +++ b/scripts/data_files/rename-1.3-2.0.txt @@ -421,14 +421,8 @@ POLARSSL_ECP_DP_BP384R1 MBEDTLS_ECP_DP_BP384R1 POLARSSL_ECP_DP_BP384R1_ENABLED MBEDTLS_ECP_DP_BP384R1_ENABLED POLARSSL_ECP_DP_BP512R1 MBEDTLS_ECP_DP_BP512R1 POLARSSL_ECP_DP_BP512R1_ENABLED MBEDTLS_ECP_DP_BP512R1_ENABLED -POLARSSL_ECP_DP_M221 MBEDTLS_ECP_DP_M221 -POLARSSL_ECP_DP_M221_ENABLED MBEDTLS_ECP_DP_M221_ENABLED POLARSSL_ECP_DP_M255 MBEDTLS_ECP_DP_M255 POLARSSL_ECP_DP_M255_ENABLED MBEDTLS_ECP_DP_M255_ENABLED -POLARSSL_ECP_DP_M383 MBEDTLS_ECP_DP_M383 -POLARSSL_ECP_DP_M383_ENABLED MBEDTLS_ECP_DP_M383_ENABLED -POLARSSL_ECP_DP_M511 MBEDTLS_ECP_DP_M511 -POLARSSL_ECP_DP_M511_ENABLED MBEDTLS_ECP_DP_M511_ENABLED POLARSSL_ECP_DP_MAX MBEDTLS_ECP_DP_MAX POLARSSL_ECP_DP_NONE MBEDTLS_ECP_DP_NONE POLARSSL_ECP_DP_SECP192K1 MBEDTLS_ECP_DP_SECP192K1