mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 21:35:48 +01:00
Rename psa_crypto_random.h to psa_crypto_random_impl.h
Make it clear that this is an abstraction of the random generator abstraction, and not an abstraction of the PSA random generator. mbedtls_psa_get_random and MBEDTLS_PSA_RANDOM_STATE are public-facing definitions and will be moved in a subsequent commit. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
8814fc4a34
commit
b2b64d3642
@ -40,7 +40,7 @@
|
|||||||
* stored keys. */
|
* stored keys. */
|
||||||
#include "psa_crypto_storage.h"
|
#include "psa_crypto_storage.h"
|
||||||
|
|
||||||
#include "psa_crypto_random.h"
|
#include "psa_crypto_random_impl.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -6415,7 +6415,7 @@ psa_status_t psa_generate_random( uint8_t *output,
|
|||||||
|
|
||||||
/* Wrapper function allowing the classic API to use the PSA RNG.
|
/* Wrapper function allowing the classic API to use the PSA RNG.
|
||||||
* In the non-external case, mbedtls_psa_get_random is defined
|
* In the non-external case, mbedtls_psa_get_random is defined
|
||||||
* as a constant function pointer in psa_crypto_random.h.
|
* as a constant function pointer in psa_crypto_random_impl.h.
|
||||||
*/
|
*/
|
||||||
#if defined (MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
#if defined (MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
||||||
int mbedtls_psa_get_random( void *p_rng,
|
int mbedtls_psa_get_random( void *p_rng,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** \file psa_crypto_random.h
|
/** \file psa_crypto_random_impl.h
|
||||||
*
|
*
|
||||||
* \brief PSA crypto random generator abstraction.
|
* \brief PSA crypto random generator implementation abstraction.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright The Mbed TLS Contributors
|
* Copyright The Mbed TLS Contributors
|
||||||
@ -19,8 +19,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PSA_CRYPTO_RANDOM_H
|
#ifndef PSA_CRYPTO_RANDOM_IMPL_H
|
||||||
#define PSA_CRYPTO_RANDOM_H
|
#define PSA_CRYPTO_RANDOM_IMPL_H
|
||||||
|
|
||||||
#if defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
#if defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
||||||
|
|
||||||
@ -205,4 +205,4 @@ static inline int mbedtls_psa_drbg_seed(
|
|||||||
|
|
||||||
#endif /* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG */
|
#endif /* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG */
|
||||||
|
|
||||||
#endif /* PSA_CRYPTO_RANDOM_H */
|
#endif /* PSA_CRYPTO_RANDOM_IMPL_H */
|
@ -11,7 +11,7 @@
|
|||||||
#define ENTROPY_MIN_NV_SEED_SIZE \
|
#define ENTROPY_MIN_NV_SEED_SIZE \
|
||||||
MAX(MBEDTLS_ENTROPY_MIN_PLATFORM, MBEDTLS_ENTROPY_BLOCK_SIZE)
|
MAX(MBEDTLS_ENTROPY_MIN_PLATFORM, MBEDTLS_ENTROPY_BLOCK_SIZE)
|
||||||
|
|
||||||
#include "psa_crypto_random.h"
|
#include "psa_crypto_random_impl.h"
|
||||||
#if defined(MBEDTLS_PSA_HMAC_DRBG_MD_TYPE)
|
#if defined(MBEDTLS_PSA_HMAC_DRBG_MD_TYPE)
|
||||||
/* PSA crypto uses the HMAC_DRBG module. It reads from the entropy source twice:
|
/* PSA crypto uses the HMAC_DRBG module. It reads from the entropy source twice:
|
||||||
* once for the initial entropy and once for a nonce. The nonce length is
|
* once for the initial entropy and once for a nonce. The nonce length is
|
||||||
|
@ -251,7 +251,7 @@
|
|||||||
<ClInclude Include="..\..\library\psa_crypto_driver_wrappers.h" />
|
<ClInclude Include="..\..\library\psa_crypto_driver_wrappers.h" />
|
||||||
<ClInclude Include="..\..\library\psa_crypto_invasive.h" />
|
<ClInclude Include="..\..\library\psa_crypto_invasive.h" />
|
||||||
<ClInclude Include="..\..\library\psa_crypto_its.h" />
|
<ClInclude Include="..\..\library\psa_crypto_its.h" />
|
||||||
<ClInclude Include="..\..\library\psa_crypto_random.h" />
|
<ClInclude Include="..\..\library\psa_crypto_random_impl.h" />
|
||||||
<ClInclude Include="..\..\library\psa_crypto_se.h" />
|
<ClInclude Include="..\..\library\psa_crypto_se.h" />
|
||||||
<ClInclude Include="..\..\library\psa_crypto_service_integration.h" />
|
<ClInclude Include="..\..\library\psa_crypto_service_integration.h" />
|
||||||
<ClInclude Include="..\..\library\psa_crypto_slot_management.h" />
|
<ClInclude Include="..\..\library\psa_crypto_slot_management.h" />
|
||||||
|
Loading…
Reference in New Issue
Block a user