Osphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/crypto/api-rngmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/crypto/api-rngmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/crypto/api-rngmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/crypto/api-rngmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/crypto/api-rngmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/crypto/api-rngmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h#Random Number Algorithm Definitionsh]h#Random Number Algorithm Definitions}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKtubh)}(h h]h }(hjMhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj:hhhjLhKtubh)}(hcrypto_free_rngh]j)}(hcrypto_free_rngh]hcrypto_free_rng}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubah}(h]h ](jjeh"]h$]h&]jjuh1hhj:hhhjLhKtubj)}(h(struct crypto_rng *tfm)h]j)}(hstruct crypto_rng *tfmh](h)}(hhh]hstruct}(hj{hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjwubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjwubh)}(hhh]j)}(h crypto_rngh]h crypto_rng}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetjmodnameN classnameNjpjs)}jv]jy)}jljasbc.crypto_free_rngasbuh1hhjwubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjwubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(htfmh]htfm}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubah}(h]h ]h"]h$]h&]jjuh1jhj:hhhjLhKtubeh}(h]h ]h"]h$]h&]jjj"uh1hj#j$hj6hhhjLhKtubah}(h]j1ah ](j(j)eh"]h$]h&]j-j.)j/huh1hhjLhKthj3hhubj1)}(hhh]j6)}(hzeroize and free RNG handleh]hzeroize and free RNG handle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKthjhhubah}(h]h ]h"]h$]h&]uh1j0hj3hhhjLhKtubeh}(h]h ](jOfunctioneh"]h$]h&]jTjOjUj jVj jWjXjYuh1hhhhjhNhNubj[)}(h**Parameters** ``struct crypto_rng *tfm`` cipher handle to be freed **Description** If **tfm** is a NULL or error pointer, this function does nothing.h](j6)}(h**Parameters**h]je)}(hj h]h Parameters}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKxhj ubj)}(hhh]j)}(h5``struct crypto_rng *tfm`` cipher handle to be freed h](j)}(h``struct crypto_rng *tfm``h]j)}(hj? h]hstruct crypto_rng *tfm}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj= ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKuhj9 ubj)}(hhh]j6)}(hcipher handle to be freedh]hcipher handle to be freed}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjT hKuhjU ubah}(h]h ]h"]h$]h&]uh1jhj9 ubeh}(h]h ]h"]h$]h&]uh1jhjT hKuhj6 ubah}(h]h ]h"]h$]h&]uh1jhj ubj6)}(h**Description**h]je)}(hjz h]h Description}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjx ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKwhj ubj6)}(hBIf **tfm** is a NULL or error pointer, this function does nothing.h](hIf }(hj hhhNhNubje)}(h**tfm**h]htfm}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubh8 is a NULL or error pointer, this function does nothing.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKwhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ crypto_rng_generate (C function)c.crypto_rng_generatehNtauh1hhjhhhNhNubh)}(hhh](h)}(hnint crypto_rng_generate (struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen)h]h)}(hmint crypto_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen)h](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj hhhj hKubh)}(hcrypto_rng_generateh]j)}(hcrypto_rng_generateh]hcrypto_rng_generate}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]jjuh1hhj hhhj hKubj)}(hV(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen)h](j)}(hstruct crypto_rng *tfmh](h)}(hhh]hstruct}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubh)}(hhh]j)}(h crypto_rngh]h crypto_rng}(hj, hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj) ubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetj. modnameN classnameNjpjs)}jv]jy)}jlj sbc.crypto_rng_generateasbuh1hhj ubh)}(h h]h }(hjL hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubj)}(hjh]h*}(hjZ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(htfmh]htfm}(hjg hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h const u8 *srch](h)}(hjh]hconst}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj| ubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj| ubh)}(hhh]j)}(hu8h]hu8}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetj modnameN classnameNjpjs)}jv]jH c.crypto_rng_generateasbuh1hhj| ubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj| ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj| ubj)}(hsrch]hsrc}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj| ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned int slenh](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubj)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubj)}(hslenh]hslen}(hj( hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hu8 *dsth](h)}(hhh]j)}(hu8h]hu8}(hjD hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA ubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetjF modnameN classnameNjpjs)}jv]jH c.crypto_rng_generateasbuh1hhj= ubh)}(h h]h }(hjb hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj= ubj)}(hjh]h*}(hjp hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj= ubj)}(hdsth]hdst}(hj} hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj= ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned int dlenh](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubj)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubj)}(hdlenh]hdlen}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]jjj"uh1hj#j$hj hhhj hKubah}(h]j ah ](j(j)eh"]h$]h&]j-j.)j/huh1hhj hKhj hhubj1)}(hhh]j6)}(hget random numberh]hget random number}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj hhubah}(h]h ]h"]h$]h&]uh1j0hj hhhj hKubeh}(h]h ](jOfunctioneh"]h$]h&]jTjOjUj jVj jWjXjYuh1hhhhjhNhNubj[)}(hX**Parameters** ``struct crypto_rng *tfm`` cipher handle ``const u8 *src`` Input buffer holding additional data, may be NULL ``unsigned int slen`` Length of additional data ``u8 *dst`` output buffer holding the random numbers ``unsigned int dlen`` length of the output buffer **Description** This function fills the caller-allocated buffer with random numbers using the random number generator referenced by the cipher handle. **Return** 0 function was successful; < 0 if an error occurredh](j6)}(h**Parameters**h]je)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubj)}(hhh](j)}(h)``struct crypto_rng *tfm`` cipher handle h](j)}(h``struct crypto_rng *tfm``h]j)}(hj9 h]hstruct crypto_rng *tfm}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7 ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj3 ubj)}(hhh]j6)}(h cipher handleh]h cipher handle}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjN hKhjO ubah}(h]h ]h"]h$]h&]uh1jhj3 ubeh}(h]h ]h"]h$]h&]uh1jhjN hKhj0 ubj)}(hD``const u8 *src`` Input buffer holding additional data, may be NULL h](j)}(h``const u8 *src``h]j)}(hjr h]h const u8 *src}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjl ubj)}(hhh]j6)}(h1Input buffer holding additional data, may be NULLh]h1Input buffer holding additional data, may be NULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhjl ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj0 ubj)}(h0``unsigned int slen`` Length of additional data h](j)}(h``unsigned int slen``h]j)}(hj h]hunsigned int slen}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubj)}(hhh]j6)}(hLength of additional datah]hLength of additional data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj0 ubj)}(h5``u8 *dst`` output buffer holding the random numbers h](j)}(h ``u8 *dst``h]j)}(hj h]hu8 *dst}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubj)}(hhh]j6)}(h(output buffer holding the random numbersh]h(output buffer holding the random numbers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj0 ubj)}(h2``unsigned int dlen`` length of the output buffer h](j)}(h``unsigned int dlen``h]j)}(hj h]hunsigned int dlen}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubj)}(hhh]j6)}(hlength of the output bufferh]hlength of the output buffer}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hj2 hKhj3 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj2 hKhj0 ubeh}(h]h ]h"]h$]h&]uh1jhj ubj6)}(h**Description**h]je)}(hjX h]h Description}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjV ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubj6)}(hThis function fills the caller-allocated buffer with random numbers using the random number generator referenced by the cipher handle.h]hThis function fills the caller-allocated buffer with random numbers using the random number generator referenced by the cipher handle.}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubj6)}(h **Return**h]je)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj} ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubj6)}(h30 function was successful; < 0 if an error occurredh]h30 function was successful; < 0 if an error occurred}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ!crypto_rng_get_bytes (C function)c.crypto_rng_get_byteshNtauh1hhjhhhNhNubh)}(hhh](h)}(hOint crypto_rng_get_bytes (struct crypto_rng *tfm, u8 *rdata, unsigned int dlen)h]h)}(hNint crypto_rng_get_bytes(struct crypto_rng *tfm, u8 *rdata, unsigned int dlen)h](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKubh)}(h h]h }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj hhhj hKubh)}(hcrypto_rng_get_bytesh]j)}(hcrypto_rng_get_bytesh]hcrypto_rng_get_bytes}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]jjuh1hhj hhhj hKubj)}(h6(struct crypto_rng *tfm, u8 *rdata, unsigned int dlen)h](j)}(hstruct crypto_rng *tfmh](h)}(hhh]hstruct}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubh)}(hhh]j)}(h crypto_rngh]h crypto_rng}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetj!modnameN classnameNjpjs)}jv]jy)}jlj sbc.crypto_rng_get_bytesasbuh1hhj ubh)}(h h]h }(hj?hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubj)}(hjh]h*}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(htfmh]htfm}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h u8 *rdatah](h)}(hhh]j)}(hu8h]hu8}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetjxmodnameN classnameNjpjs)}jv]j;c.crypto_rng_get_bytesasbuh1hhjoubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjoubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(hrdatah]hrdata}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned int dlenh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubj)}(hdlenh]hdlen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]jjj"uh1hj#j$hj hhhj hKubah}(h]j ah ](j(j)eh"]h$]h&]j-j.)j/huh1hhj hKhj hhubj1)}(hhh]j6)}(hget random numberh]hget random number}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj'hhubah}(h]h ]h"]h$]h&]uh1j0hj hhhj hKubeh}(h]h ](jOfunctioneh"]h$]h&]jTjOjUjBjVjBjWjXjYuh1hhhhjhNhNubj[)}(hX**Parameters** ``struct crypto_rng *tfm`` cipher handle ``u8 *rdata`` output buffer holding the random numbers ``unsigned int dlen`` length of the output buffer **Description** This function fills the caller-allocated buffer with random numbers using the random number generator referenced by the cipher handle. **Return** 0 function was successful; < 0 if an error occurredh](j6)}(h**Parameters**h]je)}(hjLh]h Parameters}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjJubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjFubj)}(hhh](j)}(h)``struct crypto_rng *tfm`` cipher handle h](j)}(h``struct crypto_rng *tfm``h]j)}(hjkh]hstruct crypto_rng *tfm}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjeubj)}(hhh]j6)}(h cipher handleh]h cipher handle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhjhKhjbubj)}(h7``u8 *rdata`` output buffer holding the random numbers h](j)}(h ``u8 *rdata``h]j)}(hjh]h u8 *rdata}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjubj)}(hhh]j6)}(h(output buffer holding the random numbersh]h(output buffer holding the random numbers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjbubj)}(h2``unsigned int dlen`` length of the output buffer h](j)}(h``unsigned int dlen``h]j)}(hjh]hunsigned int dlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjubj)}(hhh]j6)}(hlength of the output bufferh]hlength of the output buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjbubeh}(h]h ]h"]h$]h&]uh1jhjFubj6)}(h**Description**h]je)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjFubj6)}(hThis function fills the caller-allocated buffer with random numbers using the random number generator referenced by the cipher handle.h]hThis function fills the caller-allocated buffer with random numbers using the random number generator referenced by the cipher handle.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjFubj6)}(h **Return**h]je)}(hj?h]hReturn}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj=ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjFubj6)}(h30 function was successful; < 0 if an error occurredh]h30 function was successful; < 0 if an error occurred}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjFubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČcrypto_rng_reset (C function)c.crypto_rng_resethNtauh1hhjhhhNhNubh)}(hhh](h)}(hPint crypto_rng_reset (struct crypto_rng *tfm, const u8 *seed, unsigned int slen)h]h)}(hOint crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjhhhjhKubh)}(hcrypto_rng_reseth]j)}(hcrypto_rng_reseth]hcrypto_rng_reset}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1hhjhhhjhKubj)}(h;(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)h](j)}(hstruct crypto_rng *tfmh](h)}(hhh]hstruct}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubh)}(hhh]j)}(h crypto_rngh]h crypto_rng}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetjmodnameN classnameNjpjs)}jv]jy)}jljsbc.crypto_rng_resetasbuh1hhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(htfmh]htfm}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst u8 *seedh](h)}(hjh]hconst}(hj3hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj/ubh)}(h h]h }(hj@hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj/ubh)}(hhh]j)}(hu8h]hu8}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetjSmodnameN classnameNjpjs)}jv]jc.crypto_rng_resetasbuh1hhj/ubh)}(h h]h }(hjohhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj/ubj)}(hjh]h*}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(hseedh]hseed}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int slenh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubj)}(hslenh]hslen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj"uh1hj#j$hj|hhhjhKubah}(h]jwah ](j(j)eh"]h$]h&]j-j.)j/huh1hhjhKhjyhhubj1)}(hhh]j6)}(hre-initialize the RNGh]hre-initialize the RNG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j0hjyhhhjhKubeh}(h]h ](jOfunctioneh"]h$]h&]jTjOjUjjVjjWjXjYuh1hhhhjhNhNubj[)}(hX$**Parameters** ``struct crypto_rng *tfm`` cipher handle ``const u8 *seed`` seed input data ``unsigned int slen`` length of the seed input data **Description** The reset function completely re-initializes the random number generator referenced by the cipher handle by clearing the current state. The new state is initialized with the caller provided seed or automatically, depending on the random number generator type (the ANSI X9.31 RNG requires caller-provided seed, the SP800-90A DRBGs perform an automatic seeding). The seed is provided as a parameter to this function call. The provided seed should have the length of the seed size defined for the random number generator as defined by crypto_rng_seedsize. **Return** 0 if the setting of the key was successful; < 0 if an error occurredh](j6)}(h**Parameters**h]je)}(hj'h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj%ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj!ubj)}(hhh](j)}(h)``struct crypto_rng *tfm`` cipher handle h](j)}(h``struct crypto_rng *tfm``h]j)}(hjFh]hstruct crypto_rng *tfm}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj@ubj)}(hhh]j6)}(h cipher handleh]h cipher handle}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hj[hKhj\ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj[hKhj=ubj)}(h#``const u8 *seed`` seed input data h](j)}(h``const u8 *seed``h]j)}(hjh]hconst u8 *seed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjyubj)}(hhh]j6)}(hseed input datah]hseed input data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jhjhKhj=ubj)}(h4``unsigned int slen`` length of the seed input data h](j)}(h``unsigned int slen``h]j)}(hjh]hunsigned int slen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjubj)}(hhh]j6)}(hlength of the seed input datah]hlength of the seed input data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj=ubeh}(h]h ]h"]h$]h&]uh1jhj!ubj6)}(h**Description**h]je)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj!ubj6)}(hX(The reset function completely re-initializes the random number generator referenced by the cipher handle by clearing the current state. The new state is initialized with the caller provided seed or automatically, depending on the random number generator type (the ANSI X9.31 RNG requires caller-provided seed, the SP800-90A DRBGs perform an automatic seeding). The seed is provided as a parameter to this function call. The provided seed should have the length of the seed size defined for the random number generator as defined by crypto_rng_seedsize.h]hX(The reset function completely re-initializes the random number generator referenced by the cipher handle by clearing the current state. The new state is initialized with the caller provided seed or automatically, depending on the random number generator type (the ANSI X9.31 RNG requires caller-provided seed, the SP800-90A DRBGs perform an automatic seeding). The seed is provided as a parameter to this function call. The provided seed should have the length of the seed size defined for the random number generator as defined by crypto_rng_seedsize.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj!ubj6)}(h **Return**h]je)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj!ubj6)}(hD0 if the setting of the key was successful; < 0 if an error occurredh]hD0 if the setting of the key was successful; < 0 if an error occurred}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ crypto_rng_seedsize (C function)c.crypto_rng_seedsizehNtauh1hhjhhhNhNubh)}(hhh](h)}(h0int crypto_rng_seedsize (struct crypto_rng *tfm)h]h)}(h/int crypto_rng_seedsize(struct crypto_rng *tfm)h](j)}(hinth]hint}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[hhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKubh)}(h h]h }(hjnhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj[hhhjmhKubh)}(hcrypto_rng_seedsizeh]j)}(hcrypto_rng_seedsizeh]hcrypto_rng_seedsize}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubah}(h]h ](jjeh"]h$]h&]jjuh1hhj[hhhjmhKubj)}(h(struct crypto_rng *tfm)h]j)}(hstruct crypto_rng *tfmh](h)}(hhh]hstruct}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubh)}(hhh]j)}(h crypto_rngh]h crypto_rng}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjOreftypejl reftargetjmodnameN classnameNjpjs)}jv]jy)}jljsbc.crypto_rng_seedsizeasbuh1hhjubh)}(h h]h }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(htfmh]htfm}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj[hhhjmhKubeh}(h]h ]h"]h$]h&]jjj"uh1hj#j$hjWhhhjmhKubah}(h]jRah ](j(j)eh"]h$]h&]j-j.)j/huh1hhjmhKhjThhubj1)}(hhh]j6)}(hobtain seed size of RNGh]hobtain seed size of RNG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j0hjThhhjmhKubeh}(h]h ](jOfunctioneh"]h$]h&]jTjOjUj7jVj7jWjXjYuh1hhhhjhNhNubj[)}(hX**Parameters** ``struct crypto_rng *tfm`` cipher handle **Description** The function returns the seed size for the random number generator referenced by the cipher handle. This value may be zero if the random number generator does not implement or require a reseeding. For example, the SP800-90A DRBGs implement an automated reseeding after reaching a pre-defined threshold. **Return** seed size for the random number generatorh](j6)}(h**Parameters**h]je)}(hjAh]h Parameters}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj?ubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj;ubj)}(hhh]j)}(h)``struct crypto_rng *tfm`` cipher handle h](j)}(h``struct crypto_rng *tfm``h]j)}(hj`h]hstruct crypto_rng *tfm}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhjZubj)}(hhh]j6)}(h cipher handleh]h cipher handle}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hjuhKhjvubah}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1jhjuhKhjWubah}(h]h ]h"]h$]h&]uh1jhj;ubj6)}(h**Description**h]je)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj;ubj6)}(hX.The function returns the seed size for the random number generator referenced by the cipher handle. This value may be zero if the random number generator does not implement or require a reseeding. For example, the SP800-90A DRBGs implement an automated reseeding after reaching a pre-defined threshold.h]hX.The function returns the seed size for the random number generator referenced by the cipher handle. This value may be zero if the random number generator does not implement or require a reseeding. For example, the SP800-90A DRBGs implement an automated reseeding after reaching a pre-defined threshold.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj;ubj6)}(h **Return**h]je)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj;ubj6)}(h)seed size for the random number generatorh]h)seed size for the random number generator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j5hS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:13: ./include/crypto/rng.hhKhj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubeh}(h]crypto-api-random-number-apiah ]h"]crypto api random number apiah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjju nametypes}(jjuh}(jhhhjjj*j/jcjhj1j6j j j j jwj|jRjWu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.