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) */
139 unsigned char *prev; /* FIPS 140-2 continuous test value */
148 if (drbg && drbg->core) in drbg_statelen()
149 return drbg->core->statelen; in drbg_statelen()
155 if (drbg && drbg->core) in drbg_blocklen()
156 return drbg->core->blocklen_bytes; in drbg_blocklen()
162 if (drbg && drbg->core) in drbg_keylen()
163 return (drbg->core->statelen - drbg->core->blocklen_bytes); in drbg_keylen()
169 /* SP800-90A requires the limit 2**19 bits, but we return bytes */ in drbg_max_request_bytes()
175 /* SP800-90A requires 2**35 bytes additional info str / pers str */ in drbg_max_addtl()
178 * SP800-90A allows smaller maximum numbers to be returned -- we in drbg_max_addtl()
179 * return SIZE_MAX - 1 to allow the verification of the enforcement in drbg_max_addtl()
182 return (SIZE_MAX - 1); in drbg_max_addtl()
190 /* SP800-90A requires 2**48 maximum requests before reseeding */ in drbg_max_requests()
198 * @drng DRBG handle -- see crypto_rng_get_bytes
199 * @outbuf output buffer -- see crypto_rng_get_bytes
200 * @outlen length of output buffer -- see crypto_rng_get_bytes
211 return crypto_rng_generate(drng, addtl->buf, addtl->len, in crypto_drbg_get_bytes_addtl()
222 * @drng DRBG handle -- see crypto_rng_get_bytes
223 * @outbuf output buffer -- see crypto_rng_get_bytes
224 * @outlen length of output buffer -- see crypto_rng_get_bytes
237 crypto_rng_set_entropy(drng, test_data->testentropy->buf, in crypto_drbg_get_bytes_addtl_test()
238 test_data->testentropy->len); in crypto_drbg_get_bytes_addtl_test()
239 return crypto_rng_generate(drng, addtl->buf, addtl->len, in crypto_drbg_get_bytes_addtl_test()
249 * @drng DRBG handle -- see crypto_rng_reset
261 crypto_rng_set_entropy(drng, test_data->testentropy->buf, in crypto_drbg_reset_test()
262 test_data->testentropy->len); in crypto_drbg_reset_test()
263 return crypto_rng_reset(drng, pers->buf, pers->len); in crypto_drbg_reset_test()
269 #define DRBG_HASH ((drbg_flag_t)1<<2)