diff options
author | Eric Biggers <ebiggers@google.com> | 2018-02-14 10:42:22 -0800 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2018-03-05 22:00:46 +0530 |
commit | 239fd75203f2b2522f961a40c20295765ee5c8bd (patch) | |
tree | 09203bfc00718c37b427f66e81f2e069fd964e60 /crypto/testmgr.c | |
parent | 8fce82e2667a8e86738b4d2cae33a5ff8efcf3a5 (diff) |
BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
Add test vectors for Speck128-XTS, generated in userspace using C code.
The inputs were borrowed from the AES-XTS test vectors.
Both xts(speck128-generic) and xts-speck128-neon pass these tests.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit c3bb521bb6ac3023ae236a3a361f951f8d78ecc4
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master)
(removed 'const' from test vectors)
(replaced use of __VECS macro in crypto/testmgr.c)
Change-Id: Ifd701d5df4a6602c207cfb28decc620ef7e5f896
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r-- | crypto/testmgr.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index e54027b2b07f..2be1d5d04464 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -3889,6 +3889,21 @@ static const struct alg_test_desc alg_test_descs[] = { } } }, { + .alg = "xts(speck128)", + .test = alg_test_skcipher, + .suite = { + .cipher = { + .enc = { + .vecs = speck128_xts_enc_tv_template, + .count = ARRAY_SIZE(speck128_xts_enc_tv_template) + }, + .dec = { + .vecs = speck128_xts_dec_tv_template, + .count = ARRAY_SIZE(speck128_xts_dec_tv_template) + } + } + } + }, { .alg = "xts(twofish)", .test = alg_test_skcipher, .suite = { |