SciTech

How Things Work: Cryptography

VOEFS UIF USJBOHMF or UNDER THE TRIANGLE; the phrases mean the same!

Cryptography, or the practice of hiding information through codes, has helped in keeping information hidden from enemies since the times of Julius Caesar.

Cryptography literally means “hidden writing” in Greek. Messages may be converted into codes or ciphers. The words “code” and “cipher” have often been used as synonyms, but both words indicate different forms of hiding messages.

In codes, entire words are replaced by symbols, letters, numbers or different words. Ciphers, however, replace each letter by different letters or symbols.

Cryptography, like all developed fields, comes with its own set of field-specific jargon. The process of creating a cipher from a message is known as enciphering and results in a ciphertext message. Along the same lines, creating a code is called encoding.

The letters or symbols of the codewords are referred to as “codegroups.” Encryption is a general term that can be used to indicate either enciphering or encoding.

The words of the original message are called “plaintext” or “cleartext” or “plaincode.” Deciphering is the art of converting a ciphertext message back to a plaintext message. Enciphering coded messages to improve their security is known as “superencipherment.”

There are two kinds of ciphers. A substitution cipher changes the letters in a message to another set of letters in a systematic manner. A transposition cipher, on the other hand, only shuffles the letters around.

A simple substitution cipher in which the same cipher letter is always exchanged for the same plaintext letter is known as a monoalphabetic substitution cipher.

Monoalphabetic substitution ciphers go back to at least the fourth century BCE. The Hindu text for the instruction of women known as the Kama Sutra written at the time describes ciphers as one of the 64 arts that a woman should know.

She should know ciphers for arranging discreet meetings and communicating with a lover.
One of the simplest monoalphabetic substitution ciphers, known as a Caesar shift, named after Julius Caesar, involves shifting letters by a number of positions.

The letters of the plaintext are replaced by letters one or two places ahead.

The cipher at the beginning of this article is a Caesar shift cipher in which each letter has been shifted by one place. U has been replaced by V, N by O, and so on.

Because of this rather simple form of encryption, Caesar shift ciphers are relatively easy to break.
In modern times, encryption of messages was employed during World War I. Although it was not very successful in hiding messages, it did show the importance of cryptography on the battlefield and the danger of weak encryption.

Subsequently, World War II became a defining moment in the history of cryptography and placed the field squarely at the center of military and political strategy from that time to the present day.

The Second World War introduced encryption machines for the first time. The German Enigma machine ensured German supremacy for a rather long time during the war. German messages could be decoded by the Allies only after blueprints of the Enigma machine were stolen.
As was demonstrated in World War II, being able to break codes without the key or codebook is of extreme importance in military strategies.

A commonly used method to crack codes is to collect many messages encrypted with the same code and then obtain background on the messages, such as the location from where a message was sent, where it was being sent, the time the message was sent, events occurring before and after the message was sent and the normal habits of the people sending the coded messages.
For example, a codegroup that appears in messages preceding an attack on a particular location may very well stand for that location. This may provide vital information during military campaigns and wars.

Another method is called frequency analysis. Frequency analysis relies on the fact that certain letters occur more frequently than other letters in the English language.

Letters in the ciphertext can be counted and by comparing the frequency of letters in the ciphertext to the frequencies of letters in normal writings, the code can be cracked.
For example, the most commonly used letter in English is “e”; if “o” is the most common letter in a ciphertext, it can be inferred that “o” stands for “e.”

The most obvious and, in principle, the simplest way of cracking a code is to steal the codebook through bribery, burglary, or raiding parties — a procedure also known as practical cryptology — and this is the weakness of a code.

Constructing a dictionary is a big job because if the code is compromised, it means a lot of work for the cryptographer and the code breaker as the task has to be repeated all over again.
Therefore, codes should preferably be kept between a few people only.