Searched refs:entropy_collector (Results 1 - 2 of 2) sorted by relevance

/linux-4.4.14/crypto/
H A Djitterentropy-kcapi.c54 void jent_entropy_collector_free(struct rand_data *entropy_collector);
118 struct rand_data *entropy_collector; member in struct:jitterentropy
126 rng->entropy_collector = jent_entropy_collector_alloc(1, 0); jent_kcapi_init()
127 if (!rng->entropy_collector) jent_kcapi_init()
139 if (rng->entropy_collector) jent_kcapi_cleanup()
140 jent_entropy_collector_free(rng->entropy_collector); jent_kcapi_cleanup()
141 rng->entropy_collector = NULL; jent_kcapi_cleanup()
153 ret = jent_read_entropy(rng->entropy_collector, rdata, dlen); jent_kcapi_random()
H A Djitterentropy.c342 * @entropy_collector Reference to entropy collector
385 * @entropy_collector Reference to entropy collector
389 static __u64 jent_unbiased_bit(struct rand_data *entropy_collector) jent_unbiased_bit() argument
392 __u64 a = jent_measure_jitter(entropy_collector); jent_unbiased_bit()
393 __u64 b = jent_measure_jitter(entropy_collector); jent_unbiased_bit()
419 * @entropy_collector Reference to entropy collector
421 static void jent_stir_pool(struct rand_data *entropy_collector) jent_stir_pool() argument
461 if ((entropy_collector->data >> i) & 1) jent_stir_pool()
465 entropy_collector->data ^= mixer.u64; jent_stir_pool()
582 * -1 entropy_collector is NULL
617 struct rand_data *entropy_collector; jent_entropy_collector_alloc() local
619 entropy_collector = jent_zalloc(sizeof(struct rand_data)); jent_entropy_collector_alloc()
620 if (!entropy_collector) jent_entropy_collector_alloc()
627 entropy_collector->mem = jent_zalloc(JENT_MEMORY_SIZE); jent_entropy_collector_alloc()
628 if (!entropy_collector->mem) { jent_entropy_collector_alloc()
629 jent_zfree(entropy_collector); jent_entropy_collector_alloc()
632 entropy_collector->memblocksize = JENT_MEMORY_BLOCKSIZE; jent_entropy_collector_alloc()
633 entropy_collector->memblocks = JENT_MEMORY_BLOCKS; jent_entropy_collector_alloc()
634 entropy_collector->memaccessloops = JENT_MEMORY_ACCESSLOOPS; jent_entropy_collector_alloc()
640 entropy_collector->osr = osr; jent_entropy_collector_alloc()
642 entropy_collector->stir = 1; jent_entropy_collector_alloc()
644 entropy_collector->stir = 0; jent_entropy_collector_alloc()
646 entropy_collector->disable_unbias = 1; jent_entropy_collector_alloc()
649 jent_gen_entropy(entropy_collector); jent_entropy_collector_alloc()
651 return entropy_collector; jent_entropy_collector_alloc()
654 void jent_entropy_collector_free(struct rand_data *entropy_collector) jent_entropy_collector_free() argument
656 jent_zfree(entropy_collector->mem); jent_entropy_collector_free()
657 entropy_collector->mem = NULL; jent_entropy_collector_free()
658 jent_zfree(entropy_collector); jent_entropy_collector_free()
659 entropy_collector = NULL; jent_entropy_collector_free()

Completed in 67 milliseconds