Hashlib team,
I am not sure whether the SHA3 library (Keccak) returns correct encryption. I used the latest source code (changeset 78295) downloaded from codeplex but it does not match the vector and result provided in the Wikipedia (sha3 page)
When I use the following code
IHash hash = HashFactory.Crypto.SHA3.CreateKeccak512();
HashResult res = hash.ComputeString("", System.Text.Encoding.ASCII);
string dd = res.ToString();
in my VS 2012 IDE, I am getting a result as
DF987CFD-23FBC92E-7E87FAAC-A300EC3F-AA1DBADC-678E8EE9-4A830968-F22D9209-64AB402D-C5D0F7B2-0C9644BE-08056555-C789D295-8BDA3DF9-8C94BACC-EA25D3C1
This actually should return:
0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e
As per the following post Simple implementation of SHA-3 Keccak hashing to the wrong output in C#? David answered that the latest codebase should return the correct result. I am not sure whether the changes are in place.
When I used the test vector which was taken from the file ExtremelyLongMsgKAT_512.txt
abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno
and using the code
hash.ComputeString("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno").ToString();
the result is also different from the expected. The test vector file says the result would be:
3E122EDAF37398231CFACA4C7C216C9D66D5B899EC1D7AC617C40C7261906A45FC01617A021E5DA3BD8D4182695B5CB785A28237CBB167590E34718E56D8AAB8
However, the actual result was
"B9942109-EB762527-FB384E14-7EDA2DAA-71CA782F-4819B53E-E13C1C13-1C572D99-2B387FA7-212FF624-6EED988D-31AFB23B-4D1B7C44-BC38F908-46EE25F4-AABD5920"