summaryrefslogtreecommitdiff
path: root/random/rand-internal.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2012-11-30 18:16:34 +0100
committerWerner Koch <wk@gnupg.org>2012-12-03 20:47:38 +0100
commitc324644aa14e54fc7051983b38222db32b8ab227 (patch)
treeb237ea9932a3990382ee0487b772293bcc897c2b /random/rand-internal.h
parentf851b9a932ee64fa5a06000d1ac763ba4349f07d (diff)
downloadlibgcrypt-c324644aa14e54fc7051983b38222db32b8ab227.tar.gz
Move nonce creation from csprng backend to random main module.
* random/random-csprng.c (_gcry_rngcsprng_create_nonce): Remove. (nonce_buffer_lock): Remove. (initialize_basics): Remove init of nonce_buffer_lock. * random/random.c: Add a few header files. (nonce_buffer_lock): New. (_gcry_random_initialize): Init nonce_buffer_lock. (gcry_create_nonce): Add code from _gcry_rngcsprng_create_nonce. * random/random-daemon.c (_gcry_daemon_create_nonce): Remove. -- The nonce generation code is useful for all RNG types and thus it should be in random.c. The only exception is the fips-mode, which requires the use of the fips nonce generator.
Diffstat (limited to 'random/rand-internal.h')
-rw-r--r--random/rand-internal.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/random/rand-internal.h b/random/rand-internal.h
index a04a2d41..a72d88c1 100644
--- a/random/rand-internal.h
+++ b/random/rand-internal.h
@@ -61,18 +61,13 @@ void _gcry_rngcsprng_randomize (void *buffer, size_t length,
void _gcry_rngcsprng_set_seed_file (const char *name);
void _gcry_rngcsprng_update_seed_file (void);
void _gcry_rngcsprng_fast_poll (void);
-void _gcry_rngcsprng_create_nonce (void *buffer, size_t length);
-/*-- random-rngcsprng.c --*/
+/*-- random-fips.c --*/
void _gcry_rngfips_initialize (int full);
void _gcry_rngfips_dump_stats (void);
int _gcry_rngfips_is_faked (void);
gcry_error_t _gcry_rngfips_add_bytes (const void *buf, size_t buflen,
int quality);
-void *_gcry_rngfips_get_bytes (size_t nbytes,
- enum gcry_random_level level);
-void *_gcry_rngfips_get_bytes_secure (size_t nbytes,
- enum gcry_random_level level);
void _gcry_rngfips_randomize (void *buffer, size_t length,
enum gcry_random_level level);
void _gcry_rngfips_create_nonce (void *buffer, size_t length);