• Home
  • Raw
  • Download

Lines Matching refs:DEFAULT_BLK_SZ

19 #define DEFAULT_BLK_SZ 16  macro
40 unsigned char rand_data[DEFAULT_BLK_SZ];
41 unsigned char last_rand_data[DEFAULT_BLK_SZ];
42 unsigned char DT[DEFAULT_BLK_SZ];
43 unsigned char I[DEFAULT_BLK_SZ];
44 unsigned char V[DEFAULT_BLK_SZ];
83 unsigned char tmp[DEFAULT_BLK_SZ]; in _get_more_prng_bytes()
90 hexdump("Input DT: ", ctx->DT, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
91 hexdump("Input I: ", ctx->I, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
92 hexdump("Input V: ", ctx->V, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
105 memcpy(tmp, ctx->DT, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
107 hexdump("tmp stage 0: ", tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
116 xor_vectors(ctx->I, ctx->V, tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
117 hexdump("tmp stage 1: ", tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
126 DEFAULT_BLK_SZ)) { in _get_more_prng_bytes()
140 DEFAULT_BLK_SZ); in _get_more_prng_bytes()
147 DEFAULT_BLK_SZ); in _get_more_prng_bytes()
149 hexdump("tmp stage 2: ", tmp, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
162 for (i = DEFAULT_BLK_SZ - 1; i >= 0; i--) { in _get_more_prng_bytes()
171 hexdump("Output DT: ", ctx->DT, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
172 hexdump("Output I: ", ctx->I, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
173 hexdump("Output V: ", ctx->V, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
174 hexdump("New Random Data: ", ctx->rand_data, DEFAULT_BLK_SZ); in _get_more_prng_bytes()
200 if (nbytes < DEFAULT_BLK_SZ) in get_prng_bytes()
202 byte_count = DEFAULT_BLK_SZ; in get_prng_bytes()
216 if (ctx->rand_data_valid == DEFAULT_BLK_SZ) { in get_prng_bytes()
227 if (byte_count < DEFAULT_BLK_SZ) { in get_prng_bytes()
229 while (ctx->rand_data_valid < DEFAULT_BLK_SZ) { in get_prng_bytes()
242 for (; byte_count >= DEFAULT_BLK_SZ; byte_count -= DEFAULT_BLK_SZ) { in get_prng_bytes()
243 if (ctx->rand_data_valid == DEFAULT_BLK_SZ) { in get_prng_bytes()
252 memcpy(ptr, ctx->rand_data, DEFAULT_BLK_SZ); in get_prng_bytes()
253 ctx->rand_data_valid += DEFAULT_BLK_SZ; in get_prng_bytes()
254 ptr += DEFAULT_BLK_SZ; in get_prng_bytes()
291 memcpy(ctx->V, V, DEFAULT_BLK_SZ); in reset_prng_context()
293 memcpy(ctx->V, DEFAULT_V_SEED, DEFAULT_BLK_SZ); in reset_prng_context()
296 memcpy(ctx->DT, DT, DEFAULT_BLK_SZ); in reset_prng_context()
298 memset(ctx->DT, 0, DEFAULT_BLK_SZ); in reset_prng_context()
300 memset(ctx->rand_data, 0, DEFAULT_BLK_SZ); in reset_prng_context()
301 memset(ctx->last_rand_data, 0, DEFAULT_BLK_SZ); in reset_prng_context()
303 ctx->rand_data_valid = DEFAULT_BLK_SZ; in reset_prng_context()
367 const u8 *key = seed + DEFAULT_BLK_SZ; in cprng_reset()
370 if (slen < DEFAULT_PRNG_KSZ + DEFAULT_BLK_SZ) in cprng_reset()
373 if (slen >= (2 * DEFAULT_BLK_SZ + DEFAULT_PRNG_KSZ)) in cprng_reset()
396 u8 rdata[DEFAULT_BLK_SZ]; in fips_cprng_reset()
397 const u8 *key = seed + DEFAULT_BLK_SZ; in fips_cprng_reset()
402 if (slen < DEFAULT_PRNG_KSZ + DEFAULT_BLK_SZ) in fips_cprng_reset()
415 rc = get_prng_bytes(rdata, DEFAULT_BLK_SZ, prng, 0); in fips_cprng_reset()
416 prng->rand_data_valid = DEFAULT_BLK_SZ; in fips_cprng_reset()
426 .seedsize = DEFAULT_PRNG_KSZ + 2 * DEFAULT_BLK_SZ,
440 .seedsize = DEFAULT_PRNG_KSZ + 2 * DEFAULT_BLK_SZ,