0
$\begingroup$

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

$\endgroup$
  • 2
    $\begingroup$ HMAC takes a key, plain SHA-1 does not. $\endgroup$ – CodesInChaos Nov 7 '15 at 19:26
  • $\begingroup$ @CodesInChaos you mean SHA1(Data) and SHA1(Data + Key)? Can you please explain? $\endgroup$ – user960567 Nov 8 '15 at 5:43
  • 1
    $\begingroup$ 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. $\endgroup$ – CodesInChaos Nov 8 '15 at 8:05

Browse other questions tagged or ask your own question.