avalanche effect
The property of a good hash function or cipher that changing a single input bit changes about half of the output bits, in an unpredictable way.
In more detail
Because similar inputs give unrelated outputs, a digest reveals nothing about how close a guess is to the real input, and a tiny edit is as obvious as a large one. In the course demonstration, changing one character of a payment line flipped 131 of the 256 bits of its SHA-256 digest.
Examples
differ = bin(int.from_bytes(da) ^ int.from_bytes(db)).count("1")131 of 256 bits differRelated terms
- hash — A short fixed-length fingerprint calculated from data, which changes completely if even one byte of the data changes.
- digest — The short, fixed-size output of a hash function, which acts as a fingerprint of the input data.
- SHA-256 — A widely used hash function that turns any data into a 256-bit fingerprint, shown as 64 hexadecimal characters.
- SHA-3 — The newest family of standard hash functions from NIST, built on a different design called Keccak as a backup in case SHA-2 is ever weakened.
Taught in
- Cryptographic Hashing: SHA-256, SHA-3 & Passwords — Cybersecurity Fundamentals, GRC & Cryptography