diff options
author | Niels Möller <nisse@lysator.liu.se> | 2008-10-24 21:43:47 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2008-10-24 21:43:47 +0200 |
commit | b84a309d82f4b17b017a63f52a6a6a372b2cf7ed (patch) | |
tree | 205431a06b8cbf2b1f479f1460cd6755912a59d3 /yarrow.h | |
parent | c44fa75e431ab9600390a2661bdb7a3661eae4b5 (diff) | |
download | nettle-b84a309d82f4b17b017a63f52a6a6a372b2cf7ed.tar.gz |
* yarrow256.c (yarrow256_fast_reseed): Renamed (was
yarrow_fast_reseed) and made non-static. Don't generate seed file
here, let the application use yarrow256_random instead.
(yarrow256_slow_reseed): Renamed (was yarrow_slow_reseed) and made
non-static.
(yarrow256_force_reseed): Deleted function, use
yarrow256_slow_reseed instead. For backwards compatibility,
yarrow.h defines yarrow256_force_reseed as an alias for that
function.
* yarrow.h (struct yarrow256_ctx): Deleted seed_file buffer.
Rev: nettle/yarrow.h:1.2
Rev: nettle/yarrow256.c:1.4
Diffstat (limited to 'yarrow.h')
-rw-r--r-- | yarrow.h | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -40,10 +40,15 @@ extern "C" { #define yarrow256_random nettle_yarrow256_random #define yarrow256_is_seeded nettle_yarrow256_is_seeded #define yarrow256_needed_sources nettle_yarrow256_needed_sources -#define yarrow256_force_reseed nettle_yarrow256_force_reseed +#define yarrow256_fast_reseed nettle_yarrow256_fast_reseed +#define yarrow256_slow_reseed nettle_yarrow256_slow_reseed #define yarrow_key_event_init nettle_yarrow_key_event_init #define yarrow_key_event_estimate nettle_yarrow_key_event_estimate +/* Obsolete alias for backwards compatibility. Will be deleted in some + later version. */ +#define yarrow256_force_reseed yarrow256_slow_reseed + enum yarrow_pool_id { YARROW_FAST = 0, YARROW_SLOW = 1 }; struct yarrow_source @@ -64,8 +69,6 @@ struct yarrow256_ctx /* Indexed by yarrow_pool_id */ struct sha256_ctx pools[2]; - uint8_t seed_file[YARROW256_SEED_FILE_SIZE]; - int seeded; /* The current key and counter block */ @@ -103,7 +106,10 @@ unsigned yarrow256_needed_sources(struct yarrow256_ctx *ctx); void -yarrow256_force_reseed(struct yarrow256_ctx *ctx); +yarrow256_fast_reseed(struct yarrow256_ctx *ctx); + +void +yarrow256_slow_reseed(struct yarrow256_ctx *ctx); /* Key event estimator */ |