Skip to contentSkip to conversation

crypto: testmgr - Add test vectors for authenc(hmac(sha1),rfc3686(ctr(aes)))

PATCH In review Aleksander Jan Bajkowski 2 participants 6 messages Mar 1 – Mar 2

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

PATCH 1/5 crypto: testmgr - Add test vectors for authenc(hmac(sha1),rfc3686(ctr(aes)))

From: Aleksander Jan Bajkowski <[email protected]>

Test vectors were generated starting from existing RFC3686(CTR(AES)) test vectors and adding HMAC(SHA1) computed with software implementation. Then, the results were double-checked on Mediatek MT7986 (safexcel). Platform pass self-tests.

---
 crypto/testmgr.c |   6 +-
 crypto/testmgr.h | 221 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 226 insertions(+), 1 deletion(-)
crypto/testmgr.c +5 -1
index c4770b87551d..91831b548062 100644
@@ -4136,8 +4136,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		}
 	}, {
 		.alg = "authenc(hmac(sha1),rfc3686(ctr(aes)))",
-		.test = alg_test_null,
+		.generic_driver = "authenc(hmac-sha1-lib,rfc3686(ctr(aes-generic)))",
+		.test = alg_test_aead,
 		.fips_allowed = 1,
+		.suite = {
+			.aead = __VECS(hmac_sha1_aes_ctr_rfc3686_tv_temp)
+		}
 	}, {
 		.alg = "authenc(hmac(sha224),cbc(aes))",
 		.generic_driver = "authenc(hmac-sha224-lib,cbc(aes-generic))",
crypto/testmgr.h +221 -0

227 lines not on this page · raw message

Signature · 1 line
2.47.3
#1 lore raw

PATCH 2/5 crypto: testmgr - Add test vectors for authenc(hmac(sha224),rfc3686(ctr(aes)))

From: Aleksander Jan Bajkowski <[email protected]>

Test vectors were generated starting from existing RFC3686(CTR(AES)) test vectors and adding HMAC(SHA224) computed with software implementation. Then, the results were double-checked on Mediatek MT7986 (safexcel). Platform pass self-tests.

---
 crypto/testmgr.c |   6 +-
 crypto/testmgr.h | 235 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 240 insertions(+), 1 deletion(-)
crypto/testmgr.c +5 -1
index 91831b548062..b64a8b58b3fc 100644
@@ -4165,8 +4165,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		}
 	}, {
 		.alg = "authenc(hmac(sha224),rfc3686(ctr(aes)))",
-		.test = alg_test_null,
+		.generic_driver = "authenc(hmac-sha224-lib,rfc3686(ctr(aes-generic)))",
+		.test = alg_test_aead,
 		.fips_allowed = 1,
+		.suite = {
+			.aead = __VECS(hmac_sha224_aes_ctr_rfc3686_tv_temp)
+		}
 	}, {
 		.alg = "authenc(hmac(sha256),cbc(aes))",
 		.generic_driver = "authenc(hmac-sha256-lib,cbc(aes-lib))",
crypto/testmgr.h +235 -0

241 lines not on this page · raw message

Signature · 1 line
2.47.3
#2 lore raw

PATCH 3/5 crypto: testmgr - Add test vectors for authenc(hmac(sha256),rfc3686(ctr(aes)))

In reply to Aleksander Jan Bajkowski

From: Aleksander Jan Bajkowski <[email protected]>

Test vectors were generated starting from existing RFC3686(CTR(AES)) test vectors and adding HMAC(SHA256) computed with software implementation. Then, the results were double-checked on Mediatek MT7986 (safexcel). Platform pass self-tests.

---
 crypto/testmgr.c |   6 +-
 crypto/testmgr.h | 235 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 240 insertions(+), 1 deletion(-)
crypto/testmgr.c +5 -1
index b64a8b58b3fc..fcc53b5db653 100644
@@ -4206,8 +4206,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		}
 	}, {
 		.alg = "authenc(hmac(sha256),rfc3686(ctr(aes)))",
-		.test = alg_test_null,
+		.generic_driver = "authenc(hmac-sha256-lib,rfc3686(ctr(aes-generic)))",
+		.test = alg_test_aead,
 		.fips_allowed = 1,
+		.suite = {
+			.aead = __VECS(hmac_sha256_aes_ctr_rfc3686_tv_temp)
+		}
 	}, {
 		.alg = "authenc(hmac(sha384),cbc(aes))",
 		.generic_driver = "authenc(hmac-sha384-lib,cbc(aes-generic))",
crypto/testmgr.h +235 -0

241 lines not on this page · raw message

Signature · 1 line
2.47.3
#3 lore raw

PATCH 4/5 crypto: testmgr - Add test vectors for authenc(hmac(sha384),rfc3686(ctr(aes)))

In reply to Aleksander Jan Bajkowski

From: Aleksander Jan Bajkowski <[email protected]>

Test vectors were generated starting from existing RFC3686(CTR(AES)) test
vectors and adding HMAC(SHA384) computed with software implementation. Then, the results were double-checked on Mediatek MT7986 (safexcel). Platform pass self-tests.

---
 crypto/testmgr.c |   6 +-
 crypto/testmgr.h | 263 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 268 insertions(+), 1 deletion(-)
crypto/testmgr.c +5 -1
index fcc53b5db653..ae969d196cf0 100644
@@ -4246,8 +4246,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		}
 	}, {
 		.alg = "authenc(hmac(sha384),rfc3686(ctr(aes)))",
-		.test = alg_test_null,
+		.generic_driver = "authenc(hmac-sha384-lib,rfc3686(ctr(aes-generic)))",
+		.test = alg_test_aead,
 		.fips_allowed = 1,
+		.suite = {
+			.aead = __VECS(hmac_sha384_aes_ctr_rfc3686_tv_temp)
+		}
 	}, {
 		.alg = "authenc(hmac(sha512),cbc(aes))",
 		.generic_driver = "authenc(hmac-sha512-lib,cbc(aes-lib))",
crypto/testmgr.h +263 -0

269 lines not on this page · raw message

Signature · 1 line
2.47.3
#4 lore raw

PATCH 5/5 crypto: testmgr - Add test vectors for authenc(hmac(sha512),rfc3686(ctr(aes)))

In reply to Aleksander Jan Bajkowski

From: Aleksander Jan Bajkowski <[email protected]>

Test vectors were generated starting from existing RFC3686(CTR(AES)) test vectors and adding HMAC(SHA512) computed with software implementation. Then, the results were double-checked on Mediatek MT7986 (safexcel). Platform pass self-tests.

---
 crypto/testmgr.c |   6 +-
 crypto/testmgr.h | 291 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 296 insertions(+), 1 deletion(-)
crypto/testmgr.c +5 -1
index ae969d196cf0..c56356c3c889 100644
@@ -4280,8 +4280,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.fips_allowed = 1,
 	}, {
 		.alg = "authenc(hmac(sha512),rfc3686(ctr(aes)))",
-		.test = alg_test_null,
+		.generic_driver = "authenc(hmac-sha512-lib,rfc3686(ctr(aes-generic)))",
+		.test = alg_test_aead,
 		.fips_allowed = 1,
+		.suite = {
+			.aead = __VECS(hmac_sha512_aes_ctr_rfc3686_tv_temp)
+		}
 	}, {
 		.alg = "blake2b-160",
 		.generic_driver = "blake2b-160-lib",
crypto/testmgr.h +291 -0

297 lines not on this page · raw message

Signature · 1 line
2.47.3
#5 lore raw
In reply to Aleksander Jan Bajkowski

crypto/testmgr.c static const struct alg_test_desc alg_test_descs[] = { · line 4139

Quoted 10 lines · Aleksander Jan Bajkowski
crypto/testmgr.c +1 -1
index c4770b87551d..91831b548062 100644
@@ -4136,8 +4136,12 @@ static const struct alg_test_desc alg_test_descs[] = {
 		}
 	}, {
 		.alg = "authenc(hmac(sha1),rfc3686(ctr(aes)))",
-		.test = alg_test_null,
+		.generic_driver = "authenc(hmac-sha1-lib,rfc3686(ctr(aes-generic)))",

aes-generic was replaced with aes-lib in v7.0-rc1.

- Eric