From 604e60d915e3894db546bad2f543366162cacac2 Mon Sep 17 00:00:00 2001 From: Nir Sonnenschein Date: Mon, 30 Jul 2018 17:01:10 +0300 Subject: [PATCH] add default value for CTR DRBG key size --- include/mbedtls/config.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 70820be56..a79dff83e 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -2018,7 +2018,7 @@ /** * \def MBEDTLS_CTR_DRBG_C * - * Enable the CTR_DRBG AES-256-based random generator. + * Enable the CTR_DRBG AES-256-based(default) or AES-128-based random generator. * * Module: library/ctr_drbg.c * Caller: @@ -2029,6 +2029,16 @@ */ #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 *