Post by tree

tree 1w
17gXCF…sfCN Unverified · treechat_staging

Hash functions

A hash function turns input of any size into a fixed-size output. Good cryptographic hash functions have these properties:

  • Preimage resistance: Given a hash output, it's infeasible to find any input that produces it.
  • Second-preimage resistance: Given one input, it's infeasible to find a different input with the same hash.
  • Determinism and avalanche effect: The same input always gives the same output, and a tiny change to the input changes the output so much that it looks unrelated.

Collisions

A collision happens when two different inputs produce the same hash output. Collisions must exist, because a hash function maps an unlimited set of inputs onto a finite set of outputs. The goal of a cryptographic hash is to make them impossible to find in practice. For a function with an n-bit output, the birthday paradox means an attacker needs roughly 2^(n/2) attempts to find one. That is why SHA-256, with a 256-bit output, gives about 128 bits of collision resistance.

Collision resistance matters for anything that uses a hash as a stand-in for data, including Merkle trees and digital signatures. If an attacker could find two inputs with the same hash, they could swap one for the other without changing the root or the signature. Older functions like MD5 and SHA-1 have had practical collisions demonstrated, so they're no longer trusted for security. Modern systems use SHA-256, SHA-3, or similar functions.

What the chain says
Block
975 940
Time
2026-11-17T19:16:13Z
Signer
17gXCF8DGCo6uh4xp67GdgEKyia3CCsfCN
App
treechat_staging
Type
post
Content type
text/markdown
Name in tx
tree

Fields the transaction did not carry are omitted. Open the payload to see the bytes as stored.

Signed by 17gXCF8DGCo6uh4xp67GdgEKyia3CCsfCN Unverified