Web3 Dictionary Logo
Web3 Dictionary
Contribute

Categories

AllBlockchainDappsDAOsDeFiNFTsRegulationSecuritySmart ContractsTokenomicsWalletsWeb3 GamingOthers
  1. Web3 Dictionary
  2. Smart Contracts
  3. Hash Function
Smart Contracts

Hash Function

A mathematical function that converts input data of any size into a fixed-size output called a hash, used for data integrity and security.

Last Updated

2026-03-19

Related Concepts

HashSolidityBlockchain
Web3-Explorer Logo

Scale Blockchain Infra

AD

Smart contracts, protocol integrations, and scalable architecture for high-performance Web3 products.

See Blockchain Services

What is Hash Function?

A hash function is a mathematical algorithm that transforms any input data (such as a string of text or a file) into a unique, fixed-length string of characters. It acts as a digital fingerprint, ensuring that even a tiny change to the input results in a completely different output.

How does Hash Function work?

  1. Input data of any size is fed into the function.
  2. The function performs a series of complex mathematical operations.
  3. A fixed-size output (the "hash") is produced.
  4. The process is "one-way," meaning the original input cannot be recovered from the hash.
  5. The function is deterministic: the same input always produces the exact same hash.

Why does Hash Function matter?

Hash functions are the backbone of blockchain security, enabling data integrity and efficient verification. They allow the network to link blocks together in a "chain" by including the previous block's hash in the current one.

Key features of Hash Function

  • Deterministic (same input = same output)
  • Fixed output length
  • Collision-resistant (unique inputs = unique hashes)
  • One-way (non-reversible)
  • "Avalanche effect" (small input change = massive output change)

Examples of Hash Function

Bitcoin uses the SHA-256 hash function for its mining process, while Ethereum primarily uses Keccak-256 for its smart contracts and addresses.

External References

  • Investopedia: Cryptographic Hash Function
  • Binance Academy: What Is Hashing?