ECDH alternative implementation support

Add alternative implementation support for ECDH at the higher layer
This commit is contained in:
Ron Eldor 2017-06-18 17:57:51 +03:00
parent 45d269555b
commit 433f39c437
4 changed files with 10 additions and 1 deletions

View File

@ -36,6 +36,10 @@ Changes
* Clarify ECDSA documentation and improve the sample code to avoid
misunderstandings and potentially dangerous use of the API. Pointed out
by Jean-Philippe Aumasson.
* Add support for alternative implementation for ECDH, controlled by new
configuration flag MBEDTLS_ECDH_ALT in config.h.
Alternative Ecdh is supported for implementation of `mbedtls_ecdh_gen_public`
and `mbedtls_ecdh_compute_shared`.
= mbed TLS 2.5.0 branch released 2017-05-17

View File

@ -238,6 +238,7 @@
//#define MBEDTLS_BLOWFISH_ALT
//#define MBEDTLS_CAMELLIA_ALT
//#define MBEDTLS_DES_ALT
//#define MBEDTLS_ECDH_ALT
//#define MBEDTLS_XTEA_ALT
//#define MBEDTLS_MD2_ALT
//#define MBEDTLS_MD4_ALT

View File

@ -38,6 +38,7 @@
#include <string.h>
#if !defined(MBEDTLS_ECDH_ALT)
/*
* Generate public key: simple wrapper around mbedtls_ecp_gen_keypair
*/
@ -81,7 +82,7 @@ cleanup:
return( ret );
}
#endif /* MBEDTLS_ECDH_ALT */
/*
* Initialize context
*/

View File

@ -93,6 +93,9 @@ static const char *features[] = {
#if defined(MBEDTLS_DES_ALT)
"MBEDTLS_DES_ALT",
#endif /* MBEDTLS_DES_ALT */
#if defined(MBEDTLS_ECDH_ALT)
"MBEDTLS_ECDH_ALT",
#endif /* MBEDTLS_ECDH_ALT */
#if defined(MBEDTLS_XTEA_ALT)
"MBEDTLS_XTEA_ALT",
#endif /* MBEDTLS_XTEA_ALT */