Asymmetric encryption principle - public key and private key are a natural pair

foreword

As discussed before, Alice uses symmetric encryption to send messages to Bob. In the symmetric encryption mechanism, the same key is used for encryption and decryption. Once the key is lost, the entire encryption process will be broken. In addition, if Rose uses the same secret key, the ciphertext information itself cannot reflect who the encryptor is, Bob cannot identify the sender, and it is impossible to tell who loves and who hates Bob.

insert image description here

Since 1970, mathematicians have tried different solutions one after another, trying to use different secret keys to avoid the problem of loss. Asymmetric encryption algorithms such as RSA have come out, and people can publicly publish their own public key information. From then on, computers can realize Digital signatures and authentication.
insert image description here

What is our thorough analysis of asymmetric encryption technology today? Please pay attention to the gitcoins Douyin channel , we will share interesting, high-quality, cryptocurrency-related videos.

insert image description here

asymmetric encryption

key generation

Let's take a look at what this magical, anti-human model looks like. In order to ensure that each person creates a different key pair, the creation algorithm of the key pair requires a very large random number as input. It is different from symmetric encryption. Asymmetric encryption generates a pair of secret keys, public key and private key at the same time. . The public key can be distributed to anyone who needs it, even if hackers get it. The private key must be kept firmly in your own hands. In all cryptocurrencies, whoever controls the private key controls the encrypted wallet. We use blue to represent Alice's secret key pair. After Alice creates the secret key,
insert image description here
Bob also uses a random number to generate his own public key and private key.

We use red to indicate Bob's key pair because common keys require a particularly large random number, so Alice and Bob have different public keys and different private keys.
insert image description here

data encryption

When Alice needs to send a message to Bob, Alice must first obtain Bob’s public key, and then encrypt the file with Bob’s public key. The encryption process is actually a mathematical operation process, and a series of operations are performed on the message and the public key. A ciphertext that others cannot understand is formed, and the ciphertext is sent to Bob. Bob decrypts the ciphertext with his own private key, and obtains the file sent by Alice. Because only Bob has his own private key, only Bob can decrypt the information. Other private keys cannot decrypt the information encrypted by Bob’s public key. This is the role of the private key in data decryption. So you must keep the private key firmly in your hands. Once lost, you can decrypt the information sent to you by others.

insert image description here

identification

The second application is identity verification. This process is how to use the private key to simulate the signing process of a person. After signing the data, it shows that the meaning expressed by the data is approved by me. exposed.

insert image description here

If you want to prove that this notebook is yours, we can identify whose notebook it is through the notes on the notebook. An empty notebook has no imprint or signature, so it cannot be identified. .
insert image description here

Why are there so many love locks on the Pont des Arts on the banks of the Seine in Paris? That's because this bridge has always been regarded as a place of romance. The locks on the bridge symbolize eternal love, and locks are a unique mark.
insert image description here

Asymmetric encryption can leave a unique imprint on the data, and this imprint can prove that you did this thing and that the thing is yours and not someone else's.

insert image description here

Let's see how to do it with asymmetry. If Alice wants to give Bob $10, Alice signs the message with her private key. The purpose of the signature is to leave a unique mark on the message. Alice sends the signed message to Bob. Bob can use Alice’s The public key authenticates the imprint. This identification process is the same as that of handwriting identification. If the successful authentication is signed by Alice, then Bob can use this information and signature to withdraw money from Alice's bank account. Because only Alice has her own private key, only Alice can generate a signature. If Alice regrets giving Bob the $10 before, but because Bob has Alice’s signature and can prove that it was issued by Alice, then Alice cannot deny it. Another meaning of identification is non-repudiation.

insert image description here

conclusion

In the whole process of asymmetric encryption key generation, data encryption and identity authentication, no private key will be given to anyone else, but the public key will be distributed to others, and the public key will perform relevant duties on behalf of itself.

insert image description here

When we watched Journey to the West, we found that Monkey King had a unique skill, which was "plucking monkey hair". Monkey King ran to fight the Demon King, and he used his hair to conjure up a little monkey and surrounded the Demon King. Asymmetric encryption is like Monkey King’s hair-plucking avatar. The avatar monkey is the public key. The little monkey collects information for Monkey King, and then encrypts the information and sends it to Monkey King. Monkey King itself is the private key. Only Monkey King can decrypt the data sent by the little monkey. , no one else can solve it. At the same time, only Monkey King can issue orders to the little monkey, and the little monkey only executes the orders of Monkey King, because the little monkey (public key) can identify which commands are issued by Monkey King (private key).

insert image description here

There are many asymmetric encryption algorithms, including RSA, DSS, and ECDSA, etc. ECDSA is used in cryptocurrencies, which is what we often call the elliptic curve encryption algorithm, which we will discuss in the next issue. Please like and follow the gitcoins Douyin channel , we will share interesting, high-quality, cryptocurrency-related videos.
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/gitcoins/article/details/125938171