summaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.c
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2018-11-06 16:00:03 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2018-11-16 01:11:02 -0500
commit25a0b9d4e512ea04d80c84bd5e3b9e2722b92ec1 (patch)
tree74d6eebe27f0fcda43f4d08e7aab33327b7c004f /crypto/testmgr.c
parentdfdda82e3b84c13601be09f8351ec4f15a4fbe03 (diff)
crypto: streebog - add Streebog test vectors
Add testmgr and tcrypt tests and vectors for Streebog hash function from RFC 6986 and GOST R 34.11-2012, for HMAC-Streebog vectors are from RFC 7836 and R 50.1.113-2016. Cc: linux-integrity@vger.kernel.org Signed-off-by: Vitaly Chikunov <vt@altlinux.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r--crypto/testmgr.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 512ebf697f7e..379794a259a7 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -3193,6 +3193,18 @@ static const struct alg_test_desc alg_test_descs[] = {
3193 .hash = __VECS(hmac_sha512_tv_template) 3193 .hash = __VECS(hmac_sha512_tv_template)
3194 } 3194 }
3195 }, { 3195 }, {
3196 .alg = "hmac(streebog256)",
3197 .test = alg_test_hash,
3198 .suite = {
3199 .hash = __VECS(hmac_streebog256_tv_template)
3200 }
3201 }, {
3202 .alg = "hmac(streebog512)",
3203 .test = alg_test_hash,
3204 .suite = {
3205 .hash = __VECS(hmac_streebog512_tv_template)
3206 }
3207 }, {
3196 .alg = "jitterentropy_rng", 3208 .alg = "jitterentropy_rng",
3197 .fips_allowed = 1, 3209 .fips_allowed = 1,
3198 .test = alg_test_null, 3210 .test = alg_test_null,
@@ -3505,6 +3517,18 @@ static const struct alg_test_desc alg_test_descs[] = {
3505 .hash = __VECS(sm3_tv_template) 3517 .hash = __VECS(sm3_tv_template)
3506 } 3518 }
3507 }, { 3519 }, {
3520 .alg = "streebog256",
3521 .test = alg_test_hash,
3522 .suite = {
3523 .hash = __VECS(streebog256_tv_template)
3524 }
3525 }, {
3526 .alg = "streebog512",
3527 .test = alg_test_hash,
3528 .suite = {
3529 .hash = __VECS(streebog512_tv_template)
3530 }
3531 }, {
3508 .alg = "tgr128", 3532 .alg = "tgr128",
3509 .test = alg_test_hash, 3533 .test = alg_test_hash,
3510 .suite = { 3534 .suite = {