OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: SHA-256/384/512
From: Aaron D. Gifford (meaarongifford.com)
Date: Tue Oct 17 2000 - 12:21:55 CDT


Hello,

Since it looks like there aren't any additional test vectors (other than
the very few - two for each new SHA version) available yet, I'm interested
in comparing the output of my version against other versions out there.

Please, if you've got a SHA-256/384/512 implementation, would you mind
feeding various quantities of data to it and letting me know the results
(and the original data)? I did some of my own comparisons against the
SHA-256 code posted anonymously to this list and both versions matched.

If you are aware of some official NIST test vectors that I'm missing,
please let me know.

Below this message I've included samples of output from my own version.

Aaron out.

Samples of output from the freely available SHA-256/384/512 version 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 = 0x3e945c03919ab06c40d6caf58d84c04f2436ae81c86c447c8ca7c44561692e38
SHA-384 = 0x048ee88448803d7b79d9f735e5923ff057a7361515fbd7216807bbb78ecf4305
            1d57a6a7f23241710f0aa752eeca4388
SHA-512 = 0x62bfb8204dccf8c5d1c47c1ef35a53e24db48261622833be1291e431b1568339
            d079af5bd1a086b155aa2c00b2f6bbf144fa8ed6903108b9dccbb8079011edd3

The same goes for this one:
perl -e 'print "a" x (1024 * 1024 * 16);' | ./sha2
SHA-256 = 0xbde583f7e3d43a8060b5495a06e7d67de4c4ee340b9dbf8a7e58f5984c1a51d3
SHA-384 = 0x6b01fc555dc8813fbdc90ede692270b57a1ce8147ec0c1d009c8f8633aad6c2c
            040db1c3ff2f30d3008fba2515fb673c
SHA-512 = 0x3e313330213d479c69b4e95a5136880ca94430a9fe4b06ea442b804d3c9ed059
            b0d8650e8dc163b8b5c844228bbb41d6b04135cae1efcbe45e2a357dc35b79e0