What is the binary export / import format used bygpg for public and private keys?

  • Is this related to Extract only the key(s) from GPG exported keypair? – a CVn Mar 26 '14 at 15:12
  • Yes, part of the same effort – Eero Aaltonen Mar 26 '14 at 18:04
  • @vonbrand: I spend yesterday reading the man pages, tutorials, articles & blog posts and made absolutely no progress. None of the docs mentioned the export format. Silly me for not going straight to the source. – Eero Aaltonen Mar 27 '14 at 10:20

The format is defined in RfC 4880 (e.g. section 5.5 Key Material Packet).

  • Thank you! There are three leading bytes, but after that the version number, time and algorithm match exactly. – Eero Aaltonen Mar 27 '14 at 10:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.