Visible to Intel only — GUID: GUID-2A5F4F8C-8780-4981-B0C4-A8E4CD02B05C
Visible to Intel only — GUID: GUID-2A5F4F8C-8780-4981-B0C4-A8E4CD02B05C
Pseudorandom Number Generation Functions
Many cryptographic systems rely on pseudorandom number generation functions in their design that make the unpredictable nature inherited from a pseudorandom number generator the security foundation to ensure safe communication over open channels and protection against potential adversaries.
This section describes functions that make the pseudorandom bit sequence generator implemented by a US FIPS-approved method and based on a SHA-1 one-way hash function specified by [FIPS PUB 186-2], appendix 3.
The application code for generating a sequence of pseudorandom bits should perform the following sequence of operations:
- Call the function PRNGGetSize to get the size required to configure the IppsPRNGState context.
- Ensure that the required memory space is properly allocated. With the allocated memory, call the PRNGInit function to set up the default value of the parameters for pseudorandom generation process.
- If the default values of the parameters are not satisfied, call the function PRNGSetSeed and/or PRNGSetAugment and/or PRNGSetModulus and/or PRNGSetH0 to reset any of the control pseudorandom generator parameters.
- Keep calling the function PRNGen or PRNGen_BN to generate pseudo random value of the desired format.
- Clean up secret data stored in the context.
- Free the memory allocated for the IppsPRNGState context by calling the operating system memory free service function.
- User's Implementation of a Pseudorandom Number Generator
- PRNGGetSize
Gets the size of the IppsPRNGState context in bytes. - PRNGInit
Initializes user-supplied memory as IppsPRNGState context for future use. - PRNGSetSeed
Sets up the seed value for the pseudorandom number generator. - PRNGGetSeed
Extracts the seed value of the pseudorandom number generator from the context structure. - PRNGSetAugment
Sets the initial state with the given input entropy for the pseudorandom number generation. - PRNGSetModulus
Sets the initial state with the given input modulus for the pseudorandom number generation. - PRNGSetH0
Sets the initial state with the given input IV for the SHA-1 algorithm. - PRNGen
Generates a pseudorandom unsigned Big Number of the specified bit length. - PRNGenRDRAND
Generates a pseudorandom unsigned Big Number of the specified bit length using the RDRAND instruction. - TRNGenRDSEED
Generates a true random unsigned Big Number of the specified bit length using the RDSEED instruction. - PRNGen_BN
Generates a pseudorandom positive Big Number of the specified bitlength. - PRNGenRDRAND_BN
Generates a pseudorandom positive Big Number of the specified bit length using the RDRAND instruction. - TRNGenRDSEED_BN
Generates a true random positive Big Number of the specified bit length using the RDSEED instruction. - Example of Using Pseudorandom Number Generation Functions
See Also
Did you find the information on this page useful?
Feedback Message
Characters remaining: