Does libgcrypt provide pkcs1 unpadding functionality?

Foo Lum etiquettesg at
Tue May 17 15:22:08 CEST 2011

Thanks for the info mate, I could only use libs that are already on redhat
so I am manually unpadding the padding done by the encrypt function.

On Tue, May 17, 2011 at 6:23 PM, Daiki Ueno <ueno at> wrote:

> Daiki Ueno <ueno at> writes:
> >> In the libgcrypt doco, it specifies that you can define an
> >> s-expression that allows for the data to be padded in PKCS#1 before
> >> being encrypted. Is there a another function or another expression I
> >> could build to unpad the data after it has been decrypted or is there
> >> some other work around to do this?
> >
> > The current git master supports "unpad" flag (it was introduced along
> > with OAEP padding support yesterday).  The document should be updated I
> > guess...will try to do.
> Oh, sorry, with the current code the "unpad" flag only works with OAEP.
> I'm attaching a patch to support it with PKCS#1.  You could take a look
> at check_pubkey_crypt in tests/basic.c for the usage.
> BTW, perhaps it might be good to factor out PKCS#1 encode logic to a
> separate function as well.
> Regards,
> --
> Daiki Ueno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20110517/5733461e/attachment-0001.htm>

More information about the Gcrypt-devel mailing list