1 // SPDX-License-Identifier: GPL-2.0-or-later
3 extern void *jent_zalloc(unsigned int len);
4 extern void jent_zfree(void *ptr);
5 extern void jent_get_nstime(__u64 *out);
6 extern int jent_hash_time(void *hash_state, __u64 time, u8 *addtl,
7 unsigned int addtl_len, __u64 hash_loop_cnt,
9 int jent_read_random_block(void *hash_state, char *dst, unsigned int dst_len);
12 extern int jent_entropy_init(void *hash_state);
13 extern int jent_read_entropy(struct rand_data *ec, unsigned char *data,
16 extern struct rand_data *jent_entropy_collector_alloc(unsigned int osr,
19 extern void jent_entropy_collector_free(struct rand_data *entropy_collector);
21 #ifdef CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE
22 int jent_raw_hires_entropy_store(__u32 value);
23 void jent_testing_init(void);
24 void jent_testing_exit(void);
25 #else /* CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE */
26 static inline int jent_raw_hires_entropy_store(__u32 value) { return 0; }
27 static inline void jent_testing_init(void) { }
28 static inline void jent_testing_exit(void) { }
29 #endif /* CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE */