Cryptography (Public-private key cryptography)--Logical thinking problem

Source: Internet
Author: User
Both A and B were on two islands. B is sick, and a has the medicine that B needs. C has a boat and a lockable box.
C is willing to carry things between A and B, but things can only be placed in boxes. As long as the box is unlocked, C will steal everything from the box,
No matter what's in the box. If A and B each have a lock and can only open the key of their own lock, how should a be delivered to B?

Answer: A put the medicine in the box, lock the box with your own locks. b After getting the box, add a lock on the box. After the box is shipped back to a, a takes off its own lock. When the box is transported to B, B takes off his lock and gets the medicine.

So, a put the medicine into the box, with its own public key to lock the box, then others do not know A's private key will not open. C After the box to B, b with its own public key to add a lock.
At this time the box has two locks. Give A,a to open his own lock with the private key. Give b again, it's ready.

Cryptography (Public-private key cryptography)--Logical thinking problem

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.