What is SHA-256?
SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function that produces a 256-bit (32-byte) hash value, typically rendered as a 64-character hexadecimal number. It is part of the SHA-2 family designed by the NSA and is widely used for data integrity verification and digital signatures.
Quick Facts
| Full Name | Secure Hash Algorithm 256-bit |
|---|---|
| Created | 2001 by NSA, published by NIST |
| Specification | Official Specification |
How SHA-256 Works
SHA-256 was published by NIST in 2001 as part of the SHA-2 family, which also includes SHA-224, SHA-384, and SHA-512. It processes data in 512-bit blocks through 64 rounds of computation. SHA-256 is considered cryptographically secure and is used in many security applications including SSL/TLS certificates, Bitcoin mining, and password hashing. Unlike MD5, no practical collision attacks have been found against SHA-256.
Key Characteristics
- Produces a fixed 256-bit (64 hexadecimal characters) output
- Cryptographically secure - no known practical attacks
- Deterministic - same input always produces same output
- Avalanche effect - small input changes cause significant output changes
- Computationally intensive compared to MD5
- Part of the SHA-2 family of hash functions
Common Use Cases
- SSL/TLS certificate signatures
- Bitcoin and cryptocurrency mining
- Digital signatures and code signing
- Password hashing with proper salting
- File integrity verification in security-critical applications
Example
Input: Hello World
SHA-256: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
Input: hello world
SHA-256: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
Input: (empty string)
SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855