Use SDF as the crypto provider in SM2/3/4 CTX API

cmake .. -DENABLE_CRYPTO_SDF=ON
This commit is contained in:
Zhi Guan
2024-05-08 17:04:45 +08:00
parent 2000655392
commit 3d491c9e14
8 changed files with 2286 additions and 5 deletions

View File

@@ -51,10 +51,7 @@ void sm4_ctr32_encrypt(const SM4_KEY *key, uint8_t ctr[16], const uint8_t *in, s
typedef struct {
union {
SM4_KEY sm4_key;
void *handle;
};
SM4_KEY sm4_key;
uint8_t iv[SM4_BLOCK_SIZE];
uint8_t block[SM4_BLOCK_SIZE];
size_t block_nbytes;