Added DRBG automatic reseeding tests

This commit is contained in:
Andreas Steffen
2013-11-27 20:21:41 +01:00
parent 5443762491
commit 7d5b9e81a4
3 changed files with 221 additions and 171 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
#include <utils/debug.h>
#define MAX_STRENGTH_BITS 256
#define MAX_DRBG_REQUESTS 0xffffffff
#define MAX_DRBG_REQUESTS 0xfffffffe
typedef struct private_ntru_drbg_t private_ntru_drbg_t;
@@ -149,7 +149,7 @@ METHOD(ntru_drbg_t, generate, bool,
}
output = chunk_create(out, len);
if (this->reseed_counter >= this->max_requests)
if (this->reseed_counter > this->max_requests)
{
if (!reseed(this))
{