Skip to content

FAQ

What is the difference between hashing and encryption?

Encryption is reversible with the right key; hashing is not reversible at all. If you need to recover the original data, use encryption. If you need to verify that data has not changed, use a hash. Storing passwords with reversible encryption is a common and serious mistake.

Why not use MD5 if it is faster?

MD5 is broken for collision resistance. Two different inputs can be crafted to produce the same MD5 digest, which means an attacker can substitute one for the other without detection. Speed is irrelevant when the integrity guarantee no longer holds. Use SHA-256 or SHA-3.

Can two different files have the same SHA-256 hash?

In theory yes, because the input space is larger than the output space. In practice no: finding a SHA-256 collision by brute force is infeasible with current and foreseeable computing. The security of the algorithm rests on that gap between theory and practice.

Is a hash the same as a checksum?

A checksum is a broader term: it can be a simple arithmetic sum or a full cryptographic hash. A cryptographic hash is a checksum with strong security properties (one-way, collision-resistant). The word "checksum" does not imply cryptographic strength; the word "hash" in a security context usually does.

How do I know which hash algorithm to use?

Follow the standards: SHA-256 or SHA-3 for integrity and content addressing, Argon2 or bcrypt for passwords, BLAKE3 where speed and modern design matter. Check NIST and IETF guidance periodically — algorithms are deprecated on a schedule, not on a surprise.