'\" t .\" Title: crypto_rng_reset .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Programming Interface .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "CRYPTO_RNG_RESET" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Programming Interface" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" crypto_rng_reset \- re\-initialize the RNG .SH "SYNOPSIS" .HP \w'int\ crypto_rng_reset('u .BI "int crypto_rng_reset(struct\ crypto_rng\ *\ " "tfm" ", const\ u8\ *\ " "seed" ", unsigned\ int\ " "slen" ");" .SH "ARGUMENTS" .PP \fItfm\fR .RS 4 cipher handle .RE .PP \fIseed\fR .RS 4 seed input data .RE .PP \fIslen\fR .RS 4 length of the seed input data .RE .SH "DESCRIPTION" .PP 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\&. .SH "RETURN" .PP 0 if the setting of the key was successful; < 0 if an error occurred .SH "AUTHORS" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .PP \fBMarek Vasut\fR <\&marek@denx.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br