An example of cryptography

Source: Internet
Author: User

Share a cryptography Example:

Let's say that our protagonist is Alice and Bob, they are going out for dinner, but there is no consensus on which restaurant to go to. At this point the usual solution is to scissors, coins and other means to decide who to choose the scheme. This is usually fair and reasonable, like a coin toss on a football field (the probability is half the way).

But the same thing is likely to fail if the environment changes. For example, if Alice is having dinner with Bob on the phone or on the internet, if they don't have a favorite restaurant, it's obviously inappropriate to still use scissors or coin-throwing. Because there may be cheating, and no notary can be notarized truth! The transmission of modern network data has a similarly troubling problem.

What we need at this point is a protocol that can be considered a game rule, and we need to use encryption if the game is online or offsite.

Here we assume:

There is a number α, which can be easily obtained by a series of operations of α, that is, β=f (α), and it is almost impossible to calculate α by β (using supercomputers for 100 years to produce results)

Application implementation:

1. Alice and Bob now agree, by Bob Coin and select a random alpha (alpha for the odd number of coins to the positive, α is even to the negative coin) when and after the operation of the result (Beta) to tell Alice.

2.Alice tells Bob himself about the positive and negative guesses (that is, odd-even guesses): the probability is 50%.

3.Bob tells Aliceα the value.

4.Alice validates F (α) =β by operation.

Such examples have become the cornerstone of data security communications in the development of modern networks. Nowadays, many cryptographic algorithms are implemented by the operation principle of this kind of irreversible function.

Cryptography involves many aspects, such as data encryption, authentication, data integrity, and so on. These are just a few examples of data communication protocols and encryption, and many details are not mentioned and require you to make less use of a programming language to implement her.

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.