Rotors of "Enigma" had 26 positions - according to the number of letters of the Latin alphabet. Three rotors, each with a unique wiring of contacts and a different speed of rotation, for example, the third rotor after each stroke (coded letter) turned immediately 2 steps forward. Instead of a simple one-alphabetic substitution A → B, the Enigma cipher looked like a meaningless set of letters, where one letter of the ciphertext could mean different letters of the real text. The first time "A" could be coded as "T", the next time the machine replaced "A" with "E", etc.
To read such a message, the receiving side had to set the rotors to the same initial position. The initial position of the rotors (key of the day, for example QSY) was a secret known only to the German operators of Enigma. Those who did not have the key, but wanted to read the messages, had to go through all possible combinations.
There were 26 such combinations.3 = 17576. With due diligence and motivation, a group of decryptors could go through and find the required key in just a day.
An increase in the strength of the cipher due to the larger number of rotors threatened an unacceptable increase in the mass and dimensions of the machine. But then Arthur Scherbius, the creator of "Enigma", went for a trick. He made the rotors removable and interchangeable, which immediately increased the number of combinations by 6 times!
And so that the brains of the enemy codebreakers finally boil, Scherbius installed a plug panel between the keyboard and the rotors, on which the letters were replaced. For example, the letter "A" was transformed into an "E" with the help of the panel, and the rotors made a further replacement E → W. The Enigma set had six cables, with which the operator connected 6 pairs of letters in the agreed order. Every day is different.
The number of connection options for 6 pairs of letters on a panel of 26 characters was 100391791500.
The total number of possible Enigma keys, using three swapping rotors and a patch panel, was 17576 * 6 * 100391791500 = a number that could take a brute-force test that might take more than the age of the universe!
Why are rotors needed?
The patch panel provided 7 orders of magnitude more keys than bulky rotors, but alone it could not provide sufficient cipher strength. Knowing what letters are used more often in German, and which, less often, the adversary, using the method of frequency analysis, could determine how the substitution occurs and decipher the message. The rotors, due to the continuous rotation relative to each other, provided better "quality" encryption.
Together, the rotors and the patch panel provided a huge number of keys, while simultaneously depriving the enemy of any opportunity to use frequency analysis when trying to decipher messages.
Enigma was considered completely unapproachable.
The Enigma code was discovered in a time significantly less than the age of the Universe
It took a young mathematician, Marian Rejewski, one brilliant idea and a year to collect statistics. After that, the German ciphers began to be read like morning newspapers.
In short: Rejewski exploited a vulnerability inevitable when using any hardware. For all the encryption strength of Enigma, it was too imprudent to use the same code (position of the rotors) for 24 hours - the opponents accumulated a dangerous amount of statistical data.
As a result, one-time codes were used. Each time before the start of the main message, the sender sent a duplicate text (for example, DXYDXY, encrypted SGHNZK) - the position of the rotors for receiving the main message. Dubbing was required due to radio interference.
Knowing that 1st and 4th letter are always the same letter, which in the first case is encrypted as "S", and then as "N", Rejewski painstakingly built tables of correspondences, analyzing long chains of rebuilding and trying to understand how the rotors were installed. At first, he did not pay attention to the plug panel - it monotonously rearranged the same pairs of letters.
A year later, Rejewski had enough data to quickly determine the key for each day using the tables.
The ciphers acquired a dim outline of a German text with spelling errors - a consequence of the replacement of letters on the patch panel. But for Rejewski, a graduate of the University of Poznan, an area that until 1918 was part of Germany, it was not difficult to intuitively grasp the meaning and customize the panel by connecting the required pairs of letters.
It seems like a simple thing now that the hint has been given and the idea of separating the work of the rotors and the plug panel has been explained. Hacking Enigma was a brainstorming session that required painstaking effort and mathematical talent.
The Germans tried to increase the strength of the cipher
By the late 1930s, the Germans had improved the Enigma, adding two additional rotors (# 4 and # 5, which increased the number of combinations from 6 to 60) and increased the number of cables, but hacking the Enigma had already become a routine. During the war years, the English mathematician Alan Turing found his own beautiful solution, using the stereotyped content of messages (the word wetter in the daily weather report) and designed analog computers, putting the decryption of Enigma messages on the stream.
The notorious “human factor” - the betrayal of one of the employees of the German communications service - played a role in the story of the Enigma hack. Long before the war and the capture of the captured Enigmas, Germany's opponents learned the wiring diagram in the rotors of a cipher machine for the Wehrmacht. By the way, in the 1920s. this device was freely available in the civilian market for the needs of corporate communications, but its wiring was different from the military "Enigma". Among the transferred documents came across an instruction manual - so it became clear what the first six letters of any message mean (one-time code).
However, due to the principle of operation, access to the Enigma itself did not mean anything yet. Required cipher books indicating specific settings for each day of the current month (rotor order II-I-III, position of rotors QCM, letters on the panel are connected A / F, R / L, etc.).
But the Enigma decoders dispensed with cipher books, manually analyzing a number with 16 zeros.
Computer encryption methods implement the same traditional principles of replacing and rearranging characters according to a given algorithm as the electromechanical "Enigma".
Computer algorithms are extremely complex. Assembled in the form of a mechanical machine, such a system would have incredible dimensions with a huge number of rotors rotating at variable speeds and changing the direction of rotation every second.
The second difference is binary machine code. Any characters are converted into a sequence of ones and zeros, which makes it possible to swap the bits of one letter with the bits of another letter. All this provides a very high strength of computer ciphers.
However, as the story with Enigma has shown, breaking such algorithms is just a matter of computing power. The most complex cipher, based on the traditional principles of permutation and replacement, will soon be "discovered" by another supercomputer.
To ensure cryptographic strength, other ciphers are required.
A cipher that takes millions of years to crack
In recent decades, "public key" encryption has been considered the strongest and most reliable method of encryption. No need to exchange secret keys and the algorithms by which the messages were encrypted. The irreversible function is like an English lock - no key is required to close the door. The key is required to open it, and only the owner (receiving party) has it.
Keys are the result of division with the remainder of giant primes.
The function is irreversible not because of any fundamental prohibitions, but because of the difficulties of factoring large numbers into factors in any reasonable time. The scale of "irreversibility" is demonstrated by interbank transfer systems, where the calculations use numbers consisting of 10300 digits.
Asymmetric encryption is widely used in the work of banking services, instant messengers, cryptocurrencies and further wherever it is necessary to hide information from prying eyes. Nothing more reliable than this scheme has yet been invented.
In theory, anything created by one person can be broken by another. However, as recent events testify, state regulatory bodies are forced to seek keys from messenger developers through persuasion and threats. The strength of public key ciphers is so far beyond the capabilities of modern cryptanalysis.
Quantum telephone for 30 million
The trigger for writing the article was a video posted on Youtube that accidentally popped up in the list of "recommendations" for viewing. The author is not a subscriber of such channels because of their stereotyped and worthless content.
It is not an advertisement. It is not anti-advertising. Personal opinion.
One blogger smashes the arguments of another, who claims about a "corruption scam" with the creation of a domestic quantum telephone.
The skeptic oppositionist tells about the found copy of the "quantum phone" ViPNet QSS Phone, which is being sold on the Internet for $ 200. His opponent objects: the "pipes" themselves have nothing to do with it - the creators used any devices that were at hand. The key feature of ViPNet QSS Phone is in the server “box”, inside of which photons are generated. It is the "server" that justifies the price tag of 30 million rubles.
Both bloggers demonstrate complete ignorance of the issue and an inability to think and analyze information. A conversation about a quantum phone should not start with "pipes" and "server", but from the principle of work, about which everything is said in the official release.
With the help of photons, only the secret key is transmitted, which encrypts the main message. Thus, in the opinion of the developer, the highest degree of key protection is provided. The message itself is transmitted encrypted over a regular channel.
"Photons are needed only to agree on a shared key, the negotiations themselves take place in any way we are used to."
(The moment on the video is 6:09.)
Both bloggers paid no attention to this. But if the author were a potential buyer, he would ask the developers a couple of questions:
1. Cryptography is the science of how to read ciphers without having a key. In other words, the absence of a key does not guarantee that the message cannot be decrypted and read. A striking example is the story of Enigma.
2. If we are talking about the transfer of any "secret key", this means encryption with traditional replacement / permutation algorithms. This makes the cipher even less cryptographically secure over modern hacking tools.
As you know, the most reliable is encryption with a "public key", where no key is required to be transferred anywhere. What is the value and significance of the quantum channel?
The mysticism of the microworld
Ordinary devices with unusual capabilities? We will argue in a logical manner. The creators of ViPNet QSS Phone were clearly in a hurry with the introduction of the "quantum phone" on the communication device market. With the available channel width, which does not allow transmitting the entire message and the achieved range of 50 km, such a system has no applied value.
At the same time, the story with the crypto telephone showed that research is being carried out in Russia at the forefront of modern science and technology, in the field of quantum communications.
Quantum communication goes beyond conventional cryptography (hiding the meaning of a message) and steganography (hiding the very fact of a message being transmitted). Bits of information encrypted as photons receive an additional layer of protection. However, this has nothing to do with encryption.
The fundamental laws of nature do not allow intercepting a message without measuring (and therefore not changing) the parameters of the photons. In other words, those conducting a confidential conversation will immediately know that someone has tried to listen in on them. Hello…