summaryrefslogtreecommitdiff
path: root/crypto/testmgr.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2009-05-04 19:23:40 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-05-04 19:23:40 +0800
commit08456ec9749cb22c23d55b7a6166aac43cdbd349 (patch)
tree4adc0e16a19e8d3424b12cce5d3ec6064b0489df /crypto/testmgr.c
parenta52f7ca02be211cea4335bb37755b7949dc2bab1 (diff)
crypto: testmgr - Add self-tests for rfc4309(ccm(aes))
Add an array of encryption and decryption + verification self-tests for rfc4309(ccm(aes)). Test vectors all come from sample FIPS CAVS files provided to Red Hat by a testing lab. Unfortunately, all the published sample vectors in RFC 3610 and NIST Special Publication 800-38C contain nonce lengths that the kernel's rfc4309 implementation doesn't support, so while using some public domain vectors would have been preferred, its not possible at this time. 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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 84f96401b29a..40c10789f7f3 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1879,6 +1879,21 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}, {
+ .alg = "rfc4309(ccm(aes))",
+ .test = alg_test_aead,
+ .suite = {
+ .aead = {
+ .enc = {
+ .vecs = aes_ccm_rfc4309_enc_tv_template,
+ .count = AES_CCM_4309_ENC_TEST_VECTORS
+ },
+ .dec = {
+ .vecs = aes_ccm_rfc4309_dec_tv_template,
+ .count = AES_CCM_4309_DEC_TEST_VECTORS
+ }
+ }
+ }
+ }, {
.alg = "rmd128",
.test = alg_test_hash,
.suite = {