Address Andres PR comments

Address Andres' comments in the PR
This commit is contained in:
Ron Eldor 2017-09-24 15:41:09 +03:00
parent 7268ca9500
commit 2981a0a740
2 changed files with 6 additions and 2 deletions

View file

@ -38,8 +38,9 @@ Changes
by Jean-Philippe Aumasson. by Jean-Philippe Aumasson.
* Add support for alternative implementation for ECDSA, controlled by new * Add support for alternative implementation for ECDSA, controlled by new
configuration flag MBEDTLS_ECDSA_ALT in config.h. configuration flag MBEDTLS_ECDSA_ALT in config.h.
Alternative Ecdsa is supported for implementation of `mbedtls_ecdsa_sign` The following functions from the ECDSA module can be replaced
and `mbedtls_ecdsa_verify`. with an alternative implementation:
mbedtls_ecdsa_sign(), mbedtls_ecdsa_verify() and mbedtls_ecdsa_genkey().
= mbed TLS 2.5.0 branch released 2017-05-17 = mbed TLS 2.5.0 branch released 2017-05-17

View file

@ -37,9 +37,11 @@
#include "mbedtls/asn1write.h" #include "mbedtls/asn1write.h"
#include <string.h> #include <string.h>
#if defined(MBEDTLS_ECDSA_DETERMINISTIC) #if defined(MBEDTLS_ECDSA_DETERMINISTIC)
#include "mbedtls/hmac_drbg.h" #include "mbedtls/hmac_drbg.h"
#endif #endif
/* /*
* Derive a suitable integer for group grp from a buffer of length len * Derive a suitable integer for group grp from a buffer of length len
* SEC1 4.1.3 step 5 aka SEC1 4.1.4 step 3 * SEC1 4.1.3 step 5 aka SEC1 4.1.4 step 3
@ -314,6 +316,7 @@ static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s,
return( 0 ); return( 0 );
} }
/* /*
* Compute and write signature * Compute and write signature
*/ */