Home GnuPG

Add support for using DRNG random number generator
efd7002188e6Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add support for using DRNG random number generator

* configure.ac: Add option --disable-drng-support.
(ENABLE_DRNG_SUPPORT): New.
* random/rndhw.c (USE_DRNG): New.
(rdrand_long, rdrand_nlong, poll_drng): New.
(_gcry_rndhw_poll_fast, _gcry_rndhw_poll_slow): Call poll function.
* src/g10lib.h (HWF_INTEL_RDRAND): New.
* src/global.c (hwflist): Add "intel-rdrand".
* src/hwfeatures.c (detect_x86_64_gnuc) [ENABLE_DRNG_SUPPORT]: Detect
RDRAND.
(detect_ia32_gnuc) [ENABLE_DRNG_SUPPORT]: Detect RDRAND.

This patch provides support for using Digital Random Number Generator (DRNG)
engine, which is available on the latest Intel's CPUs. DRNG engine is
accesible via new the RDRAND instruction.

This patch adds the following:

  • support for disabling using of rdrand instruction
  • checking for RDRAND instruction support using cpuid
  • RDRAND usage implementation

ChangeLog and editorial changes by wk.

  • Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>

Details

Provenance
Dmitry Kasatkin <dmitry.kasatkin@intel.com>Authored on Dec 18 2012, 1:56 PM
wernerCommitted on Dec 18 2012, 7:33 PM
Parents
rCbfe4dc11bb82: doc: Add Dmitry to AUTHORS
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rCefd7002188e6: Add support for using DRNG random number generator (authored by Dmitry Kasatkin <dmitry.kasatkin@intel.com>).Dec 18 2012, 7:33 PM