I wonder how can I use the private / public keys exported by GPG to use libgcrypt? Libgcrypt needs s-expression structures with associated mpi values, and I don't know how to extract them from GPG export :(
Thanks in advance!
A related answer can be found at: Using the output from gpg -list-packages on the key to get mpi values ββfor generating s-expressions
Here are some links:
ASCII Armor is a GPG extension for OpenPGP and is not part of the libgcrypt library. the dearmor_file function is located in GnuPG.