|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: Revised SHA-256/384/512 sample output
From: Aaron D. Gifford (agifford
infowest.com)Date: Fri Oct 20 2000 - 15:23:56 CDT
- Next message: Vin McLellan: "Re: RC4 - To license or not?"
- Previous message: Eric Rescorla: "ANNOUNCE: ssldump-0.9a2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
These are revised sample hashes from my implementation of SHA-256/384/512
after several important bug fixes. I would be delighted to see how they
compare to samples from other implementations. Please disregard the samples
from my previous post. Except for the samples that matched NIST's test
vectors, they were invalid.
Unfortunate lack of SHA-256/384/512 test data from either official
sources or other implementations makes it more difficult to discover
implementation errors. If you have written an implementation, please
consider taking a few minutes to share output from your implementation.
I would really appreciate it, and I'm certain others would too.
Thank you in advance!
Aaron out.
The below included output samples are from the open source C implementation
of SHA-256/384/512 I wrote found at:
http://www.aarongifford.com/computers/sha.html
This one was in NIST's documentation with output samples for all three
versions, SHA-256, SHA-384, and SHA-512:
echo -n "abc" | ./sha2
SHA-256 = 0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
SHA-384 = 0xcb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed
8086072ba1e7cc2358baeca134c825a7
SHA-512 = 0xddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a
2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f
NIST only had an output sample for SHA-256 for this one:
echo -n "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" | ./sha2
SHA-256 = 0x248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1
SHA-384 = 0x3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6
b0455a8520bc4e6f5fe95b1fe3c8452b
SHA-512 = 0x204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c335
96fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445
NIST only had output samples for SHA-384 and SHA-512 for this one:
echo -n "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" \
| ./sha2
SHA-256 = 0xe9936562b55acf851bdc63a0ad64cbec3c9db39cad2d89c87266a8d753d90de0
SHA-384 = 0xbdc0f4a6e0d7de88f374e6c2562441d856aeabed3f52553103f55eca811f64b4
22c7cb47a8067f123e45c1a8ee303635
SHA-512 = 0x90d1bdb9a6cbf9cb0d4a7f185ee0870456f440b81f13f514f4561a0811276352
3033245875b68209bb1f5d5215bac81e0d69f77374cc44d1be30f58c8b615141
This one I just made up. I'd love to compare output against other
implementations output:
perl -e 'print "qwerty" x 65536;' | ./sha2
SHA-256 = 0x5e3dfe0cc98fd1c2de2a9d2fd893446da43d290f2512200c515416313cdf3192
SHA-384 = 0x0d5e45317bc7997cb9c8a23bad9bac9170d5bc81789b51af6bcd74ace379fd64
9a2b48cb56c4cb4ec1477e6933329e0e
SHA-512 = 0x735bd6bebfe6f8070d70069105bc761f35ed1ac3742f2e372fdc14d2a51898e6
153ccaff9073324130abdc451c730dc5dab5a0452487b1171c4dd97f92e267b7
The same goes for this one:
perl -e 'print "a" x (1024 * 1024 * 16);' | ./sha2
SHA-256 = 0x5b6ff2e19d0da0fe323061018fc381393492884e74af8296c81ab9cb2694783a
SHA-384 = 0xa75157c540ad44b0a4d53ab45a87b94436106e3b29888d7241ffc3d29418ca07
3455884beda5f82a748c8125b8566fa9
SHA-512 = 0xe1ab96c0cd3144914435e087a669db46b1d242b84572ecd2099c8e2ee516b849
fdfc441a4c5c1d436c121c212b091942c839ab78aca036675d71228be7a5162c
And what happens when NO data is fed:
echo -n "" | ./sha2
SHA-256 = 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
SHA-384 = 0x38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da
274edebfe76f65fbd51ad2f14898b95b
SHA-512 = 0xcf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce
47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
Additional samples from this implementation may be found in the sha2test.c
source file that is bundled in the same tarball as the C implementation that
generated this output. The source code may be downloaded at:
http://www.aarongifford.com/computers/sha.html
- Next message: Vin McLellan: "Re: RC4 - To license or not?"
- Previous message: Eric Rescorla: "ANNOUNCE: ssldump-0.9a2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]