Re: Import "Raw" RSA Secret Key?
On 12/19/2013 09:28 PM, David Shaw wrote: > On Dec 19, 2013, at 7:10 PM, Eric Swanson wrote: > >> I'm trying to import a "raw" RSA secret key into GnuPG. >> >> I have p, q, d and the creation timestamp, as well as anything else >> that can be computed from them (n, u, e, etc etc). >> >> I've been implementing bits of RFC 4880 in an attempt to generate >> valid secret key files, but it looks like GnuPG won't import a key >> unless it has a valid self-signature, and that chunk of the >> specification is large and looks painful to implement. >> >> So how can I best get my (p,q,d,timestamp,n,u,e) structure into a >> valid GPG key which can be used to sign, encrypt, etc messages? > > If you can manage to make a RFC 4880 secret key packet, you should be able to > combine it with a user ID packet (either generate one yourself - no crypto > needed - or just copy one from another key), and then import the result with > --allow-non-selfsigned-uid. That should skip the need for a self-signature. > Once you have it imported, you can self-sign it via GPG, using "--edit-key > xx sign". > > David > This is exactly what I was looking for. Thanks! -- Eric Swanson http://www.alloscomp.com/ ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Import "Raw" RSA Secret Key?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello all, I'm trying to import a "raw" RSA secret key into GnuPG. I have p, q, d and the creation timestamp, as well as anything else that can be computed from them (n, u, e, etc etc). I've been implementing bits of RFC 4880 in an attempt to generate valid secret key files, but it looks like GnuPG won't import a key unless it has a valid self-signature, and that chunk of the specification is large and looks painful to implement. So how can I best get my (p,q,d,timestamp,n,u,e) structure into a valid GPG key which can be used to sign, encrypt, etc messages? Best regards, - -- Eric Swanson http://www.alloscomp.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSs4r8AAoJEOYgyKdLr10J8iEQAIqDwu6osCiOZgSgXo67EYN8 l2WcUInnxShAlr8Uh5NKMAK8eQIrJyaoNgH4ZQKGBTF6rzStzz5rWoZV6vGpjKZN YqeJN5SH4kJ0gXpo8UsyGgq61JjbDf0VCz1CKKYuVAie66s5k7SfUzBPvMPThYRj T8jKl0oYwZBUZH9x6Pybxral3kphD4QmgEqVhystpVAB28i3084YcO2ZDRtrWVFA 1leeyShFNb2ZV5N/djh6iHV3sazT0TYk/G4dniWkbsRYDzvPPhb9KzVRxN44dsU0 kxd26YlIx9hOrDP4twRFD8g0fRbHh9vLg0UGqV876LudqkDwkzn8ZnO844++gJj1 71JewHoWFqjXD57B/PJULBt5LNejf7fqBCo79NkXR/Bq2oVlaSkyA4dEk+6rpSSj 20sj8pT4SdZB/KOVDdpdOB2DlLU2J5FaJqGhkJZOjSbiXdUXrqgOh0cAkUU6zrsd t6P6IhwyZ8fCsHn2iuo/rsg2Ls7MGyI4aa9KDexgmnf3hpBbKN2tP2710JHCHr1A y3TR+Lk5ILR0JeMmP0fYZa2A9xG/kL/e0HpeD2LQCX+91ivZ7vxoz/3P3IVySWbr mkvBZ1YdvdE4fq2loiR/4uuYJbB2c45t1t++OBm6pGSntv6NTfyJNd2gu5HkNg2i lO2eDOw/y66gfoNRmygj =j92H -END PGP SIGNATURE- ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users