* [PATCH] crypto: testmgr - fix some wrong vectors of aes-ccm
@ 2022-01-09 17:02 Peng Luo
2022-01-10 17:48 ` Eric Biggers
0 siblings, 1 reply; 2+ messages in thread
From: Peng Luo @ 2022-01-09 17:02 UTC (permalink / raw)
To: herbert, davem
Cc: mcoquelin.stm32, alexandre.torgue, terrelln, linux-crypto,
linux-stm32, linux-arm-kernel, linux-kernel, Peng Luo
Some vectors of aes-ccm are wrong.
This patch has been tested with kernel 4.9 and openssl1.1.1k.
Signed-off-by: Peng Luo <wuhanluop@163.com>
---
crypto/testmgr.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index a253d66ba1c1..ff171fe53979 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -19865,8 +19865,8 @@ static const struct aead_testvec aes_ccm_tv_template[] = {
"\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
"\x86\xb0\x87\x6b\x62\x33\x8c\x34"
"\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
- "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
- "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
+ "\xCF\xE9\xF9\x21\x3C\x1A\xCE\x67"
+ "\x62\x7B\x36\x3A\xEA\x19\xAC\x58",
.clen = 48,
.novrfy = 1,
}, {
@@ -19952,8 +19952,8 @@ static const struct aead_testvec aes_ccm_tv_template[] = {
"\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
"\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
"\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
- "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
- "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
+ "\x08\x5A\x20\x4A\xB0\x2C\xF9\x49"
+ "\x10\x1C\x9C\x85\x8C\x12\xE0\x3A",
.clen = 48,
.novrfy = 1,
}, {
@@ -19983,7 +19983,7 @@ static const struct aead_testvec aes_ccm_tv_template[] = {
"\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
"\x89\xd4\x75\x7a\x63\xb1\xda\x93",
.plen = 32,
- .ctext = "\x48\x01\x5e\x02\x24\x04\x66\x47"
+ .ctext = "\x14\x01\x5e\x02\x24\x04\x66\x47"
"\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
"\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
"\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: testmgr - fix some wrong vectors of aes-ccm
2022-01-09 17:02 [PATCH] crypto: testmgr - fix some wrong vectors of aes-ccm Peng Luo
@ 2022-01-10 17:48 ` Eric Biggers
0 siblings, 0 replies; 2+ messages in thread
From: Eric Biggers @ 2022-01-10 17:48 UTC (permalink / raw)
To: Peng Luo
Cc: herbert, davem, mcoquelin.stm32, alexandre.torgue, terrelln,
linux-crypto, linux-stm32, linux-arm-kernel, linux-kernel
On Mon, Jan 10, 2022 at 01:02:39AM +0800, Peng Luo wrote:
> Some vectors of aes-ccm are wrong.
> This patch has been tested with kernel 4.9 and openssl1.1.1k.
>
> Signed-off-by: Peng Luo <wuhanluop@163.com>
> ---
> crypto/testmgr.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/crypto/testmgr.h b/crypto/testmgr.h
> index a253d66ba1c1..ff171fe53979 100644
> --- a/crypto/testmgr.h
> +++ b/crypto/testmgr.h
> @@ -19865,8 +19865,8 @@ static const struct aead_testvec aes_ccm_tv_template[] = {
> "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
> "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
> "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
> - "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
> - "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
> + "\xCF\xE9\xF9\x21\x3C\x1A\xCE\x67"
> + "\x62\x7B\x36\x3A\xEA\x19\xAC\x58",
> .clen = 48,
> .novrfy = 1,
> }, {
> @@ -19952,8 +19952,8 @@ static const struct aead_testvec aes_ccm_tv_template[] = {
> "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
> "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
> "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
> - "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
> - "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
> + "\x08\x5A\x20\x4A\xB0\x2C\xF9\x49"
> + "\x10\x1C\x9C\x85\x8C\x12\xE0\x3A",
> .clen = 48,
> .novrfy = 1,
> }, {
> @@ -19983,7 +19983,7 @@ static const struct aead_testvec aes_ccm_tv_template[] = {
> "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
> "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
> .plen = 32,
> - .ctext = "\x48\x01\x5e\x02\x24\x04\x66\x47"
> + .ctext = "\x14\x01\x5e\x02\x24\x04\x66\x47"
> "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
> "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
> "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
This patch causes a self-test failure:
[ 22.354527] alg: aead: ccm_base(ctr-aes-aesni,cbcmac(aes-aesni)) decryption unexpectedly succeeded on test vector 16; expected_error"
[ 22.355843] ------------[ cut here ]------------
[ 22.356306] alg: self-tests for ccm_base(ctr-aes-aesni,cbcmac(aes-aesni)) (ccm(aes)) failed (rc=-22)
Please be more specific about what is wrong. Also, please test with the latest
upstream kernel, not v4.9 which is over 5 years old.
- Eric
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-10 17:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-09 17:02 [PATCH] crypto: testmgr - fix some wrong vectors of aes-ccm Peng Luo
2022-01-10 17:48 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox