Digital Security and Privacy for Human Rights Defenders

2.4 Cryptology

Abstract
  1. Encryption is the process of making your information inaccessible to all but the intended party. You can encrypt a message, an email or your entire computer.
  2. For secure communications we To communicate utilise public key encryption.. Our encryption method consists of a public and a private key. We share the public key with those who wish to communicate with us. They then encrypt a message to us using our public key.
  3. The security of the public key encryption system relies on the validity of the public key you are encrypting to, a virus and spyware free computer, and a good password protecting your private key.
  4. We can prevent unauthorised tampering with our email en-route to its destination by using digital signatures.
  5. The level of security offered by encryption has led to its practice or theory (teaching) being outlawed in several countries.

History

Cryptology is concerned with linguistic and mathematical techniques for securing information. The messages are coded to become unreadable to everyone but the intended recipient. Its long and colourful history goes back to around 5th century BC when the Spartans created the earliest known method of encryption using two identical wooden staffs and a piece of parchment. The parchment would be wrapped around the stick and the message written lengthwise. Unwrapped, the letters did not appear in any comprehensible order. The parchment was sent to the recipient, who had an identical staff to read the message on. Other methods to secure information from outsiders include lin- guistic cryptology (e.g. hieroglyphics) and steganography, which is the process of hiding the existence of the message itself.

The message written on the parchment along the length of the stick (scytale). The scytale uses what is now known as a transpositional cipher, whereby you
rearrange the order of letters in a message.28

The security, provided by cryptography alone, should not be overestimated. Its fallibility is usually a result of human error or a bug in the overall security procedure. The use of cryptography has also been restricted by legislation in some countries. Mathematicians, scientists and civil rights activists in the US waged a 20 year battle to prevent the government prohibiting public access and use of cryptology, in what is now known as the Crypto Wars.

ceasar cipher

Encryption

Encryption (and its opposite – decryption) is a popular study in the field of cryptology. Encryption works by applying a large mathematical pattern to a set of data and coding it so that it appears incomprehensible to anyone who does not have the decryption method, otherwise known as the key.

Disk encryption

harddisk encryption

You can use encryption to protect your entire hard drive. You will in essence encrypt every bit of information on it, so that only you, having entered a password, can access this data. Whenever data is extracted from your computer (for example, an email attachment) it is automatically decrypted. If your computer isstolen, the information on it will remain inaccessible to others29.

You can also create an encrypted virtual drive on your computer. This option may suit those who do not wish to encrypt their entire computer, but allocate a space where to store information securely. If your computer has 5GB of free space, you can create an encrypted container and allocate 1GB of space to it. It will appear as a new drive on your computer (in fact this drive is not new and hence referred to as virtual). n will be encrypted, and you can store your documents on it. partitioThis

You can set your email program (e.g. Thunderbird) to store all files on the encrypted partition. Only you, or the bearer of your password, will be able to access the email on this partition.

You can also encrypt anentire USB memory card or other removable devices. This is useful when travelling with all of your documents on the memory card. Software like True Crypt, can also be run directly from your USB card, so that you will not need the program installed on every computer you wish to access your encrypted documents on.

harddisk partition encryption

 

Public Key Encryption

Traditional methods of encrypting the information you wanted to share with another person required you to give them the password to decrypt it. This was not a very secure method, as it was possible to compromise your password in the process. To get around this problem, mathematicians developed public key encryption (PKE). It is the most common method of encrypting communications (e.g. email) today.

When using PKE, your key will be made up of two parts: a public and a private key. Together they will make up your key pair. The keys are intertwined and what you encrypt with one, you can decrypt with the other. This is an integral part of PKE and a basis for its security and fallibility.

You share your public key with anyone you want to communicate with. You can also upload your public key to a key server on the Internet. The private key is kept secret on your computer or floppy disk and additionally protected with a password that only you should know. Do not share your private key with anyone. If you think that your password has become compromised (stolen) then you will need to revoke your key pair and recreate them from scratch.

Encrypting and decrypting a message30

In the PKE system, messages are encrypted for sending to us using our public key, and we decrypt them using our private key. People obtain your public key when they wish to send you an encrypted message by asking you for it or finding one you left previously on an Internet key server.

Example: You have a message that you wish to send to me encrypted. First, I must give you a copy of my public key. You use this public key to encrypt the message and send it back by email or other means. Only I will be able to decrypt this message since only I have the missing link – my private key.

public key encryption

Note: by “plaintext” we refer to the original message and “cipher text” refers to the message once it has been encrypted.

This facilitates communication of encrypted messages without having to share a password and dramatically increases the security and practicality of your communications. PKE has been applied to email, Internet chat, web browsing and many other Internet services. Its security has caused controversy with many governments. The level of privacy offered by the successful application of this system has made many surveillance and intelligence agencies very worried.

Key Security

The reliability of the encryption depends on :
  • the size of your key pair (usually 2048 bits long)
  • the ability to validate the recipient’s public key
  • protecting your password that unlocks the private key

The PKE infrastructure relies on the valid identity of the public and private key. When you are encrypting a message to me using my public key, you want to be sure that this key belongs to me. Let's have a look at the properties of a key pair.

A key pair is identified by 5 distinct features:
  • User ID: usually the email address of the key holder. Make sure it is spelt correctly.
  • Key ID: a unique ID automatically generated by the encryption program.
  • Fingerprint: (sometimes called MD5 and SHA1. See ‘Encryption on the Internet’ chapter for more detail) this is a unique identifier that is generated from the public key.
  • Date Created: the day on which the keypair was created.
  • Date Expired: the day on which the keypair expires.
