0

Can anyone let me know the difference between SHA1 and SHA1HMAC algo?

  • 2
    HMAC takes a key, plain SHA-1 does not. – CodesInChaos Nov 07 '15 at 19:26
  • @CodesInChaos you mean SHA1(Data) and SHA1(Data + Key)? Can you please explain? – Imran Qadir Baksh - Baloch Nov 08 '15 at 05:43
  • 1
    SHA1 only has one parameter, the data. HMAC-SHA-1 has two parameters, key and data. Simply concatenating key and data and passing them to SHA-1 is not a good idea. SHA1(Data + Key) is much weaker than HMAC-SHA-1, since it relies on collision resistance. SHA1(Key + Data) is totally broken, due to length extensions. – CodesInChaos Nov 08 '15 at 08:05

0 Answers0