so I spent many hours on this now and I hope someone can give me any useful input.
I want to export an encrypted secret key from GPG (which lies in ~/.gnupg/private-keys-v1.d) but I do not have the passphrase. So the normal gpg --armor --export-secret-keys <name> does not work for me. My goal is to get that encrypted private key into the armored OpenPGP format (while still being encrypted).
Just a change of format without any decryption happening.
So I dove into the RFC 4880 standard to understand how the packet structure works but that doesn't lead me anywhere.
I hope this is understable.
Is it even possible to do this manually or is the key decrypted and reencrypted a different way during gpg's export function?