mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-31 18:32:57 +00:00
Update some internal comments
The refactoring of fill_random had left some obsolete bits in comments. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
dd54324765
commit
22cdd0ccd3
@ -1933,10 +1933,9 @@ cleanup:
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Fill X with size bytes of random.
|
* Fill X with size bytes of random.
|
||||||
*
|
* The bytes returned from the RNG are used in a specific order which
|
||||||
* Use a temporary bytes representation to make sure the result is the same
|
* is suitable for deterministic ECDSA (see the specification of
|
||||||
* regardless of the platform endianness (useful when f_rng is actually
|
* mbedtls_mpi_random() and the implementation in mbedtls_mpi_fill_random()).
|
||||||
* deterministic, eg for tests).
|
|
||||||
*/
|
*/
|
||||||
int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size,
|
int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size,
|
||||||
int (*f_rng)(void *, unsigned char *, size_t),
|
int (*f_rng)(void *, unsigned char *, size_t),
|
||||||
|
@ -557,9 +557,8 @@ void mbedtls_mpi_core_ct_uint_table_lookup( mbedtls_mpi_uint *dest,
|
|||||||
/* Fill X with n_bytes random bytes.
|
/* Fill X with n_bytes random bytes.
|
||||||
* X must already have room for those bytes.
|
* X must already have room for those bytes.
|
||||||
* The ordering of the bytes returned from the RNG is suitable for
|
* The ordering of the bytes returned from the RNG is suitable for
|
||||||
* deterministic ECDSA (see RFC 6979 §3.3 and mbedtls_mpi_core_random()).
|
* deterministic ECDSA (see RFC 6979 §3.3 and the specification of
|
||||||
* The size and sign of X are unchanged.
|
* mbedtls_mpi_core_random()).
|
||||||
* n_bytes must not be 0.
|
|
||||||
*/
|
*/
|
||||||
int mbedtls_mpi_core_fill_random(
|
int mbedtls_mpi_core_fill_random(
|
||||||
mbedtls_mpi_uint *X, size_t X_limbs,
|
mbedtls_mpi_uint *X, size_t X_limbs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user