I examined a few randomly generated private keys generated by Gnu PG, and found a lot of redundancy.
- It is enclosed by
-----BEGIN PGP PRIVATE KEY BLOCK-----and
-----END PGP PRIVATE KEY BLOCK-----
- There is a CRC checksum at the end (e.g.,
- All RSA keys that I generated start with "lQ"
I tried removing the checksum and the importing works. Also, removing the BEGIN/END markers and the common "lQ" prefix seems reversible. I am wondering how much further can I go to make the key less redundant and more obfuscated?
My main security concern is:
If the attacker steals the encrypted private key, he can (more) quickly and easily verify that the decryption succeeded (in the case above, by verifying it begins with "lQ" and that the checksum is right).
Note: I used the
gpg -a --export-secret-key, but it looks the non-ASCII encodeded key (no
-a) has pretty much the same redundancy (I verified this using a hex editor).
Is there a specification / standard that specifies which parts of the private keys are "truly secret", and which one serve as a descriptor, checksum and can be safely removed (provided that I trust trust the key is unmodified)?