Top.Mail.Ru
← All journal articles

How do encryption systems work?

How encryption systems work

We are not afraid to enter our card details in an online store and share our secrets via email, because we know that all information on the Internet is encrypted. But do you really know what this means? What technologies protect your data from prying eyes, and why is it said that supercomputers will end these cloudless days? In this article, we'll show you how encryption works.

What is encryption?

People have been trying to protect written information ever since they actually learned to write. The ancient Greeks wrapped parchment on special cylinders so that the letter could only be read using the same device. Caesar is credited with using the first cipher, built using roughly the same technology as today: the emperor substituted another letter in a word for each letter, moving several positions in the alphabet. To understand the text, it was necessary to know the magnitude of this shift — today we call this the cipher key.

Simply replacing a letter with another gives very little protection to the text. Sherlock Holmes shows how easy it is to break such a cipher in the short story Dancing Men. Modern systems use complex mathematical functions, turning data into a meaningless set of symbols in which it is impossible to recognize the source materials. This protects text data, audio (for example, phone calls), and video. To return them to their original form, the recipient of the message must do the reverse work — run the received content through the same function using the secret ingredient, the key.

Thus, the main issue of encryption is how to transfer the key to the recipient? This should be a method that excludes the possibility of interception, otherwise what's the point of protecting data at all. This is where the fun begins.

Symmetric and asymmetric encryption

The easiest way is to arrange a personal meeting and come up with a key together that will be used in further correspondence. If both parties use the same key, this encryption is called symmetric encryption. This technology has one big drawback: if an attacker finds out the key of one of the participants in the correspondence, he will be able to decrypt the data of other participants as well.

To protect against such an unpleasant situation, engineers have developed asymmetric encryption technology. It assumes that each participant has two keys — public and private. The first is used to encrypt data, the second is used to read it.

This pair is connected in a clever mathematical way so that it is impossible to know the other key by one key. To explain the point, let's take the number 36 — it can be represented as 1x36, 2x18, 3x12, 4x9, 6x6. Imagine that your friend chose one multiplier out of these ten and asked you to guess it. It will be difficult to say correctly on the first attempt. But if your friend tells you the second multiplier from his pair, you will immediately understand exactly what he has in mind. After all, this is no longer a mystery, but a multiplication task.

This is approximately how asymmetric encryption works, but in this case it is not primitive multiplication that is used, but complex, very complex mathematical algorithms. Before starting a conversation, participants exchange their public keys. In our example, this corresponds to 36. Next, Participant A encrypts his message with Participant B's public key. When he receives the message, he will be able to decrypt it using his private key, the same multiplier that only he knows.

Asymmetric encryption also has a weak point: it is much slower than symmetric encryption. Therefore, this method is used to transfer small pieces of information, such as symmetric keys. As long as participants in the conversation manage to keep them from prying eyes, their data remains safe.

Are there unbreakable ciphers?

In order for a stranger to read a message that was protected by asymmetric encryption, they will have to go through all possible factors to see if the meaningless set of characters has become the original message. Modern encryption algorithms are designed in such a way that it takes an unimaginable time to find the right pair — from a thousand to a million years of continuous computer operation. Therefore, in fact, any cipher can be cracked — the only question is how much time you are willing to spend.

That is why today's encryption technologies may be completely useless in the near future. The creation of a quantum computer, which will inevitably happen in the coming decades, will cause a sharp jump in computing power. As a result, it will be possible to split current ciphers within an acceptable time frame, which means that they will not be able to be used. However, there is no need to panic — new times will offer new algorithms.

You can also read

Courses for kids

Progkids обратная связь

It's easy to sign up for a free class

Already in the first lesson, we'll dive into the basics of development and create a small project that your child will want to brag about.

Submit a request

ok image
Ваша заявка отправлена. Скоро мы свяжемся с Вами
Ошибка при отправке формы