summaryrefslogtreecommitdiff
path: root/yarrow.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2008-10-24 21:43:47 +0200
committerNiels Möller <nisse@lysator.liu.se>2008-10-24 21:43:47 +0200
commitb84a309d82f4b17b017a63f52a6a6a372b2cf7ed (patch)
tree205431a06b8cbf2b1f479f1460cd6755912a59d3 /yarrow.h
parentc44fa75e431ab9600390a2661bdb7a3661eae4b5 (diff)
downloadnettle-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.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/yarrow.h b/yarrow.h
index 52690bcf..a5fac25c 100644
--- a/yarrow.h
+++ b/yarrow.h
@@ -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 */