RAND_DRBG_NEW - Online Linux Manual PageSection : 3
Updated : 2021-03-26
Source : 1.1.1k
Note : OpenSSL

NAMERAND_DRBG_new, RAND_DRBG_secure_new, RAND_DRBG_set, RAND_DRBG_set_defaults, RAND_DRBG_instantiate, RAND_DRBG_uninstantiate, RAND_DRBG_free ​− initialize and cleanup a RAND_DRBG instance

SYNOPSIS​ #include <openssl/rand_drbg.h> ​ ​ ​ RAND_DRBG *RAND_DRBG_new(int type, ​ unsigned int flags, ​ RAND_DRBG *parent); ​ ​ RAND_DRBG *RAND_DRBG_secure_new(int type, ​ unsigned int flags, ​ RAND_DRBG *parent); ​ ​ int RAND_DRBG_set(RAND_DRBG *drbg, ​ int type, unsigned int flags); ​ ​ int RAND_DRBG_set_defaults(int type, unsigned int flags); ​ ​ int RAND_DRBG_instantiate(RAND_DRBG *drbg, ​ const unsigned char *pers, size_t perslen); ​ ​ int RAND_DRBG_uninstantiate(RAND_DRBG *drbg); ​ ​ void RAND_DRBG_free(RAND_DRBG *drbg);

DESCRIPTIONRAND_DRBG_new() and RAND_DRBG_secure_new() create a new DRBG instance of the given type, allocated from the heap resp. the secure heap (using OPENSSL_zalloc() resp. OPENSSL_secure_zalloc()). RAND_DRBG_set() initializes the drbg with the given type and flags. RAND_DRBG_set_defaults() sets the default type and flags for new DRBG instances. Currently, all DRBG types are based on AES-CTR, so type can be one of the following values: NID_aes_128_ctr, NID_aes_192_ctr, NID_aes_256_ctr. Before the DRBG can be used to generate random bits, it is necessary to set its type and to instantiate it. The optional flags argument specifies a set of bit flags which can be joined using the | operator. Currently, the only flag is ​RAND_DRBG_FLAG_CTR_NO_DF, which disables the use of the derivation function ctr_df. For an explanation, see [NIST SP 800−90A Rev. 1]. If a parent instance is specified then this will be used instead of the default entropy source for reseeding the drbg. It is said that the ​drbg is chained to its parent. For more information, see the NOTES section. RAND_DRBG_instantiate() seeds the drbg instance using random input from trusted entropy sources. Optionally, a personalization string pers of length perslen can be specified. To omit the personalization string, set pers=NULL and perslen=0; RAND_DRBG_uninstantiate() clears the internal state of the drbg and puts it back in the uninstantiated state.

RETURN VALUESRAND_DRBG_new() and RAND_DRBG_secure_new() return a pointer to a DRBG instance allocated on the heap, resp. secure heap. RAND_DRBG_set(), ​RAND_DRBG_instantiate(), and ​RAND_DRBG_uninstantiate() return 1 on success, and 0 on failure. RAND_DRBG_free() does not return a value.

NOTESThe DRBG design supports chaining, which means that a DRBG instance can use another parent DRBG instance instead of the default entropy source to obtain fresh random input for reseeding, provided that parent DRBG instance was properly instantiated, either from a trusted entropy source, or from yet another parent DRBG instance. For a detailed description of the reseeding process, see RAND_DRBG(7). The default DRBG type and flags are applied only during creation of a DRBG instance. To ensure that they are applied to the global and thread-local DRBG instances (<master>, resp. <public> and <private>), it is necessary to call ​RAND_DRBG_set_defaults() before creating any thread and before calling any cryptographic routines that obtain random data directly or indirectly.

SEE ALSOOPENSSL_zalloc(3), ​OPENSSL_secure_zalloc(3), ​RAND_DRBG_generate(3), ​RAND_DRBG(7)

HISTORYThe RAND_DRBG functions were added in OpenSSL 1.1.1.

COPYRIGHTCopyright 2017−2020 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the License). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
0
Johanes Gumabo
Data Size   :   14,095 byte
man-RAND_DRBG_new.3sslBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 171,181
Visitor ID   :     :  
Visitor IP   :   18.216.167.229   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|R___AND_DRBG_free.3ssl|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|R___AND_DRBG_free.3ssl|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|R___AND_DRBG_free.3ssl|43|br══─}─══|'br══─}─══ )         (htmlprn|149|R___AND_DRBG_free.3ssl|43|'br══─}─══ |'br══─}─══ )