MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClCss_Rng.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2021 NXP */
3 /* */
4 /* NXP Confidential. This software is owned or controlled by NXP and may */
5 /* only be used strictly in accordance with the applicable license terms. */
6 /* By expressly accepting such terms or by downloading, installing, */
7 /* activating and/or otherwise using the software, you are agreeing that */
8 /* you have read, and that you agree to comply with and are bound by, such */
9 /* license terms. If you do not agree to be bound by the applicable license */
10 /* terms, then you may not retain, install, activate or otherwise use the */
11 /* software. */
12 /*--------------------------------------------------------------------------*/
13 
20 #ifndef MCUXCLCSS_RNG_H_
21 #define MCUXCLCSS_RNG_H_
22 
23 #include <mcuxClCss_Common.h> // Common functionality
24 
25 
34 /**********************************************
35  * CONSTANTS
36  **********************************************/
43 #define MCUXCLCSS_RNG_DTRNG_CONFIG_SIZE ((uint8_t) 84)
44 #define MCUXCLCSS_RNG_DTRNG_EVAL_CONFIG_SIZE ((uint8_t) 52)
45 #define MCUXCLCSS_RNG_DTRNG_EVAL_RESULT_SIZE ((uint8_t) 188)
46 
47 #define MCUXCLCSS_RNG_DRBG_TEST_EXTRACT_OUTPUT_MIN_SIZE 4U
48 #define MCUXCLCSS_RNG_DRBG_TEST_EXTRACT_OUTPUT_MAX_SIZE ((uint32_t) 1U << 16U)
49 
54 /**********************************************
55  * FUNCTIONS
56  **********************************************/
57 
103  uint8_t * pOutput,
104  size_t outputLength
105  );
106 
107 
129  uint8_t const * pEntropy
130  );
131 
165  uint8_t * pOutput,
166  size_t outputLength
167  );
168 
192  uint8_t const * pDataKey,
193  uint8_t * pOutput
194  );
195 
221  uint8_t const * pData,
222  size_t dataLength,
223  uint8_t const * pIvKey,
224  uint8_t * pOutput
225  );
226 
259  uint8_t const * pInput
260  );
261 
294  uint8_t const * pInput,
295  uint8_t * pOutput
296  );
297 
298 
318  uint32_t * pWord
319  );
320 
341  uint8_t * pOutput,
342  size_t outputLength
343  );
344  /* mcuxClCss_Rng_Functions */
348 
349  /* mcuxClCss_Rng */
353 
354 #endif /* MCUXCLCSS_RNG_H_ */
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Prng_GetRandomWord(uint32_t *pWord)
Returns one random word from the CSS PRNG.
#define MCUXCLCSS_API
Marks a function as a public API function of the mcuxClCss component.
Definition: mcuxClCss_Common.h:40
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Rng_Dtrng_ConfigEvaluate_Async(uint8_t const *pInput, uint8_t *pOutput)
Performs characterization of the CSS DTRNG.
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Rng_DrbgTestInstantiate_Async(uint8_t const *pEntropy)
Instantiates the DRBG in test mode.
CSSv2 header for common functionality.
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Rng_DrbgTestAesEcb_Async(uint8_t const *pDataKey, uint8_t *pOutput)
Encrypts data using the AES-ECB engine of the DRBG.
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Rng_Dtrng_ConfigLoad_Async(uint8_t const *pInput)
Loads a configuration of the CSS DTRNG.
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Rng_DrbgTestExtract_Async(uint8_t *pOutput, size_t outputLength)
Performs a DRBG extraction.
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Rng_DrbgRequest_Async(uint8_t *pOutput, size_t outputLength)
Writes random data from the CSS DRBG to the given buffer.
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Rng_DrbgTestAesCtr_Async(uint8_t const *pData, size_t dataLength, uint8_t const *pIvKey, uint8_t *pOutput)
Encrypts data using the AES-CTR engine of the DRBG.
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Prng_GetRandom(uint8_t *pOutput, size_t outputLength)
Writes random data from the CSS PRNG to the given buffer.
#define MCUX_CSSL_FP_FUNCTION_DECL(id)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:119
uint64_t mcuxClCss_Status_Protected_t
Type for CSS driver protected status codes.
Definition: mcuxClCss_Types.h:183