From f162af12892940684b0405f74448118570f1208c Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 1 Jun 2019 22:45:44 -0300 Subject: Add helper scripts/export-keys.sh --- scripts/export-keys.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/export-keys.sh (limited to 'scripts') diff --git a/scripts/export-keys.sh b/scripts/export-keys.sh new file mode 100755 index 0000000..b7ef50d --- /dev/null +++ b/scripts/export-keys.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +yellow "Exporting public key..." +gpg --export --armor -a EuAndreh > keys +green "Done." + +yellow "Exporting private key..." +read -p "A prompt for the GPG password will appear! (Press any key to continue)" -n 1 -r +gpg --export-secret-keys --armor -a EuAndreh >> keys +green "Done." + +yellow "Encrypting key pair..." +read -p "A prompt for the symmetric encryption key of the keys.gpg file will appear! (Press any key to continue)" -n 1 -r +gpg --cipher-algo AES256 -c keys +green "Done." + +yellow "Removing traces of private key..." +shred keys +rm keys +green "Done." + +blue "File 'keys.gpg' create!" -- cgit v1.2.3