澳洲幸运5开奖号码历史查询

What Are Cryptographic Hash Functions?

Cryptographic Hash Functions

Investopedia / Paige McLaughlin

Definition

Cryptographic hash functions are used in cryptocurrencies to pass transaction information anonymou꧟sly. 

What Are Cryptographic Hash Functions?

A cryptographic hash function is a mathematical tool used in cryptography. Typical hash functions take inputs of variable lengths to return outputs of a fixed length. A cryptographic hash function secures the message-passing capabilities of hash functions. Hash functions are used for 澳洲幸运5开奖号码历史查询:cryptocurrency, password security, and message security.

Key Takeaways

  • Hash functions transform or "map" a given data set into a bit string of fixed size, also known as the "hash value."
  • Hash functions are used in cryptography and have various levels of complexity and difficulty.
  • Hash functions are used for cryptocurrency, password security, and message security.

How Hash Functions Work

Hash functions are data structures used in computing systems to check the integrity of mess﷽ages and authenticate inಞformation. Not all hash functions are equal. Some are stronger and more protective than others.

Cryptographic hash functions add security ꦏfeatures to typical hash functions, making it difficult to detect the contents of a message or information about recipients and senders. Cryptographic hash functions exhibit these properties:

  • They are "collision-resistant," ensuring that different inputs do not map to the same output hash.
  • It should be difficult to guess the input value for a hash function from its output. 
  • The input should be selected from a distribution that's as wide as possible.

Applications

  • Cryptocurrency: Cryptographic hash functions are widely used in cryptocurrencies to pass transaction information anonymously. For example, Bitcoin uses the SHA-256 cryptographic hash function in its algorithm. Ethereum uses Keccak-256 to hash information.
  • Password Verification: Many sites store passwords as hashes. When a user inputs a password, it is hashed, and the result is compared to the list of hashed values stored on the company's servers. However, hackers can create databases of common passwords and their hashes, called rainbow tables, which make it easier for them to get into accounts.
  • Signature Generation and Verification: Verifying signatures is a mathematical process used to verify the authenticity of digital documents or messages.
  • File and Message Integrity: Hashes can ensure messages and files transmitted from sender to receiver are not tampered with during transit. The practice builds a "chain of trust," where a user publishes a hashed version of their data and the key so recipients can compare the hash value they compute to the published value.

Fast Fact

A digital signature scheme typically consists of three 澳洲幸运5开奖号码历史查询:algorithms: a key generation algorithm, a signing algorithm with a private key, and a signatu꧒re verificati🃏on algorithm.

What Is the Best Cryptographic Hash Function?

The best cryptographic hash function is the one that meets the needs of whatever i🎶t is being used for. SHA-256 is widely used, but there are many to choose from.

What's an Example of a Hash Function?

An MD5 hash takes a string of information and encodes it into a 128-bit fingerprint. MD5 hashes are commonly used when storing passwords or credit card numbers. For example, a common online hash generator tool may transform a simple password like "Flower" and encrypt it to an MD5 hash of 338d1f8007f0c84287d9963d5ea36aeb.

What Are the 3 Properties of a Hash Function?

The three properties a hash function should have are collision resistance, preimage resistance, and second preimage resistance.

The Bottom Line

Cryptographic has♋h functions are programs that use a mathematical function, like an 🎶algorithm, to convert information to a hexadecimal form. These functions are also used in cryptocurrency to secure blockchain information and password protection.

The comments, opinions, and analyses expressed on Investopedia are for informational purposes online. Read our warranty and liability disclaimer for more info.

Article Sources
Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial policy.
  1. Bitcoin Magazine. "."

  2. Coinbase. "."

  3. National Institute of Standards and Technology. "."

  4. Encryption Consulting. "?"

  5. National Intitute of Standards and Technology. "."

Compare Accounts
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.

Related Articles