use single define for 128bit key for ctr_drbg and update test dependencies

the change is designed to make configuring 128bit keys for ctr_drbg more similar to other configuration options. Tests have been updated accordingly.
also clarified test naming.
This commit is contained in:
Nir Sonnenschein 2018-08-29 10:11:46 +03:00
parent aecf8c941a
commit ce266e4ca2
3 changed files with 291 additions and 61 deletions

View file

@ -2018,7 +2018,9 @@
/**
* \def MBEDTLS_CTR_DRBG_C
*
* Enable the CTR_DRBG AES-256-based(default) or AES-128-based random generator.
* Enable the CTR_DRBG AES-based random generator.
* The CTR_DRBG generator uses AES-256 by default.
* To use AES-128 instead, enable MBEDTLS_CTR_DRBG_USE_128_BIT_KEY below.
*
* Module: library/ctr_drbg.c
* Caller:
@ -2029,16 +2031,6 @@
*/
#define MBEDTLS_CTR_DRBG_C
/**
* configure key size for ctr DRBG , either
* MBEDTLS_CTR_DRBG_KEYSIZE_256 (default)
* or
* MBEDTLS_CTR_DRBG_KEYSIZE_128
* must be set.
*/
#if !defined(MBEDTLS_CTR_DRBG_KEY_SIZE_128)
#define MBEDTLS_CTR_DRBG_KEY_SIZE_256 1
#endif
/**
* \def MBEDTLS_DEBUG_C
*
@ -2920,6 +2912,7 @@
//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
//#define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY /**< Use 128-bit key for CTR_DRBG - may reduce security (see ctr_drbg.h) */
/* HMAC_DRBG options */
//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */