summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2012-12-03 20:41:28 +0100
committerWerner Koch <wk@gnupg.org>2012-12-03 20:47:38 +0100
commit7607ab81504ce44060ed0b331d309606f5da1e75 (patch)
tree67d02c0a5e7f2de47c0d6a5fd7b9f5437e1e49b0 /NEWS
parentf17e4d920c8a18007a98830dd13163ff19616202 (diff)
downloadlibgcrypt-7607ab81504ce44060ed0b331d309606f5da1e75.tar.gz
random: Add a RNG selection interface and system RNG wrapper.
* random/random-system.c: New. * random/Makefile.am (librandom_la_SOURCES): Add new module. * random/random.c (struct rng_types): New. (_gcry_set_preferred_rng_type, _gcry_get_rng_type): New. (_gcry_random_initialize, gcry_random_add_bytes, do_randomize) (_gcry_set_random_seed_file, _gcry_update_random_seed_file) (_gcry_fast_random_poll): Dispatch to the actual RNG. * src/gcrypt.h.in (GCRYCTL_SET_PREFERRED_RNG_TYPE): New. GCRYCTL_GET_CURRENT_RNG_TYPE): New. (gcry_rng_types): New. * src/global.c (print_config): Print the TNG type. (global_init, _gcry_vcontrol): Implement the new control codes. * doc/gcrypt.texi (Controlling the library): Document the new control codes. * tests/benchmark.c (main): Add options to test the RNG types. * tests/random.c (main): Add new options. (print_hex): Print to stderr. (progress_cb, rng_type): New. (check_rng_type_switching, check_early_rng_type_switching): New. (run_all_rng_tests): New. -- The purpose of this change is to allow applications with moderate random requirements to use the system's RNG (e.g. /dev/urandom). The type switching logic makes sure that existing applications won't be affected by this change. A library is in almost all cases not able to degrade the quality of the RNG. The definition of "degrade" comes from our own assertion of the quality/trustworthiness of the RNGs: The most trustworthy RNG is the CSPRNG which dates back to the early GnuPG days. It is quite conservative and often requires more seeding than might be justified. GCRY_RNG_TYPE_STANDARD is the default unless the process is in FIPS mode. The second trustworthy RNG is the FIPS recommended X9.81 AES based implementation. It is seeded by the system's RNG. GCRY_RNG_TYPE_FIPS is the only available RNG if running in FIPS mode. The third trustworthy RNG is a mere wrapper around the system's native RNG. Thus there is no extra step on top of what, for example, /dev/random provides. GCRY_RNG_TYPE_SYSTEM may be used by applications which would use /dev/random or /dev/urandom instead.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS10
1 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a0fd09b2..45b892fb 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,10 @@ Noteworthy changes in version 1.6.0 (unreleased)
* The deprecated message digest debug macros have been removed. Use
gcry_md_debug instead.
- * Add support for the IDEA cipher algorithm.
+ * Added support for the IDEA cipher algorithm.
+
+ * Added a random number generator to directly use the system's RNG.
+ Also added an interface to prefer the use of a specified RNG.
* Interface changes relative to the 1.5.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -28,6 +31,11 @@ Noteworthy changes in version 1.6.0 (unreleased)
gcry_md_start_debug REMOVED (macro).
gcry_md_stop_debug REMOVED (macro).
GCRYCTL_SET_ENFORCED_FIPS_FLAG NEW.
+ GCRYCTL_SET_PREFERRED_RNG_TYPE NEW.
+ GCRYCTL_GET_CURRENT_RNG_TYPE NEW.
+ GCRY_RNG_TYPE_STANDARD NEW.
+ GCRY_RNG_TYPE_FIPS NEW.
+ GCRY_RNG_TYPE_SYSTEM NEW.
Noteworthy changes in version 1.5.0 (2011-06-29)