summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>2021-07-20 06:46:40 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2021-07-30 05:58:30 +0300
commitc59de48e125c6d49a8abd165e388ca57bfe37b17 (patch)
tree695961559dbb5ca3a03360d580da98a9492564d3 /include/crypto
parent2b31277af577b1b2da62c3ad7d3315b422869102 (diff)
downloadlinux-c59de48e125c6d49a8abd165e388ca57bfe37b17.tar.xz
crypto: arm64/sm4-ce - Make dependent on sm4 library instead of sm4-generic
SM4 library is abstracted from sm4-generic algorithm, sm4-ce can depend on the SM4 library instead of sm4-generic, and some functions in sm4-generic do not need to be exported. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/sm4.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/crypto/sm4.h b/include/crypto/sm4.h
index 06322325f862..709f286e7b25 100644
--- a/include/crypto/sm4.h
+++ b/include/crypto/sm4.h
@@ -16,7 +16,7 @@
#define SM4_BLOCK_SIZE 16
#define SM4_RKEY_WORDS 32
-struct crypto_sm4_ctx {
+struct sm4_ctx {
u32 rkey_enc[SM4_RKEY_WORDS];
u32 rkey_dec[SM4_RKEY_WORDS];
};
@@ -30,7 +30,7 @@ struct crypto_sm4_ctx {
* Returns 0 on success. The function fails only if an invalid key size (or
* pointer) is supplied.
*/
-int sm4_expandkey(struct crypto_sm4_ctx *ctx, const u8 *in_key,
+int sm4_expandkey(struct sm4_ctx *ctx, const u8 *in_key,
unsigned int key_len);
/**
@@ -41,9 +41,4 @@ int sm4_expandkey(struct crypto_sm4_ctx *ctx, const u8 *in_key,
*/
void sm4_crypt_block(const u32 *rk, u8 *out, const u8 *in);
-int crypto_sm4_set_key(struct crypto_tfm *tfm, 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