From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: linux-crypto@vger.kernel.org
Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 16/17] crypto: testmgr - add test vectors for XTS ciphertext stealing
Date: Wed, 21 Aug 2019 17:32:52 +0300 [thread overview]
Message-ID: <20190821143253.30209-17-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20190821143253.30209-1-ard.biesheuvel@linaro.org>
Import the AES-XTS test vectors from IEEE publication P1619/D16
that exercise the ciphertext stealing part of the XTS algorithm,
which we haven't supported in the Linux kernel implementation up
till now.
Tested-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
crypto/testmgr.h | 60 ++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 154052d07818..b88a1ba87b58 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -15291,6 +15291,66 @@ static const struct cipher_testvec aes_xts_tv_template[] = {
"\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
"\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
.len = 512,
+ }, { /* XTS-AES 15 */
+ .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+ "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+ "\xbf\xbe\xbd\xbc\xbb\xba\xb9\xb8"
+ "\xb7\xb6\xb5\xb4\xb3\xb2\xb1\xb0",
+ .klen = 32,
+ .iv = "\x9a\x78\x56\x34\x12\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00",
+ .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07"
+ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+ "\x10",
+ .ctext = "\x6c\x16\x25\xdb\x46\x71\x52\x2d"
+ "\x3d\x75\x99\x60\x1d\xe7\xca\x09"
+ "\xed",
+ .len = 17,
+ }, { /* XTS-AES 16 */
+ .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+ "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+ "\xbf\xbe\xbd\xbc\xbb\xba\xb9\xb8"
+ "\xb7\xb6\xb5\xb4\xb3\xb2\xb1\xb0",
+ .klen = 32,
+ .iv = "\x9a\x78\x56\x34\x12\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00",
+ .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07"
+ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+ "\x10\x11",
+ .ctext = "\xd0\x69\x44\x4b\x7a\x7e\x0c\xab"
+ "\x09\xe2\x44\x47\xd2\x4d\xeb\x1f"
+ "\xed\xbf",
+ .len = 18,
+ }, { /* XTS-AES 17 */
+ .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+ "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+ "\xbf\xbe\xbd\xbc\xbb\xba\xb9\xb8"
+ "\xb7\xb6\xb5\xb4\xb3\xb2\xb1\xb0",
+ .klen = 32,
+ .iv = "\x9a\x78\x56\x34\x12\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00",
+ .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07"
+ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+ "\x10\x11\x12",
+ .ctext = "\xe5\xdf\x13\x51\xc0\x54\x4b\xa1"
+ "\x35\x0b\x33\x63\xcd\x8e\xf4\xbe"
+ "\xed\xbf\x9d",
+ .len = 19,
+ }, { /* XTS-AES 18 */
+ .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+ "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+ "\xbf\xbe\xbd\xbc\xbb\xba\xb9\xb8"
+ "\xb7\xb6\xb5\xb4\xb3\xb2\xb1\xb0",
+ .klen = 32,
+ .iv = "\x9a\x78\x56\x34\x12\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00",
+ .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07"
+ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+ "\x10\x11\x12\x13",
+ .ctext = "\x9d\x84\xc8\x13\xf7\x19\xaa\x2c"
+ "\x7b\xe3\xf6\x61\x71\xc7\xc5\xc2"
+ "\xed\xbf\x9d\xac",
+ .len = 20,
}
};
--
2.17.1
next prev parent reply other threads:[~2019-08-21 14:33 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 14:32 [PATCH 00/17] crypto: arm/aes - XTS ciphertext stealing and other updates Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 01/17] crypto: arm/aes - fix round key prototypes Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 02/17] crypto: arm/aes-ce - yield the SIMD unit between scatterwalk steps Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 03/17] crypto: arm/aes-ce - switch to 4x interleave Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 04/17] crypto: arm/aes-ce - replace tweak mask literal with composition Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 05/17] crypto: arm/aes-neonbs " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 06/17] crypto: arm64/aes-neonbs " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 07/17] crypto: arm64/aes-neon - limit exposed routines if faster driver is enabled Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 08/17] crypto: skcipher - add the ability to abort a skcipher walk Ard Biesheuvel
2019-08-30 8:03 ` Herbert Xu
2019-08-31 18:01 ` Ard Biesheuvel
2019-09-03 6:54 ` crypto: skcipher - Unmap pages after an external error Herbert Xu
2019-09-03 7:05 ` crypto: ablkcipher " Herbert Xu
2019-09-03 7:09 ` crypto: blkcipher " Herbert Xu
2019-09-03 13:50 ` crypto: skcipher " Eric Biggers
2019-09-03 22:36 ` Herbert Xu
2019-09-05 5:22 ` Eric Biggers
2019-09-05 5:40 ` Herbert Xu
2019-09-06 1:57 ` Eric Biggers
2019-09-06 2:15 ` Herbert Xu
2019-09-06 3:13 ` [v2 PATCH] " Herbert Xu
2019-09-07 0:52 ` Ard Biesheuvel
2019-09-07 1:19 ` Herbert Xu
2019-09-07 1:32 ` Ard Biesheuvel
2019-09-07 1:56 ` Herbert Xu
2019-09-07 2:14 ` Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 09/17] crypto: arm64/aes-cts-cbc-ce - performance tweak Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 10/17] crypto: arm64/aes-cts-cbc - move request context data to the stack Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 11/17] crypto: arm64/aes - implement support for XTS ciphertext stealing Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 12/17] crypto: arm64/aes-neonbs - implement ciphertext stealing for XTS Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 13/17] crypto: arm/aes-ce " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 14/17] crypto: arm/aes-neonbs " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 15/17] crypto: arm/aes-ce - implement ciphertext stealing for CBC Ard Biesheuvel
2019-09-30 16:32 ` Guenter Roeck
2019-09-30 18:19 ` Ard Biesheuvel
2019-08-21 14:32 ` Ard Biesheuvel [this message]
2019-08-21 14:32 ` [PATCH 17/17] crypto: testmgr - Add additional AES-XTS vectors for covering CTS Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190821143253.30209-17-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).