diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2019-11-08 13:22:29 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-11-17 09:02:42 +0800 |
commit | 088e204965e158b71efff6b6393f2e464fd4d960 (patch) | |
tree | 130cf07ff373fff850ad3b8b91f80976663368ea /crypto/testmgr.c | |
parent | 7c8703ecdd68c3c2e0a347c35e46150b6980c115 (diff) | |
download | linux-crypto-088e204965e158b71efff6b6393f2e464fd4d960.tar.gz linux-crypto-088e204965e158b71efff6b6393f2e464fd4d960.zip |
crypto: testmgr - add test cases for Blake2s
As suggested by Eric for the Blake2b implementation contributed by
David, introduce a set of test vectors for Blake2s covering different
digest and key sizes.
blake2s-128 blake2s-160 blake2s-224 blake2s-256
---------------------------------------------------
len=0 | klen=0 klen=1 klen=16 klen=32
len=1 | klen=16 klen=32 klen=0 klen=1
len=7 | klen=32 klen=0 klen=1 klen=16
len=15 | klen=1 klen=16 klen=32 klen=0
len=64 | klen=0 klen=1 klen=16 klen=32
len=247 | klen=16 klen=32 klen=0 klen=1
len=256 | klen=32 klen=0 klen=1 klen=16
Cc: David Sterba <dsterba@suse.com>
Cc: Eric Biggers <ebiggers@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r-- | crypto/testmgr.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 2a67a050..53577285 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -4051,6 +4051,30 @@ static const struct alg_test_desc alg_test_descs[] = { .hash = __VECS(blake2b_512_tv_template) } }, { + .alg = "blake2s-128", + .test = alg_test_hash, + .suite = { + .hash = __VECS(blakes2s_128_tv_template) + } + }, { + .alg = "blake2s-160", + .test = alg_test_hash, + .suite = { + .hash = __VECS(blakes2s_160_tv_template) + } + }, { + .alg = "blake2s-224", + .test = alg_test_hash, + .suite = { + .hash = __VECS(blakes2s_224_tv_template) + } + }, { + .alg = "blake2s-256", + .test = alg_test_hash, + .suite = { + .hash = __VECS(blakes2s_256_tv_template) + } + }, { .alg = "cbc(aes)", .test = alg_test_skcipher, .fips_allowed = 1, |