diff --git a/in/public/security/gpg/fun.rst b/in/public/security/gpg/fun.rst new file mode 100644 index 0000000..1ad7782 --- /dev/null +++ b/in/public/security/gpg/fun.rst @@ -0,0 +1,50 @@ +“Choose” fingerprint +==================== + +.. code:: bash + + #! /bin/bash + + mkdir --parents _ + + while true; do + + gpg \ + --batch \ + --passphrase '' \ + --quick-generate-key \ + 'First Last ' \ + ed25519 \ + cert \ + 1y \ + &> /dev/null + + gpg \ + --armor \ + --export-secret-keys \ + 'First Last' > "tmp.gpg" + + name=$(\ + cat tmp.gpg \ + | gpg --list-packets \ + | grep v4 \ + | awk -F ' ' '{print $9}' \ + | awk -F ')' '{print $1}' \ + ) + + name="${name:24:4}_${name:28:4}__${name:32:4}_${name:36}" + echo "${name}" + mv tmp.gpg "_/${name}" + + rm openpgp-revocs.d/* + rm private-keys-v1.d/* + + gpg \ + --batch \ + --yes \ + --delete-keys 'First Last' + + rm pubring.kbx* + rm trustdb.gpg + + done diff --git a/in/public/security/gpg/index.rst b/in/public/security/gpg/index.rst index 1a2506f..3b93a21 100644 --- a/in/public/security/gpg/index.rst +++ b/in/public/security/gpg/index.rst @@ -8,3 +8,4 @@ GnuPG configure generate servers + fun