aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2009-05-04 07:46:29 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2009-06-02 00:04:40 -0400
commite08ca2da39db22da569dc23578103cdc942fe3ac (patch)
tree2ea4b4d964492400a0930b8d77fbda600877b00d /crypto/tcrypt.c
parent7647d6ce2077d9e1c3d72359f6b4492be129cfe8 (diff)
crypto: testmgr - Add ansi_cprng test vectors
Add ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode), aka 'ansi_cprng' test vectors, taken from Appendix B.2.9 and B.2.10 of the NIST RNGVS document, found here: http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf Successfully tested against both the cryptodev-2.6 tree and a Red Hat Enterprise Linux 5.4 kernel, via 'modprobe tcrypt mode=150'. The selection of 150 was semi-arbitrary, didn't seem like it should go any place in particular, so I started a new range for rng tests. Signed-off-by: Jarod Wilson <jarod@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 0452036b1d45..ea3b8a8db721 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -707,6 +707,10 @@ static void do_test(int m)
707 tcrypt_test("hmac(rmd160)"); 707 tcrypt_test("hmac(rmd160)");
708 break; 708 break;
709 709
710 case 150:
711 tcrypt_test("ansi_cprng");
712 break;
713
710 case 200: 714 case 200:
711 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, 715 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
712 speed_template_16_24_32); 716 speed_template_16_24_32);