keysign-kit.org 6.9 KB

Keysigning Party Toolkit

Introduction

TOC   ignore

Create An 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

Add Key to Keyring

  gpg --no-default-keyring --keyring `pwd`/${NAME}.gpg --keyserver $KEYSERVER --recv-key $@

Generate Announcement

  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

Generate Key Email


Key Information Sheet Generator

  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