lib: import Skein implementation

Skein is a hash function and cryptographic Swiss army knife which was
one of the five SHA-3 finalists.  The final SHA-3 report was very
favorable to the security of Skein, and chose Keccak as SHA-3
primarily because it was faster in hardware implementations.

This is Daniel J. Bernstein's streamlining of the implementation by
Doug Whiting, one of the Skein designers, which was part of the SHA-3
submission.  We include only the version with 512-bit state and
512-bit output, which was the main proposal for SHA-3.

The file is taken verbatim from Bernstein's SUPERCOP distribution, at
crypto_hash/skein512512/simple/hash.c.  Our own modifications
(starting by making it build in the kernel tree) will be made in
separate commits, so that they're easily spotted.

Signed-off-by: Greg Price <price@mit.edu>
lib/skein: basic cleanups

Now the file builds, it has a brief comment header, and it passes
checkpatch.  The diff is pretty reasonable with -w.

Signed-off-by: Greg Price <price@mit.edu>
lib/skein: replace redundant endianness helpers

In the kernel we have our own code for converting endianness.

Signed-off-by: Greg Price <price@mit.edu>
lib/skein: replace redundant rotate macro

Signed-off-by: Greg Price <price@mit.edu>
wip skein factor out E
wip skein remove badly-abstracted helper
wip skein: factor out UBI
wip skein: fix whitespace from refactoring
wip skein: kill context struct
wip skein: separate in/out for E and UBI
wip skein: correct boundary of E

The XOR is part of the definition of UBI, not E.
wip skein: define output function
wip skein: fix endianness
wip skein api

-rw-rw-r-- 1 greg greg 720 2013-11-29 01:56:02.978690023 -0500 include/linux/cryptohash.h
wip skein: more cryptohash-like API
wip skein: cryptohash API
wip skein: a bit of documentation
DRAFT random: use Skein

Still to clean up: OUTPUT_POOL_WORDS, poolinfo
random skein: protect with lock
random: factor out FIPS checks to own functions