Data Privacy Primer

Cryptography is a study that deals with data privacy among other uses. It is now widely used for data encryption and integrity verification.

There are mainly two branches of cryptography systems, symmetric-key cryptography and public-key cryptography. They can be used together.

Symmetric-key Cryptography

Symmetric-key cryptography refers to a encryption method that uses a shared secret key between senders and receivers. Based on this method, senders encrypt their plain message into an encrypted message using the shared secret key. Then the encrypted message is safe to be stored and sent to the receivers through any unsecured channels. Once the encrypted message reaches the receivers, the receivers can then uncover the original plain message by decrypting the encrypted message with the shared secret key. This was the only method before the public-key cryptography was developed. It has serious problem with the key managment. If the shared secret key is somehow revealed, not everyone involved can be immediately notified and messages encrypted with the revealed secret key are in immediate danger. In addition, it is cubersome to send the shared secret key to everyone involved if a new key is created.

Public-key Cryptography

In a public-key cryptography system, each user uses a pair of keys, or a keypair. The keypair consists of a public key, which is free to be given to anyboby, and a secret key, which should never be given to anyone. Besides, the secret key is not needed by others except yourself.

The keypair is so paired that you cannot derive one key from the other. You can use one key to encrypt and the other key then must be used to decrypt. In one scenario, your public key given to others is used by others to encrypt message to you, and your secret key is used to decrypt the encrypted message. In another scenario, you use your secret key to digitally sign a document. The the receivers of the document can then use your public key to verify if the document is indeed signed by you. Of course, a document can be encrypted and digitally signed at the same time.

GnuPG and MyPrivacyKey

MyPrivacyKey uses GnuPG as a backend crypto engine. GnuPG is an implementation of public-key cryptography systems. The keypair you generate through GnuPG is protected through an arbitrarily long passphrase. This is to ensure the safety of your private key in case you lose it. You should choose a very long passphrase. It is essential that you shall not give your secret key and passphrase to anyone.

The first step towards data privacy is to have your own keypairs generated. Once generated, your keypairs will be kept on a virtual key ring as a computer file. To communicate with others securely, you can then imports others' public keys onto this key ring. For details, see section Keys.