EN - FR - DE - ES - IT - PT -

LexiconDream

#️⃣ Hash Function

A function that maps data to a fixed-size value for integrity checks.

Hash Function

A hash function maps data of any size to a fixed-size value. The same input always produces the same output. Change one bit and the output changes completely. That property makes hashes useful for integrity checks. Download a file and compare its hash to the published value. If they match, the file arrived intact. If not, something changed it.

Hash functions are one-way. You cannot work backward from a hash to the original data. That makes them useful for password storage. Systems store the hash of a password, not the password itself. When you log in, the system hashes what you typed and compares it to the stored hash. If the database leaks, the attacker gets hashes, not passwords. Weak passwords can still be cracked with rainbow tables or brute force, which is why salting matters. A salt is random data added to each password before hashing, so identical passwords produce different hashes. SHA-256 and SHA-3 are common cryptographic hashes. MD5 and SHA-1 are broken and should not be used for security. Hash functions also power blockchains, digital signatures, and file deduplication.

Hash function properties

A hash is a fingerprint, not encryption. It proves integrity. It does not hide data.

Comments

No comments yet. Be the first to share a thought.

Leave a comment