Closed justalittlenoob closed 1 year ago
According to Intel recommendation:
"The RDSEED instruction is intended for seeding a software PRNG of arbitrary width, whereas the RDRAND is intended for applications that merely require high-quality random numbers."
Is it more reasonable to use ippsPRNGenRDRand_BN() to generate random value if both the RDSEED and RDRAND exist.
According to Intel recommendation:
"The RDSEED instruction is intended for seeding a software PRNG of arbitrary width, whereas the RDRAND is intended for applications that merely require high-quality random numbers."
Is it more reasonable to use ippsPRNGenRDRand_BN() to generate random value if both the RDSEED and RDRAND exist.
I don't think so. The reasons are as follows:
ippsPRNGenRDRand_BN
generates a pseudo random positive Big Number, while TRNGenRDSEED_BN
generates a true random positive Big Number.This issue is fixed with PR #54
When a machine does NOT support
rdseed
andrdrand
instruction, IPP-Crypto S/W pseudo random number generatorippsPRNGen_BN
andippsPRNGen
will be used. There will be 2 issue.ippsPRNGen
will causegetDJNBN
orgetNormalBN
fall into an infinite loop, becausep
always equals toq
.ippsPRNGen_BN
will cause an error like below.(provided by @xhuan28)