Update comments

pull/696/head
Jeffrey Walton 2018-08-03 05:08:21 -04:00
parent 1bd18dd5ba
commit eca0458d03
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 9 additions and 6 deletions

View File

@ -7,16 +7,19 @@
#include "rdrand.h" #include "rdrand.h"
#include "cpu.h" #include "cpu.h"
// This file (and friends) provides both RDRAND and RDSEED. They were added at // This file (and friends) provides both RDRAND and RDSEED. They were added
// Crypto++ 5.6.3. At compile time, it uses CRYPTOPP_BOOL_{X86|X32|X64} // at Crypto++ 5.6.3. At compile time, it uses CRYPTOPP_BOOL_{X86|X32|X64}
// to select an implementation or "throw NotImplemented". The class does not // to select an implementation or throws "NotImplemented". Users of the
// determine if RDRAND or RDSEED are available at runtime. If not available, // classes should call HasRDRAND() or HasRDSEED() to determine if a
// then a SIGILL will result. Users of the classes should call HasRDRAND() // generator is available at runtime.
// or HasRDSEED() to determine if a generator is available.
// The original classes accepted a retry count. Retries were superflous for // The original classes accepted a retry count. Retries were superflous for
// RDRAND, and RDSEED encountered a failure about 1 in 256 bytes depending // RDRAND, and RDSEED encountered a failure about 1 in 256 bytes depending
// on the processor. Retries were removed at Crypto++ 6.0 because // on the processor. Retries were removed at Crypto++ 6.0 because
// GenerateBlock unconditionally retries and always fulfills the request. // GenerateBlock unconditionally retries and always fulfills the request.
// Intel recommends using a retry count in case RDRAND or RDSEED circuit
// is bad. This implemenation does not follow the advice and requires
// good silicon. If the circuit or processor is bad then the user has
// bigger problems than generating random numbers.
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////