Short Version of the Question: I would like to remove any predictable information from an encrypted private keys binary representation. Does anyone have a hint where the binary format for encrypted GnuPG private keys (.gpg) is documented?
Longer Explanatory Version of the Question: Hey guys, basically I'm trying to write a program which hides the encrypted private key in a random user-selectable medium (e.g. JPEG image) using steganography.
I'm assuming the attacker knows the kind of medium, but not the specific file, it would be rather useless if the private key doesn't appear completely random.
Basically, I would like to remove any predictable information for example on the type of encryption (maybe AES-128-CBC) used, and reconstruct the key after retrieval from the medium. A wrongly chosen medium should deliver a seemingly valid private key. So the attacker would have to brute-force all possible passphrases for all possible storage mediums.
Is that generally a stupid and futile endeavor?
From the encrypted keys I looked at and the information I collected I would guess that the key is concatenated like "SALT + EncryptedByteStream + InformationOnEncryptionAlgorithm". Does anyone have a hint where to find that? I'm a little tired from digging haphazardly through source code right now.