1RAND_DRBG_GET0_MASTER(3)            OpenSSL           RAND_DRBG_GET0_MASTER(3)
2
3
4

NAME

6       RAND_DRBG_get0_master, RAND_DRBG_get0_public, RAND_DRBG_get0_private -
7       get access to the global RAND_DRBG instances
8

SYNOPSIS

10        #include <openssl/rand_drbg.h>
11
12        RAND_DRBG *RAND_DRBG_get0_master(void);
13        RAND_DRBG *RAND_DRBG_get0_public(void);
14        RAND_DRBG *RAND_DRBG_get0_private(void);
15

DESCRIPTION

17       The default RAND API implementation (RAND_OpenSSL()) utilizes three
18       shared DRBG instances which are accessed via the RAND API:
19
20       The <public> and <private> DRBG are thread-local instances, which are
21       used by RAND_bytes() and RAND_priv_bytes(), respectively.  The <master>
22       DRBG is a global instance, which is not intended to be used directly,
23       but is used internally to reseed the other two instances.
24
25       These functions here provide access to the shared DRBG instances.
26

RETURN VALUES

28       RAND_DRBG_get0_master() returns a pointer to the <master> DRBG
29       instance.
30
31       RAND_DRBG_get0_public() returns a pointer to the <public> DRBG
32       instance.
33
34       RAND_DRBG_get0_private() returns a pointer to the <private> DRBG
35       instance.
36

NOTES

38       It is not thread-safe to access the <master> DRBG instance.  The
39       <public> and <private> DRBG instance can be accessed safely, because
40       they are thread-local. Note however, that changes to these two
41       instances apply only to the current thread.
42
43       For that reason it is recommended not to change the settings of these
44       three instances directly.  Instead, an application should change the
45       default settings for new DRBG instances at initialization time, before
46       creating additional threads.
47
48       During initialization, it is possible to change the reseed interval and
49       reseed time interval.  It is also possible to exchange the reseeding
50       callbacks entirely.
51

SEE ALSO

53       RAND_DRBG_set_callbacks(3), RAND_DRBG_set_reseed_defaults(3),
54       RAND_DRBG_set_reseed_interval(3),
55       RAND_DRBG_set_reseed_time_interval(3), RAND_DRBG_set_callbacks(3),
56       RAND_DRBG_generate(3), RAND_DRBG(7)
57

HISTORY

59       The RAND_DRBG functions were added in OpenSSL 1.1.1.
60
62       Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
63
64       Licensed under the OpenSSL license (the "License").  You may not use
65       this file except in compliance with the License.  You can obtain a copy
66       in the file LICENSE in the source distribution or at
67       <https://www.openssl.org/source/license.html>.
68
69
70
711.1.1q                            2022-07-07          RAND_DRBG_GET0_MASTER(3)
Impressum