Verifying a Digital Signature
Presumably you are reading this because you received an e-mail from me with this signature:
This message was digitally signed. If you are curious, or worried about an "unknown attachment", see http://cromwell-intl.com/digsig/ ---___-_-_-_-___-______-_---_---___-_---___-_---_-_-___-_---_-_-___-_-_-_ All unencrypted communication by Internet, telephone, and fax is subject to interception and archiving. Corporate announcements of desire for deletion by unintended recipients accomplish nothing. ______-_-_-_-___-_---___-_-_-_---___-______-___-_---___-_---_-___-_-_-___ PGP key fingerprint: 6E6E 1DF0 C381 9172 55B4 AC00 8344 6EEA 41E1 A929
A digital signature is a security mechanism based on cryptography. It allows someone to verify two crucial aspects of information security:
Message integrity — The message received is identical to what was originally sent. Nothing, not a single character, has been changed, added, or deleted.
Sender authentication — The message was in fact sent by the person or other entity the message claims to be from.
If the digital signature can be verified, then you can have very high confidence in data integrity and sender identity. If it cannot, then either the data has been somehow modified or it is an attempt to spoof the identity of another sender. You cannot tell precisely how it was modified — what was changed, added, or deleted — just that something was done to it.
How Do You Verify A Digital Signature?
The simple answer is that you just need to import my public key into your PGP keyring and make sure that your mail tool uses it.
The OpenPGP standard has been around since November 1998. However, some mail tools such as Outlook Express do not understand it. If you're reading this because you were puzzled or worried by mysterious "unknown attachments" reported by your mail tool, there's the reason.
If you're curious about the cryptography, about the mechanics (or really the mathematics) of how a digital signature is created and verified, see my "Just Enough Cryptography" page for an overview.
Digital Signatures Do Not Provide Confidentiality!
You must understand that digital signatures do not provide confidentiality.
While they are based on cryptography, digital signatures do not encrypt the message. Anyone can read a digitally signed message. The signature itself is just a distraction or is ignored if you or your mail software do not use it.
All communication on public telecommunication networks — Internet, telephone, facsimile, etc — is subject to interception and archiving. It is easy for governments to do this because Internet and telephone traffic must pass through a limited number of backbone interconnection points. The governments simply obligate the telecommunications companies to provide access, or even to do the data collection on behalf of the government.
Yes, this process was greatly expanded in the U.S. during the Cheney/Bush administration, but it had already been underway for many years. See, for example:
The Puzzle Palace,
James Bamford, 1982 Body of Secrets,
James Bamford, 2001 Wired
May 2006 cryptome.org
May 2006 PBS
Feb 16 2007
The only defense, potentially very powerful if done very carefully, is to encrypt the message. The encrypted message, the ciphertext, can still be intercepted and archived. However, the intercepting agency would have to decrypt the message to make any sense of it beyond the fact that at some time person A sent a message to person B.
Again, see my "Just Enough Crypto" page to see what would be involved to protect your communication, and what would be required to attack the encryption.
The Form of a Digitally-Signed Message
Below is an actual message.
Notice the in-line markup indicating the start of the
signed message, the end of the message and start of the
signature, and the end of the signature,
all of those highlighted in
Then the protected message body itself has a
Finally, the PGP digital signature itself has an
To: firstname.lastname@example.org From: Bob Cromwell <email@example.com> Subject: Here is an example of an OpenPGP message Message-ID: <579FEB4C.firstname.lastname@example.org> Date: Mon, 19 Dec 2016 20:37:32 -0400 User-Agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 This is the message body. All of the message body has been protected with cryptographic tamper protection" in the form of a digital signature. Bob - -- This message was digitally signed, see http://cromwell-intl.com/digsig/ - ---___-_-_-_-___-_____-_---_---___-_---___-_---_-_-___-_---_-_-___-_-_-_ All unencrypted communication by Internet, telephone, and fax is subject to interception and archiving. Corporate announcements of desire for deletion by unintended recipients accomplish nothing. ______-_-_-_-___-_---___-_-_-_---___-______-___-_---___-_---_-___-_-_-__ PGP key fingerprint: 6E6E 1DF0 C381 9172 55B4 AC00 8344 6EEA 41E1 A929 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXn+tCAAoJEINEbupB4akpz0wP/RfNBWhG9D+jav5ST/78K6pE ODC4r3OpTP1CBuF1ntP6JJ1oVjMA1q7lgWkCYNIxorQ84NUzhv0S214hPnf4SLJN dCHesLW9ox9miAWuKP4ZoQvXrRYDKAZuEgdONaG44NRsXeN2V3FEnMpNJgBOL9Ee n+f1zecuuTRHWfRWDbo3exmHeS52kuohDuP1lxaAbpK3HwuIwa40xUQ10e/YuvBb vbXbyQcYWvkOexvJGxk8gvDUSpZOSrjBpQvhNBxZN36CqlxhEiMbmuGgCsOJHMiO awmgDqqflUU1DoA8AXPpzEPdipcBwV0heKawVh0hBnMNl7BxA1XW0p5E0ESkysfp YipMAOeMeXelHby8ZGpBCVSVUI+r7COlonN8AT2Mfb7gHkBmOLIlKyykub00mFCX puudQAQMmMxshA54pBmGPRJ2ESDaAp5SYqMf7rlind5HSe0g2gSUKPz2+Z7yrdWP tjeuJOsBCmcbI+z/7UnLBFEYgPfVLNibHS0psdCXyHR0qDA9ingNd6MRwTrw6nMN 2O+iKuTpDkkuo14HDh8kGk6hRU2gzghFqmwJNGTZkrT0uYKM9hchRq7ndfWArkqn hJPjPgMTjJNIqtie2IMUDtnRcBQvrVvWCMIDaI9NAx7DhEv02ANmDjTmqEydtPoV tGldCwKB56vGuIjQ0V2u =gpq8 -----END PGP SIGNATURE-----
As you can see from the message header and the PGP signature block, this message was digitally signed with GNU Privacy Guard (GnuPG) which I use as a plugin with the Thunderbird mail tool, running on the OpenBSD operating system.
However, since the message uses the OpenPGP standard format (which has been around since November, 1998), modern mail tools should be able to handle it regardless of application, graphical environment, or operating system.
The digital signature was made with the SHA-2-256 hash function followed by encryption with my 4096-bit RSA private key.
You can get the correponding public key from any of:
My site MIT PGP key server SKS key servers
Now for some skepticism...
As Matthew Green, Moxie Marlinspike, and others have pointed out, PGP is actually a pretty horrible choice for strangers who are trying to establish secure communications.
Unless you work at the same place or otherwise share a trusted PKI (or Public Key Infrastructure), you are forced to do manual key management. What's worse, you're in an environment where you almost certainly have no means of determining key validity.
Then there are the cryptographic drawbacks. PGP doesn't provide forward secrecy. And, as Matthew Green says, the quest for backwards compatability turns a current OpenPGP implementation into a museum of 1990s crypto.
Finally, as Moxie Marlinspike points out, the quest for cross-compatability is largely pointless given the vanishingly small sliver of Internet users struggling to use PGP.
And yet I still use it...
I'll admit it's as much performance art as anything. My excuse is that it gets a few people thinking about what is possible. Some of those people could find this useful. Those would be the people that work at an organization with PKI for trustworthy key management and configuration management for restricting operation to secure ciphers and operating modes.