Skip to contentSkip to conversation

crypto: Add some test vectors for cmac(camellia)

PATCH In review David Howells 2 participants 2 messages Apr 13, 2023 – Apr 20, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: Add some test vectors for cmac(camellia)

Add some test vectors for 128-bit cmac(camellia) as found in draft-kato-ipsec-camellia-cmac96and128-01 section 6.2.

The document also shows vectors for camellia-cmac-96, and for VK with a length greater than 16, but I'm not sure how to express those in testmgr.

This also leaves cts(cbc(camellia)) untested, but I can't seem to find any tests for that that I could put into testmgr.

---
 crypto/testmgr.c |    6 ++++++
 crypto/testmgr.h |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)
crypto/testmgr.c +6 -0
index c91e93ece20b..082a77e6a95c 100644
@@ -4572,6 +4572,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.suite = {
 			.hash = __VECS(aes_cmac128_tv_template)
 		}
+	}, {
+		.alg = "cmac(camellia)",
+		.test = alg_test_hash,
+		.suite = {
+			.hash = __VECS(camellia_cmac128_tv_template)
+		}
 	}, {
 		.alg = "cmac(des3_ede)",
 		.test = alg_test_hash,
crypto/testmgr.h +47 -0

53 lines not on this page · raw message

maintainer
#1 lore raw
Quoted 17 lines · David Howells

Add some test vectors for 128-bit cmac(camellia) as found in draft-kato-ipsec-camellia-cmac96and128-01 section 6.2.

The document also shows vectors for camellia-cmac-96, and for VK with a length greater than 16, but I'm not sure how to express those in testmgr.

This also leaves cts(cbc(camellia)) untested, but I can't seem to find any tests for that that I could put into testmgr.

Quoted 4 lines
---
 crypto/testmgr.c |    6 ++++++
 crypto/testmgr.h |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt