The theft of the "codebook" in the war movie is serious. Is there such a thing in the blockchain?

Author | Seeds

Production | Vernacular Blockchain (ID: hellobtc)

Xiao Hei and Da Bai just watched "Midway Midway", while they were sitting in the theater lounge and chatting.

"What do you think of the victory of Midway Island, in addition to the bravery of the players?"

Dabai thought for a while, "Well, is that the intelligence department?"

"Yes, the battle on Midway Island is an outright intelligence victory. Fortunately, it happened 36 years ago, when asymmetric encryption technology had not yet appeared, otherwise it was another situation.

After listening to their chat, Xiao Hei became very interested in asymmetric encryption. Today we will talk about what is asymmetric encryption?

Symmetric encryption is also called single-key encryption, which means that the same key is used to encrypt and decrypt information. The disadvantage of symmetric encryption is that the key distribution is difficult, and it is intercepted by the enemy. Just like our house keys, both the lock and the unlock are the same, and if you accidentally stole it, you were hit. "

Asymmetric encryption has a pair of keys, which are a private key and a public key, which are encrypted and decrypted with each other, that is, public key encryption, private key decryption, or private key encryption, public key decryption . The private key needs to be kept secret and kept in a safe place. Only you know it, like a bank password. The public key can be made public, just like our public bank account number.

For example, we now have a pair of keys: a public key and a private key, and we have agreed to meet at Starbucks at 3 pm . I now use your public key to encrypt and get a string of ciphertext, and then hash this ciphertext to get a string of hash values.

I then encrypted the hash with the private key again to get a digital signature. By the way, encrypting with a private key is also called a digital signature, which is different from our electronic signature at the bank counter. After you do this, send you two pieces of information: ciphertext and digital signature.

How can I decrypt it after receiving the information?

First look at the digital signature in the figure below. You can decrypt it with my public key. If it can be decrypted, it means that the information was indeed encrypted by my private key, and it was me and not others. "

Even if someone knows the hash value, it's useless. He doesn't know the original text. The purpose of signing with a private key is to indicate my identity. In daily life, we often use signatures to indicate that I agree to a contract, which is to verify my identity. If this step is gone, just like someone just signed my name on the document, it must be messy.

"Identification is OK, what about decrypting the original text? "

In this cipher text, do you say that no one has tampered with it, after all, who can send messages to me? You hash it once, you get the hash value, and compared with the hash value decrypted by the public key just now, the same is that it has not been tampered with.

The final step is to decrypt the ciphertext with your private key, and you get the original text, and you're done.

In which aspects of life do you think asymmetric encryption will be applied? Welcome to share your views in the message area.

——End——

 

"Disclaimer : This series of content is only for the introduction of blockchain science popularization, and does not constitute any investment opinions or suggestions. If there are any mistakes, please leave a message to point out. Article copyright and final interpretation rights belong to the vernacular blockchain. A

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Market

Exclusive Interview with Yuga Labs We are more like Tencent of Web3, constantly changing the rules of NFT games

During the Token2049 conference, BlockBeats reporter had a conversation with Daniel Alegre, the CEO of Yuga Labs, dis...

Opinion

Exclusive Interview with dYdX Foundation CEO dYdX Chain Abandons Off-chain Order Book, Aims to Become Public Infrastructure

The CEO of the dYdX Foundation, Charles, believes that dYdX will develop towards becoming a derivative giant, and bec...

Blockchain

How to "shock reduction" The risk control method of the head digital currency institution

Text | Editing by Li Zheweng | Produced by Bi Tongtong | PANews Risk is a word derived from the Italian word "RI...

Blockchain

Number said | In the first half of 2019, blockchain private placement financing of 11.851 billion yuan exceeded 60% of funds invested in the US market

As the cryptocurrency undergoes the “Bear Bull” conversion, the blockchain private equity financing mar...

Market

Bitcoin stays stable at $30,000, is this a signal of a bull market?

Since 2023, the Bitcoin market has maintained a continuous growth trend, recently rebounding to over $31,000 in the p...

Policy

BlockFi Emerges from Bankruptcy, Ready to Pay Back Creditors and Recover Assets

In November, popular crypto lending platform BlockFi made headlines for their bankruptcy filing caused by the FTX con...