Path: blob/main/crypto/openssl/providers/implementations/include/prov/seeding.h
48534 views
/*1* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.2*3* Licensed under the Apache License 2.0 (the "License"). You may not use4* this file except in compliance with the License. You can obtain a copy5* in the file LICENSE in the source distribution or at6* https://www.openssl.org/source/license.html7*/89#include "prov/provider_ctx.h"10#include "crypto/rand_pool.h"1112/* Hardware-based seeding functions. */13size_t ossl_prov_acquire_entropy_from_tsc(RAND_POOL *pool);14size_t ossl_prov_acquire_entropy_from_cpu(RAND_POOL *pool);1516/*17* External seeding functions from the core dispatch table.18*/19int ossl_prov_seeding_from_dispatch(const OSSL_DISPATCH *fns);2021size_t ossl_prov_get_entropy(PROV_CTX *prov_ctx, unsigned char **pout,22int entropy, size_t min_len, size_t max_len);23void ossl_prov_cleanup_entropy(PROV_CTX *prov_ctx, unsigned char *buf,24size_t len);25size_t ossl_prov_get_nonce(PROV_CTX *prov_ctx, unsigned char **pout,26size_t min_len, size_t max_len,27const void *salt, size_t salt_len);28void ossl_prov_cleanup_nonce(PROV_CTX *prov_ctx, unsigned char *buf,29size_t len);303132