diff options
author | Xu Yizhou <xuyizhou1@huawei.com> | 2022-11-25 13:52:49 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-11-29 16:17:30 +0100 |
commit | 2788b56f0c8306c89c97a6599484120afddfa14a (patch) | |
tree | 0b682cc46d94138ad342681b3fd7a2f7aaafd948 /include/crypto | |
parent | de8f6a3e293a43f364cddefdf734b13486ec4cc9 (diff) |
providers: Add SM4 XTS implementation
Signed-off-by: Xu Yizhou <xuyizhou1@huawei.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19619)
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/modes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/modes.h b/include/crypto/modes.h index d567a0ba84..d03ca83d00 100644 --- a/include/crypto/modes.h +++ b/include/crypto/modes.h @@ -155,6 +155,12 @@ struct xts128_context { block128_f block1, block2; }; +/* XTS mode for SM4 algorithm specified by GB/T 17964-2021 */ +int ossl_crypto_xts128gb_encrypt(const XTS128_CONTEXT *ctx, + const unsigned char iv[16], + const unsigned char *inp, unsigned char *out, + size_t len, int enc); + struct ccm128_context { union { u64 u[2]; |