aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/exportkey.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/exportkey.sh b/scripts/exportkey.sh
new file mode 100755
index 0000000..90dbc01
--- /dev/null
+++ b/scripts/exportkey.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Backup GPG keys as DMTX for offline backup
+
+# Generates key-aa, key-ab, ...
+gpg --export-secret-key --armor $1 | split -b 1500 - key-
+
+# Convert each of them to a PNG image
+for K in key-*; do
+ dmtxwrite -e 8 $K > $K.png
+done