Sample Header Ad - 728x90

Export GPG Private Key WITHOUT knowning the passphrase

0 votes
0 answers
2992 views
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 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?
Asked by xyzabc123 (1 rep)
Apr 5, 2022, 08:42 PM