That's true, Bitcoin, Blizzard, and downloading pirated movies all use the same algorithm.

Source: Internet
Author: User
Tags blizzard

After the rapid surge and bursting of the ICO bubble, Bitcoin still sings, breaking the $9600 mark recently. As a digital cryptocurrency independent of the monetary system, the essence of Bitcoin's success is due to technology-blockchain security and privacy that underpin Bitcoin's core value.

Referring to blockchain, asymmetric cryptographic algorithms and hashing algorithms are two technical terms that cannot be avoided. In particular, hashing algorithms, in the blockchain-related technical articles can always see this name, but it is difficult to really understand its mystery. Today, let's take a look at how hashing algorithms protect bitcoins and other data.

Learn the hashing algorithm and use your brain to store bitcoins

If you're going to buy Bitcoins, you'll have a bitcoin wallet. Typically, a Bitcoin wallet is a mobile/local client that the user can trade through the client. But there is a more sophisticated way to play: the brain purse.

Because the key generation is independent of the Bitcoin protocol and the blockchain, so how to protect their own key becomes a big problem, before even happened to hack bitcoin wallet client to get Bitcoin event.

To avoid this problem, someone has come up with a new way of creating a Bitcoin key and then remembering it in your own mind.

the way to generate a Bitcoin key is not difficult, the initial key is just a string of 256 bits of binary digits, toss more than 200 coins can be obtained. But to remember that more than 200 0 and 1 is too complex, the key to the concept of the brain purse is to use the hashing algorithm SHA-256 the key to verify, so that the 256-bit binary numbers into a shorter encoding, you can ensure that this string of characters suitable for human memory.

> from NSA, no wonder the hashing algorithm is safe!

Whether it's a brain purse that throws 200 coins with a brain memory, or an e-purse on the mobile side of the PC as a client, it basically doesn't work around it. Verify this step with the SHA-256 algorithm.

In fact, SHA-256 algorithm invented the original purpose and Bitcoin has nothing to do, in 1993, the U.S. National Security Agency designed a cryptographic hash function for secure encryption--secure hash algorithm, translated is a secure hashing algorithm. People are more willing to call it sha,1993, the release of the version named SHA-0, and then with the algorithm constantly cracked and constantly self-correcting, finally introduced a number of SHA algorithm variants, including SHA-256.

Sha's main feature is that when a binary digital message is received, a "Numeric Digest" is formed, and this digest can also be used to verify the integrity of the digital message. As shown above, SHA-256 means that the algorithm can compress 256-bit binary digits.

Many people will be puzzled by the hashing algorithm to compress the numbers, digest, then why can not reverse the "crack" based on these summaries?

The hashing algorithm is more closely related to "compression" than "encryption". This involves a concept of "mapping". The so-called mapping, we can understand as "representative". For example, you can use a character like ABC to represent 10001101 such a number, the character a can represent 1, 001, 0001 and so on, but only to get the character a, we can not know whether the number before encryption is 1 or 001 or 0001 or ...

In a simpler case, explain: In a bitcoin transaction, the shared key that both parties can learn about is "100", but only one of them knows that the private key before encryption is 2+78+5+5+10.

100 this shared key, want to crack the private key can only go to order "1+0+0+0+99", "1+1+0+0+98" ... If it becomes a 256-bit key, it is almost impossible to complete a task. It is also easy to verify the public key, since the private key before encryption is 2+78+5+5+10, then 99, 98 of these public keys are wrong.

forgot Bitcoin, downloaded pirated movies you already knew the hash algorithm

So, at the moment, it seems that the most useful function of the hashing algorithm is to encrypt bitcoin transactions.

In fact, the best use of hashing algorithm is to compress the data, the reason is used in bitcoin, because it contains a large number of operations on the "consumption of resources to obtain Bitcoins" rules. In other areas, hashing algorithms can also play a significant role.

A more typical example is the "one-method Hash" algorithm launched by the game company Blizzard.

usually in the database looking for data like in KTV song, database is music library, want to find their own points of song, can only turn music library from beginning to end. But there is also a simpler way, that is to establish a representative relationship, the song name "Little Star" abbreviated to XXX, and the corresponding relationship stored in the database. When looking for a song, if not even xxx can not find, that the song can not exist in the library "little Star" this songs.

Similarly, "Little Star" =xxx, "Love Me China" =awzh, this text into pinyin, pinyin to take the first letter of the corresponding way in the actual application may involve functions, coordinates and other mathematical problems, in short, this correspondence is called "hash table."

But we in KTV, search XXX results not only have "little Star", there is "laugh haha", in the face of the same string on the hash table position the same problem, blizzard program apes came up with a wonderful solution-in the hash table with three hashes to verify the location.

The principle is that when you want to download the movie "Wolf 2", the system will extract the "Wolf 2" hash value, through the search for this hash, you can find all the users who have "Wolf 2", everyone together to carry out point-to-point data transmission, emule itself does not have to establish a database, only build platform on it. Because of the compression characteristics of the hashing algorithm, the "Global Search" event is low cost and feasible.

At present, if the hashing algorithm is discarded, there are only two cases: first, the application of quantum computing, hashing algorithm and all known passwords, encryption methods are powerful computing power and speed defeated. Second, there has been a better use of compression algorithms, such as the American drama "Silicon Valley" in the Magic Flute in the real, hashing algorithm because it is not good to be discarded by developers.

To assess the likelihood of these two scenarios, I'm sure you'll know how long the hashing algorithm will accompany us.


That's true, Bitcoin, Blizzard, and downloading pirated movies all use the same algorithm.

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.