Lines Matching +full:fips +full:- +full:140 +full:- +full:2

2  * DRBG based on NIST SP800-90A
12 * 2. Redistributions in binary form must reproduce the above copyright
23 * the restrictions contained in a BSD-style copyright.)
52 #include <linux/fips.h>
60 * SP800-90A requires the concatenation of different data. To avoid copying
76 string->buf = buf; in drbg_string_fill()
77 string->len = len; in drbg_string_fill()
78 INIT_LIST_HEAD(&string->list); in drbg_string_fill()
121 /* Number of RNG requests since last reseed -- 10.1.1.1 1c) */
140 unsigned char *prev; /* FIPS 140-2 continuous test value */
149 if (drbg && drbg->core) in drbg_statelen()
150 return drbg->core->statelen; in drbg_statelen()
156 if (drbg && drbg->core) in drbg_blocklen()
157 return drbg->core->blocklen_bytes; in drbg_blocklen()
163 if (drbg && drbg->core) in drbg_keylen()
164 return (drbg->core->statelen - drbg->core->blocklen_bytes); in drbg_keylen()
170 /* SP800-90A requires the limit 2**19 bits, but we return bytes */ in drbg_max_request_bytes()
176 /* SP800-90A requires 2**35 bytes additional info str / pers str */ in drbg_max_addtl()
179 * SP800-90A allows smaller maximum numbers to be returned -- we in drbg_max_addtl()
180 * return SIZE_MAX - 1 to allow the verification of the enforcement in drbg_max_addtl()
183 return (SIZE_MAX - 1); in drbg_max_addtl()
191 /* SP800-90A requires 2**48 maximum requests before reseeding */ in drbg_max_requests()
199 * @drng DRBG handle -- see crypto_rng_get_bytes
200 * @outbuf output buffer -- see crypto_rng_get_bytes
201 * @outlen length of output buffer -- see crypto_rng_get_bytes
212 return crypto_rng_generate(drng, addtl->buf, addtl->len, in crypto_drbg_get_bytes_addtl()
223 * @drng DRBG handle -- see crypto_rng_get_bytes
224 * @outbuf output buffer -- see crypto_rng_get_bytes
225 * @outlen length of output buffer -- see crypto_rng_get_bytes
238 crypto_rng_set_entropy(drng, test_data->testentropy->buf, in crypto_drbg_get_bytes_addtl_test()
239 test_data->testentropy->len); in crypto_drbg_get_bytes_addtl_test()
240 return crypto_rng_generate(drng, addtl->buf, addtl->len, in crypto_drbg_get_bytes_addtl_test()
250 * @drng DRBG handle -- see crypto_rng_reset
262 crypto_rng_set_entropy(drng, test_data->testentropy->buf, in crypto_drbg_reset_test()
263 test_data->testentropy->len); in crypto_drbg_reset_test()
264 return crypto_rng_reset(drng, pers->buf, pers->len); in crypto_drbg_reset_test()
270 #define DRBG_HASH ((drbg_flag_t)1<<2)