* [PATCH] crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des3_ede))
@ 2026-02-01 11:27 Aleksander Jan Bajkowski
2026-02-06 11:01 ` Herbert Xu
0 siblings, 1 reply; 5+ messages in thread
From: Aleksander Jan Bajkowski @ 2026-02-01 11:27 UTC (permalink / raw)
To: herbert, davem, mcoquelin.stm32, alexandre.torgue, linux-crypto,
linux-stm32, linux-arm-kernel, linux-kernel
Cc: Aleksander Jan Bajkowski
Test vector was generated using a software implementation and then double
checked using a hardware implementation on NXP P2020 (talitos). The
encryption part is identical to authenc(hmac(sha1),cbc(des3_ede)),
only HMAC is different.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
crypto/testmgr.c | 7 ++++++
crypto/testmgr.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index f3e068382073..0fef46c35367 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -4086,6 +4086,13 @@ static const struct alg_test_desc alg_test_descs[] = {
.suite = {
.aead = __VECS(hmac_md5_aes_cbc_tv_temp)
}
+ }, {
+ .alg = "authenc(hmac(md5),cbc(des3_ede))",
+ .generic_driver = "authenc(hmac-md5-lib,cbc(des3_ede-generic))",
+ .test = alg_test_aead,
+ .suite = {
+ .aead = __VECS(hmac_md5_des3_ede_cbc_tv_temp)
+ }
}, {
.alg = "authenc(hmac(md5),ecb(cipher_null))",
.generic_driver = "authenc(hmac-md5-lib,ecb-cipher_null)",
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index dd690da11bae..c582255373d1 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -17481,6 +17481,65 @@ static const struct aead_testvec hmac_sha512_des_cbc_tv_temp[] = {
},
};
+static const struct aead_testvec hmac_md5_des3_ede_cbc_tv_temp[] = {
+ { /*Generated with cryptopp*/
+#ifdef __LITTLE_ENDIAN
+ .key = "\x08\x00" /* rta length */
+ "\x01\x00" /* rta type */
+#else
+ .key = "\x00\x08" /* rta length */
+ "\x00\x01" /* rta type */
+#endif
+ "\x00\x00\x00\x18" /* enc key length */
+ "\x11\x22\x33\x44\x55\x66\x77\x88"
+ "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+ "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
+ "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
+ "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
+ .klen = 8 + 16 + 24,
+ .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+ .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
+ "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+ .alen = 16,
+ .ptext = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
+ "\x53\x20\x63\x65\x65\x72\x73\x74"
+ "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
+ "\x20\x79\x65\x53\x72\x63\x74\x65"
+ "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
+ "\x79\x6e\x53\x20\x63\x65\x65\x72"
+ "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
+ "\x6e\x61\x20\x79\x65\x53\x72\x63"
+ "\x74\x65\x20\x73\x6f\x54\x20\x6f"
+ "\x61\x4d\x79\x6e\x53\x20\x63\x65"
+ "\x65\x72\x73\x74\x54\x20\x6f\x6f"
+ "\x4d\x20\x6e\x61\x20\x79\x65\x53"
+ "\x72\x63\x74\x65\x20\x73\x6f\x54"
+ "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
+ "\x63\x65\x65\x72\x73\x74\x54\x20"
+ "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
+ .plen = 128,
+ .ctext = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
+ "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
+ "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
+ "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
+ "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
+ "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
+ "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
+ "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
+ "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
+ "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
+ "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
+ "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
+ "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
+ "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
+ "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
+ "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
+ "\x99\x09\xfb\x05\x35\xc8\xcc\x38"
+ "\xc3\x1e\x5e\xe1\xe6\x96\x84\xc8",
+ .clen = 128 + 16,
+ },
+};
+
static const struct aead_testvec hmac_sha1_des3_ede_cbc_tv_temp[] = {
{ /*Generated with cryptopp*/
#ifdef __LITTLE_ENDIAN
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des3_ede))
2026-02-01 11:27 [PATCH] crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des3_ede)) Aleksander Jan Bajkowski
@ 2026-02-06 11:01 ` Herbert Xu
2026-02-06 19:40 ` Aleksander Jan Bajkowski
0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2026-02-06 11:01 UTC (permalink / raw)
To: Aleksander Jan Bajkowski
Cc: davem, mcoquelin.stm32, alexandre.torgue, linux-crypto,
linux-stm32, linux-arm-kernel, linux-kernel
On Sun, Feb 01, 2026 at 12:27:08PM +0100, Aleksander Jan Bajkowski wrote:
> Test vector was generated using a software implementation and then double
> checked using a hardware implementation on NXP P2020 (talitos). The
> encryption part is identical to authenc(hmac(sha1),cbc(des3_ede)),
> only HMAC is different.
>
> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
> ---
> crypto/testmgr.c | 7 ++++++
> crypto/testmgr.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 66 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des3_ede))
2026-02-06 11:01 ` Herbert Xu
@ 2026-02-06 19:40 ` Aleksander Jan Bajkowski
2026-02-07 1:33 ` Herbert Xu
0 siblings, 1 reply; 5+ messages in thread
From: Aleksander Jan Bajkowski @ 2026-02-06 19:40 UTC (permalink / raw)
To: Herbert Xu
Cc: davem, mcoquelin.stm32, alexandre.torgue, linux-crypto,
linux-stm32, linux-arm-kernel, linux-kernel
Hi Herbert,
On 2/6/26 12:01, Herbert Xu wrote:
> On Sun, Feb 01, 2026 at 12:27:08PM +0100, Aleksander Jan Bajkowski wrote:
>> Test vector was generated using a software implementation and then double
>> checked using a hardware implementation on NXP P2020 (talitos). The
>> encryption part is identical to authenc(hmac(sha1),cbc(des3_ede)),
>> only HMAC is different.
>>
>> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
>> ---
>> crypto/testmgr.c | 7 ++++++
>> crypto/testmgr.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 66 insertions(+)
> Patch applied. Thanks.
While resolving the conflict, the entry was added in the wrong place. As a
result, the test manager complains about sorting:
[ 0.050891] testmgr: alg_test_descs entries in wrong order:
'authenc(hmac(md5),ecb(cipher_null))' before
'authenc(hmac(md5),cbc(des3_ede))'
Should I send a patch to fix the sorting? Or would you prefer to replace
the patch in your tree and apply [1] first, then [2]? That way there should
be no conflicts.
1.
https://patchwork.kernel.org/project/linux-crypto/patch/20260131174020.3670-1-olek2@wp.pl/
2.
https://patchwork.kernel.org/project/linux-crypto/patch/20260201112834.3378-1-olek2@wp.pl/
Best regards,
Aleksander
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des3_ede))
2026-02-06 19:40 ` Aleksander Jan Bajkowski
@ 2026-02-07 1:33 ` Herbert Xu
2026-02-07 14:31 ` Aleksander Jan Bajkowski
0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2026-02-07 1:33 UTC (permalink / raw)
To: Aleksander Jan Bajkowski
Cc: davem, mcoquelin.stm32, alexandre.torgue, linux-crypto,
linux-stm32, linux-arm-kernel, linux-kernel
On Fri, Feb 06, 2026 at 08:40:18PM +0100, Aleksander Jan Bajkowski wrote:
>
> While resolving the conflict, the entry was added in the wrong place. As a
> result, the test manager complains about sorting:
> [ 0.050891] testmgr: alg_test_descs entries in wrong order:
> 'authenc(hmac(md5),ecb(cipher_null))' before
> 'authenc(hmac(md5),cbc(des3_ede))'
Thanks for the heads up. I've just pushed out a fix, can you
please double-check?
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des3_ede))
2026-02-07 1:33 ` Herbert Xu
@ 2026-02-07 14:31 ` Aleksander Jan Bajkowski
0 siblings, 0 replies; 5+ messages in thread
From: Aleksander Jan Bajkowski @ 2026-02-07 14:31 UTC (permalink / raw)
To: Herbert Xu
Cc: davem, mcoquelin.stm32, alexandre.torgue, linux-crypto,
linux-stm32, linux-arm-kernel, linux-kernel
On 2/7/26 02:33, Herbert Xu wrote:
> On Fri, Feb 06, 2026 at 08:40:18PM +0100, Aleksander Jan Bajkowski wrote:
>> While resolving the conflict, the entry was added in the wrong place. As a
>> result, the test manager complains about sorting:
>> [ 0.050891] testmgr: alg_test_descs entries in wrong order:
>> 'authenc(hmac(md5),ecb(cipher_null))' before
>> 'authenc(hmac(md5),cbc(des3_ede))'
> Thanks for the heads up. I've just pushed out a fix, can you
> please double-check?
It's fine now. Thanks.
>
> Cheers,
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-07 14:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-01 11:27 [PATCH] crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des3_ede)) Aleksander Jan Bajkowski
2026-02-06 11:01 ` Herbert Xu
2026-02-06 19:40 ` Aleksander Jan Bajkowski
2026-02-07 1:33 ` Herbert Xu
2026-02-07 14:31 ` Aleksander Jan Bajkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox