Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Public keys, private keys and digital signatures

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

I. Public key encryption

Suppose I find two numbers, one is 1 and the other is 2. I like the number 2, so I keep it without telling you (private key), and then I tell you that 1 is my public key.

I have a file that can't be seen by others, so I encrypted it with 1. Someone else found the file, but he didn't know that 2 was the decrypted private key, so he couldn't unlock it, only I could use it.

The number 2, which is my private key, is to decrypt it. So I can protect the data.

My good friend x encrypted the character a with my public key 1, encrypted it into b, and put it on the Internet. Someone else stole the file, but they couldn't unlock it because they didn't know that 2 was my private key.

Only I can decrypt it, and after decryption, I get a. In this way, we can transmit encrypted data.

Private key signature

If I encrypt a piece of data with a private key (of course only I can encrypt it with a private key, because only I know that 2 is my private key), all people will see my content, because they all know

It is said that my public key is 1, so what is the use of this encryption?

But my good friend x said that someone pretended to be me to send him a letter. What should I do? I send the letter I want to send, the content is c, use my private key 2, encrypt the encrypted content is d, send it to x, and then tell him

Decrypt it to see if it is c. He decrypted it with my public key 1 and found that it was c.

At this time, he will think that the data that can be decrypted with my public key must be encrypted with my private key. Only I know my private key, so he can confirm that it is indeed what I sent.

So we can confirm the identity of the sender. This process is called digital signature. Of course, the specific process is a little more complicated. Encrypting data with a private key is used for digital signature.

Summary: public and private keys are paired and they decrypt each other.

Public key encryption, private key decryption.

Private key digital signature, public key verification.

Give an example

For example, if two users, Alice and Bob,Alice, want to send a plaintext to Bob,Bob with a pair of public and private keys through double-key encryption, the process of encryption and decryption is as follows:

Bob transmits his public key to Alice.

Alice encrypts her message with Bob's public key and sends it to Bob.

Bob decrypts Alice's message with his private key.

The above process can be shown in the following figure. Alice is encrypted with Bob's public key and Bob is decrypted with its own private key.

Examples and diagrams are from the second Edition of basic applications and Standards for Network Security

RSA algorithm

The RSA public key encryption algorithm was developed by Ron Rivest, Adi Shamirh and LenAdleman in 1977. RSA is named after the three developers. RSA is the most influential public key encryption algorithm, which can resist all the known passwords so far, and has been recommended as the public key data encryption standard by ISO. The RSA algorithm is based on a very simple number theory fact: it is easy to multiply two large primes, but it is extremely difficult to factorize the product at that time, so the product can be made public as an encryption key.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report