1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct rng_alg</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Kernel Crypto API"><link rel="up" href="ch05s02.html" title="Block Cipher Algorithm Definitions"><link rel="prev" href="API-struct-cipher-alg.html" title="struct cipher_alg"><link rel="next" href="ch05s03.html" title="Asynchronous Block Cipher API"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct rng_alg</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-cipher-alg.html">Prev</a>&#160;</td><th width="60%" align="center">Block Cipher Algorithm Definitions</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch05s03.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-rng-alg"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct rng_alg &#8212; 
2  random number generator definition
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct rng_alg {
5  int (* rng_make_random) (struct crypto_rng *tfm, u8 *rdata,unsigned int dlen);
6  int (* rng_reset) (struct crypto_rng *tfm, u8 *seed, unsigned int slen);
7  unsigned int seedsize;
8};  </pre></div><div class="refsect1"><a name="idp1097483388"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">rng_make_random</span></dt><dd><p>
9The function defined by this variable obtains a random
10number. The random number generator transform must generate
11the random number out of the context provided with this
12call.
13      </p></dd><dt><span class="term">rng_reset</span></dt><dd><p>
14Reset of the random number generator by clearing the entire state.
15With the invocation of this function call, the random number
16generator shall completely reinitialize its state. If the random
17number generator requires a seed for setting up a new state,
18the seed must be provided by the consumer while invoking this
19function. The required size of the seed is defined with
20<em class="parameter"><code>seedsize</code></em> .
21      </p></dd><dt><span class="term">seedsize</span></dt><dd><p>
22The seed size required for a random number generator
23initialization defined with this variable. Some random number
24generators like the SP800-90A DRBG does not require a seed as the
25seeding is implemented internally without the need of support by
26the consumer. In this case, the seed size is set to zero.
27      </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-cipher-alg.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch05s02.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch05s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct cipher_alg</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Asynchronous Block Cipher API</td></tr></table></div></body></html>
28