General information about cryptography, information encryption

With the development of technology, users around the world, as well as programmers and developers, began to face the issue of maintaining the confidentiality of information. Internet technologies and hacker attacks began to threaten this direction. This is how various methods of data encryption emerged.

This article will talk about what it is, explain the concept of cryptography, and discuss the main ways in which certain data can be protected. The information offered will be useful to both experienced programmers and novice PC users.

What does the science of cryptology study?

World practice has developed three main ways to protect information:

  • physical protection;
  • stenographic defense;
  • cryptographic protection.

Physical protection

The essence of the method is to create a reliable communication channel. As a rule, we are talking about protecting a material medium (paper, magnetic disk or flash card). The communication channel in various periods of history was secret couriers, carrier pigeons or classified radio frequencies. This method is also used in modern automated data processing systems: conditions of isolation and security are created for them.

Stenographic defense

Protection involves not only physical camouflage and isolation of the carrier, but also an attempt to hide the very fact of the existence of information that interests the enemy. Typically, classified information is hidden in plain sight among unclassified data.

For example: a microphotograph may be hidden under a stamp on a postal envelope or under the cover of a book. Important data is hidden in books, buttons, shoe heels, and even dental fillings.

With the development of information technology, shorthand methods have changed dramatically or become more complex. For example: a secret message may be hidden in a graphics file, where the least significant bit in the pixel description is replaced by the message bit.

Cryptographic protection

The most reliable and modern method of protection. To hide information from the enemy, the data undergoes a special transformation.

Definition! Cryptography is, translated from Greek, “secret writing”, a science that deals with mathematical methods of converting information.

Cryptanalysis deals with overcoming cryptographic protection without knowing the keys.

Cryptography and cryptanalysis are combined into one science - cryptology. She deals with the following issues:

  • assessing the reliability of encryption systems;
  • analysis of cipher strength;
  • transformation of information to protect against unauthorized intervention.

Modern data encryption methods can be so complex that only highly specialized specialists involved in mathematical analysis and information technology can understand them.

Cryptographic methods require large financial investments: the higher the required level of information protection, the higher the cost of encryption.

Hashing

Hashing is a cryptographic method of converting large amounts of data into short values ​​that are difficult to counterfeit. This is a key component of blockchain technology regarding the security and integrity of data flowing through the system.

This method is mainly used for four processes:

  • verification and confirmation of balances in user wallets;
  • encoding wallet addresses;
  • encoding transactions between wallets;
  • mining blocks (for cryptocurrencies that offer this possibility) by creating mathematical puzzles that must be solved in order to mine a block.

Requirements for cryptographic information protection systems

The basic rules for all modern cryptographic security systems mean that an encrypted message can only be read using a given key, and the availability of an encryption algorithm will not affect the level of protection.

The listed requirements are not met for all encryption algorithms. In particular, the requirement that there be no weak keys (keys that allow a cryptanalyst to break an encrypted message) is not met for some earlier block ciphers. However, newer encryption systems meet the required parameters.

Important Definitions

Encryption is the process of cryptographic transformation of text based on a certain parameter (key) and algorithm.

Decryption is the cryptographic transformation of cipher text into plain text.

A cipher is a set of reversible transformations of source data into hidden text.

Public key cipher (asymmetric) – a cipher with two keys: an encryption key and a decryption key.

Source text – data that has not been processed using cryptographic methods.

Cipher text is data with a key processed by a cryptosystem.

Key is a cipher parameter used to convert text.

A public key is one of the two keys of an asymmetric cryptosystem that is freely available.

Private key is the secret key of an asymmetric encryption system.

Decryption is the extraction of the original text without using a cryptographic key, using only the encryption key.

Cryptographic strength is the strength of a cipher for decryption by a cryptanalyst without knowing the key.

World Wars

