Learn About Modern Cryptography
Explore the concepts behind modern hashing and encryption algorithms.
A cryptographic hash function is an algorithm that takes an input (or 'message') of any size and returns a fixed-size string of bytes. This output is called the hash, hash value, digest, or simply message digest.
The process is deterministic, meaning the same input will always produce the same output. It's designed to be a one-way function, which means it is computationally infeasible to reverse the process and find the original input from its hash.
Good hash functions are also designed to be collision-resistant. This means it should be extremely difficult to find two different inputs that produce the exact same hash output. Hash functions are fundamental to data integrity verification, password storage, and blockchain technology.
MD5 (Message Digest 5)
One of the earliest widely used hash functions. While fast, MD5 is no longer considered secure for cryptographic purposes due to known vulnerabilities that allow for collisions. It's now primarily used for file integrity checks where security is not a concern.
MD5("Hello World"): b10a8db164e0754105b7a99be72e3fe5
SHA-256 (Secure Hash Algorithm 256-bit)
Part of the SHA-2 family, designed by the NSA. It's a widely trusted and used hashing algorithm, offering a good balance of security and performance. It is a standard for many security applications, including SSL certificates and cryptocurrencies like Bitcoin.
SHA-256("Hello World"): a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e