802b857a9889428dc5120f34b3eac1603f13d1b4796 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-16.fc31.riscv64 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.o8VqrA + RPM_EC=0 BUILDSTDERR: ++ jobs -p + exit 0 + umask 022 + cd /builddir/build/BUILD + cd sha2-1.0.1 + DOCDIR=/builddir/build/BUILDROOT/sha2-1.0.1-16.fc31.riscv64/usr/share/doc/sha2 + export LC_ALL=C + LC_ALL=C + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/sha2-1.0.1-16.fc31.riscv64/usr/share/doc/sha2 + cp -pr README /builddir/build/BUILDROOT/sha2-1.0.1-16.fc31.riscv64/usr/share/doc/sha2 + RPM_EC=0 BUILDSTDERR: ++ jobs -p + exit 0 Provides: libsha2.so.1()(64bit) sha2 = 1.0.1-16.fc31 sha2(riscv-64) = 1.0.1-16.fc31 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: ld-linux-riscv64-lp64d.so.1()(64bit) ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.27)(64bit) libsha2.so.1()(64bit) rtld(GNU_HASH) Processing files: sha2-devel-1.0.1-16.fc31.riscv64 Provides: sha2-devel = 1.0.1-16.fc31 sha2-devel(riscv-64) = 1.0.1-16.fc31 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-debugsource-1.0.1-16.fc31.riscv64 Provides: sha2-debugsource = 1.0.1-16.fc31 sha2-debugsource(riscv-64) = 1.0.1-16.fc31 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Processing files: sha2-debuginfo-1.0.1-16.fc31.riscv64 Provides: debuginfo(build-id) = 762c34d4613725f6ad8f328dc5abd554ca1584cd debuginfo(build-id) = 7f53b7e1ee93c502366088f0b94f08b630579d3d debuginfo(build-id) = 8b353ccff276f80994908a01add808422259ea57 sha2-debuginfo = 1.0.1-16.fc31 sha2-debuginfo(riscv-64) = 1.0.1-16.fc31 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Recommends: sha2-debugsource(riscv-64) = 1.0.1-16.fc31 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/sha2-1.0.1-16.fc31.riscv64 Wrote: /builddir/build/RPMS/sha2-devel-1.0.1-16.fc31.riscv64.rpm Wrote: /builddir/build/RPMS/sha2-1.0.1-16.fc31.riscv64.rpm Wrote: /builddir/build/RPMS/sha2-debugsource-1.0.1-16.fc31.riscv64.rpm Wrote: /builddir/build/RPMS/sha2-debuginfo-1.0.1-16.fc31.riscv64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.hZxReC + umask 022 + cd /builddir/build/BUILD + cd sha2-1.0.1 + /usr/bin/rm -rf /builddir/build/BUILDROOT/sha2-1.0.1-16.fc31.riscv64 + RPM_EC=0 BUILDSTDERR: ++ jobs -p + exit 0 Child return code was: 0