• Home
  • Raw
  • Download

Lines Matching full:entropy

36 // entropy which is accessed via |CRYPTO_sysrand[_for_seed]|. (If the operating
37 // system entropy source fails, it's up to |CRYPTO_sysrand| to abort the
46 // (We assume that the OS entropy is safe from fork()ing and VM duplication.
174 // In passive entropy mode, entropy is supplied from outside of the module via
179 // bytes contains entropy suitable for seeding a DRBG.
186 // obtained via a method other than from the kernel. In these cases entropy
194 void RAND_load_entropy(const uint8_t *entropy, size_t entropy_len, in RAND_load_entropy() argument
204 OPENSSL_memcpy(&buffer->bytes[buffer->bytes_valid], entropy, entropy_len); in RAND_load_entropy()
239 // rand_get_seed fills |seed| with entropy. In some cases, it will additionally
240 // fill |additional_input| with entropy to supplement |seed|. It sets
248 uint8_t *entropy = entropy_bytes; in rand_get_seed() local
252 // No need to fill |state->last_block| with entropy from the read. in rand_get_seed()
253 entropy += sizeof(state->last_block); in rand_get_seed()
258 get_seed_entropy(entropy, entropy_len, &want_additional_input); in rand_get_seed()
261 OPENSSL_memcpy(state->last_block, entropy, sizeof(state->last_block)); in rand_get_seed()
262 entropy += sizeof(state->last_block); in rand_get_seed()
269 if (CRYPTO_memcmp(state->last_block, entropy, sizeof(state->last_block)) == in rand_get_seed()
277 if (CRYPTO_memcmp(entropy + i - CRNGT_BLOCK_SIZE, entropy + i, in rand_get_seed()
283 OPENSSL_memcpy(state->last_block, entropy + entropy_len - CRNGT_BLOCK_SIZE, in rand_get_seed()
287 OPENSSL_memcpy(seed, entropy, CTR_DRBG_ENTROPY_LEN); in rand_get_seed()
291 seed[j] ^= entropy[CTR_DRBG_ENTROPY_LEN * i + j]; in rand_get_seed()
295 // If we used something other than system entropy then also in rand_get_seed()
297 // hardware once the entropy pool has been initialized. in rand_get_seed()
307 // rand_get_seed fills |seed| with entropy. In some cases, it will additionally
308 // fill |additional_input| with entropy to supplement |seed|. It sets
314 // If not in FIPS mode, we don't overread from the system entropy source and in rand_get_seed()
340 // entropy is used. This can be expensive (one read per |RAND_bytes| call) in RAND_bytes_with_additional_data()
346 // No alternative so block for OS entropy. in RAND_bytes_with_additional_data()
351 // RDRAND failed: block for OS entropy. in RAND_bytes_with_additional_data()
411 // avoid returning bad entropy if we race with in RAND_bytes_with_additional_data()