Software implementation of the RND Generator.
More...
|
| phStatus_t | phCryptoRng_Sw_Update (phCryptoRng_Sw_DataParams_t *pDataParams, uint8_t *pProvidedData) |
| | Implements the update function according to NIST SP800-90 section 10.2.1.2. More...
|
| |
| phStatus_t | phCryptoRng_Sw_Instantiate (phCryptoRng_Sw_DataParams_t *pDataParams, uint8_t *pEntropyInput, uint16_t wEntropyInputLength, uint8_t *pNonce, uint8_t bNonceLength, uint8_t *pPersonalizationString, uint8_t bPersonalizationString) |
| | Implements the instantiate function according to NIST SP800-90 section 10.2.1.3.2 (using derivation function). More...
|
| |
| phStatus_t | phCryptoRng_Sw_Reseed (phCryptoRng_Sw_DataParams_t *pDataParams, uint8_t *pEntropyInput, uint16_t wEntropyInputLength, uint8_t *pAdditionalInput, uint8_t bAdditionalInputLength) |
| | Implements the reseed function according to section 10.2.1.4.2 (using derivation function). More...
|
| |
| phStatus_t | phCryptoRng_Sw_Generate (phCryptoRng_Sw_DataParams_t *pDataParams, uint8_t *pAdditionalInput, uint16_t wNumBytesRequested, uint8_t *pRndBytes) |
| | Implements the generate function according to section 10.2.1.5.2 (using derivation function). More...
|
| |
| phStatus_t | phCryptoRng_Sw_BlockCipherDf (phCryptoRng_Sw_DataParams_t *pDataParams, uint8_t *pIoString) |
| | Implements the BlockCipherDf according to NIST SP800-90 section 10.4.2. More...
|
| |
Software implementation of the RND Generator.
◆ phCryptoRng_Sw_Update()
Implements the update function according to NIST SP800-90 section 10.2.1.2.
Using provided data generated in one of phCryptoRng_Sw_Instantiate, phCryptoRng_Sw_Reseed and phCryptoRng_Sw_Generate function the values of pDataParams->V and the key loaded in the AES module are updated. Provided data can be null, if this is the case, no XOR is performed. This is not recommendet for use during Instantiate functionality!.
- Returns
- Status code
- Return values
-
- Parameters
-
◆ phCryptoRng_Sw_Instantiate()
Implements the instantiate function according to NIST SP800-90 section 10.2.1.3.2 (using derivation function).
Note: the length of all inputs together needs to be exactly PHCRYPTORNG_SW_SEEDLEN
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | pEntropyInput | [In] Entropy input of size bEntropyInputLength. |
| [in] | wEntropyInputLength | [In] Length of the entropy input. |
| [in] | pNonce | [In] Nonced as specified in Section 8.6.7. of NIST SP800-90. |
| [in] | bNonceLength | [In] Length of the nonce provided. |
| [in] | pPersonalizationString | [In] Personalization string of size bPersonalizationString. |
| [in] | bPersonalizationString | [In] Length of the Personalization string. |
◆ phCryptoRng_Sw_Reseed()
Implements the reseed function according to section 10.2.1.4.2 (using derivation function).
Note: the length of all inputs together needs to be exactly PHCRYPTORNG_SW_SEEDLEN
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | pEntropyInput | [In] Entropy input of size bEntropyInputLength. |
| [in] | wEntropyInputLength | [In] Length of the entropy input. |
| [in] | pAdditionalInput | [In] Additional Input. |
| [in] | bAdditionalInputLength | [In] Length of Additional Input provided. |
◆ phCryptoRng_Sw_Generate()
Implements the generate function according to section 10.2.1.5.2 (using derivation function).
Note: the length of the additional input needs to be exactly PHCRYPTORNG_SW_SEEDLEN. If an application does not support additional input, the pointer has to be set to NULL.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | pAdditionalInput | [In] Additional Input can be NULL). |
| [in] | wNumBytesRequested | [In] Amount of bytes requested. |
| [out] | pRndBytes | [Out] Random bytes generated. |
◆ phCryptoRng_Sw_BlockCipherDf()
Implements the BlockCipherDf according to NIST SP800-90 section 10.4.2.
Note: inside there are 10 encryptions performed. Although this takes quite some time, the implication on overall system performance is rather low as this function is only called at startup and during reseeding. Note: The input string needs to be exactly PHCRYPTORNG_SW_SEEDLEN bytes.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in,out] | pIoString | [InOut] pIoString of PHCRYPTORNG_SW_SEEDLEN bytes - contains input data and later output data. |