mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-26 21:39:56 +00:00
ECDH alternative implementation support
Add alternative implementation support for ECDH at the higher layer
This commit is contained in:
parent
45d269555b
commit
433f39c437
@ -36,6 +36,10 @@ Changes
|
|||||||
* Clarify ECDSA documentation and improve the sample code to avoid
|
* Clarify ECDSA documentation and improve the sample code to avoid
|
||||||
misunderstandings and potentially dangerous use of the API. Pointed out
|
misunderstandings and potentially dangerous use of the API. Pointed out
|
||||||
by Jean-Philippe Aumasson.
|
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
|
= mbed TLS 2.5.0 branch released 2017-05-17
|
||||||
|
|
||||||
|
@ -238,6 +238,7 @@
|
|||||||
//#define MBEDTLS_BLOWFISH_ALT
|
//#define MBEDTLS_BLOWFISH_ALT
|
||||||
//#define MBEDTLS_CAMELLIA_ALT
|
//#define MBEDTLS_CAMELLIA_ALT
|
||||||
//#define MBEDTLS_DES_ALT
|
//#define MBEDTLS_DES_ALT
|
||||||
|
//#define MBEDTLS_ECDH_ALT
|
||||||
//#define MBEDTLS_XTEA_ALT
|
//#define MBEDTLS_XTEA_ALT
|
||||||
//#define MBEDTLS_MD2_ALT
|
//#define MBEDTLS_MD2_ALT
|
||||||
//#define MBEDTLS_MD4_ALT
|
//#define MBEDTLS_MD4_ALT
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_ECDH_ALT)
|
||||||
/*
|
/*
|
||||||
* Generate public key: simple wrapper around mbedtls_ecp_gen_keypair
|
* Generate public key: simple wrapper around mbedtls_ecp_gen_keypair
|
||||||
*/
|
*/
|
||||||
@ -81,7 +82,7 @@ cleanup:
|
|||||||
|
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
#endif /* MBEDTLS_ECDH_ALT */
|
||||||
/*
|
/*
|
||||||
* Initialize context
|
* Initialize context
|
||||||
*/
|
*/
|
||||||
|
@ -93,6 +93,9 @@ static const char *features[] = {
|
|||||||
#if defined(MBEDTLS_DES_ALT)
|
#if defined(MBEDTLS_DES_ALT)
|
||||||
"MBEDTLS_DES_ALT",
|
"MBEDTLS_DES_ALT",
|
||||||
#endif /* MBEDTLS_DES_ALT */
|
#endif /* MBEDTLS_DES_ALT */
|
||||||
|
#if defined(MBEDTLS_ECDH_ALT)
|
||||||
|
"MBEDTLS_ECDH_ALT",
|
||||||
|
#endif /* MBEDTLS_ECDH_ALT */
|
||||||
#if defined(MBEDTLS_XTEA_ALT)
|
#if defined(MBEDTLS_XTEA_ALT)
|
||||||
"MBEDTLS_XTEA_ALT",
|
"MBEDTLS_XTEA_ALT",
|
||||||
#endif /* MBEDTLS_XTEA_ALT */
|
#endif /* MBEDTLS_XTEA_ALT */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user