protect Iv and AES functions if CFB enabled

This commit is contained in:
jifan 2023-01-11 13:26:20 +08:00 committed by GitHub
parent a71d856ee9
commit 43ee63f00a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

4
aes.h
View File

@ -47,13 +47,13 @@
struct AES_ctx
{
uint8_t RoundKey[AES_keyExpSize];
#if (defined(CBC) && (CBC == 1)) || (defined(CTR) && (CTR == 1))
#if (defined(CBC) && (CBC == 1)) || (defined(CTR) && (CTR == 1)) || (defined(CFB) && (CFB == 1))
uint8_t Iv[AES_BLOCKLEN];
#endif
};
void AES_init_ctx(struct AES_ctx* ctx, const uint8_t* key);
#if (defined(CBC) && (CBC == 1)) || (defined(CTR) && (CTR == 1))
#if (defined(CBC) && (CBC == 1)) || (defined(CTR) && (CTR == 1)) || (defined(CFB) && (CFB == 1))
void AES_init_ctx_iv(struct AES_ctx* ctx, const uint8_t* key, const uint8_t* iv);
void AES_ctx_set_iv(struct AES_ctx* ctx, const uint8_t* iv);
#endif