diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2018-09-20 14:18:38 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-09-28 12:46:26 +0800 |
commit | 95ba597367ddc26c1062c7ee9697c9aee53d04d0 (patch) | |
tree | 743244506ea01e21e1397ce2ebdb6eafa919f0f0 /crypto/testmgr.c | |
parent | ce1294d981c1467c13b2b698913f35859592308b (diff) |
crypto: testmgr - update sm4 test vectors
Add additional test vectors from "The SM4 Blockcipher Algorithm And Its
Modes Of Operations" draft-ribose-cfrg-sm4-10 and register cipher speed
tests for sm4.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r-- | crypto/testmgr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 1c9bf38e59ea..bd13bc971e2b 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -2662,6 +2662,12 @@ static const struct alg_test_desc alg_test_descs[] = { .cipher = __VECS(serpent_cbc_tv_template) }, }, { + .alg = "cbc(sm4)", + .test = alg_test_skcipher, + .suite = { + .cipher = __VECS(sm4_cbc_tv_template) + } + }, { .alg = "cbc(twofish)", .test = alg_test_skcipher, .suite = { @@ -2785,6 +2791,12 @@ static const struct alg_test_desc alg_test_descs[] = { .cipher = __VECS(serpent_ctr_tv_template) } }, { + .alg = "ctr(sm4)", + .test = alg_test_skcipher, + .suite = { + .cipher = __VECS(sm4_ctr_tv_template) + } + }, { .alg = "ctr(twofish)", .test = alg_test_skcipher, .suite = { |