Lines Matching refs:entropy_collector
389 static __u64 jent_unbiased_bit(struct rand_data *entropy_collector) in jent_unbiased_bit() argument
392 __u64 a = jent_measure_jitter(entropy_collector); in jent_unbiased_bit()
393 __u64 b = jent_measure_jitter(entropy_collector); in jent_unbiased_bit()
421 static void jent_stir_pool(struct rand_data *entropy_collector) in jent_stir_pool() argument
461 if ((entropy_collector->data >> i) & 1) in jent_stir_pool()
465 entropy_collector->data ^= mixer.u64; in jent_stir_pool()
617 struct rand_data *entropy_collector; in jent_entropy_collector_alloc() local
619 entropy_collector = jent_zalloc(sizeof(struct rand_data)); in jent_entropy_collector_alloc()
620 if (!entropy_collector) in jent_entropy_collector_alloc()
627 entropy_collector->mem = jent_zalloc(JENT_MEMORY_SIZE); in jent_entropy_collector_alloc()
628 if (!entropy_collector->mem) { in jent_entropy_collector_alloc()
629 jent_zfree(entropy_collector); in jent_entropy_collector_alloc()
632 entropy_collector->memblocksize = JENT_MEMORY_BLOCKSIZE; in jent_entropy_collector_alloc()
633 entropy_collector->memblocks = JENT_MEMORY_BLOCKS; in jent_entropy_collector_alloc()
634 entropy_collector->memaccessloops = JENT_MEMORY_ACCESSLOOPS; in jent_entropy_collector_alloc()
640 entropy_collector->osr = osr; in jent_entropy_collector_alloc()
642 entropy_collector->stir = 1; in jent_entropy_collector_alloc()
644 entropy_collector->stir = 0; in jent_entropy_collector_alloc()
646 entropy_collector->disable_unbias = 1; in jent_entropy_collector_alloc()
649 jent_gen_entropy(entropy_collector); in jent_entropy_collector_alloc()
651 return entropy_collector; in jent_entropy_collector_alloc()
654 void jent_entropy_collector_free(struct rand_data *entropy_collector) in jent_entropy_collector_free() argument
656 jent_zfree(entropy_collector->mem); in jent_entropy_collector_free()
657 entropy_collector->mem = NULL; in jent_entropy_collector_free()
658 jent_zfree(entropy_collector); in jent_entropy_collector_free()
659 entropy_collector = NULL; in jent_entropy_collector_free()