diff options
author | Jarod Wilson <jarod@redhat.com> | 2009-05-04 07:23:40 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-06-02 00:04:36 -0400 |
commit | 5d667322a25ab4ecb91176db118fd663fee4da35 (patch) | |
tree | 0dea05fd2e59b7854370a871fb8f9bb30e5ed94e /crypto/testmgr.c | |
parent | e44a1b44c3a9794236fe038b89a0fbef5adcd523 (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.c | 15 |
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[] = { | |||
1879 | } | 1879 | } |
1880 | } | 1880 | } |
1881 | }, { | 1881 | }, { |
1882 | .alg = "rfc4309(ccm(aes))", | ||
1883 | .test = alg_test_aead, | ||
1884 | .suite = { | ||
1885 | .aead = { | ||
1886 | .enc = { | ||
1887 | .vecs = aes_ccm_rfc4309_enc_tv_template, | ||
1888 | .count = AES_CCM_4309_ENC_TEST_VECTORS | ||
1889 | }, | ||
1890 | .dec = { | ||
1891 | .vecs = aes_ccm_rfc4309_dec_tv_template, | ||
1892 | .count = AES_CCM_4309_DEC_TEST_VECTORS | ||
1893 | } | ||
1894 | } | ||
1895 | } | ||
1896 | }, { | ||
1882 | .alg = "rmd128", | 1897 | .alg = "rmd128", |
1883 | .test = alg_test_hash, | 1898 | .test = alg_test_hash, |
1884 | .suite = { | 1899 | .suite = { |