1=pod 2 3=head1 NAME 4 5RAND_DRBG_get0_master, 6RAND_DRBG_get0_public, 7RAND_DRBG_get0_private 8- get access to the global RAND_DRBG instances 9 10=head1 SYNOPSIS 11 12 #include <openssl/rand_drbg.h> 13 14 RAND_DRBG *RAND_DRBG_get0_master(void); 15 RAND_DRBG *RAND_DRBG_get0_public(void); 16 RAND_DRBG *RAND_DRBG_get0_private(void); 17 18 19=head1 DESCRIPTION 20 21The default RAND API implementation (RAND_OpenSSL()) utilizes three 22shared DRBG instances which are accessed via the RAND API: 23 24The <public> and <private> DRBG are thread-local instances, which are used 25by RAND_bytes() and RAND_priv_bytes(), respectively. 26The <master> DRBG is a global instance, which is not intended to be used 27directly, but is used internally to reseed the other two instances. 28 29These functions here provide access to the shared DRBG instances. 30 31=head1 RETURN VALUES 32 33RAND_DRBG_get0_master() returns a pointer to the <master> DRBG instance. 34 35RAND_DRBG_get0_public() returns a pointer to the <public> DRBG instance. 36 37RAND_DRBG_get0_private() returns a pointer to the <private> DRBG instance. 38 39 40=head1 NOTES 41 42It is not thread-safe to access the <master> DRBG instance. 43The <public> and <private> DRBG instance can be accessed safely, because 44they are thread-local. Note however, that changes to these two instances 45apply only to the current thread. 46 47For that reason it is recommended not to change the settings of these 48three instances directly. 49Instead, an application should change the default settings for new DRBG instances 50at initialization time, before creating additional threads. 51 52During initialization, it is possible to change the reseed interval 53and reseed time interval. 54It is also possible to exchange the reseeding callbacks entirely. 55 56=head1 SEE ALSO 57 58L<RAND_DRBG_set_callbacks(3)>, 59L<RAND_DRBG_set_reseed_defaults(3)>, 60L<RAND_DRBG_set_reseed_interval(3)>, 61L<RAND_DRBG_set_reseed_time_interval(3)>, 62L<RAND_DRBG_set_callbacks(3)>, 63L<RAND_DRBG_generate(3)>, 64L<RAND_DRBG(7)> 65 66=head1 HISTORY 67 68The RAND_DRBG functions were added in OpenSSL 1.1.1. 69 70=head1 COPYRIGHT 71 72Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved. 73 74Licensed under the OpenSSL license (the "License"). You may not use 75this file except in compliance with the License. You can obtain a copy 76in the file LICENSE in the source distribution or at 77L<https://www.openssl.org/source/license.html>. 78 79=cut 80