Skip to content

Commit b8454ee

Browse files
nhormanherbertx
authored andcommitted
crypto: prng - Deterministic CPRNG
This patch adds a cryptographic pseudo-random number generator based on CTR(AES-128). It is meant to be used in cases where a deterministic CPRNG is required. One of the first applications will be as an input in the IPsec IV generation process. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 166247f commit b8454ee

4 files changed

Lines changed: 447 additions & 1 deletion

File tree

‎crypto/Kconfig‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,15 @@ config CRYPTO_LZO
666666
help
667667
This is the LZO algorithm.
668668

669+
comment "Random Number Generation"
670+
671+
config CRYPTO_PRNG
672+
tristate "Pseudo Random Number Generation for Cryptographic modules"
673+
help
674+
This option enables the generic pseudo random number generator
675+
for cryptographic modules. Uses the Algorithm specified in
676+
ANSI X9.31 A.2.4
677+
669678
source "drivers/crypto/Kconfig"
670679

671680
endif # if CRYPTO

‎crypto/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
6969
obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
7070
obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o
7171
obj-$(CONFIG_CRYPTO_LZO) += lzo.o
72-
72+
obj-$(CONFIG_CRYPTO_PRNG) += prng.o
7373
obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
7474

7575
#

0 commit comments

Comments
 (0)