OpenPGP messages and also exported keys are assembled by many OpenPGP packets, which even might again be split in subpackets. There are lots of different ways to assemble them.
There are many possible reasons for getting different secret key exports:
- multiple keys might be exported in different order
- different versions of GnuPG print equivalent, but slightly different output within the OpenPGP specifications
- different options for symmetric encryption (with the passphrase given) are applied, or just different initialization vectors are used
- the exported secret key might also contain different sets of signatures on the public key, which also might be ordered differently
Likely, even multiple of those reasons apply. You can have a look at the exported key's contents by running gpg --list-packets [file]
. You could do with both exports, and use diff
(or some more advanced graphical user interface) to compare the results. Reading RFC 4880, OpenPGP might be required to understand the output details.