summaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.c
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2018-09-20 09:18:38 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2018-09-28 00:46:26 -0400
commit95ba597367ddc26c1062c7ee9697c9aee53d04d0 (patch)
tree743244506ea01e21e1397ce2ebdb6eafa919f0f0 /crypto/testmgr.c
parentce1294d981c1467c13b2b698913f35859592308b (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.c12
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[] = {
2662 .cipher = __VECS(serpent_cbc_tv_template) 2662 .cipher = __VECS(serpent_cbc_tv_template)
2663 }, 2663 },
2664 }, { 2664 }, {
2665 .alg = "cbc(sm4)",
2666 .test = alg_test_skcipher,
2667 .suite = {
2668 .cipher = __VECS(sm4_cbc_tv_template)
2669 }
2670 }, {
2665 .alg = "cbc(twofish)", 2671 .alg = "cbc(twofish)",
2666 .test = alg_test_skcipher, 2672 .test = alg_test_skcipher,
2667 .suite = { 2673 .suite = {
@@ -2785,6 +2791,12 @@ static const struct alg_test_desc alg_test_descs[] = {
2785 .cipher = __VECS(serpent_ctr_tv_template) 2791 .cipher = __VECS(serpent_ctr_tv_template)
2786 } 2792 }
2787 }, { 2793 }, {
2794 .alg = "ctr(sm4)",
2795 .test = alg_test_skcipher,
2796 .suite = {
2797 .cipher = __VECS(sm4_ctr_tv_template)
2798 }
2799 }, {
2788 .alg = "ctr(twofish)", 2800 .alg = "ctr(twofish)",
2789 .test = alg_test_skcipher, 2801 .test = alg_test_skcipher,
2790 .suite = { 2802 .suite = {