Professional Documents
Culture Documents
Hashing(SHA-1)
Hashing(SHA-1)
Hashing(SHA-1)
46113+1=46114
46114/512=90.06
Take decimal part = 90 *512 =46080
46114- 46080=34
Length = 34
Length < 448 so 448-34 = 414 padding bits
46114+414=46528
Find how many block of 512 will be in 46528
46528/512= 90.875
90 block of 512 and 448 remaining bits which will become 512 by
adding 64 bits
90*512=46080
46528-46080=448
512-448=64
Original msg binary is 1011 0100 0010 0001 (16 bits)
64-16=48
Now the total blocks will be 91 (of 512) that will be processed by
SHA-1
46113+1+414+48+16=46592/512=91 blocks of 512
Apply SHA1 hashing algorithm to find the output of f1, f2 and f3 functions, If B=C2C6, C=F1B2 and
D=5FE1 in hexadecimal.
Solution
F1 F2 F3
B C D B&C !B !B&D (B&C)| B D B xor B&C B&D C&D (B&C) |
(!B&D) xor C xor (B&D) |
C D (C&D)
1 1 0 1 0 0 1 0 0 0 1 0 0 1
1 1 1 1 0 0 1 0 1 1 1 1 1 1
0 1 0 0 1 0 0 1 0 1 0 0 0 0
0 1 1 0 1 1 1 1 1 0 0 0 1 1
0 0 1 0 1 1 1 0 1 1 0 0 0 0
0 0 1 0 1 1 1 0 1 1 0 0 0 0
1 0 1 0 0 0 0 1 1 0 0 1 0 1
0 1 1 0 1 1 1 1 1 0 0 0 1 1
1 1 1 1 0 0 1 0 1 1 1 1 1 1
1 0 1 0 0 0 0 1 1 0 0 1 0 1
0 1 1 0 1 1 1 1 1 0 0 0 1 1
0 1 0 0 1 0 0 1 0 1 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 1 0 1 0 0 0 0
1 1 0 1 0 0 1 0 0 0 1 0 0 1
0 0 1 0 1 1 1 0 1 1 0 0 0 0