By the beginning of the First World War, cryptography was already considered a full-fledged combat tool in the USA, Russia, England, Germany and beyond. Countries intercepted each other's classified communications, and cryptanalysts ruined plans to keep political moves secret. Thus, the decryption of an intercepted telegram from the German ambassador Arthur Zimmerman prompted the United States to enter the war on the side of the Entente.


On the left is Zimmerman's telegram, on the right is the decrypted text. The telegram was intercepted by British intelligence and deciphered by the Admiralty cryptographic service - “Room 40”. After the publication of the decrypted message in newspapers, anti-German sentiment increased sharply in the United States / ©KhanAcademyRussian

By World War II, major powers were using electromechanical encryptors. At that time, device codes were considered unbreakable. The devices themselves were rotary, like the Enigma cipher machine, and on lantern disks, like the M-209. Using Enigma, messages were encrypted by German troops and its allies, and by using M-209, the US Army. Both types of devices were produced in the USSR.


On the left is the Enigma M-4 encryption machine, on the right is the M-209. At first, Enigma was used by different countries for commercial purposes, but the machine became most widespread in Nazi Germany. The M-209 was immediately used during World War II for military purposes. Both devices are portable: they could be carried by one person / ©New Atlas / eGFI

The codes created by Enigma were considered the most resistant to hacking in World War II. The principle of operation of the device was as follows: with each press of a key, the right rotor moves one position, and under certain conditions, the other rotors also shift. The movement of the rotors resulted in different cryptographic transformations each time.

“The Enigma code was deciphered twice. For the first time, before World War II, in the Polish Cipher Bureau in December 1932. After this, German scientists complicated the device. The ciphers of the new Enigma, which was released in 1938, could only be deciphered using a more complex mechanism - the Turing Bomb, the first version of which appeared in 1940. At the same time, few people know about our encryption technology of the 1940-1950s, for example, about the Soviet Violet encryption machine, which was never hacked by anyone and was classified until the recent past,” reports Evgeny Zhdanov.


Alan Turing's cryptological decoder, which was called the "Bomb". Technically, the machine is complex, but to simplify it, the Bomb is the equivalent of 26 Enigmas. Turing's decoder could simultaneously work on three secret message keys, without which it was impossible to decipher the Enigma codes / ©Scanning WWII

Legal standards

Activities related to cryptographic encryption are subject to government control. Cryptography in Russia is regulated by the document “On approval of provisions on licensing of certain types of activities related to encryption (cryptographic) means” decreed by the Government of the Russian Federation; encryption means and technical maintenance of these means are subject to mandatory licensing.

In addition, the provision of services related to information encryption, the production of cryptographic tools and their development are under state control. These types of activities require special permission.

Order of the FSB of Russia dated February 9, 2005 N 66 “On approval of the regulations on the development, production, implementation and operation of encryption (cryptographic) information security means (regulations PKZ-2005)” determines the procedure for the development and use of encryption tools.

There is currently a law in force that determines the procedure for the development and operation of cryptographic tools.

According to the Decree of the President of the Russian Federation of April 3, 1995, government agencies are prohibited from using cryptographic means, secure technical devices for storing, processing and transmitting information that are not licensed by the government communications agency.

Areas of application of cryptography

The use of cryptography allows you to perform the following tasks:

  • encryption of data when transmitted over open communication channels, for example, via the Internet);
  • data encryption to protect against unauthorized access;
  • encryption of information when the bank works with clients during operations with plastic cards);
  • processing and storing personal passwords of Internet users;
  • protection of financial and reporting documents of organizations that are transmitted via remote communication channels;
  • banking services for enterprises via networks;
  • ensuring the protection of information stored on the computer's hard drive from unauthorized access via the network.

Cryptographic methods developed in the last century were aimed only at protecting information from unauthorized access. Today, the range of tasks has expanded significantly. There is an urgent need to verify the authenticity of messages, the integrity of transmitted data and the source of transmission.

Where is it used?

Digital services must necessarily worry about the safety of user and archived information. Otherwise, a data leak is fraught with serious consequences. An example is that hackers will be able to use the received electronic materials from a particular project for their own selfish purposes.

Today, almost all important aspects of human life and activity depend on information technology and gadgets. Financial transactions, as well as all kinds of payments and even work, are carried out through mobile technologies. They can hardly be called secure channels for transmitting electronic materials. Therefore, we have to think about how best to organize data protection.

Information encryption algorithms are used everywhere:

  • TV;
  • computers;
  • Internet technologies;
  • programming;
  • radio communication;
  • other communications;
  • banking activities.

Wherever information technology appears and digitalization is present, cryptography is involved. This scientific direction is very complex, but promising.

Story

Interesting historical information about some shorthand methods of protecting information reaches our days. In ancient Greece, the following method was practiced: a secret message was scratched on the shaved head of a slave, and when the hair grew back, the slave was sent to the recipient. The addressee read the message, shaving the slave's head again.

Sympathetic ink is another very common way of conveying information that is not intended for prying eyes. They used this ink to write between the lines of a regular letter. The addressee received information using the developer.

Historical encryption methods

There is reliable historical evidence that practical encryption methods were widely used in India, Egypt and Mesopotamia. In Ancient Egypt, a system of hidden messages was created by a caste of priests.

The warriors of Sparta used a cylindrical rod of a certain diameter, on which a strip of papyrus was wound, as a “cipher machine”. The message was written in clear text and sent to the addressee, but the message could only be read by wrapping papyrus on a cylinder of the same diameter.

Historians have an idea about who was the first to invent a decryption device. Its authorship is attributed to Aristotle: he designed a cone-shaped spear on which papyrus with an intercepted message was wound. The tape was placed on the cone and moved until the original text appeared on the desired diameter.

Encryption was also used in Arab countries. It is believed that the word “cipher” itself comes from the Arabic “numeral”. Information about ancient cryptanalysis can be found in the Shauba al-Asha encyclopedia.

The history of cryptography continued in medieval Europe, where priests, military men, scientists and diplomats practiced encryption. The secretaries of the office of the Catholic pontiffs, Cicco Simonneti, Gabriel de Lavinda, and the architect Leon Battista Alberti, were interested in works on cryptography in the 14th-16th centuries. They made a significant contribution not only to the theoretical collection of encryption methods and methods, but also to the improvement of these methods.

Such prominent figures and scientists of their time as Plato, Pythagoras, Galileo, Pascal, da Vinci, Euler, Newton, Bacon and many others were engaged in cryptography.

In the 19th century, with the beginning of scientific and technological progress and the invention of the telegraph, the first commercial and government ciphers appeared. Encryption speed has increased. At the end of the century, cryptography finally became an independent science.

World War II and post-war period

The advent of radio communications made it possible to transmit information at high speed and brought encryption to a new electromechanical and then electronic level. Narrow specialists in decrypting and intercepting data appeared. In the 20th century, specialization in cryptographic activities emerged. Specialists in encryption, in intercepting encrypted messages, and in decrypting enemy data are appearing.

In the 20s, rotary encryption machines were designed that performed all operations to convert information, which was then transmitted over radio channels. They were used by all states participating in the Second World War.

Algorithms for rotary machines were developed by the best mathematicians and engineers. K. Shannon, one of the prominent figures of that time, in his work formulated the conditions for the unbreakability of ciphers.

Electronic computers replaced electromechanical machines in the post-war years of the last century. Now the information was declassified in large fragments. Cryptographic software has begun to be used for commercial and civilian purposes to transfer data.

Gibberish, numbers and other ciphers

The work of Arab scientists contributed to the emergence of polyalphabetic ciphers, more resistant to decryption, in which several alphabets were used at once. However, people of the Middle Ages continued to use simple ciphers based on replacing letters with other letters or numbers, misspelling letters, etc. During the Middle Ages in Europe, cryptography was believed to be closely related to magic and Kabbalah.

It is interesting that Ancient Rus' also had its own methods of secret writing, for example litorea, which was divided into simple and wise. In the wise version of the cipher, some letters were replaced by dots, sticks or circles. In a simple litorea, which was also called a gibberish letter, all the consonant letters of the Cyrillic alphabet were arranged in two rows. They encrypted the letter by replacing the letters of one row with the letters of another.

Another famous cipher of Ancient Rus' was tsifir, when letters, syllables and words were replaced by numbers. Sometimes mathematical operations were added to the cipher to make it more complex, and it was not easy to solve such a riddle: “The ten is a ten and the five is a four, the one is a four and the ten is two.”


Secret writing of the 16th century, based on the numerical values ​​of Church Slavonic letters

During the Renaissance, cryptography experienced a rise. The period of formal cryptography begins, associated with the emergence of formalized, more secure ciphers. Cryptographers of subsequent years struggled with some of the mysteries of Renaissance scientists for centuries.

Around 1466, the Italian scientist Leon Alberti invents a cipher disk consisting of two parts: external and internal. The alphabet and numbers were written on the stationary external disk. The internal movable disk also contained letters and numbers in a different order and was the key to the cipher. To encrypt, it was necessary to find the desired letter of the text on the external disk and replace it with the letter on the internal disk, located under it. After this, the internal disk was shifted, and a new letter was encrypted from a new position. Thus, the Alberti cipher became one of the first polyalphabetic substitution ciphers based on the principle of combinatorics. In addition, Leon Alberti wrote one of the first scientific works on cryptography - “Treatise on Ciphers”.


Leon Alberti's encryption disk

It is worth mentioning here the phenomenon of steganography, which was also paid attention to in Alberti’s work. If using a cipher they try to hide the meaning of information, then steganography allows you to hide the very fact of transmitting or storing data. That is, text hidden using this method will be mistaken for a picture, a recipe, a shopping list, or, for example, a crossword puzzle. Or you won’t see it at all if it is written with milk, lemon juice or special ink. Often the methods of steganography and cryptography were combined into one message.

A breakthrough in cryptography was the book “Polygraphy” by Abbot Johannes Trithemius in 1518, which also talks about ciphers with polyalphabetic substitution. The most famous cipher maker of the 16th century is considered to be the diplomat and alchemist from France Blaise de Vigenère, who came up with an absolutely strong cipher that used 26 alphabets, and the order of use of the cipher was determined by knowledge of the password. We can say that the Vigenère cipher was a combination of several of the Caesar ciphers already mentioned.

Modern methods of classifying information

In today's hyper-information world, encryption technologies have not only reached a new level, but have also undergone significant changes. Now cryptography as a science has begun to be seriously studied and implemented in various directions.

Now the process of information exchange involves not only two parties: the sender and the addressee, but also other subscribers. There is a need for reliable protection and new ways of transmitting decryption keys. In the 70s, W. Diffie and M. Hellman introduced a new principle of encryption with a public initial key. It was called asymmetrical. This made it possible to expand the areas of use of cryptographic methods. Today they are used in banking operations when working with customers’ plastic cards, in the field of electronic currency, telecommunications and many other remote operations that are performed through a local and global network.

Modern cryptography uses open encryption algorithms. Symmetric (DES, AES, Camellia, Twofish, Blowfish), and asymmetric RSA and Elgamal algorithms are common.

Encryption methods are used by both private and legal entities, as well as government agencies. Thus, the USA has a national AES encryption standard. The Russian Federation uses the block encryption algorithm GOST 28147-89 and the digital signature algorithm GOST R 34.10-2001.

One of the modern achievements of cryptography is the creation of a payment system with an electronic currency called “bitcoin”, which is already widely used in many commercial transactions. It was created in 2009 and is considered the first such system. At the moment, there are a huge number of cryptocurrencies that are trying to improve and complement the ideas implemented in Bitcoin.

You may also be interested.


Cryptography 0

Rijndael

The Rijndael approach is a symmetrical method of protecting information. Refers to block ones. In it you can adjust the parameters of blocks, as well as secret keys from 128 to 256 bits. But it’s important to take into account that the difference reaches 32 bits.

