Last active
April 6, 2020 18:05
-
-
Save wooyey/688bce44c1a6dda352e048a02f7388e4 to your computer and use it in GitHub Desktop.
Yubikey soft GPG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WARNING='\033[5m\033[1mWARNING\033[0m' | |
sudo apt update -qq | |
sudo apt install -qq -y gnupg2 gnupg-agent dirmngr cryptsetup scdaemon pcscd secure-delete hopenpgp-tools yubikey-personalization | |
ENTROPY=$(cat /proc/sys/kernel/random/entropy_avail) | |
if [ $ENTROPY -lt 2000 ]; then | |
echo -e "${WARNING}: Small entropy value: ${ENTROPY}" | |
fi | |
cat << EOF > gpg.conf | |
personal-cipher-preferences AES256 AES192 AES | |
personal-digest-preferences SHA512 SHA384 SHA256 | |
personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed | |
default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed | |
cert-digest-algo SHA512 | |
s2k-digest-algo SHA512 | |
s2k-cipher-algo AES256 | |
charset utf-8 | |
fixed-list-mode | |
no-comments | |
no-emit-version | |
keyid-format 0xlong | |
list-options show-uid-validity | |
verify-options show-uid-validity | |
with-fingerprint | |
require-cross-certification | |
no-symkey-cache | |
use-agent | |
throw-keyids | |
default-key 0x7A63D77C417D7C3B | |
trusted-key 0x7A63D77C417D7C3B | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment