|
Secure Hash Algorithm (SHA-1) Reference
implementation in C/C++ with comments |
|
The SHA hash functions are a collection of cryptographic hash functions designed by the National Security Agency (NSA) of the US Govt. and published by the National Institute of Standards and Technology (NIST), USA. Hash algorithms compute a fixed-length digital representation (called message digest or signature or hash) of an input message of any length. SHA-1 produces a message digest that is 160 bits long
A hash function is called secure when it is computationally infeasible to: The implementations given here is in C / C++. It is given as an aid for beginners to get acquainted with the algorithm and can be used as a base for actual implementation. The main feature of this SHA-1 implementation is not efficiency; It is simplicity and readability.
Get the source codes here:
SHA-1 Secure Hash Algorithm source code in C/C++
(The document also contains description of SHA-2 variants viz. SHA-224, SHA-256, SHA-384, and SHA-512)
SHA-1 is employed in several widely used security applications and protocols, including TLS and SSL, PGP, SSH, S/MIME, and IPsec. It was considered to be the successor to MD5, an earlier, widely-used hash function. The other variants of the algorithm collectively called SHA-2 are also in wide use now.
License No license. This is an open source and free website. Use the resources as you like. Please link to this page and give credits if you can. And promote open source.
Author: Niyaz PK
|
All Rights Reserved © 2007 Hoozi
