Go to file
Alain Mosnier b21a7b5529 Added comment 2017-12-13 12:03:01 +01:00
.gitignore Completed the implementation, including testing, and fixed bugs 2017-12-13 11:12:47 +01:00
LICENSE Initial commit 2017-12-12 20:48:09 +01:00
Makefile Completed the implementation, including testing, and fixed bugs 2017-12-13 11:12:47 +01:00
README.md Added comment about testing 2017-12-13 11:29:58 +01:00
sha-256.c Added comment 2017-12-13 12:03:01 +01:00
sha-256.h Started a SHA-256 implementation. Buggy so far. 2017-12-13 00:52:28 +01:00
test.c Removed temporary code 2017-12-13 11:27:39 +01:00

README.md

sha-2

Contents

SHA-2 algorithm implementations.

At the moment, only SHA-256 is implemented.

Design criteria

  • Easy to test, include in any project, compile and link.

  • ANSI C with as little specific C99 as possible (e.g. extended integer types are used, but not bool).

  • Portable. Makes no assumptions on the target system's endianess or word size.

  • The SHA-256 implementation is a straightforward implementation of the algorithm specified on Wikipedia. At the moment, no effort at all has been put on optimization.

Testing

Some testing has been performed, that hopefully proves that the implementation is correct. However, no effort has so far been put into testing large sizes of data.

Notes

The Makefile is as minimal as possible. No effort was put into making it general. Its purpose is mainly to ease testing for the developer's host machine. The actual implementation is however extremely easy to include in any project, may it use GNU make or any other build tool.

License

This repository is made available in the public domain. See LICENSE FILE.