"num" parameter and expected output buffer size in EVP_CipherUpdate

Wiktor Kwapisiewicz wiktor at metacode.biz
Fri Dec 16 11:08:24 UTC 2022


Hi Tomáš,

On 16.12.2022 11:53, Tomas Mraz wrote:
> Of course once you feed the data to EncryptUpdate by chunks sized
> smaller than block size, there logically has to be some caching
> involved as a block cipher must encrypt only full blocks unless there
> is some padding involved but that applies only to the last block.

Okay, if I understood you correctly there's no API to ask an already 
intitialized EVP_CIPHER_CTX object about the cache as this is 
implementation detail?

(I thought EVP_CIPHER_CTX_get_num would do that but apparently not...)

> In case of AEAD modes this is also different as there must be some
> additional space in the ciphertext for the tag.

Yes, understood.

Thank you for answers!

Kind regards,
Wiktor


More information about the openssl-users mailing list