summaryrefslogtreecommitdiff
path: root/random/random-fips.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-09-16 14:28:17 +0000
committerWerner Koch <wk@gnupg.org>2008-09-16 14:28:17 +0000
commit2d9eb39bd6c6c70358f6bc395ed4dfd81738e811 (patch)
tree274d122c827e46996c98471738b5926b1aae5903 /random/random-fips.c
parent2f1962593d4465b50ad7ec5781fa08cd44aec820 (diff)
downloadlibgcrypt-2d9eb39bd6c6c70358f6bc395ed4dfd81738e811.tar.gz
Make fipsrngdriv more pretty.
Fix a problem in the RNG test code. Minor doc update.
Diffstat (limited to 'random/random-fips.c')
-rw-r--r--random/random-fips.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/random/random-fips.c b/random/random-fips.c
index eb1706fc..2fc9596e 100644
--- a/random/random-fips.c
+++ b/random/random-fips.c
@@ -37,7 +37,7 @@
caller requested less bits, the extra bits are not used. The key
for each generator is only set once at the first time a generator
is used. The seed value is set with the key and again after 1000
- (SEED_TTL) output blocks.
+ (SEED_TTL) output blocks; the re-seeding is disabled in test mode.
The GCRY_VERY_STRONG_RANDOM and GCRY_STRONG_RANDOM generators are
keyed and seeded from the /dev/random device. Thus these
@@ -1043,9 +1043,9 @@ _gcry_rngfips_init_external_test (void **r_context,
/* Setup a DT value. Because our context structure only stores a
pointer we copy the DT value to the extra space we allocated in
- the test_ctx and set the pointer to tehre. */
- memcpy ((char*)test_ctx + sizeof *test_ctx, dt, dtlen);
- test_ctx->test_dt_ptr = (unsigned char*)test_ctx + sizeof test_ctx;
+ the test_ctx and set the pointer to that address. */
+ memcpy ((unsigned char*)test_ctx + sizeof *test_ctx, dt, dtlen);
+ test_ctx->test_dt_ptr = (unsigned char*)test_ctx + sizeof *test_ctx;
test_ctx->test_dt_counter = ( (test_ctx->test_dt_ptr[12] << 24)
|(test_ctx->test_dt_ptr[13] << 16)
|(test_ctx->test_dt_ptr[14] << 8)