#!/bin/bash # Daniel Kahn Gillmor # 2015-07-15 # How to generate the keys used for the creation of the message # corpus. export WORKDIR=$(mktemp -d) export GNUPGHOME="$WORKDIR" cat >"${WORKDIR}/gpg-agent.conf"<' gpg2 --batch --pinentry-mode=loopback --passphrase=_julia_ --quick-gen-key 'Julia ' gpg2 --batch --pinentry-mode=loopback --passphrase=_obrian_ --quick-gen-key "O'Brian " for x in winston julia obrian; do gpg2 --armor --batch --pinentry-mode=loopback --passphrase=_${x}_ --output $x.key --export-secret-key $x gpg2 --armor --batch --output $x.pgp --export $x done