]> git.ipfire.org Git - thirdparty/openssl.git/blob - providers/implementations/include/prov/seeding.h
share rand_pool between libcrypto and providers
[thirdparty/openssl.git] / providers / implementations / include / prov / seeding.h
1 /*
2 * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10 #include "prov/rand_pool.h"
11
12 /* Hardware-based seeding functions. */
13 size_t prov_acquire_entropy_from_tsc(RAND_POOL *pool);
14 size_t prov_acquire_entropy_from_cpu(RAND_POOL *pool);
15
16 /* DRBG entropy callbacks. */
17 size_t prov_drbg_get_additional_data(RAND_POOL *pool, unsigned char **pout);
18
19 void prov_drbg_cleanup_additional_data(RAND_POOL *pool, unsigned char *out);
20
21 size_t prov_pool_acquire_entropy(RAND_POOL *pool);
22 int prov_pool_add_nonce_data(RAND_POOL *pool);
23
24 /*
25 * Add some platform specific additional data
26 *
27 * This function is platform specific and adds some random noise to the
28 * additional data used for generating random bytes and for reseeding
29 * the drbg.
30 *
31 * Returns 1 on success and 0 on failure.
32 */
33 int rand_pool_add_additional_data(RAND_POOL *pool);
34