AES and EVP_CIPHER question

Philip Prindeville philipp_subx at redfish-solutions.com
Fri May 13 18:05:52 UTC 2022


Here's a simple/stupid test program and its output, running on Ubuntu 20.04 LTS:

OpenSSL 1.1.1f  31 Mar 2020
EVP_CIPHER_CTX_new returns 0x5627171042a0
EVP_CipherInit returns 1
EVP_CipherUpdate returns 1, outlen = 0
buf: 'Mary had a littl'
EVP_CipherFinal returns 0, finallen = 0
buf: 'Mary had a littl'
final: '****************'

Arguably, "outlen" should be the same as "inlen" when calling EVP_CipherUpdate() for ECB.  EVP_CipherFinal() should return 1... not clear what the appropriate value of "outlen" should be in that case, guessing 0?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: application/octet-stream
Size: 1495 bytes
Desc: not available
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20220513/567c49ee/attachment.obj>


More information about the openssl-users mailing list