sphinx.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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/pt_BR/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)}(hRandom Number Generator (RNG)h]hRandom Number Generator (RNG)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj; ubah}(h]h ]h"]h$]h&] refdomainjtreftypej reftargetj@ modnameN classnameNjj)}j]jB c.crypto_rng_generateasbuh1hhj7 ubj)}(h h]h }(hj\ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7 ubj)}(hjh]h*}(hjj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7 ubj()}(hdsth]hdst}(hjw hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj7 ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubj)}(hunsigned int dlenh](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj()}(hdlenh]hdlen}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubeh}(h]h ]h"]h$]h&]j?j@uh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj hhhj hKubah}(h]j ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj hKhj hhubjV)}(hhh]j[)}(hget random numberh]hget random number}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj hhubah}(h]h ]h"]h$]h&]uh1jUhj hhhj hKubeh}(h]h ](jtfunctioneh"]h$]h&]jyjtjzj j{j j|j}j~uh1hhhhj#hNhNubj)}(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](j[)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj ubj)}(hhh](j)}(h)``struct crypto_rng *tfm`` cipher handle h](j)}(h``struct crypto_rng *tfm``h]j)}(hj3 h]hstruct crypto_rng *tfm}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1 ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj- ubj)}(hhh]j[)}(h cipher handleh]h cipher handle}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjH hKhjI ubah}(h]h ]h"]h$]h&]uh1jhj- ubeh}(h]h ]h"]h$]h&]uh1jhjH hKhj* ubj)}(hD``const u8 *src`` Input buffer holding additional data, may be NULL h](j)}(h``const u8 *src``h]j)}(hjl h]h const u8 *src}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjf ubj)}(hhh]j[)}(h1Input buffer holding additional data, may be NULLh]h1Input buffer holding additional data, may be NULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhjf ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj* 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:16: ./include/crypto/rng.hhKhj ubj)}(hhh]j[)}(hLength of additional datah]hLength of additional data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj* 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:16: ./include/crypto/rng.hhKhj ubj)}(hhh]j[)}(h(output buffer holding the random numbersh]h(output buffer holding the random numbers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj* 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:16: ./include/crypto/rng.hhKhj ubj)}(hhh]j[)}(hlength of the output bufferh]hlength of the output buffer}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhj, hKhj- ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj, hKhj* ubeh}(h]h ]h"]h$]h&]uh1jhj ubj[)}(h**Description**h]j)}(hjR h]h Description}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP ubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj ubj[)}(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.}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj ubj[)}(h **Return**h]j)}(hjy h]hReturn}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw ubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj ubj[)}(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&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj#hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h!crypto_rng_get_bytes (C function)c.crypto_rng_get_byteshNtauh1hhj#hhhNhNubh)}(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:16: ./include/crypto/rng.hhKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hKubj")}(hcrypto_rng_get_bytesh]j()}(hcrypto_rng_get_bytesh]hcrypto_rng_get_bytes}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj hhhj hKubj)}(h6(struct crypto_rng *tfm, u8 *rdata, unsigned int dlen)h](j)}(hstruct crypto_rng *tfmh](h)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j()}(h crypto_rngh]h crypto_rng}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjtreftypej reftargetjmodnameN classnameNjj)}j]j)}jj sbc.crypto_rng_get_bytesasbuh1hhj ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hjh]h*}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj()}(htfmh]htfm}(hjThhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubj)}(h u8 *rdatah](h)}(hhh]j()}(hu8h]hu8}(hjphhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjmubah}(h]h ]h"]h$]h&] refdomainjtreftypej reftargetjrmodnameN classnameNjj)}j]j5c.crypto_rng_get_bytesasbuh1hhjiubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubj()}(hrdatah]hrdata}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjiubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubj)}(hunsigned int dlenh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hdlenh]hdlen}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubeh}(h]h ]h"]h$]h&]j?j@uh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj hhhj hKubah}(h]j ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj hKhj hhubjV)}(hhh]j[)}(hget random numberh]hget random number}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj!hhubah}(h]h ]h"]h$]h&]uh1jUhj hhhj hKubeh}(h]h ](jtfunctioneh"]h$]h&]jyjtjzj<j{j<j|j}j~uh1hhhhj#hNhNubj)}(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](j[)}(h**Parameters**h]j)}(hjFh]h Parameters}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj@ubj)}(hhh](j)}(h)``struct crypto_rng *tfm`` cipher handle h](j)}(h``struct crypto_rng *tfm``h]j)}(hjeh]hstruct crypto_rng *tfm}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj_ubj)}(hhh]j[)}(h cipher handleh]h cipher handle}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjzhKhj{ubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhjzhKhj\ubj)}(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:16: ./include/crypto/rng.hhKhjubj)}(hhh]j[)}(h(output buffer holding the random numbersh]h(output buffer holding the random numbers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj\ubj)}(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:16: ./include/crypto/rng.hhKhjubj)}(hhh]j[)}(hlength of the output bufferh]hlength of the output buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj\ubeh}(h]h ]h"]h$]h&]uh1jhj@ubj[)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj@ubj[)}(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&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj@ubj[)}(h **Return**h]j)}(hj9h]hReturn}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj@ubj[)}(h30 function was successful; < 0 if an error occurredh]h30 function was successful; < 0 if an error occurred}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj#hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hcrypto_rng_reset (C function)c.crypto_rng_resethNtauh1hhj#hhhNhNubh)}(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}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjhKubj")}(hcrypto_rng_reseth]j()}(hcrypto_rng_reseth]hcrypto_rng_reset}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjzhhhjhKubj)}(h;(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)h](j)}(hstruct crypto_rng *tfmh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j()}(h crypto_rngh]h crypto_rng}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjtreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.crypto_rng_resetasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(htfmh]htfm}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hconst u8 *seedh](h)}(hjh]hconst}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj)ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubh)}(hhh]j()}(hu8h]hu8}(hjKhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjHubah}(h]h ]h"]h$]h&] refdomainjtreftypej reftargetjMmodnameN classnameNjj)}j]jc.crypto_rng_resetasbuh1hhj)ubj)}(h h]h }(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(hjh]h*}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj()}(hseedh]hseed}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj)ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hunsigned int slenh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hslenh]hslen}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubeh}(h]h ]h"]h$]h&]j?j@uh1jhjzhhhjhKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjvhhhjhKubah}(h]jqah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjhKhjshhubjV)}(hhh]j[)}(hre-initialize the RNGh]hre-initialize the RNG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jUhjshhhjhKubeh}(h]h ](jtfunctioneh"]h$]h&]jyjtjzjj{jj|j}j~uh1hhhhj#hNhNubj)}(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 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](j[)}(h**Parameters**h]j)}(hj!h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjubj)}(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:16: ./include/crypto/rng.hhKhj:ubj)}(hhh]j[)}(h cipher handleh]h cipher handle}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjUhKhjVubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhjUhKhj7ubj)}(h#``const u8 *seed`` seed input data h](j)}(h``const u8 *seed``h]j)}(hjyh]hconst u8 *seed}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjsubj)}(hhh]j[)}(hseed input datah]hseed input data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubj)}(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:16: ./include/crypto/rng.hhKhjubj)}(hhh]j[)}(hlength of the seed input datah]hlength of the seed input data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubeh}(h]h ]h"]h$]h&]uh1jhjubj[)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjubj[)}(hXThe 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 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]hXThe 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 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjubj[)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjubj[)}(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}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj#hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h crypto_rng_seedsize (C function)c.crypto_rng_seedsizehNtauh1hhj#hhhNhNubh)}(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}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhhjghKubj")}(hcrypto_rng_seedsizeh]j()}(hcrypto_rng_seedsizeh]hcrypto_rng_seedsize}(hjzhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjvubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjUhhhjghKubj)}(h(struct crypto_rng *tfm)h]j)}(hstruct crypto_rng *tfmh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j()}(h crypto_rngh]h crypto_rng}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjtreftypej reftargetjmodnameN classnameNjj)}j]j)}jj|sbc.crypto_rng_seedsizeasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(htfmh]htfm}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubah}(h]h ]h"]h$]h&]j?j@uh1jhjUhhhjghKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjQhhhjghKubah}(h]jLah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjghKhjNhhubjV)}(hhh]j[)}(hobtain seed size of RNGh]hobtain seed size of RNG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jUhjNhhhjghKubeh}(h]h ](jtfunctioneh"]h$]h&]jyjtjzj1j{j1j|j}j~uh1hhhhj#hNhNubj)}(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](j[)}(h**Parameters**h]j)}(hj;h]h Parameters}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj5ubj)}(hhh]j)}(h)``struct crypto_rng *tfm`` cipher handle h](j)}(h``struct crypto_rng *tfm``h]j)}(hjZh]hstruct crypto_rng *tfm}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhjTubj)}(hhh]j[)}(h cipher handleh]h cipher handle}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jZhjohKhjpubah}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1jhjohKhjQubah}(h]h ]h"]h$]h&]uh1jhj5ubj[)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj5ubj[)}(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&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj5ubj[)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj5ubj[)}(h)seed size for the random number generatorh]h)seed size for the random number generator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhS/var/lib/git/docbuild/linux/Documentation/crypto/api-rng:16: ./include/crypto/rng.hhKhj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj#hhhNhNubeh}(h]crypto-api-random-number-apiah ]h"]crypto api random number apiah$]h&]uh1hhhhhhhhK ubeh}(h]random-number-generator-rngah ]h"]random number generator (rng)ah$]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}(jjj jjju nametypes}(jj juh}(jhjhhhjj#jOjTj]jbj+j0j j j j jqjvjLjQu 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.