SHA-224 Algorithm Visualizer

Watch how SHA-224 transforms your input into a cryptographic hash through interactive step-by-step visualization of bit operations, message scheduling, and compression functions.

Input Your Message

⚠️ This visualization works best on desktop for the full experience.

📌 Note

For demonstration purposes, input is limited to 55 characters (440 bits) to fit within a single 512-bit block. SHA-224 can handle much larger inputs in practice.

Interactive Visualization

5
Ready

Step 1: Input Message

What's happening:

Your input message is converted to bytes. Each character becomes its UTF-8 byte representation.

🎉 SHA-224 Hash Complete!

The final hash is produced by adding the working variables to the initial hash values and taking the first 224 bits (7 words) of the result.

Understanding SHA-224

Message Padding

SHA-224 processes data in 512-bit blocks. Messages are padded with a '1' bit, zeros, and the message length to reach a multiple of 512 bits.

Message Schedule

Each 512-bit block is expanded into 64 32-bit words using a recurrence relation involving bitwise rotations and shifts.

Compression Function

64 rounds of mixing operations using logical functions (Ch, Maj), rotations (Σ₀, Σ₁), and additions with round constants.

Initial Hash Values

SHA-224 starts with specific initial values derived from the square roots of prime numbers (9th through 16th primes).

Round Constants

64 predefined constants (K) derived from the cube roots of the first 64 primes, used to ensure randomness.

Final Output

After processing all blocks, the first 224 bits (7 × 32-bit words) of the final hash values form the SHA-224 digest.

Bit Operations Reference

ROTR^n(x)

Right rotate: Circular right shift by n bits

x ≫ n | x ≪ (32-n)
SHR^n(x)

Right shift: Logical right shift by n bits

x ≫ n
⊕ (XOR)

Exclusive OR: Bit is 1 if inputs differ

a ⊕ b
∧ (AND)

Logical AND: Bit is 1 if both inputs are 1

a ∧ b
¬ (NOT)

Logical NOT: Inverts all bits

¬a
+ (ADD)

Modular addition: Add mod 2³²

(a + b) mod 2³²