Lines Matching refs:DEFAULT_BLK_SZ

25 #define DEFAULT_BLK_SZ 16  macro
46 unsigned char rand_data[DEFAULT_BLK_SZ];
47 unsigned char last_rand_data[DEFAULT_BLK_SZ];
48 unsigned char DT[DEFAULT_BLK_SZ];
49 unsigned char I[DEFAULT_BLK_SZ];
50 unsigned char V[DEFAULT_BLK_SZ];
89 unsigned char tmp[DEFAULT_BLK_SZ]; in _get_more_prng_bytes()
96 hexdump("Input DT: ", ctx->DT, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
97 hexdump("Input I: ", ctx->I, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
98 hexdump("Input V: ", ctx->V, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
111 memcpy(tmp, ctx->DT, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
113 hexdump("tmp stage 0: ", tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
122 xor_vectors(ctx->I, ctx->V, tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
123 hexdump("tmp stage 1: ", tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
132 DEFAULT_BLK_SZ)) { in _get_more_prng_bytes()
146 DEFAULT_BLK_SZ); in _get_more_prng_bytes()
153 DEFAULT_BLK_SZ); in _get_more_prng_bytes()
155 hexdump("tmp stage 2: ", tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
168 for (i = DEFAULT_BLK_SZ - 1; i >= 0; i--) { in _get_more_prng_bytes()
177 hexdump("Output DT: ", ctx->DT, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
178 hexdump("Output I: ", ctx->I, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
179 hexdump("Output V: ", ctx->V, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
180 hexdump("New Random Data: ", ctx->rand_data, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
206 if (nbytes < DEFAULT_BLK_SZ) in get_prng_bytes()
208 byte_count = DEFAULT_BLK_SZ; in get_prng_bytes()
222 if (ctx->rand_data_valid == DEFAULT_BLK_SZ) { in get_prng_bytes()
233 if (byte_count < DEFAULT_BLK_SZ) { in get_prng_bytes()
235 while (ctx->rand_data_valid < DEFAULT_BLK_SZ) { in get_prng_bytes()
248 for (; byte_count >= DEFAULT_BLK_SZ; byte_count -= DEFAULT_BLK_SZ) { in get_prng_bytes()
249 if (ctx->rand_data_valid == DEFAULT_BLK_SZ) { in get_prng_bytes()
258 memcpy(ptr, ctx->rand_data, DEFAULT_BLK_SZ); in get_prng_bytes()
259 ctx->rand_data_valid += DEFAULT_BLK_SZ; in get_prng_bytes()
260 ptr += DEFAULT_BLK_SZ; in get_prng_bytes()
297 memcpy(ctx->V, V, DEFAULT_BLK_SZ); in reset_prng_context()
299 memcpy(ctx->V, DEFAULT_V_SEED, DEFAULT_BLK_SZ); in reset_prng_context()
302 memcpy(ctx->DT, DT, DEFAULT_BLK_SZ); in reset_prng_context()
304 memset(ctx->DT, 0, DEFAULT_BLK_SZ); in reset_prng_context()
306 memset(ctx->rand_data, 0, DEFAULT_BLK_SZ); in reset_prng_context()
307 memset(ctx->last_rand_data, 0, DEFAULT_BLK_SZ); in reset_prng_context()
309 ctx->rand_data_valid = DEFAULT_BLK_SZ; in reset_prng_context()
373 const u8 *key = seed + DEFAULT_BLK_SZ; in cprng_reset()
376 if (slen < DEFAULT_PRNG_KSZ + DEFAULT_BLK_SZ) in cprng_reset()
379 if (slen >= (2 * DEFAULT_BLK_SZ + DEFAULT_PRNG_KSZ)) in cprng_reset()
402 u8 rdata[DEFAULT_BLK_SZ]; in fips_cprng_reset()
403 const u8 *key = seed + DEFAULT_BLK_SZ; in fips_cprng_reset()
408 if (slen < DEFAULT_PRNG_KSZ + DEFAULT_BLK_SZ) in fips_cprng_reset()
421 rc = get_prng_bytes(rdata, DEFAULT_BLK_SZ, prng, 0); in fips_cprng_reset()
422 prng->rand_data_valid = DEFAULT_BLK_SZ; in fips_cprng_reset()
432 .seedsize = DEFAULT_PRNG_KSZ + 2 * DEFAULT_BLK_SZ,
446 .seedsize = DEFAULT_PRNG_KSZ + 2 * DEFAULT_BLK_SZ,