aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto/sm4.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-04-25 14:20:45 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-05-05 14:52:51 +0800
commit8da02bf1a216224e6f63b48d883b5aee07f82ba9 (patch)
tree0768b06ea949dfe61943eadeeb74004413bc32fe /include/crypto/sm4.h
parenthwrng: stm32 - fix pm_suspend issue (diff)
downloadlinux-dev-8da02bf1a216224e6f63b48d883b5aee07f82ba9.tar.xz
linux-dev-8da02bf1a216224e6f63b48d883b5aee07f82ba9.zip
crypto: sm4 - export encrypt/decrypt routines to other drivers
In preparation of adding support for the SIMD based arm64 implementation of arm64, which requires a fallback to non-SIMD code when invoked in certain contexts, expose the generic SM4 encrypt and decrypt routines to other drivers. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/sm4.h')
-rw-r--r--include/crypto/sm4.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/sm4.h b/include/crypto/sm4.h
index b64e64d20b28..7afd730d16ff 100644
--- a/include/crypto/sm4.h
+++ b/include/crypto/sm4.h
@@ -25,4 +25,7 @@ int crypto_sm4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
int crypto_sm4_expand_key(struct crypto_sm4_ctx *ctx, const u8 *in_key,
unsigned int key_len);
+void crypto_sm4_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in);
+void crypto_sm4_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in);
+
#endif