2
0

RAND_DRBG_get0_master.pod 2.3 KB

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