aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2009-05-06 05:29:17 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2009-06-02 00:04:46 -0400
commitf7cb80f2b9fa06730be20d17c80b12e511a36c1c (patch)
tree09bf6f66a518adbceb32b8821b671af3f2f216ac /crypto/testmgr.c
parentf8b0d4d09dc9d0a73fcdcf6c2724650529ec417d (diff)
crypto: testmgr - Add ctr(aes) test vectors
Now with multi-block test vectors, all from SP800-38A, Appendix F.5. Also added ctr(aes) to case 10 in tcrypt. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r--crypto/testmgr.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index c5550943411d..f4cc1780aee2 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1568,6 +1568,21 @@ static const struct alg_test_desc alg_test_descs[] = {
1568 } 1568 }
1569 } 1569 }
1570 }, { 1570 }, {
1571 .alg = "ctr(aes)",
1572 .test = alg_test_skcipher,
1573 .suite = {
1574 .cipher = {
1575 .enc = {
1576 .vecs = aes_ctr_enc_tv_template,
1577 .count = AES_CTR_ENC_TEST_VECTORS
1578 },
1579 .dec = {
1580 .vecs = aes_ctr_dec_tv_template,
1581 .count = AES_CTR_DEC_TEST_VECTORS
1582 }
1583 }
1584 }
1585 }, {
1571 .alg = "cts(cbc(aes))", 1586 .alg = "cts(cbc(aes))",
1572 .test = alg_test_skcipher, 1587 .test = alg_test_skcipher,
1573 .suite = { 1588 .suite = {
@@ -2017,12 +2032,12 @@ static const struct alg_test_desc alg_test_descs[] = {
2017 .suite = { 2032 .suite = {
2018 .cipher = { 2033 .cipher = {
2019 .enc = { 2034 .enc = {
2020 .vecs = aes_ctr_enc_tv_template, 2035 .vecs = aes_ctr_rfc3686_enc_tv_template,
2021 .count = AES_CTR_ENC_TEST_VECTORS 2036 .count = AES_CTR_3686_ENC_TEST_VECTORS
2022 }, 2037 },
2023 .dec = { 2038 .dec = {
2024 .vecs = aes_ctr_dec_tv_template, 2039 .vecs = aes_ctr_rfc3686_dec_tv_template,
2025 .count = AES_CTR_DEC_TEST_VECTORS 2040 .count = AES_CTR_3686_DEC_TEST_VECTORS
2026 } 2041 }
2027 } 2042 }
2028 } 2043 }