Files
eternalwrt-mt798x/target/linux/generic/backport-6.18/914-v7.0-crypto-testmgr-allow-authenc-sha224-rfc3686-variant-.patch
T
Aleksander Jan BajkowskiandHauke Mehrtens b6f2b5ea13 kernel: backport crypto selftests
FIPS 140-3 recommends that all crypto implementations should be tested
before first use. Testmanager performs initial tests based on existing
test vectors. Not all algorithms have defined test vectors, so to improve
this situation, this commit backports recently added test vectors for
some cipher suites.

These vectors were calculated using a software implementation and then
double-checked on Mediatek MT7981 (safexcel) and NXP P2020 (talitos).
Both platforms passed self-tests.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/23012
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-28 00:52:07 +02:00

32 lines
1.0 KiB
Diff

From e1dc530d0c082c903e74bf6e16d8a38843d3d1d7 Mon Sep 17 00:00:00 2001
From: Aleksander Jan Bajkowski <olek2@wp.pl>
Date: Thu, 1 Jan 2026 16:25:18 +0100
Subject: [PATCH] crypto: testmgr - allow authenc(sha224,rfc3686) variant in
fips mode
The remaining combinations of AES-CTR-RFC3686 and SHA* have already been
marked as allowed in 8888690ef5f7. This commit does the same for SHA224.
rfc3686(ctr(aes)) is already marked fips compliant,
so these should be fine.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
crypto/testmgr.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -4249,6 +4249,10 @@ static const struct alg_test_desc alg_te
.aead = __VECS(hmac_sha224_des3_ede_cbc_tv_temp)
}
}, {
+ .alg = "authenc(hmac(sha224),rfc3686(ctr(aes)))",
+ .test = alg_test_null,
+ .fips_allowed = 1,
+ }, {
.alg = "authenc(hmac(sha256),cbc(aes))",
.generic_driver = "authenc(hmac-sha256-lib,cbc(aes-generic))",
.test = alg_test_aead,