1 person following this project (follow)

THIS IS THE ONGOING PROJECT

(see http://skeinlibmanaged.codeplex.com for the previous depreciated version, development on that old version has halted)

This project encompasses a cryptographic hash function that is in consideration for NIST's SHA-3 competition. It has advanced to Round 3 as of the latest release of this project. At its core, it uses the ThreeFish block cipher, which is described in the same paper as Skein. This implementation exposes the ThreeFish transformation functions for purposes of research and testing and can be used for encryption. Initial community testing of the algorithm's core looks promising.

This implementation, as submitted, follows standard 1.3 of the Skein paper (as of October 2010). This is Visual Studio 2010 oriented with a much more modular approach than my previous attempt. Use of the code in previous versions of Visual Studio are possible only if they support .NET 4, but will require manually adding the code files to a new project. There is no LINQ code in the project but there is a requirement for .NET 4 due to the Optional Parameters that are being taken advantage of in this release. This GREATLY reduces the need for overloaded functions.

A PRNG (Pseudo-random Number Generator) is also implemented, but that is a little vague in the white paper, so this needs more work and guidance. A few other PRNG projects have sprung up in Python and other languages around (see skein-hash.info link below). NOTE: I have not had the chance to test the results of this project against theirs, and would welcome a chance to do so. Anyone downloading this project should understand that the basic hashing, keyed hashing, and certain other functions that have examples in the Known Answer Tests (KATs) provided to NIST by the developers are working according to the paper, but the RNG/PRNG functions have no concrete examples from the developers, so they are "untested" as such.

NEW June 17th 2011, much improved performance gained by moving core ThreeFish functions to separate DLL. This means Skein uses 2 DLL's now, but ILMERGE can put them together if this is an issue with anyone. See the check-in http://skeinlib.codeplex.com/SourceControl/changeset/changes/67075 for details

SOME HELPFUL INFORMATION:
  • Bruce Schneier's site where he and his team first released Skein.
http://www.schneier.com/skein.html
  • Home site of Skein and a spring-board for information not made available here.
This is also one of the first places to look for updates to the core algorithm and any papers or attacks published surrounding Skein.
http://www.skein-hash.info/
  • Information regarding NIST's SHA-3 Competition (currently in the final round, Skein is one of the 5 finalists)
http://csrc.nist.gov/groups/ST/hash/sha-3/index.html

The skein_golden_kat_internals.txt file indicates a series of "known answer tests" as part of the NIST submission package. Use these for testing the outputs against the standard for basic hashing, tree hashing (implemented but not multi-threaded as of yet), and keyed hashing. A testing program that does a very cursory check on the basic functionality is included with the KATs file parsed out into individual tests against which the code can be run. In the old project, this was in VB, in the new project, everything is C Sharp. The white paper is also included in the project.

Because the original developers released the algorithm and process into the public domain, I am releasing this code as well. Check the License tab above for details on what restrictions CodePlex places on code posted here. As for myself and the development team (per the specification), you are free to do what you will assuming your country of residence has no specific legal restrictions.

This hash function is still undergoing peer review and should be considered preliminary. Cryptanalysis has been completed against the algorithm and it holds up well, but this is still a young algorithm. The version 1.3 tweaked a constant to strengthen the algorithm against rebound attacks. See the sites above for blog entries and published papers on this new tweak. The updated paper is included in the source code.
This implementation is preliminary, and has been tested against the KATs in a very simple manor.
DO UNIT TESTING AND READ THE WHITE PAPER BEFORE USING IT IN A LIVE ENVIRONMENT

Last edited Wed at 7:21 PM by dsparksColossus, version 11