Mock Version: 1.4.10 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/sha2.spec'], chrootPath='/var/lib/mock/767322-epel-7-x86_64-1529056669.999911/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseprintOutput=True) Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'ce1557c402ed46c9a5866b050bc1bade', '-D', '/var/lib/mock/767322-epel-7-x86_64-1529056669.999911/root', '-a', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/sha2.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/sha2-1.0.1-10.el7.src.rpm Child return code was: 0 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/sha2.spec'], chrootPath='/var/lib/mock/767322-epel-7-x86_64-1529056669.999911/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseprintOutput=True) Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'a76b259ddb1448b9af7157a25ec32039', '-D', '/var/lib/mock/767322-epel-7-x86_64-1529056669.999911/root', '-a', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/sha2.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.HD77qy + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf sha2-1.0.1 + /usr/bin/gzip -dc /builddir/build/SOURCES/sha2-1.0.1.tgz + /usr/bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd sha2-1.0.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + cp -a /builddir/build/SOURCES/sha2-Makefile Makefile + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Nwt9YZ + umask 022 + cd /builddir/build/BUILD + cd sha2-1.0.1 + make -j2 'OPTFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' gcc -Wall -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o sha2.o sha2.c gcc -Wall -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o sha2prog.o sha2prog.c BUILDSTDERR: sha2prog.c: In function 'main': BUILDSTDERR: sha2prog.c:71:4: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] BUILDSTDERR: if (!strcmp(av, "q")) { BUILDSTDERR: ^ BUILDSTDERR: sha2prog.c:112:3: warning: pointer targets in passing argument 2 of 'SHA256_End' differ in signedness [-Wpointer-sign] BUILDSTDERR: SHA256_End(&ctx256, buf); BUILDSTDERR: ^ BUILDSTDERR: In file included from sha2prog.c:41:0: BUILDSTDERR: sha2.h:153:7: note: expected 'char *' but argument is of type 'unsigned char *' BUILDSTDERR: char* SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]); BUILDSTDERR: ^ BUILDSTDERR: sha2prog.c:118:3: warning: pointer targets in passing argument 2 of 'SHA384_End' differ in signedness [-Wpointer-sign] BUILDSTDERR: SHA384_End(&ctx384, buf); BUILDSTDERR: ^ BUILDSTDERR: In file included from sha2prog.c:41:0: BUILDSTDERR: sha2.h:159:7: note: expected 'char *' but argument is of type 'unsigned char *' BUILDSTDERR: char* SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]); BUILDSTDERR: ^ BUILDSTDERR: sha2prog.c:124:3: warning: pointer targets in passing argument 2 of 'SHA512_End' differ in signedness [-Wpointer-sign] BUILDSTDERR: SHA512_End(&ctx512, buf); BUILDSTDERR: ^ BUILDSTDERR: In file included from sha2prog.c:41:0: BUILDSTDERR: sha2.h:165:7: note: expected 'char *' but argument is of type 'unsigned char *' BUILDSTDERR: char* SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]); BUILDSTDERR: ^ BUILDSTDERR: sha2.c: In function 'SHA256_Final': BUILDSTDERR: sha2.c:606:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] BUILDSTDERR: *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; BUILDSTDERR: ^ BUILDSTDERR: sha2.c: In function 'SHA512_Last': BUILDSTDERR: sha2.c:923:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] BUILDSTDERR: *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; BUILDSTDERR: ^ BUILDSTDERR: sha2.c:924:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] BUILDSTDERR: *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; BUILDSTDERR: ^ gcc -Wall -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o sha2speed.o sha2speed.c gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -shared -fPIC -Wl,-soname,libsha2.so.1 -o libsha2.so.1.0.1 sha2.o ln -sf libsha2.so.1.0.1 libsha2.so.1 ln -sf libsha2.so.1 libsha2.so gcc sha2prog.o -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o sha2 -L. -lsha2 gcc sha2speed.o -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o sha2speed -L. -lsha2 + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.tAMVBs + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64 BUILDSTDERR: ++ dirname /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64 + cd sha2-1.0.1 + make install DESTDIR=/builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64 LIBDIR=/usr/lib64 INCLUDEDIR=/usr/include BINDIR=/usr/bin 'OPTFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -shared -fPIC -Wl,-soname,libsha2.so.1 -o libsha2.so.1.0.1 sha2.o ln -sf libsha2.so.1.0.1 libsha2.so.1 ln -sf libsha2.so.1 libsha2.so gcc sha2prog.o -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o sha2 -L. -lsha2 gcc sha2speed.o -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o sha2speed -L. -lsha2 install -d /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/bin install sha2 sha2speed /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/bin install -d /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/include install -pm 644 sha2.h /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/include install -d /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/lib64 install libsha2.so.1.0.1 libsha2.so libsha2.so.1 /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/lib64 ln -sf libsha2.so.1.0.1 /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/lib64/libsha2.so.1 ln -sf libsha2.so.1 /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/lib64/libsha2.so + /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /builddir/build/BUILD/sha2-1.0.1 extracting debug info from /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/lib64/libsha2.so.1.0.1 extracting debug info from /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/bin/sha2speed extracting debug info from /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/bin/sha2 /usr/lib/rpm/sepdebugcrcfix: Updated 3 CRC32s, 0 CRC32s did match. symlinked /usr/lib/debug/usr/lib64/libsha2.so.1.0.1.debug to /usr/lib/debug/usr/lib64/libsha2.so.debug symlinked /usr/lib/debug/usr/lib64/libsha2.so.1.0.1.debug to /usr/lib/debug/usr/lib64/libsha2.so.1.debug BUILDSTDERR: 94 blocks + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.f5N5mX + umask 022 + cd /builddir/build/BUILD + cd sha2-1.0.1 + LD_PRELOAD=./libsha2.so + ./sha2test.pl TEST VECTOR #1: This test vector is taken from the PDF document that describes the SHA-256/384/512 algorithms. That document contains sample output for all three versions (SHA-256, SHA-384, and SHA-512). (Total length of test vector data: 3) VECTOR DATA FILE: testvectors/vector001.dat SHA256 MATCHES: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad SHA384 MATCHES: cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed 8086072ba1e7cc2358baeca134c825a7 SHA512 MATCHES: ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a 2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f TEST VECTOR #2: The PDF document only provided sample output for SHA-256 using this test data. I have provided SHA-384 and SHA-512 sample output from my own implementation which may not be correct. (Total length of test vector data: 56) VECTOR DATA FILE: testvectors/vector002.dat SHA256 MATCHES: 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 SHA384 MATCHES: 3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6 b0455a8520bc4e6f5fe95b1fe3c8452b SHA512 MATCHES: 204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c335 96fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445 TEST VECTOR #3: For this test data (from the PDF document), no example output was provided for SHA-256 (SHA-384 and SHA-512 samples were provided), so the sample for SHA-256 comes from the output of my own implementation and so may not be correct. (Total length of test vector data: 112) VECTOR DATA FILE: testvectors/vector003.dat SHA256 MATCHES: cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 SHA384 MATCHES: 09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712 fcc7c71a557e2db966c3e9fa91746039 SHA512 MATCHES: 8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018 501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909 TEST VECTOR #4: The output samples for this test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample comes from...well most anyone in the U.S. will know and many outside the U.S. too. (Total length of test vector data: 1515) VECTOR DATA FILE: testvectors/vector004.dat SHA256 MATCHES: 4d25fccf8752ce470a58cd21d90939b7eb25f3fa418dd2da4c38288ea561e600 SHA384 MATCHES: 69cc75b95280bdd9e154e743903e37b1205aa382e92e051b1f48a6db9d0203f8 a17c1762d46887037275606932d3381e SHA512 MATCHES: 23450737795d2f6a13aa61adcca0df5eef6df8d8db2b42cd2ca8f783734217a7 3e9cabc3c9b8a8602f8aeaeb34562b6b1286846060f9809b90286b3555751f09 TEST VECTOR #5: The output samples for this test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample is EMPTY (no bits). Mr. David A. Ireland's SHA-256 implementation agrees with my own implementation on the output of this test vector (SHA-256 only). (Total length of test vector data: 0) VECTOR DATA FILE: testvectors/vector005.dat SHA256 MATCHES: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 SHA384 MATCHES: 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da 274edebfe76f65fbd51ad2f14898b95b SHA512 MATCHES: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce 47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e TEST VECTOR #6: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample exactly the same length as the SHA-256 block length. (Total length of test vector data: 64) VECTOR DATA FILE: testvectors/vector006.dat SHA256 MATCHES: ab64eff7e88e2e46165e29f2bce41826bd4c7b3552f6b382a9e7d3af47c245f8 SHA384 MATCHES: e28e35e25a1874908bf0958bb088b69f3d742a753c86993e9f4b1c4c21988f95 8bd1fe0315b195aca7b061213ac2a9bd SHA512 MATCHES: 70aefeaa0e7ac4f8fe17532d7185a289bee3b428d950c14fa8b713ca09814a38 7d245870e007a80ad97c369d193e41701aa07f3221d15f0e65a1ff970cedf030 TEST VECTOR #7: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample one byte shorter than the SHA-256 block length. (Total length of test vector data: 63) VECTOR DATA FILE: testvectors/vector007.dat SHA256 MATCHES: f08a78cbbaee082b052ae0708f32fa1e50c5c421aa772ba5dbb406a2ea6be342 SHA384 MATCHES: 37b49ef3d08de53e9bd018b0630067bd43d09c427d06b05812f48531bce7d2a6 98ee2d1ed1ffed46fd4c3b9f38a8a557 SHA512 MATCHES: b3de4afbc516d2478fe9b518d063bda6c8dd65fc38402dd81d1eb7364e72fb6e 6663cf6d2771c8f5a6da09601712fb3d2a36c6ffea3e28b0818b05b0a8660766 TEST VECTOR #8: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample exactly the same length as the SHA-384 and SHA-512 block lengths. (Total length of test vector data: 128) VECTOR DATA FILE: testvectors/vector008.dat SHA256 MATCHES: 0ab803344830f92089494fb635ad00d76164ad6e57012b237722df0d7ad26896 SHA384 MATCHES: e3e3602f4d90c935321d788f722071a8809f4f09366f2825cd85da97ccd2955e b6b8245974402aa64789ed45293e94ba SHA512 MATCHES: 97fb4ec472f3cb698b9c3c12a12768483e5b62bcdad934280750b4fa4701e5e0 550a80bb0828342c19631ba55a55e1cee5de2fda91fc5d40e7bee1d4e6d415b3 TEST VECTOR #9: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample is one byte shorter in length than the SHA-384 and SHA-512 block lengths. (Total length of test vector data: 127) VECTOR DATA FILE: testvectors/vector009.dat SHA256 MATCHES: e4326d0459653d7d3514674d713e74dc3df11ed4d30b4013fd327fdb9e394c26 SHA384 MATCHES: 1ca650f38480fa9dfb5729636bec4a935ebc1cd4c0055ee50cad2aa627e06687 1044fd8e6fdb80edf10b85df15ba7aab SHA512 MATCHES: d399507bbf5f2d0da51db1ff1fc51c1c9ff1de0937e00d01693b240e84fcc340 0601429f45c297acc6e8fcf1e4e4abe9ff21a54a0d3d88888f298971bd206cd5 TEST VECTOR #10: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample is exactly 5 times size of the SHA-256 block length. (Total length of test vector data: 320) VECTOR DATA FILE: testvectors/vector010.dat SHA256 MATCHES: a7f001d996dd25af402d03b5f61aef950565949c1a6ad5004efa730328d2dbf3 SHA384 MATCHES: b8261ddcd7df7b3969a516b72550de6fbf0e394a4a7bb2bbc60ec603c2ceff64 3c5bf62bc6dcbfa5beb54b62d750b969 SHA512 MATCHES: caf970d3638e21053173a638c4b94d6d1ff87bc47b58f8ee928fbe9e245c23ab f81019e45bf017ecc8610e5e0b95e3b025ccd611a772ca4fb3dfba26f0859725 TEST VECTOR #11: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample is one byte less than 7 times the size of the SHA-256 block length. (Total length of test vector data: 447) VECTOR DATA FILE: testvectors/vector011.dat SHA256 MATCHES: 6dcd63a07b0922cc3a9b3315b158478681cc32543b0a4180abe58a73c5e14cc2 SHA384 MATCHES: 548e4e9a1ff57f469ed47b023bf5279dfb4d4ca08c65051e3a5c41fab84479a2 05496276906008b4b3c5b0970b2f5446 SHA512 MATCHES: ee5d07460183b130687c977e9f8d43110989b0864b18fe6ee00a53dec5eda111 f3aaa3bac7ab8dae26ed545a4de33ed45190f18fa0c327c44642ab9424265330 TEST VECTOR #12: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample is exactly 5 times size of the SHA-384 and SHA-512 block lengths. (Total length of test vector data: 640) VECTOR DATA FILE: testvectors/vector012.dat SHA256 MATCHES: af6ebfde7d93d5badb6cde6287ecc2061c1cafc5b1c1217cd984fbcdb9c61aaa SHA384 MATCHES: c6fec3a3278dd6b5afc8c0971d32d38faf5802f1a21527c32563b32a1ac34065 6b433b44fe2648aa2232206f4301193a SHA512 MATCHES: 73ffeb67716c3495fbc33f2d62fe08e2616706a5599881c7e67e9ef2b68f4988 ea8b3b604ba87e50b07962692705c420fa31a00be41d6aaa9f3b11eafe9cf49b TEST VECTOR #13: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample is one byte short of 17 times size of the SHA-384 and SHA-512 block lengths. (Total length of test vector data: 2175) VECTOR DATA FILE: testvectors/vector013.dat SHA256 MATCHES: 8ff59c6d33c5a991088bc44dd38f037eb5ad5630c91071a221ad6943e872ac29 SHA384 MATCHES: 92dca5655229b3c34796a227ff1809e273499adc2830149481224e0f54ff4483 bd49834d4865e508ef53d4cd22b703ce SHA512 MATCHES: 0e928db6207282bfb498ee871202f2337f4074f3a1f5055a24f08e912ac118f8 101832cdb9c2f702976e629183db9bacfdd7b086c800687c3599f15de7f7b9dd TEST VECTOR #14: The output samples for thi test vector come exclusively from my own implementation and so may be completely incorrect. Use with a very large grain of salt. The input sample 4 KB of misc. data. (Total length of test vector data: 16384) VECTOR DATA FILE: testvectors/vector014.dat SHA256 MATCHES: 1818e87564e0c50974ecaabbb2eb4ca2f6cc820234b51861e2590be625f1f703 SHA384 MATCHES: 310fbb2027bdb7042f0e09e7b092e9ada506649510a7aa029825c8e8019e9c30 749d723f2de1bd8c043d8d89d3748c2f SHA512 MATCHES: a001636f3ff1ce34f432f8e8f7785b78be84318beb8485a406650a8b243c419f 7db6435cf6bf3000c6524adb5b52bad01afb76b3ceff701331e18b85b0e4cbd3 TEST VECTOR #15: This is yet another of my own test vectors for a larger input data set. The input data is the string "qwerty repeated 65536 times. (Total length of test vector data: 393216) VECTOR DATA FILE: testvectors/vector015.dat SHA256 MATCHES: 5e3dfe0cc98fd1c2de2a9d2fd893446da43d290f2512200c515416313cdf3192 SHA384 MATCHES: 0d5e45317bc7997cb9c8a23bad9bac9170d5bc81789b51af6bcd74ace379fd64 9a2b48cb56c4cb4ec1477e6933329e0e SHA512 MATCHES: 735bd6bebfe6f8070d70069105bc761f35ed1ac3742f2e372fdc14d2a51898e6 153ccaff9073324130abdc451c730dc5dab5a0452487b1171c4dd97f92e267b7 TEST VECTOR #16: This test vector came from Brian LaMacchia in his e-mail message containing several samples of output from his SHA-256 and SHA-512 implementations. My own implementations match his output exactly. The input data data set is the string "Rijndael is AES" repeated 1024 times. (Total length of test vector data: 15360) VECTOR DATA FILE: testvectors/vector016.dat SHA256 MATCHES: 80fced5a97176a5009207cd119551b42c5b51ceb445230d02ecc2663bbfb483a SHA384 MATCHES: aa1e77c094e5ce6db81a1add4c095201d020b7f8885a4333218da3b799b9fc42 f00d60cd438a1724ae03bd7b515b739b SHA512 MATCHES: fae25ec70bcb3bbdef9698b9d579da49db68318dbdf18c021d1f76aaceff9628 38873235597e7cce0c68aabc610e0deb79b13a01c302abc108e459ddfbe9bee8 TEST VECTOR #17: Rogier van de Pol notified me that my implementation differed with several others on several test data sets he had tested against. This test vector data set is one Rogier provided to me that highlighted an off-by-one bug in my implementation that affected SHA-256/384/512 hashes where the data set length was of a certain length. In the case of SHA512 or SHA384, if the data length after subtracting 111 was an even multiple of 128 bytes, the bug surfaced. In the case of SHA256, after subtracting 55, the remaining length was an even multiple of 64, the bug surfaced. The fix was simple. In SHA512_Last() and in SHA256_Final() functions, I simply replaced a single "<" test with a "<=" test. Thanks, Rogier! (Total length of test vector data: 12271) VECTOR DATA FILE: testvectors/vector017.dat SHA256 MATCHES: 88ee6ada861083094f4c64b373657e178d88ef0a4674fce6e4e1d84e3b176afb SHA384 MATCHES: 78cc6402a29eb984b8f8f888ab0102cabe7c06f0b9570e3d8d744c969db14397 f58ecd14e70f324bf12d8dd4cd1ad3b2 SHA512 MATCHES: 211bec83fbca249c53668802b857a9889428dc5120f34b3eac1603f13d1b4796 5c387b39ef6af15b3a44c5e7b6bbb6c1096a677dc98fc8f472737540a332f378 TEST VECTOR #18: I added this vector after fixing a bug first discovered by Rogier van de Pol. The length of this data set is designed to test for that bug or similar bugs in SHA-256 hashes. The bug was an off-by-one bug where I used a "<" test instead of a "<=" test in SHA256_Final(). Whenever data set lengths were an even multiple of 64 after subtracting 55, the bug showed up. The fix was easy, once the problem was fully diagnosed. Thanks, Rogier! (Total length of test vector data: 1079) VECTOR DATA FILE: testvectors/vector018.dat SHA256 MATCHES: 5a2e925a7f8399fa63a20a1524ae83a7e3c48452f9af4df493c8c51311b04520 SHA384 MATCHES: 72ec26cc742bc5fb1ef82541c9cadcf01a15c8104650d305f24ec8b006d7428e 8ebe2bb320a465dbdd5c6326bbd8c9ad SHA512 MATCHES: ebad464e6d9f1df7e8aadff69f52db40a001b253fbf65a018f29974dcc7fbf8e 58b69e247975fbadb4153d7289357c9b6212752d0ab67dd3d9bbc0bb908aa98c ===== RESULTS (18 VECTOR DATA FILES HASHED) ===== HASH TYPE NO. OF TESTS PASSED FAILED --------- ------------ ------ ------ SHA-256 18 18 0 SHA-384 18 18 0 SHA-512 18 18 0 ---------------------------------------------- TOTAL: 54 54 0 NO ERRORS! ALL TESTS WERE SUCCESSFUL! Processing files: sha2-1.0.1-10.el7.x86_64 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.LsYXzs + exit 0 + umask 022 + cd /builddir/build/BUILD + cd sha2-1.0.1 + DOCDIR=/builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/share/doc/sha2-1.0.1 + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/share/doc/sha2-1.0.1 + cp -pr README /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64/usr/share/doc/sha2-1.0.1 + exit 0 Provides: libsha2.so.1()(64bit) sha2 = 1.0.1-10.el7 sha2(x86-64) = 1.0.1-10.el7 Requires(interp): /sbin/ldconfig /sbin/ldconfig Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libsha2.so.1()(64bit) rtld(GNU_HASH) Processing files: sha2-devel-1.0.1-10.el7.x86_64 Provides: sha2-devel = 1.0.1-10.el7 sha2-devel(x86-64) = 1.0.1-10.el7 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: libsha2.so.1()(64bit) Processing files: sha2-debuginfo-1.0.1-10.el7.x86_64 Provides: sha2-debuginfo = 1.0.1-10.el7 sha2-debuginfo(x86-64) = 1.0.1-10.el7 Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64 Wrote: /builddir/build/RPMS/sha2-1.0.1-10.el7.x86_64.rpm Wrote: /builddir/build/RPMS/sha2-devel-1.0.1-10.el7.x86_64.rpm Wrote: /builddir/build/RPMS/sha2-debuginfo-1.0.1-10.el7.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.rqHJSy + umask 022 + cd /builddir/build/BUILD + cd sha2-1.0.1 + /usr/bin/rm -rf /builddir/build/BUILDROOT/sha2-1.0.1-10.el7.x86_64 + exit 0 Child return code was: 0