Commit 549f6415 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Herbert Xu

crypto: testmgr - add chunked test cases for chacha20

We failed to catch a bug in the chacha20 code after porting it to the
skcipher API. We would have caught it if any chunked tests had been
defined, so define some now so we will catch future regressions.
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4de43726
...@@ -32675,6 +32675,10 @@ static const struct cipher_testvec chacha20_enc_tv_template[] = { ...@@ -32675,6 +32675,10 @@ static const struct cipher_testvec chacha20_enc_tv_template[] = {
"\x5b\x86\x2f\x37\x30\xe3\x7c\xfd" "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
"\xc4\xfd\x80\x6c\x22\xf2\x21", "\xc4\xfd\x80\x6c\x22\xf2\x21",
.rlen = 375, .rlen = 375,
.also_non_np = 1,
.np = 3,
.tap = { 375 - 20, 4, 16 },
}, { /* RFC7539 A.2. Test Vector #3 */ }, { /* RFC7539 A.2. Test Vector #3 */
.key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
"\xf3\x33\x88\x86\x04\xf6\xb5\xf0" "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
...@@ -33049,6 +33053,9 @@ static const struct cipher_testvec chacha20_enc_tv_template[] = { ...@@ -33049,6 +33053,9 @@ static const struct cipher_testvec chacha20_enc_tv_template[] = {
"\xa1\xed\xad\xd5\x76\xfa\x24\x8f" "\xa1\xed\xad\xd5\x76\xfa\x24\x8f"
"\x98", "\x98",
.rlen = 1281, .rlen = 1281,
.also_non_np = 1,
.np = 3,
.tap = { 1200, 1, 80 },
}, },
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment