Introduction to Cryptography: Why It Was Useful Even 4000 Years Ago. Part I

Introduction to Cryptography: Why It Was Useful Even 4000 Years Ago. Part I

Cryptography is becoming more and more important in our lives. The entire digital world is literally built with it in mind. With the help of cryptography, all information on the Internet is stored and transferred. It is responsible for all our passwords, including those from bank accounts, and also led to the formation of cryptocurrencies as a means of payment.

Encryption algorithms are used by you every day when visiting sites via the HTTPS protocol, making purchases with a bank card, connecting to the cloud, communicating in instant messengers or using any decentralized applications. Crypto is our present and, more importantly, our future. So it’s important to understand how it all works.

What is Cryptography?

Cryptography is the science of protecting data. It is exploring ways and finding new methods to secure information, authenticate it, and verify its integrity.

Many people think of cryptography as a way to protect the contents of a safe. But in reality, the task here is much more ambitious: you need to keep the information a secret even if the safe was in the hands of a criminal and its lock was cracked. After all, in the world of the Internet, this happens all the time with passwords and accounts, and any data transmitted over the network can, in theory, be intercepted.

There is only one way to ensure the secrecy of information even in case “safe was cracked”. It is to radically change it in some way so that no one but those for whom it was intended could understand it. That is, to carry out an encryption.

After that, the information can be freely transmitted even through public communication channels. It will be impossible to parse, it will be encrypted and will not be of value to those who do not have the password or the key (unless, of course, they manage to steal it).

This is the most basic cryptography method, and today everything is a lot more complicated. Billion dollar organizations fight among themselves to protect or steal information. New devices are invented, the technology is advanced into the new age, all to be able to encrypt or decrypt data. Needless to say, even the computers themselves were developed for just such a purpose.

History of Cryptography

Cryptography has been around for almost as long as writing. It is one of the oldest fields of technical study we can find records of. According to A Short History of Cryptography by Fred Cohen, it has been around for 4,000 years or more. Whenever any communications are recorded, there arises the issue of protecting those records and the knowledge within.

Ancient Egypt

Scientists discovered the oldest known text with cryptography in ancient Egypt, in the tomb of Khnumhotep II, a prince from the city of Menat Khufu. This rich man and official lived more than four thousand years ago. Around 1900 B.C. the scribe, already after the death of his master, wrote down the biography of Khnumhotep II, knocking out hieroglyphs in his tomb (now known to us as BH3). In addition to the usual hieroglyphs, the scribe used a number of strange symbols, which in some places hid the literal meaning from any onlookers. In fact, this is the first known substitution cipher, when parts of the source text are directly replaced by other elements according to some rules.

Symbols (left) and their implied meaning (right)

Ancient Greece

Around 500 B.C. the Spartans, known for their military bearing, created a device called scytale, which allowed you to send and receive secret messages. They would use it to hide the information from their enemies — the Persians and Athenians.

The scytale looked like a short thick stick around which a strip of parchment could be wound. After that, a message was applied to the parchment. If you unfolded it, it became unreadable — you would just get random fragments of letters. To read the message, one had to have a scytale of exactly the same thickness, and wrap the parchment around it. In that case, the letters would line up again, showing the original message. The diameter of the stick was a great military secret of the Spartans, and they radically changed it every few years.

Ancient Rome

But the earliest military use of cryptography known to us belongs to Gaius Julius Caesar. Ancient Rome was the largest empire in the world, and with the most extensive road network. Messengers ran along these roads, relaying decrees to various branches of the military. If these messages were to be intercepted by enemies, it could jeopardize any military operation.Therefore, about 2000 years ago, Caesar, being at that time at the head of the Roman army, came up with a solution to secure communication with his troops. He developed his own substitution cipher, a table by which some letters were replaced by others. Only a person who knew the table could understand the message.

In fact, it was the first ever cryptographic key. It was transferred to the regiments much less frequently, and only in large armed convoys. Now getting an ordinary messenger into the hands of the enemy did not affect the plans of the Romans. This “new technology” gave Caesar’s troops a huge advantage and won him many wars. Although today even children know about this encryption method, and can find a way to crack it.

World War II

For over two thousand years, all methods of cryptography in one form or another resembled the method of Caesar, with replacement techniques becoming more and more complicated.

All this culminated during World War II. Back then, the Germans used their famous typewriter-like Enigma device to create encrypted codes and send them to various units in their army via radiograms. The smartest English and Polish mathematicians over the years developed methods for recognizing these ciphers. It was extremely difficult: the code could only be recognized if one had the same copy of Enigma and knew its settings for a particular day. In order to decipher messages, the first computer in history was eventually created — a machine code-named “Turing Bombe”. It was 7 feet high and 10 feet long, the size of a closet. A total of 210 such machines were produced before the end of the war.

Turing Bombe

It is argued that victory on the cryptographic front proved to be a decisive factor in the eventual victory in the war. It allowed Allies to counteract the most important plans of Nazi Germany.

From the point of view of modern cryptography, the Enigma cipher was incredibly weak. But despite this, the Allies had a very difficult time in the early 1940s. They managed to solve the messages only because of:

  • covert operations that captured Enigma devices;
  • cipher books stolen from military submarines and ships;
  • years of work of hundreds of famous mathematicians;
  • presence of messages with a pre-known text (German weather reports often began with the word “weather”).

Still, even after all of that, eventually the computer had to be invented to find the correct key combination for a particular day.

Since that time, cryptography has advanced tremendously. Today’s message encryption techniques would have seemed like science fiction to mid-20th-century mathematicians. Enigma ciphers can now be solved in milliseconds.

Continued in Part II — Modern Cryptography: techniques, algorithms and unsolvable problems. All about hash functions, asymmetric encryption, Whirlpool, 3DES and prospects for the development of the field with our transition to quantum computing.

—-

Polkapad is a launchpad for crypto startups that helps connect founders and investors. We are your key to the hottest IDO projects. Join our community if you want to invest in crypto projects for awesome returns or if you want to successfully launch your own crypto product through a crowdsale.

Continue to Part II: Modern Cryptography: Techniques, Algorithms and Unsolvable Problems

You may be interested

Learn basics in our free Wiki section!