Problem with padding and lost of data

Werner Koch wk at
Sun Jul 22 18:19:39 CEST 2012

On Fri, 20 Jul 2012 01:59, contato at said:

> 1) When I use padding, it is not removed during the decryption. And I am
> adding the "(flags pkcs1)" to S-expression before decrypt.

IIRC, the decryption feature has only been available since 1.5.0.  Do
you use this version?  Older version allow to pass the flag but dod not
implement decryption.

> 2) If I do not use padding and I encrypt and decrypt a block of bytes
> which starts with the byte zero, I lose that first byte after decryption.

Never ever use RSA without padding.  Thus this is not relevant. 

The zero is missing because the raw data is treated as a number and
leading zeroes are removed.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gcrypt-devel mailing list