[openssl-users] EVP Functions

Eudald Sabaté Creixell eudaldsabate at gmail.com
Wed Apr 12 14:42:56 UTC 2017


First of all I'm new to OpenSSL and EVP functions. I've been using them in
a project in order to encrypt/decrypt files using 256-bit AES in CBC mode,
and using these functions to entirely encrypt/decrypt a file I've found any
problem. Now, I've been asked to decrypt a file partially, and the problem
we've found is that when decrypting it block by block, if the block to be
decrypted is not the first one I have rubbish characters. But when
decrypting all the content of the file, starting by the beginning block
these characters does not appear.
So, my question is if it is possible to decrypt a file partially, and I
will be very grateful if you could help me.

I also want to mention that when decrypting the file block by block (block
chunks of 1024), the outlen variable on EVP_CipherUpdate(...) is always
less than the inlen variable passed, though the outbuf contains more than
outlen characters decrypted. Is it also normal?

Thank you all for your time,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20170412/97e4df97/attachment.html>

More information about the openssl-users mailing list