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>
This commit is contained in:
Jarod Wilson
2009-05-04 19:23:40 +08:00
committed by Herbert Xu
parent e44a1b44c3
commit 5d667322a2
3 changed files with 389 additions and 0 deletions

View File

@@ -667,6 +667,10 @@ static void do_test(int m)
tcrypt_test("zlib");
break;
case 45:
tcrypt_test("rfc4309(ccm(aes))");
break;
case 100:
tcrypt_test("hmac(md5)");
break;