diff options
author | Tianjia Zhang <tianjia.zhang@linux.alibaba.com> | 2022-03-15 17:44:51 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-04-08 16:12:46 +0800 |
commit | 73c919d314ad57be900437fd329990b1d846b763 (patch) | |
tree | 60e59a08cfe9cc16cefa245a8f3c0cd0af54bfdb /include/crypto | |
parent | d2825fa9365d0101571ed16534b16b7c8d261ab3 (diff) | |
download | lwn-73c919d314ad57be900437fd329990b1d846b763.tar.gz lwn-73c919d314ad57be900437fd329990b1d846b763.zip |
crypto: sm4 - export sm4 constant arrays
Export the constant arrays fk, ck, sbox of the SM4 algorithm, and
add the 'crypto_sm4_' prefix, where sbox is used in the SM4 NEON
implementation for the tbl/tbx instruction to replace the S-BOX,
and the fk, ck arrays are used in the SM4 CE implementation. Use
the sm4ekey instruction to speed up key expansion operations.
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.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/crypto/sm4.h b/include/crypto/sm4.h index 709f286e7b25..9656a9a40326 100644 --- a/include/crypto/sm4.h +++ b/include/crypto/sm4.h @@ -21,6 +21,10 @@ struct sm4_ctx { u32 rkey_dec[SM4_RKEY_WORDS]; }; +extern const u32 crypto_sm4_fk[]; +extern const u32 crypto_sm4_ck[]; +extern const u8 crypto_sm4_sbox[]; + /** * sm4_expandkey - Expands the SM4 key as described in GB/T 32907-2016 * @ctx: The location where the computed key will be stored. |