Fix RNG issue with Intel RD and cleanup to remove old ARC4 support#805
Conversation
|
rdseed should not be used as PRNG, it should only be used to seed an PRNG. Was rdseed tested? |
|
The RDSEED is only used to seed the PRNG. RDRAND can be used with --enable-intelrand as the RNG source with DRBG as backup. I tested RDSEED on the SGX machine and it is used with --enable-intelasm. Also tested with --enable-intelrand and the RDSEED was not used, but RDRAND was used. |
|
This still needs a little work.
|
|
@toddouska : Thanks of the review.
|
…ed because HAVE_HASHDRBG was always being defined if !WOLFSSL_FORCE_RC4_DRBG. Added new --enable-intelrand option to indicate use of RDRAND preference for RNG source (if RDRAND not supported by CPU then HASHDRBG will be used). The --enable-intelasm option enables the RDSEED support for seeding HASHDRBG if CPU supports it. Allow use of seed as RNG source if --disable-hashdbrg (shows build warning). Cleanup to remove old ARC4 RNG support. Fixed random_test return code with !HAVE_HASHDRBG. Cleanup of ./configure --help alignment.
…figure --disable-hashdrbg or WC_NO_HASHDRBG defined. Fix use of warning with VS. Fix to only use rng seed as source if no DRBG.
…K is defined. Added support for CUSTOM_RAND_GENERATE_BLOCK with Intel RDRAND.
… backup RNG source. Fixed building on embedded system with time_t not defined (test.c should use long for asn_test).
Fix RNG issue with Intel RDRAND and RDSEED accelerations not being used because HAVE_HASHDRBG was always being defined if !WOLFSSL_FORCE_RC4_DRBG. Added new --enable-intelrand option to indicate use of RDRAND preference for RNG source (if RDRAND not supported by CPU then HASHDRBG will be used). The --enable-intelasm option enables the RDSEED support for seeding HASHDRBG if CPU supports it. Allow use of seed as RNG source if --disable-hashdbrg (shows build warning). Cleanup to remove old ARC4 RNG support. Fixed random_test return code with !HAVE_HASHDRBG. Cleanup of ./configure --help alignment.