Software implementation of the phCryptoRng interface.
More...
Software implementation of the phCryptoRng interface.
The following standard is implemented:
- NIST Special Publication 800-90: CTR_DRBG
Architecture overview of the phCryptoRng_Sw Component
- The AES 128 implementation of the phCryptoSym component is used to generate random numbers.
- This phCryptoSym instance has to be properly instantiated before generation of random numbers is possible.
- The phCryptoRng_Sw_Int block implements all functions required by the NIST standard.
- According to the state of the library component, the seed function choses whether to use #phCryptoRng_Sw_Instantiate or #phCryptoRng_Sw_Reseed.
- #phCryptoRng_Sw_Update is automatically called when random numbers are generated in order to be ready for retrieving the next chunk of random bytes.
- #phCryptoRng_Sw_BlockCipherDf is used to derive the key and V-value for a given seed.
§ PH_CRYPTORNG_SW_ID
#define PH_CRYPTORNG_SW_ID 0x01 |
ID for Software crypto rng component.
§ phCryptoRng_Sw_Init()
Initialise the CryptoRnd component.
For seeding, the following considerations have to be taken:
- Take a seed of at 32 bytes, which consists of
- entropy input
- nonce
- personalization string.
- Returns
- Status code
- Return values
-
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlaying component. |
- Parameters
-
[in] | pDataParams | Pointer to this layers parameter structure. |
[in] | wSizeOfDataParams | Specifies the size of the data parameter structure. |
[in] | pCryptoDataParams | Pointer to the parameter structure of the symmetric crypto layer. |