Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Typedefs
Entropy Generation

Data Structures

struct  psa_drv_entropy_t
 A struct containing all of the function pointers needed to interface to an entropy source. More...
 

Typedefs

typedef psa_status_t(* psa_drv_entropy_init_t) (void *p_context)
 Initialize an entropy driver. More...
 
typedef psa_status_t(* psa_drv_entropy_get_bits_t) (void *p_context, uint8_t *p_buffer, uint32_t buffer_size, uint32_t *p_received_entropy_bits)
 Get a specified number of bits from the entropy source. More...
 

Detailed Description

Typedef Documentation

typedef psa_status_t(* psa_drv_entropy_get_bits_t) (void *p_context, uint8_t *p_buffer, uint32_t buffer_size, uint32_t *p_received_entropy_bits)

Get a specified number of bits from the entropy source.

It retrives buffer_size bytes of data from the entropy source. The entropy source will always fill the provided buffer to its full size, however, most entropy sources have biases, and the actual amount of entropy contained in the buffer will be less than the number of bytes. The driver will return the actual number of bytes of entropy placed in the buffer in p_received_entropy_bytes. A PSA Crypto API implementation will likely feed the output of this function into a Digital Random Bit Generator (DRBG), and typically has a minimum amount of entropy that it needs. To accomplish this, the PSA Crypto implementation should be designed to call this function multiple times until it has received the required amount of entropy from the entropy source.

Parameters
[in,out]p_contextA hardware-specific structure containing any context information for the implementation
[out]p_bufferA caller-allocated buffer for the retrieved entropy to be placed in
[in]buffer_sizeThe allocated size of p_buffer
[out]p_received_entropy_bitsThe amount of entropy (in bits) actually provided in p_buffer
Return values
PSA_SUCCESS

Definition at line 80 of file crypto_entropy_driver.h.

typedef psa_status_t(* psa_drv_entropy_init_t) (void *p_context)

Initialize an entropy driver.

Parameters
[in,out]p_contextA hardware-specific structure containing any context information for the implementation
Return values
PSA_SUCCESS

Definition at line 52 of file crypto_entropy_driver.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.