---
name: "crypto_rng_reset"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/crypto_rng_reset"
---

# crypto\_rng\_reset(9)

re-initialize the RNG

## NAME

crypto\_rng\_reset - re-initialize the RNG

## SYNOPSIS

**int crypto\_rng\_reset(struct crypto\_rng \*** *tfm***, const u8 \*** *seed***, unsigned int** *slen***);**

## ARGUMENTS

*tfm*

cipher handle

*seed*

seed input data

*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 occurred

## AUTHORS

**Stephan Mueller** \<smueller@chronox.de\>

Author.

**Marek Vasut** \<marek@denx.de\>

Author.

## COPYRIGHT
