crypto: testmgr - add missing self test entries for protected keys
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 18 Apr 2019 13:38:36 +0000 (16:38 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 25 Apr 2019 07:38:13 +0000 (15:38 +0800)
Mark sm4 and missing aes using protected keys which are indetical to
same algs with no HW protected keys as tested.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/testmgr.c

index 2bd89a65e9e77424d1b4bb1c164b5903f68ee44b..c9e67c2bd7257cc98f57e6e5a93efeea16864afd 100644 (file)
@@ -3794,6 +3794,12 @@ static const struct alg_test_desc alg_test_descs[] = {
                .alg = "cbc(paes)",
                .test = alg_test_null,
                .fips_allowed = 1,
+       }, {
+               /* Same as cbc(sm4) except the key is stored in
+                * hardware secure memory which we reference by index
+                */
+               .alg = "cbc(psm4)",
+               .test = alg_test_null,
        }, {
                .alg = "cbc(serpent)",
                .test = alg_test_skcipher,
@@ -3930,6 +3936,13 @@ static const struct alg_test_desc alg_test_descs[] = {
                .test = alg_test_null,
                .fips_allowed = 1,
        }, {
+
+               /* Same as ctr(sm4) except the key is stored in
+                * hardware secure memory which we reference by index
+                */
+               .alg = "ctr(psm4)",
+               .test = alg_test_null,
+       }, {
                .alg = "ctr(serpent)",
                .test = alg_test_skcipher,
                .suite = {
@@ -3954,6 +3967,13 @@ static const struct alg_test_desc alg_test_descs[] = {
                .suite = {
                        .cipher = __VECS(cts_mode_tv_template)
                }
+       }, {
+               /* Same as cts(cbc((aes)) except the key is stored in
+                * hardware secure memory which we reference by index
+                */
+               .alg = "cts(cbc(paes))",
+               .test = alg_test_null,
+               .fips_allowed = 1,
        }, {
                .alg = "deflate",
                .test = alg_test_comp,