Saturday, September 10, 2016

SHA1 Hash Implementation


If you have done MD5 implementation, then SHA1 is quite easy with some small tweaks. Like, SHA1 is fully big endian, unlike MD5, and there are some different compression functions and stuff. That's it.

To know how to implement SHA1 you need to check the official documentation :

https://tools.ietf.org/html/rfc3174

That is the best source, obviously. And there are two ways to implement it, you can choose one and implement. The only difference in the two methods is space and time complexity.

And if you want a good pseudo code, Wikipedia has one for Method 1 of the documentation :

https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode

That should be enough to code SHA1. For any queries, mail me.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.