summaryrefslogtreecommitdiff
path: root/lib/random.c
Commit message (Collapse)AuthorAgeFilesLines
* fips140: added function for applications to switch the FIPS140-2 modeNikos Mavrogiannopoulos2018-02-191-7/+1
| | | | | | | | | | That would allow FIPS140-2 compliant applications to use forbidden algorithms by switching to a lax FIPS140-2 mode. Resolves #352 Resolves #353 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* fuzzer: added a fuzzer targetNikos Mavrogiannopoulos2017-08-161-1/+10
| | | | | | | | This allows to compile the library with flags which will add predictable random generation and eliminate some crypto checks, in order for the library to be used for testing (fuzzying). Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* random: keep global list of initialized contextsNikos Mavrogiannopoulos2017-03-061-4/+50
| | | | | | | This allows to properly deinitialize all random generator contexts on library deinitialization. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Use a thread local random generator.Nikos Mavrogiannopoulos2017-03-061-32/+9
| | | | | | | | | | | This allows accessing the per-thread random generator in a lock-free way, at the cost of additional memory per thread. The default random generator imposes around 640 bytes per thread on 64-bit architectures. Resolves: #141 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* gnutls_rnd: document the available values of level [ci skip]Nikos Mavrogiannopoulos2017-01-021-1/+3
| | | | This enables using the function by only checking the man page.
* rng: split initialization in preinit and initNikos Mavrogiannopoulos2016-11-041-11/+74
| | | | | | | | This makes gnutls to initialize its random generator on the first call to gnutls_rnd(). That prevents blocking due to getrandom() on a constructor; that change allows to use gnutls-linked applications even in early boot in systems where getrandom() blocks waiting for entropy.
* Removed the 'gnutls_' prefix from files to simplify file namingNikos Mavrogiannopoulos2015-08-231-2/+2
|
* gnutls_rnd: doc updateNikos Mavrogiannopoulos2014-12-121-1/+3
|
* fixed compilation warningsNikos Mavrogiannopoulos2014-09-251-1/+1
|
* register FIPS140 random generator prior to initializationNikos Mavrogiannopoulos2014-01-221-7/+7
|
* The FIPS140 random number generator is enabled conditionally when required.Nikos Mavrogiannopoulos2014-01-171-0/+13
|
* The library state is used even when not in FIPS mode.Nikos Mavrogiannopoulos2013-11-301-1/+1
| | | | | This allows having an error state that blocks the library usage even when not in FIPS mode.
* Added support for fips states.Nikos Mavrogiannopoulos2013-11-271-0/+2
| | | | | | | | | | | This implies that when in FIPS mode and the library is not in operational state (i.e., all self checks succeeded), crypto functionality of the library will fail. This includes: * API functions of gnutls/crypto.h * API functions of gnutls/abstract.h * API functions of gnutls/x509.h * gnutls_init() * API functions of gnutls/xssl.h
* reindented codeNikos Mavrogiannopoulos2013-11-081-24/+17
|
* Use LGPLv2.1 in the files their author's agreed to.Nikos Mavrogiannopoulos2013-02-011-1/+1
|
* Added gnutls_rnd_refresh().Nikos Mavrogiannopoulos2013-01-271-0/+17
|
* Cleanup copyright headers.Simon Josefsson2012-01-251-1/+1
|
* Run 'make update-copyright'.Simon Josefsson2012-01-161-1/+1
|
* Optimizations in DH parameter generation.Nikos Mavrogiannopoulos2011-12-121-8/+4
| | | | | | The larger prime is find first and the big loop needs to find a smaller prime, increasing performance. The _gnutls_rnd() function is now inline and GNUTLS_RND_NONCE doesn't update random generator state.
* Clarify license and copyright.Simon Josefsson2011-08-031-1/+1
|
* More GTK-DOC improvements.Simon Josefsson2011-08-031-4/+4
|
* documentation fixesNikos Mavrogiannopoulos2011-07-231-1/+1
|
* Upgraded to LGPLv3.Nikos Mavrogiannopoulos2011-06-231-5/+3
|
* Indented code. Use same indentation but with -nut to avoid usage of tabs. In ↵Nikos Mavrogiannopoulos2010-12-161-4/+4
| | | | several editors tabs can be configured not to be 8 spaces and this produces artifacts with the current indentation that is a mixture of tabs and spaces.
* Indent (using GNU indent 2.2.11).Simon Josefsson2010-10-141-1/+2
|
* exported gnutls_rnd().Nikos Mavrogiannopoulos2010-06-031-2/+14
|
* Change GNUTLS into GnuTLS.Simon Josefsson2010-05-221-2/+2
|
* Update copyright years.Simon Josefsson2010-01-271-1/+1
|
* Fix FSF copyright notices.Simon Josefsson2010-01-271-1/+1
|
* Minor randomness API cleanups.Simon Josefsson2008-07-091-3/+3
|
* Indent code.Simon Josefsson2008-07-021-16/+20
|
* Initial merge attempt with gnutls_with_ext_mpiNikos Mavrogiannopoulos2008-06-281-30/+7
|
* faster seek into the list.Nikos Mavrogiannopoulos2008-04-261-1/+2
|
* Added interface to register random generators.Nikos2008-03-291-0/+86