 # Asymmetric Encryption

##### The most important and interesting about encryption.
###### A series of articles understandable even to non-specialists.

From our previous articles, general information about encryption, symmetric encryption, andits algorithms was discussed.
Here, we will focus on asymmetric encryption.

Asymmetric encryption applies two keys: the public key and private key, and so the encryption is called asymmetric. The public key encrypts the message while the private keydecrypts it. Thus, public and private keys are mathematically interconnected. With the help of certain mathematical functions, a public key is calculated (generated) depending on the value of the private key. The public key, as its name depicts, can be sent via unprotected communication channels without any risk involved. On the other hand, the value of the private (secret) key which never leaves its owner can’t be calculated on the basis of the public key.

#### The working principle of asymmetric encryption

Now, let’s imagine that Bob wants to send Alice a message. Alice has a secret key, on the basis of which she calculates (generates) and sends a public key to Bob. Eve can see this public key perfectly well and could even bring it to Bob without any risk. This is because it is completely useless to her. Bob receives this public key and then encrypts his message with it. Public key encryption works only in one direction, the same public key will not be able to decrypt the message. Alice then receives Bob’s encrypted message and decrypts it with her secret key.

For clarity, we can give an example of a mailbox. So, Bob tells Alice the address of his house, on the door of which a mailbox is hanging. Alice comes to Bob’s house, sees the mailbox and puts the letter in it. It is impossible to get the letter back through the gap of the box. Bob comes home from work, opens the mailbox with his key and can read Alice’s letter. In this example, the mailbox is a public key. The address of the mailbox (the house where Bob lives) is known to everyone. And Eva sees this mailbox every day from the window opposite. But the secret key – the key to the box – has only Bob. And only Bob can open the box and read the letter.

#### Mathematical basis and the back door

The basis upon which the asymmetric encryption algorithms operate is the so-called one-way functions (or irreversible functions). Let’s have a little flashback on Mathematics. A function is a correspondence between elements of two sets. Mathematically, the definition of the function is y = f (x). F is all those operations that determine how the value of y (the variable) depends on the value of x (the constant). For example, vehicle speed (f) determines how the distance traveled (y) depends on the time spent (x).
Asymmetric cryptography uses one-way functions with a back door.

The irreversibility of the function is as follows:
It is easy to calculate y for any value of x. But if for most values of y, it is difficult to find x in an acceptable time, in such a way that y = f(x), then the function will be one-way.
An example of a one-way function that is used in asymmetric encryption algorithms is a multiplication of two large numbers, say N = P*Q. Imagine that you multiply P and Q having at least five characters on a calculator, and get the resulting number N. Tell that number N to a friend and ask him to find the numbers P and Q which you have multiplied. Be certain that your friend is unlikely to cope with this task, even over several years. The process of fitting the multipliers P and Q for the value of N is called factorization of the product of two large numbers.

back door is such a value of y, with which we can easily calculate x if we know the value of f(x). The back door is the secret key in asymmetric encryption which never leaves its owner and makes the function reversible.
This may seem like a can of worms, but there’s no need to worry if you haven’t got the full mathematical understanding of this.

### What is Encryption: basic concepts

Decentralized VPN service of a new generation based on the post-quantum blockchain