gcry_cipher_decrypt usage

Joe the Shmoe news at edrusb.is-a-geek.org
Wed Apr 6 20:35:03 CEST 2011


I hope to ask my question at the appropriate place, if not tell me and
thanks to accept my appologies.

While all works fine using libgcrypt, I have meet a situation where the
submitted buffer containg ciphered data to gcry_cipher_decrypt() may
also contain clear data after the ciphered data.

In that situation, gcry_cipher_decrypt() decipher properly the encrypted
data into the output buffer, but I cannot figure out how much data was
put in it, and cry_cipher_decrypt() does not report any error neither,
while the original clear data located at the end of the input buffer,
could most probably not be "deciphered".

In other words, when a buffer of ciphered data is given to
gcry_cipher_decrypt, how is it possible to know the amount of clear text
data that has been produced?

Thanks in advance for any help,


More information about the Gcrypt-devel mailing list