1*64c690aaSwizHow to use ssh keys in PGP signatures 2*64c690aaSwiz===================================== 3*64c690aaSwiz 4*64c690aaSwiz1. generate a new ssh key pair 5*64c690aaSwiz 6*64c690aaSwiz % ssh-keygen -t rsa -b 4096 -f sshtest-20140202 7*64c690aaSwiz Generating public/private rsa key pair. 8*64c690aaSwiz Enter passphrase (empty for no passphrase): 9*64c690aaSwiz Enter same passphrase again: 10*64c690aaSwiz Your identification has been saved in sshtest-20140202. 11*64c690aaSwiz Your public key has been saved in sshtest-20140202.pub. 12*64c690aaSwiz The key fingerprint is: 13*64c690aaSwiz 73:98:cf:3d:89:05:a1:6b:39:6b:24:f9:10:32:7a:05 agc@netbsd-001.cupertino.alistaircrooks.com 14*64c690aaSwiz The key's randomart image is: 15*64c690aaSwiz +--[ RSA 4096]----+ 16*64c690aaSwiz | E . | 17*64c690aaSwiz | . . . | 18*64c690aaSwiz | o o . . | 19*64c690aaSwiz | . + o = . | 20*64c690aaSwiz | . . + S . . | 21*64c690aaSwiz | . * B + . | 22*64c690aaSwiz | + + + | 23*64c690aaSwiz | . . | 24*64c690aaSwiz | | 25*64c690aaSwiz +-----------------+ 26*64c690aaSwiz % 27*64c690aaSwiz 28*64c690aaSwiz2. sign newdata using netpgp 29*64c690aaSwiz 30*64c690aaSwiz % netpgp -s -S sshtest-20140202 newdata 31*64c690aaSwiz signature 4096/RSA (Encrypt or Sign) 1c5ef29143e3e3ae 2014-02-02 32*64c690aaSwiz Key fingerprint: a4eb b577 ff2e f878 ea40 8c14 1c5e f291 43e3 e3ae 33*64c690aaSwiz uid netbsd-001.cupertino.alistaircrooks.com (sshtest-20140202.pub) <agc@netbsd-001.cupertino.alistaircrooks.com> 34*64c690aaSwiz % 35*64c690aaSwiz 36*64c690aaSwiz3. verify signature on newdata 37*64c690aaSwiz 38*64c690aaSwiz % ./netpgpverify -S sshtest-20140202.pub newdata.gpg 39*64c690aaSwiz Good signature for newdata.gpg made Sun Feb 2 13:40:07 2014 40*64c690aaSwiz signature 4096/RSA (Encrypt or Sign) 1c5ef29143e3e3ae 2014-02-02 41*64c690aaSwiz fingerprint a4eb b577 ff2e f878 ea40 8c14 1c5e f291 43e3 e3ae 42*64c690aaSwiz uid netbsd-001.cupertino.alistaircrooks.com (sshtest-20140202.pub) <agc@netbsd-001.cupertino.alistaircrooks.com> 43*64c690aaSwiz 44*64c690aaSwiz % 45*64c690aaSwiz 46*64c690aaSwiz4. get the contents of the file (only if the signature verifies ok) 47*64c690aaSwiz 48*64c690aaSwiz % ./netpgpverify -c cat -S sshtest-20140202.pub newdata.gpg 49*64c690aaSwiz /*- 50*64c690aaSwiz * Copyright (c) 2012 Alistair Crooks <agc@NetBSD.org> 51*64c690aaSwiz * All rights reserved. 52*64c690aaSwiz * 53*64c690aaSwiz * Redistribution and use in source and binary forms, with or without 54*64c690aaSwiz * modification, are permitted provided that the following conditions 55*64c690aaSwiz * are met: 56