Home web3.0 High-frequency concepts in the process of learning blockchain: Hash function

High-frequency concepts in the process of learning blockchain: Hash function

Mar 06, 2024 pm 01:36 PM
Blockchain Bitcoin Blockchain technology Hash function Bitcoin blockchain

If you want to know more about blockchain technology and Bitcoin, you have to climb over the technical wall and "open your eyes" from a technical perspective to see the first killer successful application of Bitcoin in the blockchain world. , look at why Satoshi Nakamoto can be called an alien, and when it comes to blockchain technology, we have to mention, Learn a piece of knowledge that is often used in blockchain technology - the hash function .

A hash function is a way to create a small digital fingerprint from any kind of data. The hash function compresses the message or data into a digest, making the amount of data smaller and fixing the format of the data. This function shuffles the data and recreates a fingerprint called a hash value.

If Baidu Encyclopedia and Wikipedia really have another name, it should be called (so professional that people can’t understand it) Encyclopedia. Give a concise vernacular definition of hash function: Hash function is a series of complex mathematical transformations with a fixed number of output values.

Transformation cannot be done randomly, and must be done according to the following process:

1. Content (data) of any length
2. After this series of complex but fixed mathematical transformations After
3, a fixed length and format of data (numeric value) will be output

Footnote: In the field of mathematics, H() will be used to represent the changed output value, which is called message summary in Chinese Or digital fingerprint.

For example, in Bitcoin, the hash function SHA256 is used when the public key generates an address. The "256" behind it means that the output is data with a fixed 256-bit length.

High-frequency concepts in the process of learning blockchain: Hash function

Not any mathematical transformation can be called a hash function. To upgrade a mathematical transformation to a hash function, it must Meets three conditions: uniqueness, one-wayness, violent solution:

1. Uniqueness of hash function

The intuitive understanding is: only input X, To get H(X). When understanding this feature, you can think of the hash function as you and your fingerprint. You are the input and your fingerprint is the output. Uniqueness means that only you can have your fingerprint. In Bitcoin, it means that you use it to transfer money. A Bitcoin address can only be generated with your public key. Just like your fingerprint is unique, no one else in the world can generate the same transfer address as you.

2. The one-way nature of the hash function

The one-way nature of the hash function means that H(X) cannot derive X in reverse. If you are given a fingerprint, and you have only one fingerprint, you will never be able to imagine whether the owner of the fingerprint is a male or a female, or what he looks like. You can only know that it is a fingerprint.

The one-way nature of the hash function can be intuitively understood with an inaccurate but very vivid analogy - guess who the owner of the chin is?

High-frequency concepts in the process of learning blockchain: Hash function

Is the owner of this manly and charming chin Bai Yu? Is it Zhang Zhen? Or Zhao Youting? The answer to the mystery is revealed: it’s our favorite Kunkun, not Cai Xukun, but Countryside F4 Xie Guangkun↓

High-frequency concepts in the process of learning blockchain: Hash function

Because of the one-way nature of the hash function, in Bitcoin, even if our payment address is public, no one can We don’t know what the public key we use to generate the payment address is, let alone what the private key is to generate the public key.

There is a saying in the market that the emergence of quantum computers will make Bitcoin worthless, but now you should know that even if quantum computers appear, it will still be difficult to break the hash function. The hash function is Satoshi set a security lock for Bitcoin, hoping that Bitcoin would have enough time to upgrade to a quantum-resistant encryption algorithm.

3. Violent solution of hash function

If you know the hash value H(X) and really want to find the input value X, you can only start from the source, a number Try a number, fit each number into a hash function, and then see if the output hash value is equal to H(X).

Just like if you really want to know whose fingerprint a certain fingerprint belongs to, you can only find one person all over the world to compare the fingerprints in each hand with this fingerprint to see if they are exactly the same, without any trace. deviation. 02

Because of these three characteristics, the hash function became a weapon in the hands of Satoshi Nakamoto, helping him solve many problems on the way to designing Bitcoin. In In the Bitcoin white paper, except for the 10 chapters of introduction and conclusion, the use of hash functions can be seen in almost every chapter.

· Use the uniqueness of the hash function to prevent fraud - digital signature

· Use the uniqueness of the hash function to improve efficiency - Merkle tree retrieval of transaction records

·Using the one-way nature of the hash function for confidentiality - the public key generates the Bitcoin address

Using the brute force solution of the hash function to design Bitcoin's proof of work - when the range When the fingerprint is large enough, it is impossible to find the fingerprint owner with a fingerprint. But if the scope is narrowed, for example, in a city with only a few million people, the difficulty will be much smaller. This is the purpose of Bitcoin. Mining difficulty adjustment mechanism. If you want the difficulty to be higher, expand the range. If you want the difficulty to be lower, narrow the range.

The hash function appeared in 1953, the hash function flourished in 1970, and SHA-256 appeared in 2001. In 2008, the hash function was played out by Satoshi Nakamoto and became It is the unshakable cornerstone of blockchain technology.

From this perspective, it is somewhat understandable why experts and experts can’t help praising Satoshi Nakamoto’s genius, and even doubt whether Satoshi Nakamoto is an alien.

At this point, although you only understand a basic knowledge of the hash function in the technical principles of the Bitcoin white paper, this does not prevent you from understanding 50% of what the Bitcoin white paper wants to express.

The above is the detailed content of High-frequency concepts in the process of learning blockchain: Hash function. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is Ouyi for? What is Ouyi What is Ouyi for? What is Ouyi Apr 01, 2025 pm 03:18 PM

OKX is a global digital asset trading platform. Its main functions include: 1. Buying and selling digital assets (spot trading), 2. Trading between digital assets, 3. Providing market conditions and data, 4. Providing diversified trading products (such as derivatives), 5. Providing asset value-added services, 6. Convenient asset management.

How to roll positions in digital currency? What are the digital currency rolling platforms? How to roll positions in digital currency? What are the digital currency rolling platforms? Mar 31, 2025 pm 07:36 PM

Digital currency rolling positions is an investment strategy that uses lending to amplify trading leverage to increase returns. This article explains the digital currency rolling process in detail, including key steps such as selecting trading platforms that support rolling (such as Binance, OKEx, gate.io, Huobi, Bybit, etc.), opening a leverage account, setting a leverage multiple, borrowing funds for trading, and real-time monitoring of the market and adjusting positions or adding margin to avoid liquidation. However, rolling position trading is extremely risky, and investors need to operate with caution and formulate complete risk management strategies. To learn more about digital currency rolling tips, please continue reading.

How to calculate the transaction fee of gate.io trading platform? How to calculate the transaction fee of gate.io trading platform? Mar 31, 2025 pm 09:15 PM

The handling fees of the Gate.io trading platform vary according to factors such as transaction type, transaction pair, and user VIP level. The default fee rate for spot trading is 0.15% (VIP0 level, Maker and Taker), but the VIP level will be adjusted based on the user's 30-day trading volume and GT position. The higher the level, the lower the fee rate will be. It supports GT platform coin deduction, and you can enjoy a minimum discount of 55% off. The default rate for contract transactions is Maker 0.02%, Taker 0.05% (VIP0 level), which is also affected by VIP level, and different contract types and leverages

Tutorial on how to register, use and cancel Ouyi okex account Tutorial on how to register, use and cancel Ouyi okex account Mar 31, 2025 pm 04:21 PM

This article introduces in detail the registration, use and cancellation procedures of Ouyi OKEx account. To register, you need to download the APP, enter your mobile phone number or email address to register, and complete real-name authentication. The usage covers the operation steps such as login, recharge and withdrawal, transaction and security settings. To cancel an account, you need to contact Ouyi OKEx customer service, provide necessary information and wait for processing, and finally obtain the account cancellation confirmation. Through this article, users can easily master the complete life cycle management of Ouyi OKEx account and conduct digital asset transactions safely and conveniently.

Binance binance computer version entrance Binance binance computer version PC official website login entrance Binance binance computer version entrance Binance binance computer version PC official website login entrance Mar 31, 2025 pm 04:36 PM

This article provides a complete guide to login and registration on Binance PC version. First, we explained in detail the steps for logging in Binance PC version: search for "Binance Official Website" in the browser, click the login button, enter the email and password (enable 2FA to enter the verification code) to log in. Secondly, the article explains the registration process: click the "Register" button, fill in the email address, set a strong password, and verify the email address to complete the registration. Finally, the article also emphasizes account security, reminding users to pay attention to the official domain name, network environment, and regularly updating passwords to ensure account security and better use of various functions provided by Binance PC version, such as viewing market conditions, conducting transactions and managing assets.

What are the recommended websites for virtual currency app software? What are the recommended websites for virtual currency app software? Mar 31, 2025 pm 09:06 PM

This article recommends ten well-known virtual currency-related APP recommendation websites, including Binance Academy, OKX Learn, CoinGecko, CryptoSlate, CoinDesk, Investopedia, CoinMarketCap, Huobi University, Coinbase Learn and CryptoCompare. These websites not only provide information such as virtual currency market data, price trend analysis, etc., but also provide rich learning resources, including basic blockchain knowledge, trading strategies, and tutorials and reviews of various trading platform APPs, helping users better understand and make use of them

Currency Trading Network Official Website Collection 2025 Currency Trading Network Official Website Collection 2025 Mar 31, 2025 pm 03:57 PM

It ranks among the top in the world, supports all categories of transactions such as spot, contracts, and Web3 wallets. It has high security and low handling fees. A comprehensive trading platform with a long history, known for its compliance and high liquidity, supports multilingual services. The industry leader covers currency trading, leverage, options, etc., with strong liquidity and supports BNB deduction fees.

On which platform is web3 transaction? On which platform is web3 transaction? Mar 31, 2025 pm 07:54 PM

This article lists the top ten well-known Web3 trading platforms, including Binance, OKX, Gate.io, Kraken, Bybit, Coinbase, KuCoin, Bitget, Gemini and Bitstamp. The article compares the characteristics of each platform in detail, such as the number of currencies, trading types (spot, futures, options, NFT, etc.), handling fees, security, compliance, user groups, etc., aiming to help investors choose the most suitable trading platform. Whether it is high-frequency traders, contract trading enthusiasts, or investors who focus on compliance and security, they can find reference information from it.