paperkey

An OpenPGP key archiver. More information: https://www.jabberwocky.com/software/paperkey/.

paperkey --secret-key path/to/secret_key.gpg --output path/to/secret_data.txt

paperkey --pubring path/to/public_key.gpg --secrets path/to/secret_data.txt --output secret_key.gpg

gpg --export-secret-key key | paperkey --output path/to/secret_data.txt