1RAND_SET_DRBG_TYPE(3ossl) OpenSSL RAND_SET_DRBG_TYPE(3ossl)
2
3
4
6 RAND_set_DRBG_type, RAND_set_seed_source_type - specify the global
7 random number generator types
8
10 #include <openssl/rand.h>
11
12 int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq,
13 const char *cipher, const char *digest);
14 int RAND_set_seed_source_type(OSSL_LIB_CTX *ctx, const char *seed,
15 const char *propq);
16
18 RAND_set_DRBG_type() specifies the random bit generator that will be
19 used within the library context ctx. A generator of name drbg with
20 properties propq will be fetched. It will be instantiated with either
21 cipher or digest as its underlying cryptographic algorithm. This
22 specifies the type that will be used for the primary, public and
23 private random instances.
24
25 RAND_set_seed_source_type() specifies the seed source that will be used
26 within the library context ctx. The seed source of name seed with
27 properties propq will be fetched and used to seed the primary random
28 big generator.
29
31 These function return 1 on success and 0 on failure.
32
34 These functions must be called before the random bit generators are
35 first created in the library context. They will return an error if the
36 call is made too late.
37
38 The default DRBG is "CTR-DRBG" using the "AES-256-CTR" cipher.
39
40 The default seed source is "SEED-SRC".
41
43 EVP_RAND(3), RAND_get0_primary(3)
44
46 These functions were added in OpenSSL 3.0.
47
49 Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
50
51 Licensed under the Apache License 2.0 (the "License"). You may not use
52 this file except in compliance with the License. You can obtain a copy
53 in the file LICENSE in the source distribution or at
54 <https://www.openssl.org/source/license.html>.
55
56
57
583.0.5 2022-11-01 RAND_SET_DRBG_TYPE(3ossl)