Commit | Line | Data |
---|---|---|
965d7286 BD |
1 | // SPDX-License-Identifier: GPL-2.0-or-later |
2 | ||
59bcfd78 SM |
3 | extern void *jent_kvzalloc(unsigned int len); |
4 | extern void jent_kvzfree(void *ptr, unsigned int len); | |
965d7286 BD |
5 | extern void *jent_zalloc(unsigned int len); |
6 | extern void jent_zfree(void *ptr); | |
965d7286 | 7 | extern void jent_get_nstime(__u64 *out); |
bb897c55 SM |
8 | extern int jent_hash_time(void *hash_state, __u64 time, u8 *addtl, |
9 | unsigned int addtl_len, __u64 hash_loop_cnt, | |
10 | unsigned int stuck); | |
11 | int jent_read_random_block(void *hash_state, char *dst, unsigned int dst_len); | |
965d7286 BD |
12 | |
13 | struct rand_data; | |
04597c8d | 14 | extern int jent_entropy_init(unsigned int osr, unsigned int flags, |
8405ec8e | 15 | void *hash_state, struct rand_data *p_ec); |
965d7286 BD |
16 | extern int jent_read_entropy(struct rand_data *ec, unsigned char *data, |
17 | unsigned int len); | |
18 | ||
19 | extern struct rand_data *jent_entropy_collector_alloc(unsigned int osr, | |
bb897c55 SM |
20 | unsigned int flags, |
21 | void *hash_state); | |
965d7286 | 22 | extern void jent_entropy_collector_free(struct rand_data *entropy_collector); |
69f1c387 SM |
23 | |
24 | #ifdef CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE | |
25 | int jent_raw_hires_entropy_store(__u32 value); | |
26 | void jent_testing_init(void); | |
27 | void jent_testing_exit(void); | |
28 | #else /* CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE */ | |
29 | static inline int jent_raw_hires_entropy_store(__u32 value) { return 0; } | |
30 | static inline void jent_testing_init(void) { } | |
31 | static inline void jent_testing_exit(void) { } | |
32 | #endif /* CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE */ |