]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - crypto/drbg.c
crypto: drbg - SP800-90A Deterministic Random Bit Generator
authorStephan Mueller <smueller@chronox.de>
Sat, 31 May 2014 13:44:17 +0000 (15:44 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Jun 2014 13:26:08 +0000 (21:26 +0800)
commit541af946fe1360ec1b45730964e87d7f93c50781
treead89cf0a13a361db5d80a204329e2c0539454322
parent13269ec647050fd7652abd0eb05673ffe90c3e92
crypto: drbg - SP800-90A Deterministic Random Bit Generator

This is a clean-room implementation of the DRBG defined in SP800-90A.
All three viable DRBGs defined in the standard are implemented:

 * HMAC: This is the leanest DRBG and compiled per default
 * Hash: The more complex DRBG can be enabled at compile time
 * CTR: The most complex DRBG can also be enabled at compile time

The DRBG implementation offers the following:

 * All three DRBG types are implemented with a derivation function.
 * All DRBG types are available with and without prediction resistance.
 * All SHA types of SHA-1, SHA-256, SHA-384, SHA-512 are available for
   the HMAC and Hash DRBGs.
 * All AES types of AES-128, AES-192 and AES-256 are available for the
   CTR DRBG.
 * A self test is implemented with drbg_healthcheck().
 * The FIPS 140-2 continuous self test is implemented.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c [new file with mode: 0644]