The implementation process uses linear substitution principles. The round here can be 10, 12 or 14. It directly depends on the length of the key.

AES Features

AES is a unique approach to solving the problem, based on the Rijndael algorithm. Previous solution with 128 bit key. The data block here will be 16 bytes. Provides various functions.

These include:

  • keyExpansion – the key extension itself;
  • subBytes — replacement for “state”;
  • addRoundKey – round keys;
  • shiftRows – shifting rows using loops;
  • mixColumns – mixing columns;
  • invMixColumns – inverse of the previous action;
  • invShiftRows – the reverse version of shiftRows;
  • invSubBytes – reverse replacement of “state”.

Encrypting information using the so-called AES encryption algorithm is carried out in several steps. Each has its own nuances.

Encryption principle

Encryption is carried out in several stages:

1. Formation of “states”. Let's assume that there is already a secret message for one or another recipient. It is represented by numbers in the range from 0 to 255. Here the division of information into n-blocks of 16 bytes occurs. Each "packet of information" is called a "state". If the text is not a multiple of 16 bytes, it is padded to the appropriate values.

2. KeyExpansion. Keys in AES are byte-by-byte equal to state. Key expansion occurs, which is responsible for generating the current key arrays for the cycles of encryption rounds. A fixed array Rcon is involved as an XOR operation mapping. Here keyExpansion returns arrays of them via XOR with fixed key arrays. Their number is 11 pieces. Only one does not belong to the algorithm round.

3. AddRoundKey. This is the first stage of encryption. Applies to state using summation rules. XOR occurs with the state, with each of its bytes. Next, the “state” moves on to the next stage – the system of algorithm rounds.

4. Rounds. There are 10 of them in total. It turns out to be a kind of substitution table with 10 steps. The first 9 do subBytes, shiftRows, mixColumns, addRoundKey. The latter is responsible for processing “saba”, “shift” and “edda”.

5. SubBytes. The “state” is transformed by replacing its own bytes with others. To do this, they are substituted into ready-made fixed S-box tables.

6. ShiftRows. The last three lines are cyclically shifted to the left. The principle is shown in the picture.

7. MixColumns. The most complex computing process. Here we multiply by a constant function f(x) = {03}x^3 + {01}x^2 + {01}x + {02}. This is how we obtain the product, according to the previously stated rules, of specific columns from State and functions a(x). If we exclude the multiplication rule of the so-called encryption algorithm, such a technique will be similar to matrix multiplication.

In the case of decryption, the situation will be approximately the same. The procedure is completely carried out in several approaches (steps).

About decryption

First, the system uses KeyExpansion when reading a message using AES encryption algorithms. Next, rounds of algorithms are performed. They provide 10 steps, called crypto conversion steps.

The first nine pieces are responsible for the cyclic execution of 4 functions in the reverse order of the original protection (encryption) method. Namely:

  • addRoundKey;
  • invMixColumns;
  • invShiftRows;
  • invSubBytes.

The last, 10th round consists of three operations: “AddRoundKey”, “InvShift”, “InvSubBytes”. Next, addRoundKey is processed. The stage involves reverse summation according to the rules of the algorithms used to encrypt itself. The Rcon array is completely eliminated.

The next step is processing invMixColumns. This is multiplicative processing of the multiplication operation according to the rules of multiplication of the algorithm by a constant function a^(-1) from x of a specific “state” column.

Now the system will perform the reverse transformation shiftRows. That is, it will carry out a cyclical shift of “information” to the right. The final stage is inversion. Produced relative to "SubBytes". Provides reverse replacement of the state byte, which is obviously represented in hex according to the correspondence of the fixed plate:

At this stage, the user will be able to read the information he needs. It sounds difficult, but programmers and hackers never act “manually” to implement a given task. They use IT technologies and all kinds of encryptors and decryptors.

Rating
( 2 ratings, average 4.5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]