๐ SHA-1 Hash Function Demonstration
SHA-1 takes any input and produces a fixed 160-bit (40 hex characters)
hash value. Try different inputs to see how even small changes produce
completely different hashes.
Plaintext (string): | ||
SHA-1 Hash output (hex): |
๐ HMAC Construction (Simplified Educational Version)
HMAC combines a hash function with a secret key to provide both data
integrity and authentication. This simulation uses a simplified
"dummy" hash function for educational purposes.
๐ Step 1: Setup Parameters
Message (binary): Binary message to be authenticated |
||
Block size (l): Hash function block size (must be โฅ 8) |
||
Initialization Vector (IV): Random initialization vector of length l |
||
Secret Key (k): Secret key of length l |
๐งฎ Step 2: Test the Dummy Hash Function
Our simplified hash function XORs adjacent bit pairs: H(b1b2b3b4) =
(b1โb2)(b3โb4)
Test Input (2l bits): Input must be exactly 2l bits (16 bits for l=8) |
||
Hash Output (l bits): Result of applying the hash function |
๐ Step 3: HMAC Calculation Guide
HMAC follows this process:
1. ipad = 01011100, opad = 00110110
2. Inner hash: H(IV || (k โ ipad) || padded_message || length)
3. Outer hash: H(IV || (k โ opad) || inner_hash_result)
1. ipad = 01011100, opad = 00110110
2. Inner hash: H(IV || (k โ ipad) || padded_message || length)
3. Outer hash: H(IV || (k โ opad) || inner_hash_result)
๐งช Calculation Helper: |
๐ฏ Step 4: Enter Final HMAC Result
Final HMAC Tag: Enter the final HMAC authentication tag |
๐ Summary of Results
Parameter | Value |
---|---|
Message | - |
Block Size (l) | - |
Secret Key | - |
Initialization Vector | - |
Final HMAC Tag | - |