Methods of Cryptography

The best cryptography method to use depends on the use and level of security needed. Here we look at the different methods and where they are best suited.

Substitution Methods

The simplest cryptography is using the substitution method, or Caesar's Alphabet. The letters of the alphabet are moved so that the letter that you really want is X number of digits ahead of the one you use so that ABC becomes EFG or are substituted for numbers or symbols so that ABC becomes 456 or #*%. The major problem with this method is that the code is easily cracked.

Reciprocal Methods

The reciprocal method works by inputting text or data into a machine that creates the encryption. The machine flips letters in pairs, which means that if an A is replaced with an L then the L in the text will replaced with an A in the code. The weakness in this method is that if the code is entered into the same type of machine with the same key, the original message will become clear. This is what happened in World War II with the German Enigma machine.

Symmetric Method

Symmetric methods are also known as single key codes. There is one key that is used to encrypt and decrypt the original data and this key needs to be known both by the send and the recipient. The key is vulnerable as its details are known by more than one person. Two variations of the symmetric method are block code that sends data in a number of bits at one time and stream codes that sends one piece of data at a time. Data Encryption Standard (DES) is one example of symmetric keys.

Asymmetric Method

The Asymmetric method is also known as a public key method. The key holder has two keys one of which is a private key, which only they know and a public key, which is up-loaded to a key-server or given to people they want to correspond with. When sending an encrypted message or file, the sender uses the public key of the recipient to encrypt it. This ensures that only the individual with the private key can access the data or message. If the sender wants to give a guarantee that they are the sender, they will use their private key to sign the message. This requires the recipient to use their public key which confirms the identity of the sender. PGP is just one example of asymmetric keys.

Key length

Key length is an important consideration when using cryptography. The longer the key-length the less chance that the code will be attacked. A 2-bit encryption has four possibilities, a 512-bit has 262,144 possibilities. Whilst a 512-bit key has been considered the most secure for some time, advances in computer technology has seen the 4kbit become standard, that is 16 million possibilities. Therefore it is important to pick the strongest method and the largest key possible for your most vulnerable data.

Cryptography for Developers

By Tom St Denis

Cryptographically secure pseudorandom number generator