summaryrefslogtreecommitdiff
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorRik Snel <rsnel@cube.dyndns.org>2006-11-29 19:01:41 +1100
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-06 18:38:58 -0800
commit92bf300df93f9447ba2c1db477546dffc27fce1b (patch)
treeee59d74efcef0e8664f42e7a2382e1f5e726ad3d /crypto/tcrypt.c
parent07a5a2216d1ca28c783bc2f04f0f823a52b25018 (diff)
downloadlinux-crypto-92bf300df93f9447ba2c1db477546dffc27fce1b.tar.gz
linux-crypto-92bf300df93f9447ba2c1db477546dffc27fce1b.zip
[CRYPTO] tcrypt: LRW test vectors
Do modprobe tcrypt mode=10 to check the included test vectors, they are from: http://grouper.ieee.org/groups/1619/email/pdf00017.pdf and from http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html. To make the last test vector fit, I had to increase the buffer size of input and result to 512 bytes. Signed-off-by: Rik Snel <rsnel@cube.dyndns.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index d1a5f2b8..d671e894 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -906,6 +906,10 @@ static void do_test(void)
AES_CBC_ENC_TEST_VECTORS);
test_cipher("cbc(aes)", DECRYPT, aes_cbc_dec_tv_template,
AES_CBC_DEC_TEST_VECTORS);
+ test_cipher("lrw(aes)", ENCRYPT, aes_lrw_enc_tv_template,
+ AES_LRW_ENC_TEST_VECTORS);
+ test_cipher("lrw(aes)", DECRYPT, aes_lrw_dec_tv_template,
+ AES_LRW_DEC_TEST_VECTORS);
//CAST5
test_cipher("ecb(cast5)", ENCRYPT, cast5_enc_tv_template,
@@ -1055,6 +1059,10 @@ static void do_test(void)
AES_CBC_ENC_TEST_VECTORS);
test_cipher("cbc(aes)", DECRYPT, aes_cbc_dec_tv_template,
AES_CBC_DEC_TEST_VECTORS);
+ test_cipher("lrw(aes)", ENCRYPT, aes_lrw_enc_tv_template,
+ AES_LRW_ENC_TEST_VECTORS);
+ test_cipher("lrw(aes)", DECRYPT, aes_lrw_dec_tv_template,
+ AES_LRW_DEC_TEST_VECTORS);
break;
case 11:
@@ -1194,6 +1202,10 @@ static void do_test(void)
aes_speed_template);
test_cipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0,
aes_speed_template);
+ test_cipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0,
+ aes_lrw_speed_template);
+ test_cipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0,
+ aes_lrw_speed_template);
break;
case 201: