blob: 5470b75130540afd00edc245bfe4c9549f066a11 [file] [log] [blame]
Paul Bakker37ca75d2011-01-06 12:28:03 +00001/**
Jaeden Amero25facdd2018-01-23 15:36:58 +00002 * \file doc_rng.h
3 *
4 * \brief Random number generator (RNG) module documentation file.
5 */
6/*
Manuel Pégourié-Gonnard8119dad2015-08-06 10:59:26 +02007 *
Bence Szépkúti1e148272020-08-07 13:07:28 +02008 * Copyright The Mbed TLS Contributors
Dave Rodgman7ff79652023-11-03 12:04:52 +00009 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
Paul Bakker37ca75d2011-01-06 12:28:03 +000010 */
11
12/**
13 * @addtogroup rng_module Random number generator (RNG) module
Paul Bakker6083fd22011-12-03 21:45:14 +000014 *
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020015 * The Random number generator (RNG) module provides random number
Simon Butcher6e7d3d52016-01-04 16:09:23 +000016 * generation, see \c mbedtls_ctr_drbg_random().
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020017 *
18 * The block-cipher counter-mode based deterministic random
Paul Bakker6083fd22011-12-03 21:45:14 +000019 * bit generator (CTR_DBRG) as specified in NIST SP800-90. It needs an external
Simon Butcher6e7d3d52016-01-04 16:09:23 +000020 * source of entropy. For these purposes \c mbedtls_entropy_func() can be used.
21 * This is an implementation based on a simple entropy accumulator design.
Paul Bakker6083fd22011-12-03 21:45:14 +000022 *
Simon Butcher6e7d3d52016-01-04 16:09:23 +000023 * The other number generator that is included is less strong and uses the
24 * HAVEGE (HArdware Volatile Entropy Gathering and Expansion) software heuristic
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020025 * which considered unsafe for primary usage, but provides additional random
26 * to the entropy pool if enables.
Paul Bakker37ca75d2011-01-06 12:28:03 +000027 *
Simon Butcher6e7d3d52016-01-04 16:09:23 +000028 * Meaning that there seems to be no practical algorithm that can guess
Paul Bakker37ca75d2011-01-06 12:28:03 +000029 * the next bit with a probability larger than 1/2 in an output sequence.
30 *
31 * This module can be used to generate random numbers.
32 */