Perform only asymmetric encryption/decryption

Erik Nellessen erik.nellessen at informatik.hu-berlin.de
Fri Apr 8 17:28:00 CEST 2016


When I encrypt data using GnuPG, GnuPG uses hybrid encryption. This really is a good idea for most use cases. But in my (I admit, rather special) use case, only using asymmetric encryption/decryption is what I need. Is it possible to use asymmetric encryption only? The interface I would wish to have takes plain data and provides an RSA encrypted cipher text (and vice versa for decryption).

Does GnuPG provide any kind of interface for direct asymmetric encryption/decryption operations? I guess I could try do it similar to the write_pubkey_enc function in the file g10/encrypt.c. But is there an easier/more official way?

What I want to do is certainly possible using OpenSSL. But as I am changing an existing system, a possibility to do this with GnuPG would be the easiest way for me.

Kind regards,
Erik Nellessen



More information about the Gnupg-users mailing list