Pretty Good Privacy
Pretty Good Privacy (PGP) allows people to encrypt their communications over the internet. It is currently one of the best ways to combat surveillance and eavesdropping.
The internet without encryption is synonymous to a crowd of people yelling at each other; a curious eavesdropper can easily walk up to the party in question and listen. It would simply be too dangerous to transmit obviously sensitive information over the internet, such as social security numbers or online banking passwords. You may try to encrypt those sensitive communications, but dedicated eavesdroppers can collect the rest of your unencrypted internet communications to paint a detailed picture of your personality and habits.
"My life's an open book," people might say. "I've got nothing to hide." But now the government has large dossiers of everyone's activities, interests, reading habits, finances, and health. What if the government leaks the information to the public? What if the government mistakenly determines that based on your pattern of activities, you're likely to engage in a criminal act? What if it denies you the right to fly? What if the government thinks your financial transactions look odd—even if you've done nothing wrong—and freezes your accounts? What if the government doesn't protect your information with adequate security, and an identity thief obtains it and uses it to defraud you? Even if you have nothing to hide, the government can cause you a lot of harm.
In the above passage from the book Nothing to Hide, Daniel J. Solove extrapolates on what could happen if everybody simply accepted the notion that the benefits of government surveillance outweigh the disadvantages. Many forget that they do have something(s) to hide, and so surveillance is harmful to them rather than helpful. With the help of PGP, Tor, OTR, GNU/Linux, and other encryption/anonymity tools, one can use the internet with a very low probability of being spied on.
Secret-key (symmetric) cryptography—Alice wants to send Bob a secret message. They both agree on a single secret password to use as an encryption/decryption key. Alice can use that key to encrypt data to send to Bob, and Bob can use that key to decrypt data received from Alice. Mathematically, a symmetric cipher is just a one-to-one function that is easily invertible—apply the function to encrypt data, or apply its inverse decrypt data. The key describes the characteristics of the function; without the key, one cannot determine the function or its inverse.
Symmetric cryptography has some disadvantages:
- At the very beginning, when Alice and Bob initially exchanged the key, the exchange could have been transparently intercepted by a third party (assume Alice and Bob were not using a secure channel to exchange the key because that is precisely what we are trying to build!). With a stolen key, a third party can eavesdrop on Alice or Bob, and even pretend to be Alice or Bob.
- It is unwieldy for large groups of people to communicate privately, since the number of keys is polynomial with the number of people (recall the number of edges in a complete graph of n nodes):
# people # keys 2 1 3 3 4 6 5 10 6 15 n n(n-1)/2
Public-key (asymmetric) cryptography—rather than just using one key, a public-key cipher uses a pair of keys for sending messages. One is a public key used for encryption, and the other is a private key used for decryption. Anybody, including Alice, can use Bob's public key to encrypt messages, but those messages can only be decrypted with the corresponding private key which Bob keeps to himself. If Alice also has a public/private key pair then she can send and receive secret messages to and from Bob.
Public-key cryptography addresses some problems with secret-key cryptography:
- Only the public (decryption) key needs to be sent over the network, so an eavesdropper cannot simply steal the key by performing a man-in-the-middle attack.
- Large groups of people can easily communicate because each person only needs to generate his or her own key pair. The number of key pairs in the network is linear with the number of people (2n). Alice never needed to negotiate with Bob to agree on a shared secret key—they each simply generated their own key pairs and grabbed each other's public key.