提交 097012e8 编写于 作者: E Eric Biggers 提交者: Herbert Xu

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: NEric Biggers <ebiggers@google.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 dd09f58c
...@@ -5595,6 +5595,28 @@ static const struct cipher_testvec des_enc_tv_template[] = { ...@@ -5595,6 +5595,28 @@ static const struct cipher_testvec des_enc_tv_template[] = {
.rlen = 16, .rlen = 16,
.np = 2, .np = 2,
.tap = { 8, 8 } .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 */ }, { /* Four blocks -- for testing encryption with chunking */
.key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
.klen = 8, .klen = 8,
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册