GPGshell program

Fingerprint as seen in the GPGshell program

Try and verify the above details before using someone's public key to communicate with them. Since public key encryption does not require you to share a password with the message recipient, it is important that you can validate the true identity of the public key. Public keys are easy to create but the identifying features can also be falsified. That is why you should authenticate the person's public key before you use it (see 'Digital signa- tures' below). Once you have established that the public key belongs to them, you can 'sign' it. This will tell the program that you trust the key's vali- dity and wish to use it.31

The key size is usually 2048 bits. This level of encryption is assumed to be far more complex than modern computers can break32.

Digital Signatures - For Techies

We need the ability to verify the authenticity of our messages. This can be done by a digital signature, which also uses PKE to function. When you digitally sign a message, you include in it a unique mathematical calculation derived from its size, date and specific content. This digest is then encrypted with your private key so that the recipient can verify its validity. Once decrypted, the original digest in the signature is checked against the file received and confirms whether the file has been modified or not since it was signed. It is virtually impossible to change the content of your message without invalidating the signature.

digital signatures
It is advisable to encrypt all your communications once you and your contacts have set up and began using PKE. This counteracts the possibility of arousing suspicion of a lone encrypted email, containing sensitive information.

To sum it all up, using encryption is really not so difficult with modern software at hand. The main points to remember:

  • You need to create a keypair and keep your private key safe
  • You encrypt your messages to the recipient’s public key
  • You should always verify the recipient’s key by checking the fingerprint

Encryption Insecurity

The biggest problem with using encryption is that it sometimes gives the user a false sense of security. Just because you are using encryption does not mean that your messages will remain 100% secure. It is, of course, an excellent method of raising your level of security, but it is not foolproof. The main problem with PKE security is the human factor: mistakes that we make by carelessness or ignorance. I will discuss three methods of breaking your encryption privacy.
  • Compromising your private key. If the attacker manages to receive a copy of your private key by gaining access to your computer or otherwise, all they have to do is break the password protecting it. This can be done by brute force (using a password-cracking program that tries all common and random combinations) or by simply observing you type your password on the keyboard. Another method of stealing your password would be to install a keylogger program by gaining access to your computer with the help of an email attachment. A keylogger will record all the keys that you press on the keyboard and send this information to a designated Internet or email address. This way the attacker can receive the password you use to access your private key without requiring physical access to you or your computer.34

    The solution here is to use updated anti-virus, and anti-spyware programs and a firewall. This will, hopefully, either detect the presence of a the keylogger or prevent it from sending your password outside. Take care when typing the password and make sure that no one can see your keyboard or the computer screen. Most good encryption programs do not display the password on the screen. You have to write it 'blind'.
  • Key Recovery Systems. Since encryption is now integrated into more devices and uses with every passing day, its highly secure framework has become a problem for many government and law enforcement agencies. For many years they have been trying to implement key recovery systems (key escrow) which would give the authorities access to your private key. Alternatively, governments have began passing laws stating that you must surrender a copy of your private key to them for storage. Some closed encryption programs, where the encryption method has not been publicly tested, actually provide a backdoor for security agencies. Although this practice has been made illegal in many countries, it can still be found in different versions of software and hardware. The solution here is to use open source products (like GnuPG), thoroughly analysed and tested by the Internet community.
  • Public key validity and deception. As already mentioned in this chapter, the validity of the public key you are encrypting to is central to the all-round security of public key cryptography. The problem is that keys can be easily falsified. Carelessness on the user’s part may lead to using an adversary’s key under the assumption that it actually belongs to someone else. Pay close attention when receiving and importing public keys. The steps to verifying public key validity are explained above. Even though this may slow down the process of communication slightly, these steps should not be ignored.
There are also, of course, traditional methods of physical intimidation and force that could be used to make you reveal your password.

Choose encryption programs that have been publicly verified to have no back doors (such as PGP, GnuPG, TrueCrypt). Be aware of your local legis- lation and whether it allows you to use encryption and if yes, at what level of complexity (key size)35. You should also understand that the current legislation in your country may oblige you to reveal your password to the authorities. Try to find out if there are any legislative privacy safeguards which you can use to prevent this from happening.

 

29
An example of software that can encrypt your entire hard drive, cre- ate an encrypted partition or virtual drive is TrueCrypt, available in the Security-in-a-Box project http://security.ngoinabox.org/truecrypt_main

30Suggested software with which you could perform PKE is GPG4Win http://www.gpg4win.org or by installing the GnuPG and GPGshell software from the NGO in a Box
– Security Edition CD. It may help you replicate some of the examples in this chapter.

31
It will also add your signature to this key; should you send it to someone else, they will see your signature and know that you trust the validity of this key.

32 See this article http://www.keylength.com/en/3/ for a description of current and future key length necessities

33
http://www3.gdata.de/gpg/download.html

34
In 1991, the FBI launched a technique named ‘Magic Lantern’. Reportedly, it would attempt to install a Trojan Horse, attached to an email, on your computer. When activated, it would record all the keys a user typed and would send this information back to the headquarters. One justification for these actions was a response to the increased use of PKE. Since the FBI could not read an encrypted message, they tried to steal the user’s private key password. This initiative was reportedly dropped after courts questioned its legality but we cannot be sure a variation has not been developed in the meantime.

35
Refer to the Crypto Law survey maintained by Dr. Bert-Jaap Koops http://rechten.uvt.nl/koops/cryptolaw/