summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>2012-12-18 14:56:48 +0200
committerWerner Koch <wk@gnupg.org>2012-12-18 19:33:04 +0100
commitefd7002188e6d50013e4d9a920a8b9afa9d210e5 (patch)
tree09adb14c6f19c50a45ae5c2fb3067c08435506d5 /src/global.c
parentbfe4dc11bb822cbc5bf2b425e5a5a2867a904518 (diff)
downloadlibgcrypt-efd7002188e6d50013e4d9a920a8b9afa9d210e5.tar.gz
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 Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> ChangeLog and editorial changes by wk.
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/global.c b/src/global.c
index f280a7b6..2428e215 100644
--- a/src/global.c
+++ b/src/global.c
@@ -66,6 +66,7 @@ static struct
{ HWF_PADLOCK_SHA, "padlock-sha" },
{ HWF_PADLOCK_MMUL,"padlock-mmul"},
{ HWF_INTEL_AESNI, "intel-aesni" },
+ { HWF_INTEL_RDRAND,"intel-rdrand" },
{ 0, NULL}
};