]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(yarrow_key_event_estimate): Fixed handling
authorNiels Möller <nisse@lysator.liu.se>
Wed, 5 Dec 2001 12:39:44 +0000 (13:39 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 5 Dec 2001 12:39:44 +0000 (13:39 +0100)
of timing info.

Rev: src/nettle/yarrow_key_event.c:1.3

yarrow_key_event.c

index 6ea9a8114bfe48627ba6b02a4551e6d08c532793..9b25c96ceb9c6545a4568fc3664914ed4b6df2ef 100644 (file)
@@ -44,9 +44,9 @@ yarrow_key_event_estimate(struct yarrow_key_event_ctx *ctx,
   unsigned i;
 
   /* Look at timing first. */
-  if (ctx->previous)
+  if (ctx->previous && (time > ctx->previous) )
     {
-      if ( (time - ctx->previous) < 256)
+      if ( (time - ctx->previous) >= 256)
         entropy++;
     }
   ctx->previous = time;