Quote from: nomodeset on July 27, 2012, 11:15 pmQuote from: LouisCyphre on July 27, 2012, 02:55 pmI agree, but most people on this thread are learning to use it for the first time and haven't yet reached the point of verifying a file by the signature. Hopefully we'll get to that.Let me try to introduce the topic. At least one message will be enough.In order to understand how digital signatures work we need to consider a hash function. It's a many-to-one function that maps its input to a value in a finite set. Typically this set is a range of natural numbers. A simple hash function is f(x) = 0 for all integers x. A more interesting hash function is f(x) = x mod 37, which maps x to the remainder of dividing x by 37.A document's digital signature is the result of applying a hash function to the document. To be useful, however, the hash function needs to satisfy two important properties. First, it should be hard to find two documents that hash to the same value. Second, given a hash value it should be hard to recover the document that produced that value.See https://en.wikipedia.org/wiki/Cryptographic_hash_functionAfter the hash value of the message is computed, it is encrypted using the signer's private key, and anybody can check the signature using the public key. If the document is modified the signature check will fail, but this is precisely what the signature check is supposed to catch.In order to sign a document the --sign command-line option is used:gpg --clearsign --output message.sig --sign messageThe message is input, and the signed document is output.Let's consider an example. Dread Pirate Roberts sends the following message:-----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1If for some reason the official Silk Road onion URL were to be compromised and I was unable to communicate with you through the forum, one of the following 3 URLs will be used to relaunch the site and/or communicate through:silkroadiplkjo7t.onionbpbpoqbqdodbqbqb.onionpddqoboqqqqqbqdq.onion-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.4.11 (GNU/Linux)iQEcBAEBAgAGBQJQEwC+AAoJEAIiQjtnt/olmpYIAIAh9rDphz9MMHPR9Y+273yNmRcBi5Smj4NMu6pU37jQlNZ/NEVlU41Qmmp80emGTSpVyLlljzTBg04d15NKQITwByidPFbh2Qqz63T+WyqDsEZAnmRQ7tZvXtpk4cKx3ttX384tP+jUlmHBC+83ERHmfok32hPRPO309RZkZBEa9gwmeGCkU8sg3E8LT331Wtwd5Zo+LIGdR8Jd5HevarBFLwYIw1suEN5+Gvu3/liTS0f0Ftqyqt2oLCrAYd821ybmxYZYnwpErx+pcsrE+0icj4MInxn65sSbcZKE5cmjMunVldmASoWxMmJjNq8yzMgxZzW8JIXmdvLixwlaWcY==rxxy-----END PGP SIGNATURE-----Everyone who's imported DPR's public key could then check that this message is really written by Dread Pirate Roberts running this:gpg --output DPRmessage --decrypt DPRmessage.sigIt should say:gpg: Good signature from "Silk Road "Now let's assume that somebody pwned forum or DPR account to post this:-----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1If for some reason the official Silk Road onion URL were to be compromised and I was unable to communicate with you through the forum, one of the following 3 URLs will be used to relaunch the site and/or communicate through:www.usdoj.gov/dea/www.fbi.govwww.cnn.com-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.4.11 (GNU/Linux)iQEcBAEBAgAGBQJQEwC+AAoJEAIiQjtnt/olmpYIAIAh9rDphz9MMHPR9Y+273yNmRcBi5Smj4NMu6pU37jQlNZ/NEVlU41Qmmp80emGTSpVyLlljzTBg04d15NKQITwByidPFbh2Qqz63T+WyqDsEZAnmRQ7tZvXtpk4cKx3ttX384tP+jUlmHBC+83ERHmfok32hPRPO309RZkZBEa9gwmeGCkU8sg3E8LT331Wtwd5Zo+LIGdR8Jd5HevarBFLwYIw1suEN5+Gvu3/liTS0f0Ftqyqt2oLCrAYd821ybmxYZYnwpErx+pcsrE+0icj4MInxn65sSbcZKE5cmjMunVldmASoWxMmJjNq8yzMgxZzW8JIXmdvLixwlaWcY==rxxy-----END PGP SIGNATURE-----Everybody who has DPR's public key can check that this message is not written by him:gpg --output DPRmessage2 --decrypt DPRmessage.sigIt will say:gpg: BAD signature from "Silk Road "Great post! Golly, it reminds me that I have to complete my cryptographic hashing project soon. And don't forget to sign DPR's public key before verifying a signed message by him folks.A thought on more sophisticated PGP tech beyond simply knowing how to encrypt and decrypt.Is it possible to create a PGP encrypted message that is designed be Timestamp sensitive?I mean for applications like the following:- A 'mission impossible' message. i.e. the encrypted message can't be decrypted after X minutes/days/years even if you have the private key.- A 'time bomb' message. i.e. the encrypted message is only decrypted with your private key after a time limit.- A Timestamp pattern message. i.e. Message only decrypted at certain time intervals e.g. each Friday at GMT 1pmAnd so on. It could be very useful.Now, I know what you're going to say: the PGP software needs to know the time... And that you could always simply change the clock on your computer to suit yourself.However, imagine a bunch of servers that exist to tell you the time, they already exist. Now, what if those servers were arranged into a web of trust network communicating the Timestamp with your PGP software via signed encrypted messaging?