summaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-05-21 07:50:25 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-05-30 18:13:36 +0200
commit097012e8f214f7d4678125d30be3b89adb9cd10c (patch)
tree8a2588b7e860190138f7c178dccdbba05e27030b /crypto/testmgr.h
parentcrypto: x86/aegis256 - Fix wrong key buffer size (diff)
downloadlinux-097012e8f214f7d4678125d30be3b89adb9cd10c.tar.xz
linux-097012e8f214f7d4678125d30be3b89adb9cd10c.zip
crypto: testmgr - add extra ecb(des) encryption test vectors
Two "ecb(des)" decryption test vectors don't exactly match any of the encryption test vectors with input and result swapped. In preparation for removing the decryption test vectors, add these to the encryption test vectors, so we don't lose any test coverage. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.h')
-rw-r--r--crypto/testmgr.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 9350f9846451..0de99ebb04f2 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -5595,6 +5595,28 @@ static const struct cipher_testvec des_enc_tv_template[] = {
.rlen = 16,
.np = 2,
.tap = { 8, 8 }
+ }, {
+ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
+ .klen = 8,
+ .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
+ "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
+ .ilen = 16,
+ .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
+ "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
+ .rlen = 16,
+ .np = 2,
+ .tap = { 8, 8 }
+ }, {
+ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
+ .klen = 8,
+ .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
+ "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
+ .ilen = 16,
+ .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
+ "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
+ .rlen = 16,
+ .np = 3,
+ .tap = { 3, 12, 1 }
}, { /* Four blocks -- for testing encryption with chunking */
.key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
.klen = 8,