|
@@ -0,0 +1,263 @@
|
|
|
+#+Title: Keysigning Party Toolkit
|
|
|
+# #+Subtitle: A Quick way to run them
|
|
|
+#+AUTHOR: Samuel W. Flint
|
|
|
+#+EMAIL: swflint@flintfam.org
|
|
|
+#+DATE: <2017-02-05 Sun 17:08>
|
|
|
+#+INFOJS_OPT: view:info toc:nil path:http://flintfam.org/org-info.js
|
|
|
+#+OPTIONS: toc:nil H:5 ':t *:t todo:nil stat:nil d:nil
|
|
|
+#+PROPERTY: header-args :noweb tangle :comments noweb
|
|
|
+#+LATEX_HEADER: \usepackage[margins=0.75in]{geometry}
|
|
|
+#+LATEX_HEADER: \parskip=5pt
|
|
|
+#+LATEX_HEADER: \parindent=0pt
|
|
|
+#+LATEX_HEADER: \lstset{texcl=true,breaklines=true,columns=fullflexible,basicstyle=\ttfamily,frame=lines,literate={<=}{$\leq$}1 {>=}{$\geq$}1}
|
|
|
+#+LATEX_CLASS_OPTIONS: [10pt,twoside]
|
|
|
+#+LATEX_HEADER: \pagestyle{headings}
|
|
|
+
|
|
|
+* Export :noexport:
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:09>
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Export Document
|
|
|
+#+Name: export-document
|
|
|
+#+BEGIN_SRC emacs-lisp :exports none :results none
|
|
|
+ (save-buffer)
|
|
|
+ (let ((org-confirm-babel-evaluate
|
|
|
+ (lambda (lang body)
|
|
|
+ (declare (ignorable lang body))
|
|
|
+ nil)))
|
|
|
+ (org-latex-export-to-pdf))
|
|
|
+#+END_SRC
|
|
|
+
|
|
|
+* Tangle :noexport:
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:09>
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Tangle Document
|
|
|
+#+Name: tangle-document
|
|
|
+#+BEGIN_SRC emacs-lisp :exports none :results none
|
|
|
+ (save-buffer)
|
|
|
+ (let ((python-indent-offset 4))
|
|
|
+ (org-babel-tangle))
|
|
|
+#+END_SRC
|
|
|
+
|
|
|
+* Introduction
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:08>
|
|
|
+:UNNUMBERED: t
|
|
|
+:END:
|
|
|
+
|
|
|
+* TOC :ignore:
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:58>
|
|
|
+:END:
|
|
|
+
|
|
|
+#+TOC: headlines 3
|
|
|
+#+TOC: listings
|
|
|
+
|
|
|
+* Create An Event
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:56>
|
|
|
+:ID: c8681554-7d80-4706-b4ce-7ab4d6976ec6
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Create an Event
|
|
|
+#+Name: create-event
|
|
|
+#+BEGIN_SRC sh :shebang "#!/bin/sh" :tangle "create-event"
|
|
|
+ if [ $# -lt 2 ] ; then
|
|
|
+ echo "$0 event-name \"Long Name\" [keyserver]"
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
+
|
|
|
+ NAME=$1
|
|
|
+ LONGNAME=$2
|
|
|
+ KEYSERVER=${3:=hkp://pool.sks-keyservers.net}
|
|
|
+
|
|
|
+ cat <<EOF > get-key
|
|
|
+ #!/bin/sh
|
|
|
+
|
|
|
+ <<get-key>>
|
|
|
+ EOF
|
|
|
+ chown u+x get-key
|
|
|
+
|
|
|
+ cat <<EOF > announce
|
|
|
+ #!/bin/sh
|
|
|
+
|
|
|
+ <<gen-announce>>
|
|
|
+ EOF
|
|
|
+ chown u+x announce
|
|
|
+
|
|
|
+ cat <<EOF > key-email
|
|
|
+ #!/bin/sh
|
|
|
+
|
|
|
+ <<gen-key-email>>
|
|
|
+ EOF
|
|
|
+ chown u+x key-email
|
|
|
+#+END_SRC
|
|
|
+
|
|
|
+* Add Key to Keyring
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:58>
|
|
|
+:ID: 03114be8-a70c-4a1c-9876-d06500dc4d90
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Get Key
|
|
|
+#+Name: get-key
|
|
|
+#+BEGIN_SRC sh
|
|
|
+ gpg --no-default-keyring --keyring `pwd`/${NAME}.gpg --keyserver $KEYSERVER --recv-key $@
|
|
|
+#+END_SRC
|
|
|
+
|
|
|
+* Generate Announcement
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:56>
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Generate Announcement
|
|
|
+#+Name: gen-announce
|
|
|
+#+BEGIN_SRC sh
|
|
|
+ figlet -c OpenPGP >announcement.txt
|
|
|
+
|
|
|
+ echo >>announcement.txt
|
|
|
+ echo >>announcement.txt
|
|
|
+
|
|
|
+ cat <<EOF >>announcement.txt
|
|
|
+
|
|
|
+ There will be an OpenPGP keysigning party held at LOCATION on DATE at TIME.
|
|
|
+
|
|
|
+ Full details available at URL.
|
|
|
+
|
|
|
+ To participate:
|
|
|
+
|
|
|
+ - Please submit your key to the keyserver: ${KEYSERVER}
|
|
|
+ - Please email your key ID and fingerprint to SUBMISSION_EMAIL by FINAL_DATE_TIME
|
|
|
+ - Please prepare a sheet with your key ID, fingerprint, type, size, name and expiration
|
|
|
+ - Bring a pen, your key info sheet, and a copy of the key data sheet that will be distributed to the list.
|
|
|
+ - Bring at least 1 form of Government Issued photographic ID and at least one other form of photo id.
|
|
|
+
|
|
|
+ EOF
|
|
|
+#+END_SRC
|
|
|
+
|
|
|
+* Generate Key Email
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:56>
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Generate Key Email
|
|
|
+#+Name: gen-key-email
|
|
|
+#+BEGIN_SRC sh
|
|
|
+
|
|
|
+#+END_SRC
|
|
|
+
|
|
|
+* Key Information Sheet Generator
|
|
|
+:PROPERTIES:
|
|
|
+:CREATED: <2017-02-05 Sun 17:10>
|
|
|
+:END:
|
|
|
+
|
|
|
+#+Caption: Key Info Sheet Generator
|
|
|
+#+Name: kisg
|
|
|
+#+BEGIN_SRC perl :shebang "#!/usr/bin/perl -w"
|
|
|
+ use strict;
|
|
|
+ use POSIX qw(strftime);
|
|
|
+
|
|
|
+ # Version: 1.1
|
|
|
+ # Date: 2001.01.07
|
|
|
+ # Revised: 2004.04.06
|
|
|
+ # Author: V. Alex Brennen <vab@cryptnet.net>
|
|
|
+ # http://www.cryptnet.net/people/vab/
|
|
|
+ # Author: Gerfried Fuchs <alfie@ist.org>
|
|
|
+ # http://alfie.ist.org/alfie/
|
|
|
+ # License: Public Domain
|
|
|
+ # Description:
|
|
|
+ # This script was written as part of the gpg keysigning
|
|
|
+ # party howto. It generates a checklist for individuals
|
|
|
+ # participating in a keysigning party. The keysigning
|
|
|
+ # howto lives at:
|
|
|
+ # http://www.cryptnet.net/fdp/crypto/gpg-party.html
|
|
|
+
|
|
|
+ unless($ARGV[0])
|
|
|
+ {
|
|
|
+ print "\nUsage: party-table.pl <keyring> > out_file.html\n";
|
|
|
+ print "\nThe keyring should be the keyring where the public keys for the\n";
|
|
|
+ print "party participants are stored.\n\n";
|
|
|
+
|
|
|
+ exit;
|
|
|
+ }
|
|
|
+
|
|
|
+ my @fps = `gpg --fingerprint --no-default-keyring --no-options --with-colons --keyring $ARGV[0] | egrep '^(pub|fpr):'`;
|
|
|
+
|
|
|
+ print <<EOF;
|
|
|
+ \\documentclass[10pt]{article}
|
|
|
+ \\usepackage[landscape,margin=0.25in]{geometry}
|
|
|
+ \\usepackage{longtable}
|
|
|
+
|
|
|
+ \\begin{document}
|
|
|
+ \\begin{longtable}{|c|c|c|c|c|c|c|c|}
|
|
|
+ \\hline
|
|
|
+ & & & & & \\textbf{Expiration} & \\textbf{Info} & \\textbf{Owner} \\\\
|
|
|
+ \\textbf{Key ID} & \\textbf{Owner} & \\textbf{Fingerprint} & \\textbf{Size} & \\textbf{Type} & \\textbf{Date} & \\textbf{Match} & \\textbf{Match} \\\\
|
|
|
+ \\hline\\hline\\endhead
|
|
|
+
|
|
|
+ \\hline\\hline
|
|
|
+ & & & & & \\textbf{Expiration} & \\textbf{Info} & \\textbf{Owner} \\\\
|
|
|
+ \\textbf{Key ID} & \\textbf{Owner} & \\textbf{Fingerprint} & \\textbf{Size} & \\textbf{Type} & \\textbf{Date} & \\textbf{Match} & \\textbf{Match} \\\\
|
|
|
+ \\hline\\endfoot
|
|
|
+
|
|
|
+ EOF
|
|
|
+
|
|
|
+ while(my $line = shift(@fps)) {
|
|
|
+ if($line =~ /^pub/) {
|
|
|
+ my ($pub,$comptrust,$size,$type,$longid,$date,$expr,
|
|
|
+ undef,$settrust,$owner,undef,undef,$flags,undef)
|
|
|
+ = split /:/, $line;
|
|
|
+ my $id = substr($longid, 8);
|
|
|
+ my ($fpr,undef,undef,undef,undef,undef,undef,undef,undef,$fingerprint)
|
|
|
+ = split /:/, shift(@fps);
|
|
|
+
|
|
|
+ my ($upperFP, $lowerFP);
|
|
|
+
|
|
|
+ if($type eq '17') {
|
|
|
+ $type = 'DSA';
|
|
|
+ }
|
|
|
+ elsif($type eq '20') {
|
|
|
+ $type = 'El Gamal';
|
|
|
+ }
|
|
|
+ elsif($type eq '1') {
|
|
|
+ $type = 'RSA';
|
|
|
+ }
|
|
|
+
|
|
|
+ if(length($fingerprint) == 40) {
|
|
|
+ for my $i (36,32,28,24,20,16,12,8,4) {
|
|
|
+ substr($fingerprint,$i,0,' ');
|
|
|
+ }
|
|
|
+ $upperFP = substr($fingerprint,0,24);
|
|
|
+ $lowerFP = substr($fingerprint,25);
|
|
|
+ }
|
|
|
+ elsif (length($fingerprint) == 32) {
|
|
|
+ for my $i (30,28,26,24,22,20,18,16,14,12,10,8,6,4,2) {
|
|
|
+ substr($fingerprint,$i,0,' ');
|
|
|
+ }
|
|
|
+ $upperFP = substr($fingerprint,0,23);
|
|
|
+ $lowerFP = substr($fingerprint,24);
|
|
|
+ }
|
|
|
+
|
|
|
+ $owner =~ s/&/\\&/;
|
|
|
+ $owner =~ s/</\$<\$/;
|
|
|
+ $owner =~ s/>/\$>\$/;
|
|
|
+
|
|
|
+ print <<EOF;
|
|
|
+ \\texttt{$id} & $owner & \\texttt{$upperFP} & $size & $type & $expr & & \\\\
|
|
|
+ & & \\texttt{$lowerFP} & & & & & \\\\
|
|
|
+ \\hline
|
|
|
+
|
|
|
+ EOF
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ print <<EOF;
|
|
|
+ \\end{longtable}
|
|
|
+ \\end{document}
|
|
|
+ EOF
|
|
|
+#+END_SRC
|
|
|
+
|