diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2018-09-13 04:51:32 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-09-21 01:24:52 -0400 |
commit | dc6d6d5a586fdd6876e18092d5363d48f26b7738 (patch) | |
tree | 1d87f90f421999d58c70f89c37be2754c51ec97b /crypto | |
parent | fbe1a850b3b1522e9fc22319ccbbcd2ab05328d2 (diff) |
crypto: testmgr - Add test for LRW counter wrap-around
This patch adds a test vector for lrw(aes) that triggers wrap-around of
the counter, which is a tricky corner case.
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/testmgr.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 0b3d7cadbe93..47629cb1efd3 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h | |||
@@ -13145,6 +13145,27 @@ static const struct cipher_testvec aes_lrw_tv_template[] = { | |||
13145 | .ctext = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f" | 13145 | .ctext = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f" |
13146 | "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5", | 13146 | "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5", |
13147 | .len = 16, | 13147 | .len = 16, |
13148 | }, { /* Test counter wrap-around, modified from LRW-32-AES 1 */ | ||
13149 | .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" | ||
13150 | "\x4c\x26\x84\x14\xb5\x68\x01\x85" | ||
13151 | "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03" | ||
13152 | "\xee\x5a\x83\x0c\xcc\x09\x4c\x87", | ||
13153 | .klen = 32, | ||
13154 | .iv = "\xff\xff\xff\xff\xff\xff\xff\xff" | ||
13155 | "\xff\xff\xff\xff\xff\xff\xff\xff", | ||
13156 | .ptext = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
13157 | "\x38\x39\x41\x42\x43\x44\x45\x46" | ||
13158 | "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
13159 | "\x38\x39\x41\x42\x43\x44\x45\x46" | ||
13160 | "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
13161 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
13162 | .ctext = "\x47\x90\x50\xf6\xf4\x8d\x5c\x7f" | ||
13163 | "\x84\xc7\x83\x95\x2d\xa2\x02\xc0" | ||
13164 | "\xda\x7f\xa3\xc0\x88\x2a\x0a\x50" | ||
13165 | "\xfb\xc1\x78\x03\x39\xfe\x1d\xe5" | ||
13166 | "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f" | ||
13167 | "\xe9\x5d\x48\x92\x54\x63\x4e\xb8", | ||
13168 | .len = 48, | ||
13148 | }, { | 13169 | }, { |
13149 | /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */ | 13170 | /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */ |
13150 | .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" | 13171 | .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" |