]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
crypto: testmgr - make an cbc(des) encryption test vector chunked
authorEric Biggers <ebiggers@google.com>
Mon, 21 May 2018 05:50:26 +0000 (22:50 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 30 May 2018 16:13:37 +0000 (00:13 +0800)
One "cbc(des)" decryption test vector doesn't exactly match an
encryption test vector with input and result swapped.  It's *almost* the
same as one, but the decryption version is "chunked" while the
encryption version is "unchunked".  In preparation for removing the
decryption test vectors, make the encryption one both chunked and
unchunked, 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>
crypto/testmgr.h

index 0de99ebb04f2ad2cdc7112cdf9b27dd3b0d303a0..1e265820df297d2dd47783a0d59f02bfed2d0ee8 100644 (file)
@@ -5885,6 +5885,9 @@ static const struct cipher_testvec des_cbc_enc_tv_template[] = {
                .ilen   = 8,
                .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
                .rlen   = 8,
+               .np     = 2,
+               .tap    = { 4, 4 },
+               .also_non_np = 1,
        }, { /* Copy of openssl vector for chunk testing */
             /* From OpenSSL */
                .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",