Topic: AES in counter mode
I'm porting my code from openssl to wolfssl.
In my code I use AES in counter mode to encrypt data which arrives in parts and send it to the receiver.
In my code I use EVP_EncryptInit() to set the key and any time the data arrive, I encrypt it
with EVP_EncryptUpdate().
I never call EVP_EncryptFinal() since it will affect the context.
In wolfssl there is no compatibility for EVP_EncryptInit() but there is EVP_CipherInit(), so I intend to use EVP_CipherInit().
My difficulty comes down to EVP_EncryptUpdate().
Is their anyway I can achieve my objective since there is no alternative for EVP_EncryptUpdate()?
EDIT:
Further search through the source reveals that CyaSSL_EVP_Cipher [EVP_Cipher] is available
which i can use by passing CyaSSL_EVP_aes_128_ctr to select 128 counter mode.
I have realized that in counter mode, CyaSSL_EVP_Cipher only call AesCtrEncrypt()
This brings me back to the initial issue of context.
AesCtrEncrypt() does not accept context structure, hence will not update the context.
Thank you