Hello everybody!

I am looking for a "simple" way to use a GPG public/private RSA key to
do "raw" RSA operations. I have the impression, that gpgme only deals
with "real" OpenPGP data structures, but this does not fit my use case.
This is for an application that is currently based on openssl crypto.

I do have a "plan-b" if there is no simpler way, but given the gpgme,
libgcrypt ecosystem (which I have not really used before) I hope that I
will not have to use this:

  * use gpgme to access gnupg keyrings
  * "export" a key using as an OpenPGP key into an in-memory buffer
  * parse this key from the buffer - extracting RSA numbers
  * put the RSA values into an openssl RSA key structure
  * do the crypto using openssl

This does work - I tested this up to the fourth bullet... but there
surely must be a better way.... however, looking at the gpgme docs I can
find no obvious candidates for RSA operations - gpgme_op_encrypt does
not what I need, as it constructs a PGP message, where I assume it uses
a session key and encrypts that using RSA...


peter

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to