added encryption script

This commit is contained in:
Jeffrey Paul 2018-06-28 08:12:49 -04:00
parent 0dbca1e8fa
commit f1e9cc0cfa
1 changed files with 29 additions and 0 deletions

29
bin/encrypt-for-sneak Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
set -x
KEYSERVER="hkps.pool.sks-keyservers.net"
#KEYSERVER="pgp.mit.edu"
KEYS=""
KEYS+=" 5539AD00DE4C42F3AFE11575052443F4DF2A55C2" #sneak@sneak.berlin
KEYS+=" FF2530A4F3F152E8865FC17CA833B7CE3F2CC6FC" #JP Yubi 6192
KEYS+=" 078BBD04FBE35D665180EF8A476509F749BFD1AD" #JP Yubi 2811
KEYS+=" 7D1123A022FC90DF389EC65F233196C180B1C28F" #JP Yubi 6643
KEYS+=" F5A3A83B9E65EA3E1A2A48E5FDA763BDDCFAB8AC" #Yubikey 4928206 20160927
KEYS+=" B044B27DCB86641AFE3AB274779D07C54EB7CF85" #Yubikey 4953582 20160927
#KEYS+=" 3FF8DE63855070F8B9CB0D9A67B4CD26470681DA" #Yubikey 4CNano 06931602 20171018
GARGS=""
GARGS+=" --trust-model always"
GARGS+=" --compress-algo bzip2"
GARGS+=" --bzip2-compress-level 9"
for KEY in $KEYS ; do
if ! gpg --list-key $KEY 2>&1 > /dev/null ; then
gpg --recv-key --keyserver $KEYSERVER $KEY
fi
GARGS+=" -r $KEY"
done
gpg $GARGS --encrypt $*