crypto: inside-secure - Add support for the ecb(sm4) skcipher

This patch adds support for SM4 in ECB mode, i.e. skcipher ecb(sm4).

changes since v1:
- make SAFEXCEL_SM4 case entry explit, using the proper SM4_BLOCK_SIZE
  instead of "borrowing" the AES code which "coincidentally" works

Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Pascal van Leeuwen 2019-09-13 11:10:36 +02:00 committed by Herbert Xu
parent 8194fd1d71
commit fcca797d2a
3 changed files with 97 additions and 0 deletions

View file

@ -1178,6 +1178,7 @@ static struct safexcel_alg_template *safexcel_algs[] = {
&safexcel_alg_chachapoly_esp,
&safexcel_alg_sm3,
&safexcel_alg_hmac_sm3,
&safexcel_alg_ecb_sm4,
};
static int safexcel_register_algorithms(struct safexcel_crypto_priv *priv)