Another trivial question: gcry_cipher_encrypt() (plaintext length)
Jules Colding
colding at omesc.com
Tue Apr 24 12:14:09 CEST 2007
Hi,
Once more I'm demonstrating my utter lack of knowledge in all matters
related to cryptography. Please forgive these trivial questions.
I'm trying to use gcry_cipher_encrypt(). I've set the cipher mode to
GCRY_CIPHER_MODE_CFB(*) and the algorithm is GCRY_CIPHER_AES256.
My problem is that the size of the plaintext data is unknown to me as I
have to use gcry_cipher_encrypt() for arbitrary plaintext data.
The manual for libgcrypt says that the size of the input data has to be
a multiple of the block size of the cipher algorithm.
So what I'm really asking about is whether there is a standard way of
padding the input data to achieve the required size? How do I
remove/recognize the padding when decrypting?
Thanks a lot in advance,
jules
(*) Is that mode a wise choice?
More information about the Gnupg-users
mailing list