Re: [PATCH v2 1/6] SP800-90A Deterministic Random Bit Generator

2014-03-20 Thread Stephan Mueller
Am Donnerstag, 20. März 2014, 09:12:55 schrieb Clemens Ladisch: Hi Clemens, > Stephan Mueller wrote: > > This is a clean-room implementation of the DRBG defined in SP800-90A. > > Why? I guess it's for certification? As per SP800-131A, the ANSI X9.31 DRNG is sunset by the end of 2014 and not a

Re: [PATCH v2 1/6] SP800-90A Deterministic Random Bit Generator

2014-03-20 Thread Clemens Ladisch
Stephan Mueller wrote: > This is a clean-room implementation of the DRBG defined in SP800-90A. Why? I guess it's for certification? > +static bool drbg_fips_continuous_test(struct drbg_state *drbg, > + unsigned char *buf) > ... > + ret = memcmp(drbg->prev, bu

Re: [PATCH v2 1/6] SP800-90A Deterministic Random Bit Generator

2014-03-19 Thread Stephan Mueller
Am Montag, 17. März 2014, 08:34:06 schrieb Stephan Mueller: > +static int drbg_seed(struct drbg_state *drbg, struct drbg_string *pers, > + bool reseed) > +{ > + int ret = 0; > + unsigned char *entropy = NULL; > + size_t entropylen = 0; > + struct drbg_string data1;

[PATCH v2 1/6] SP800-90A Deterministic Random Bit Generator

2014-03-17 Thread Stephan Mueller
This is a clean-room implementation of the DRBG defined in SP800-90A. All three viable DRBGs defined in the standard are implemented: * HMAC: This is the leanest DRBG and compiled per default * Hash: The more complex DRBG can be enabled at compile time * CTR: The most complex DRBG can also be e