CTR_DRBG: more consistent formatting and wording

In particular, don't use #MBEDTLS_xxx on macros that are undefined in
some configurations, since this would be typeset with a literal '#'.
This commit is contained in:
Gilles Peskine 2019-10-03 14:28:17 +02:00
parent b9cfe58180
commit f0b3dcb14b

View file

@ -21,11 +21,11 @@
* nonce (see mbedtls_ctr_drbg_seed()). * nonce (see mbedtls_ctr_drbg_seed()).
* *
* Note that the value of #MBEDTLS_CTR_DRBG_ENTROPY_LEN defaults to: * Note that the value of #MBEDTLS_CTR_DRBG_ENTROPY_LEN defaults to:
* - \c 48 if the module #MBEDTLS_SHA512_C is enabled and the symbol * - \c 48 if the module \c MBEDTLS_SHA512_C is enabled and the symbol
* #MBEDTLS_ENTROPY_FORCE_SHA256 is not enabled at compile time. * \c MBEDTLS_ENTROPY_FORCE_SHA256 is not enabled at compile time.
* This is the default configuration of the library. * This is the default configuration of the library.
* - \c 32 if the module #MBEDTLS_SHA512_C is disabled at compile time. * - \c 32 if the module \c MBEDTLS_SHA512_C is disabled at compile time.
* - \c 32 if #MBEDTLS_ENTROPY_FORCE_SHA256 is enabled at compile time. * - \c 32 if \c MBEDTLS_ENTROPY_FORCE_SHA256 is enabled at compile time.
*/ */
/* /*
* Copyright (C) 2006-2019, Arm Limited (or its affiliates), All Rights Reserved * Copyright (C) 2006-2019, Arm Limited (or its affiliates), All Rights Reserved
@ -85,7 +85,7 @@
/** The amount of entropy used per seed by default. /** The amount of entropy used per seed by default.
* *
* This is 48 bytes because the entropy module uses SHA-512 * This is 48 bytes because the entropy module uses SHA-512
* (#MBEDTLS_ENTROPY_FORCE_SHA256 is not set). * (\c MBEDTLS_ENTROPY_FORCE_SHA256 is not set).
* *
* \note See mbedtls_ctr_drbg_set_entropy_len() regarding what values are * \note See mbedtls_ctr_drbg_set_entropy_len() regarding what values are
* acceptable. * acceptable.
@ -95,7 +95,8 @@
/** The amount of entropy used per seed by default. /** The amount of entropy used per seed by default.
* *
* This is 32 bytes because the entropy module uses SHA-256 * This is 32 bytes because the entropy module uses SHA-256
* (the SHA512 module is disabled or #MBEDTLS_ENTROPY_FORCE_SHA256 is set). * (the SHA512 module is disabled or
* \c MBEDTLS_ENTROPY_FORCE_SHA256 is enabled).
* *
* \note See mbedtls_ctr_drbg_set_entropy_len() regarding what values are * \note See mbedtls_ctr_drbg_set_entropy_len() regarding what values are
* acceptable. * acceptable.