Asymmetric encryption, I finally understand!

Source: Internet
Author: User
Tags asymmetric encryption

Beijing's Bob sent a courier to the canton of Alice, on the way through Shanghai, Shanghai Express Center appeared a hacker H, he secretly opened Bob to Alice's Express, and then secretly put the inside of the clothes cut, and then in accordance with the original package sent to Guangzhou, You can see that in the middle of the transmission of such a simple package can be secretly modified inside the thing. The
HTTP packet is clear-text transmission, that is, if a hacker sniffing this HTTP packet, he can secretly modify the contents of the inside, as Bob and Alice do not know this action, so we must have a plan to prevent this unsafe tampering behavior, One way is to encrypt. Asymmetric Encryption

Bob puts his clothes in a safe and locks him up, he makes a phone call to tell Alice that the safe is 1234, and Hacker H doesn't know the password, so he can't see what's inside the safe, and Alice can open the safe with a pre-communicated password after receiving the courier.
the means of protection here is that Bob encrypts the item and gives the method of telling Alice to decrypt it.
If you now require Bob's password to be sent to Alice only by courier. If Bob passes the password directly to Alice,h if he sniffs the courier, then H also knows the password, which will not protect the security of the Courier. So there's also a scenario where Bob can tell Alice the password, and H can't see the data that Bob communicates with Alice.
Asymmetric Encryption works at this time to see what's going on: Bob has two keys, one called public key , and one called private key . Public key is publicly known to all the society, it's okay, Bob tells everyone that you want to pass the data to me please use this key (public key) to encrypt your data, encrypted data can only be decrypted by the private key that Bob secretly hid.
Back to just the example, Bob sends the safe (Bob's public Key) to Alice, and Alice puts her safe (Alice's public Key) in Bob's Safe (that is, using Bob's public key to encrypt Alice's public key) It was sent back to Bob, and Bob took Alice's packet, untied The outer vault (Bob's public key) with his private key, and got the Inside Alice Safe (Alice's public key) . at this point Alice and Bob both have their own public key (and both have their own private key) , and as long as the guarantee each other to pass data, put the data in the other's safe inside the other can be (that is, each time the other's public key encryption data) , so that in any case, H cannot unlock the safe (because only their private key can unlock their own safe).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.