Skip to content

v4.0.0

Choose a tag to compare

@jonelo jonelo released this 22 Aug 12:37
· 86 commits to main since this release
  • Compatibility changes

    • requires a JRE/JDK that is compatible with Java 21 LTS and later, OpenJDK 25 LTS or later is recommended
    • the formation of an HMAC with algorithms of the ascon family is no longer possible, because there is no
      standard-compliant parameterization according to HMAC for sponge-based hash functions
      (RFC 2104 / FIPS 198-1); in general, an HMAC cannot be formed if the block size of the underlying hash
      function is smaller than its digest size
    • a truncated HMAC (hmac::) returns different values now if is not a multiple of 8,
      because the surplus bits are zeroed as documented, see also the bug fixes below; "hmac:sha256:155"
      for example no longer returns the same value as "hmac:sha256:160"
    • prng returns different values for files now, because the values that have been returned so far were
      wrong, see also the bug fixes below; the initial value of the algorithm was dropped while a file was
      being prepared, so "jacksum -a prng " calculated with an initial value of 0 rather than with
      the documented 0x811c9dc5 and therefore did not even agree with "jacksum -a prng -q " on
      the same data; files of any size are affected, as are all customized definitions (prng:init=...)
      whose initial value is not 0; aststrsum (aka ast, strsum) is not affected, because its initial
      value is 0 anyway
    • fletcher16 returns different values for input larger than 64 KiB now, because the values that have
      been returned so far were wrong, see also the bug fixes below; input up to 64 KiB is read in one
      single block and was therefore never affected
    • sum64 returns different values now, because the values that have been returned so far were wrong,
      see also the bug fixes below; only input whose sum of all byte values reaches 2^32 is affected,
      which is impossible for files smaller than 16,843,010 bytes (approx. 16 MiB, a file filled with
      0xFF bytes only), and in practice the difference starts at approx. 32 MiB for uniformly
      distributed binary data and even later for text files
    • the style openssl-dgst now follows the names of OpenSSL 3.x and later; the style openssl111-dgst has been
      added in order to get the traditional OpenSSL 1.1.1 behavior
  • API changes

    • added the API methods JacksumAPI.getBrokenState() and JacksumAPI.getBrokenDescription() so that
      programs that use Jacksum as a library can determine whether an algorithm is broken; if many
      algorithms are queried, JacksumAPI.preloadBrokenStates() builds a cache for all subsequent queries
    • the method Parameters.checked() has got an overload called
      Parameters.checked(boolean setupStreams) which allows a caller to validate the parameters without setting
      up the output and error streams (requested by HashGarten, issue #12); the parameterless method
      keeps its behavior
  • New algorithms

    • 97 new algorithms (including their different lengths) have been added;
      Jacksum now supports 586 algorithms!
    • added belt-hash, the hash function of the Belarusian national standard STB 34.101.31
    • added Romulus-H v1.3 (romulush); it is one of the finalists of the Lightweight Cryptography
      Competition held by NIST
    • added Fugue 2.0 (fugue2-[224,256,384,512]), the tweak of Fugue that IBM published in April 2012
      after the NIST SHA-3 competition had ended. The new Fugue 2.0 code also provides an alternate
      implementation (option -A) of the original Fugue, i.e. of fugue[224,256,384,512]
    • added 5 algorithm families (resp. 21 algorithms) from round 2 of the NIST SHA-3 competition:
      • BlueMidnightWish-[224,256,384,512]
      • SIMD-[224,256,384,512]
      • CubeHash-[224,256,384,512]
      • Hamsi-[224,256,384,512]
      • Shabal-[192,224,256,384,512]
    • added 2 algorithms from round 1 of the NIS SHA-3 competition:
      • MD6 (md6-8 to md6-512, in steps of 8)
      • Edon-R (edonr-[224,256,384,512])
    • added 2 CRCs
      • CRC-64 (NVM Express 64b CRC), called crc64_nvme
      • CRC-32 (Go Koopman), called crc32_go-koopman (issue #35)
  • New options

    • --exact, it makes the help search (-h ) match exactly rather than by prefix, so that
      options such as "-" and "--" can be looked up at all, e.g. jacksum --exact -h - prints the
      description of the option "-" only, while jacksum -h - prints all options;
      if an exact search is unsuccessful, the exit code is 1
    • --ignore-hashes, it ignores the hash values that are stored in a check file during a check (-c)
    • --ignore-sizes, it ignores the file sizes that are stored in a check file during a check (-c)
    • --ignore-timestamps, it ignores the timestamps that are stored in a check file during a check (-c)
    • --no-header, it suppresses the header that is activated by the styles which print one
  • Improvements on existing features

    • new styles
      • full
      • without-hashes
      • without-timestamps
      • without-sizes
      • sizes-and-names
      • timestamps-and-names
      • hash data base (hdb) style, which is used by ClamAV's sigtool
      • openssl111-dgst (aliases openssl111 and openssl111-tagged), which prints the format of
        "openssl dgst" with the algorithm names of OpenSSL 1.1.1 and earlier, while the style
        openssl-dgst follows the names of OpenSSL 3.x and later (SHA256 vs. SHA2-256 for example).
        Both styles read the output of any OpenSSL version. There is no style for the untagged
        format (openssl dgst -r) of OpenSSL 1.1.1, because that format does not contain an
        algorithm name at all.
    • new timestamp formats
      • default-utc
      • iso8601utc, with the alias iso-utc
      • added the alias iso for the existing format iso8601
    • extended the strict check mode (option --check-strict)
      • in strict check mode, all files must pass the verification process, and no files must have been
        added or removed
      • added strict check output to the verification summary
      • the exit code follows --check-strict
    • added more algorithm investigation info
      • added a new section called "Security:" to the output of --info, it contains the entry "broken:" which
        tells whether the selected algorithm is considered broken; the value is one of "yes", "no", "partly",
        "depends", or "n/a"; the information is read from Jacksum's documentation which remains the single
        source of truth for it
      • added the keywords "details" and "nodetails" to the option -V/--verbose; "details" makes --info print
        the explanation of the value of "broken:" in addition to the value itself, and it is part of "all"
      • added avalanche effect info to the algorithm info
      • allowed option -q to specify the sequence for the avalanche calculation
      • also added reversed and Koopman representations for the reciprocal polynomial representation if --info
        is set for a CRC
    • added troubleshooting features
      • added Java Heap Info if the option --info has been set
    • new sequence types for the options -q and -k
      • z-base-32, e.g. "jacksum -q z-base-32:cfz8g75fqeog1h3ygo3y"; so far z-base-32 was supported
        for the output (-E z-base-32) only
      • bubblebabble, e.g. "jacksum -q bubblebabble:xesef-disof-gytuf-katof-movif-baxux"; so far
        BubbleBabble was supported for the output (-E bb) only; the decoder verifies the redundancy
        that is part of the BubbleBabble encoding, so invalid strings are rejected rather than
        being decoded to arbitrary bytes; as a consequence the option -e can compare a BubbleBabble
        encoded hash value byte-wise now
    • improved the diagnostics
      • a file whose name starts with the comment string (by default "#", ";" for the style sfv) produces
        a line that is treated as a comment while the list is being read back, so such a file is silently
        skipped during a check, and the check passes although the file has never been verified. Jacksum now
        warns while it writes such a line, and it points to the option -I, which can change that string. The
        styles files-only and sfv are affected, because they put the file name at the beginning of a line.
      • options that a style overrules are reported consistently now: an encoding that has been set by -E
        is ignored by every style (the styles define the encoding of the hash value), which was the only
        case that has been silently ignored so far, while -a, -t, -F, --filesize, and
        --gnu-filename-escaping have always been reported
      • the combination of "-a none" and a style that stores hash values (e.g. bsd) writes lines with an
        empty hash value; that is now reported. In check mode the combination stays silent, because it is
        a valid way to check the properties that are left, e.g. the existence of the files.
      • if a style stores the algorithm name in the file (bsd, solaris-digest-v, openssl-dgst,
        openssl111-dgst) and that name belongs to an algorithm other than the selected one, all files were
        reported as FAILED, as if they had been altered. Jacksum now names the cause, e.g. 'The file has
        been created with the algorithm "SHA256", but the algorithm "sha3-256" has been selected.'
        A name that Jacksum cannot resolve is not reported, because tools spell the very same algorithm
        differently, e.g. SHA256 (OpenSSL 1.1.1), SHA2-256 (OpenSSL 3.x), and sha256 (Solaris).
    • improved the usability
      • hash values that are read by the options -c, -e, and -w are compared without respecting upper and
        lower case now, unless the encoding that has been selected by -E has a case-sensitive alphabet
        (base64, base64-nopadding, base64url, base64url-nopadding, and z85); so far only the options -q,
        -e (in quick mode), and --string-list have been tolerant, see also the bug fixes below
      • allowed option -e for --string-list
      • if an option has been used with an invalid or a missing parameter, the help that is printed
        before the error message now covers exactly that option rather than all options that share
        the same prefix
      • the message that is printed if a help search was unsuccessful is now localized, it follows
        the language that has been selected by -h [language], e.g. jacksum -h de xyz
    • improved the customization
      • compatibility (style) files understand a new optional property called formatter.leadingHeader in
        order to prepend a custom text to the header that is printed by --header
  • Bug fixes

    • concurrency (options --threads-hashing and --threads-reading)
      • issue #30: a java.lang.OutOfMemoryError (e.g. in "Thread-0" or "pool-1-thread-4") can occur if the
        producer is much faster than the consumer threads
      • issue #49: An unexpected exception in the output consumer aborts the run silently with exit code 0
      • a read error on a file (e.g. a locked file such as NTUSER.DAT on Microsoft Windows) that was hashed
        with multiple algorithms (--threads-hashing) could be reported as a success with a partially computed,
        i.e. wrong, hash value. Such errors are now reliably detected and reported.
      • an unexpected exception while hashing (--threads-hashing) could be silently swallowed and a partially
        computed hash returned as if it were correct, or it could deadlock the process on large files. Errors
        are now propagated and no longer silently ignored.
      • during a parallel directory walk (--threads-reading) an unexpected exception on a single file could
        make that file silently disappear from the output while the run still reported success. Such files are
        now reported as an error.
      • a crash in the file producer, or an interruption of the hashing engine, could leave the parallel
        directory walk (--threads-reading) hanging forever instead of terminating. Termination is now
        guaranteed.
      • the parallel directory walk (--threads-reading) busy-waited for its worker pool to finish, needlessly
        keeping one CPU core at 100%. It now waits without spinning.
      • a short read that is not the end of the file is no longer misinterpreted as the last block, which could
        truncate a hash or block the reader.
    • verification, parsing, and output
      • issue #32: --header not working using --quick
      • issue #36: if multiple algorithms have been selected and file size is not wanted, Jacksum does not
        find valid entries
      • issue #37: parser does not find valid entries if algorithm "none" (no hashing) has been selected
      • issue #38: if hash values are not wanted by the user, there should be no leading separator character
        left in the output
      • issue #40: output style for BSD is not 100% compatible for the cases sha512/224, sha512/256, and
        skein-512-512
      • issue #48: -c: entries for standard input () are never verified - reported as NEW, exit code 0
      • issue #50: -c: a check file that lists the same file under two path spellings can mask a mismatch
      • issue #51: -c combined with --check-line: the statistics of the check file are overwritten and the
        entry bypasses the duplicate detection
      • issue #52: --check-strict combined with --list-filter other than all exits with 2 silently, after
        the whole verification has been done
      • issue #53: -c: every error on an entry of the check file is reported as MISSING, even if the file
        exists; such a file gets the new status ERROR now, see also --list-filter error
      • issue #54: -c: the status output does not escape file names, so a file name with a newline breaks
        the output
      • issue #55: The default parser accepts almost any line, so --check-strict never detects an improperly
        formatted line
      • issue #56: -c reports FAILED for sum_bsd, sum_sysv, and sum_minix, because their block count is
        compared against the file size
      • issue #57: -c on a coreutils check file without --style gnu-linux reports every entry as MISSING
        without any hint
      • option --list-filter default is documented, but it is rejected as an invalid parameter
      • the options --wanted-list and -e are silently ignored if -c resp. --check-line is specified as well,
        because both jobs cannot be performed by one run; the combination is rejected with a parameter
        error now
      • records with the same comments in wanted list files are no longer ignored. While ignoring duplicate
        file names in check files makes sense for the option --check-file, that setting is suboptimal if the
        option --wanted-list is used, because file names are treated as comments in wanted lists.
      • hash values were compared case sensitively by the options -c, -w, and by -e in combination with
        files, although the documentation of -e promises a tolerant comparison for all encodings but Base64,
        and although the options -q and --string-list have always been tolerant. As a consequence a check
        file in SFV format that stores its CRCs in lower case was reported as FAILED although all hash values
        matched (the SFV parser accepts both cases on purpose), and a wanted list (-w) that stores its hash
        values in upper case, as many hash lists do, did not match a single file.
      • the options -g and -G (grouped hash values) could be combined with -c and -w, but grouped hash values
        cannot be parsed: the first group was taken as the whole hash value and the remaining groups became
        part of the file name, so all files were reported as MISSING rather than OK or FAILED. Both
        combinations are rejected with a parameter error now.
      • the default output format appended the separator (by default a blank) even if there was no
        file name at all, so a line ended with a trailing blank if a sequence was hashed by the
        option -q, e.g. "jacksum -q txt:abc -a sha1"; the same happened for an empty line while the
        option --string-list was being used; if the file name is empty, neither the file name nor the
        separator in front of it is written now
    • styles (options -C/--compat/--style)
      • the styles bsd, openssl-dgst, and solaris-digest-v printed algorithm names that no tool of
        the respective platform uses, because the canonical names of the SHA-1/SHA-2 family in Jacksum
        contain a hyphen: "SHA-256 (file) = ..." instead of "SHA256 (file) = ..." for example, so the
        output of Jacksum was rejected by the tools that it claims to be compatible with, e.g.
        "shasum -a 256 --check" answered "no properly formatted SHA checksum lines found". The output of
        the style bsd is now identical to the output of md5, shasum --tag, and sha256sum --tag, and
        the output of the style solaris-digest-v follows the algorithm names of "digest -v" on Solaris.
        Reading files that have been created by those tools was not affected.
      • the style openssl-dgst now follows the algorithm names of OpenSSL 3.x and later, so its output is
        identical to the output of "openssl dgst" again, both for hash functions and for HMACs.
        OpenSSL 3.0 has renamed many digests, e.g. SHA256 became SHA2-256, BLAKE2b512 became
        BLAKE2B-512, and RIPEMD160 became RIPEMD-160; OpenSSL 4.0 kept those names. Two mappings for
        HMACs (hmac:sha512-224 and hmac:sha512-256) were never in effect, because they did not use
        the canonical algorithm names of Jacksum.
      • a compatibility file (option -C) with a group position that is not covered by its regular
        expression (e.g. parser.regexp.filenamePos=9 while the regular expression has two groups only)
        terminated Jacksum with an uncaught java.lang.IndexOutOfBoundsException and a stack trace
        while a file was being parsed; such a file is now rejected with an error message that names the
        property. A position that is not an integer is reported with a proper error message as well.
    • escape sequences
      • issue #46: fixed four bugs in the interpretation of escape sequences, they affected the
        options -q txtf:, -k txtf:, -s, -c, and --file-list; the interpretation happens in one single
        pass now, and it is no longer implemented multiple times
    • encodings (option -E) and encoded output (option -F)
      • the option -F could not be used at all with the algorithms sum_bsd and crc16_minix, because their
        default encoding is an internal one that is not user selectable, and the formatter tried to resolve
        it by its name; "jacksum -a sum_bsd -F "#HASH" " for example exited with
        "Encoding "dec_fixed_size_with_leading_zeros" is unknown."
      • the token #SEQUENCE is encoded with the default encoding of the algorithm if -E has not been set;
        for sum_bsd and crc16_minix that encoding is a fixed-size decimal encoding of two bytes, which
        cannot represent a sequence of an arbitrary length; the decimal encoding is used for such data now
      • a #SEQUENCE token in a format string could exit Jacksum with a NullPointerException if there was no
        sequence at all (option -q not set) and an encoding other than hex was selected, e.g.
        "jacksum -a sha256 -E base32 -F "#SEQUENCE" "
      • the option -E was locale dependent: in a Turkish locale "-E BIN" was rejected with
        "Encoding "BIN" is unknown.", because the encoding name was lowercased with the default locale
        rather than with a fixed one; the same applied to the type of the option -q, e.g. "-q BIN:1010"
      • Encoding.toString() returned names that the option -E does not accept, e.g. "hex_uppercase" or
        "zbase32"; every encoding has got a canonical code now (public API: Encoding.getCode()), which is
        also what Encoding.toString() and Encoding.encoding2String() return; the latter no longer depends
        on the iteration order of a hash map, so an encoding with more than one name (e.g. hex and
        hex-lowercase) always maps back to its canonical code
      • a z-base-32 encoded string with invalid characters was decoded to arbitrary bytes rather than being
        rejected, because the sentinel of the decoding table was compared as a signed value
        (net.loefflmann.sugar.encodings.ZBase32, public API)
      • a Z85 encoded string could contain a group of five characters that does not encode four bytes
        (its value exceeds 2^32-1, e.g. "#####"); such a group was decoded to wrong bytes rather than being
        rejected, e.g. "jacksum -a none -q z85:'#####' -F "#SEQUENCE{hex}""
      • decoding an empty Z85 string reported a character that is not part of the alphabet of Z85, although
        there was no character at all; an empty string decodes to an empty byte array now
      • the encodings bin, dec, and oct returned "0" rather than an empty string for an empty byte array,
        unlike all other encodings (public API)
    • base32 and base32hex decoding (options -q and -k)
      • issue #47: an unpadded base32 or base32hex encoded string was only accepted if its length
        happened to be a multiple of 5, because the decoder decided between padded and unpadded input
        by testing the length against 5 instead of the Base32 group size of 8; as a consequence
        Jacksum could not read back its own base32-nopadding output, e.g. "-q base32:YDPMV7Q" was
        rejected while "-q base32:YDPMV7Q=" worked
      • an invalid base32 or base32hex string could terminate Jacksum with an uncaught
        java.lang.ArrayIndexOutOfBoundsException instead of an error message, e.g.
        "-q base32:========"; such strings are reported as invalid now
    • timestamps
      • the token #TIMESTAMP was not replaced at all if the data did not come from a file: the literal
        string "#TIMESTAMP" occurred in the output for standard input, e.g. with the styles full,
        without-hashes, without-sizes, and timestamps-and-names, and the resulting line could even start
        with the comment character, which means that such a line was silently ignored while it was being
        read back. For a sequence (-q) the token was replaced by the epoch (1970-01-01). The token is now
        replaced by an empty string if no timestamp is available.
      • the default output format printed the epoch (1970-01-01) as the timestamp if -t was set and the
        data did not come from a file, e.g. "jacksum -a sha1 -t default -q txt:abc" or
        "jacksum -a sha1 -t default --string-list "; no timestamp (and no separator for it) is
        written now if no timestamp is available, which is the behavior of the token #TIMESTAMP as well
      • the warning "A sequence (-q) has been specified, timestamp (-t) will be ignored." did not tell
        the truth, because the timestamp format was kept and the epoch was printed; the timestamp format
        is actually being discarded now, as it has always been the case for standard input
      • both warnings about an ignored option -t (the one for a sequence and the one for standard input)
        were also printed if -t had not been set at all, but the timestamp format came from a style
        (-C/--style), e.g. "jacksum -q txt:abc -a sha1 --style full"; Jacksum keeps track of whether the
        timestamp format has been set by the user now, so such a warning is only printed if the user
        has actually specified -t
      • a timestamp format (-t) that contains a space produced lines that could not be parsed, because the
        timestamp cannot be told apart from the fields that follow it; all files were reported as MISSING.
        Such a format is now rejected with a parameter error if it is combined with -c resp. -w. None of
        the predefined formats is affected.
    • algorithms
      • sum64 was truncated to 32 bits and behaved like sum32, because getValue() reduced the accumulator
        modulo 2^32 twice ((value mod 2^32) mod 2^32) instead of keeping the full 64-bit value; the upper
        32 bits of the result were always zero. sum64 now returns the correct 64-bit sum (the Java long
        already wraps modulo 2^64); see also the compatibility changes above for the input sizes
        that are affected by the changed values.
      • keccak-384 was not recognized as an alias
      • a few CRC algorithms (e.g. fcs16, fcs32, crc32c, crc32_mpeg2, crc64) do not print the Jacksum CRC
        definition code if --info has been requested
      • issue #45: the expected eDonkey test vector hash in the code comments was wrong
      • fletcher16 restarted its two running sums on every call of update() instead of continuing them, so
        any input that does not arrive in one single block was calculated wrongly. Files are read in blocks
        of 64 KiB, so every file larger than that got a wrong value, and so did all input from standard
        input. A sequence (-q) and files up to 64 KiB were not affected. See also the compatibility
        changes above.
      • the algorithms below did not restore their full initial state in reset(). Jacksum resets an
        algorithm before it reads a file, so the effects were visible on the command line as well, and
        programs that use Jacksum as a library and reuse an instance were affected in any case.
        • prng did not restore the initial value of the algorithm, it set the value to 0 instead. All
          customized definitions (prng:init=...) whose initial value is not 0 are affected as well.
          See also the compatibility changes above.
        • cksum_minix did not reset the counter that substitutes an intermediate value of zero, so a
          second calculation with the same instance could return a wrong hash value
        • sum_bsd, sum_minix, and xxhash32 did not reset the number of bytes that have been processed,
          so the file size that is part of their output (#FILESIZE) kept growing from one calculation
          to the next
      • the algorithms below did not handle an update() that does not start at offset 0, or that only
        partially fills their internal block buffer. Jacksum reads files in blocks of 64 KiB, which is a
        multiple of every block size in question, so hashing a file was never affected; input from
        standard input, where a read may return fewer bytes than requested, and programs that use Jacksum
        as a library were affected.
        • tree:tiger and tree:tiger2 (TigerTree) did not hash the bytes that complete a partially filled
          1024 byte block: those bytes were copied into the buffer, but the buffer was then hashed up to
          its old fill mark only, so the hash value was silently wrong. An update() that supplied fewer
          bytes than the block still needed read beyond the end of the input array and terminated with a
          java.lang.ArrayIndexOutOfBoundsException.
        • blake2bp determined the free space of its input buffer against 1024 bytes, although the buffer
          is 512 bytes long (PARALLELISM_DEGREE * BLAKE2B_BLOCKBYTES), so an update() that completed a
          partially filled buffer terminated with a java.lang.ArrayIndexOutOfBoundsException. blake2sp
          was not affected, because for its parameters both terms happen to be equal.
        • the LSH family (lsh-256-[224,256] and lsh-512-[224,256,384,512]) determined the free space of
          its block buffer from the length of the incoming data rather than from the fill mark of the
          buffer, so the value went negative as soon as more than one block arrived at once and the
          buffer was already partially filled; such an update() terminated with a
          java.lang.ArrayIndexOutOfBoundsException
        • blake3 passed the length of the data where java.util.Arrays.copyOfRange() expects an end index,
          so an update() with an offset other than 0 hashed the wrong bytes or terminated with a
          java.lang.IllegalArgumentException
        • crc82_darc ignored the offset that was passed to update() and always started at the beginning
          of the array
      • the option -A (alternative implementation) aborted with the parameter error "There is no
        alternate implementation available." and exit code 2 for the FNV algorithms with a width of
        128, 256, 512, and 1024 bits (fnv-0_, fnv-1_, and fnv-1a_*, 12 algorithms), because their
        selectors signalled a missing alternative by throwing an exception rather than by returning
        null. For every other algorithm without an alternative implementation -A is ignored, as it is
        documented, and the standard implementation is used; that is what happens for those 12
        algorithms now as well.
    • HMAC
      • improved the HMAC constraint: if blocksize < digestsize an HMAC cannot be calculated; that is the
        case for all ascon algorithms, for example
      • a truncated HMAC (hmac::) did not zero the surplus bits if is not a multiple of 8,
        although the documentation says so, because the number of surplus bits was never calculated and the
        masking code was therefore unreachable; "hmac:sha256:155" for example returned the same value as
        "hmac:sha256:160", see also the compatibility changes above
      • an HMAC without a key is rejected now: "-a hmac:" without the option -k exits with an error message
        that asks for the option -k, rather than with an unspecific error
      • the prompt is "Password: " twice if both options -k password and -q password have been specified
        (e.g. "jacksum -q password -a hmac:sha256 -k password"), the prompt for the key is now
        "Key (echo off): " to distinguish the input
      • HMAC does not implement the reset() method correctly, which means that the same hash of the first
        calculation is always returned
  • Improved performance

    • the output of --header is buffered and printed at once rather than line by line
    • significant performance improvement for all FNV-0/FNV-1/FNV-1a with a width of 128, 256, 512, and 1024
      bits by replacing the BigInteger arithmetic with fixed-width arithmetic on a long array
      (approx. 5x faster for 1024 bits)
    • performance improvement for aststrsum (aka ast, strsum) by hoisting the hash state and parameters into
      local variables and switching the inner update loop to 32-bit int arithmetic, which removes the per-byte
      64-bit mask from the critical path (approx. 20% faster); the computed hash values are unchanged
  • Updated documentation

    • issue #16: provided a German help file
    • added German translations of the documentation under docs/: ALGORITHMS_de.md,
      EXAMPLES_de.md, FEATURES_de.md, and JACKSUM_HACKS.md. They keep the structure and the anchors of
      their English counterparts (ALGORITHMS.md, EXAMPLES.md, FEATURES.md, JACKSUM_HACKS), so
      both language versions can be maintained in parallel; all commands and program output in
      the examples are unchanged.
    • reworked README.md: corrected all outdated facts, moved the detailed examples,
      the algorithm list, the feature list, and Jacksum Hacks to docs/.
    • added docs/ALGORITHM_SELECTION_GUIDE.md and its German translation
      docs/ALGORITHM_SELECTION_GUIDE_de.md, a guide that answers which algorithm to pick for a given
      purpose, e.g. in order to hash thousands of files for a later trustworthy integrity verification.
      It explains the concepts (hash function, hash value, CRC, avalanche effect, collision and preimage
      resistance, Merkle-Damgard vs. sponge, length extension), how to decide between a CRC, a classic
      checksum and a cryptographic hash function, when an algorithm counts as broken and why even a
      broken one can still be used as an HMAC, how much public cryptanalysis a design has received,
      when concatenating algorithms (-a +) is worthwhile, which algorithms should no
      longer be used at all, and why the choice can be limited by the tools of the operating system on
      which the check list has to be verified later. Every statement is backed by Jacksum itself, so
      the guide doubles as a tour of "-a --info --verbose details", "-h ", "-a all -l",
      and "--hmacs".
    • issue #41: the option -p is no longer supported, but the documentation still referenced it
    • corrected two alphabets in the description of the option -E in the manpage:
      • the table of the BubbleBabble alphabet was a leftover of the Base64 table; it now documents the six
        vowels, the 16 consonants, the delimiter x, and the separator that BubbleBabble actually uses
      • the last row of the z-base-32 alphabet said "30 - 31: 6 7" (a copy of the row of Base32), while
        z-base-32 uses "6 9" for the values 30 and 31
    • documented for the options -c, -e, -g, -G, and -w that hash values are compared without respecting
      upper and lower case unless the alphabet of the encoding is case sensitive, and that grouped hash
      values (-g, -G) cannot be verified
    • documented for the option -I and for the styles files-only and sfv that a file whose name starts
      with the comment string cannot be verified later, because its line is treated as a comment while
      the list is being read back
    • documented for the option -t that a timestamp is only available if the data comes from a file, and
      that a format containing a space cannot be combined with -c resp. -w; corrected the examples of the
      styles openssl-dgst and solaris-digest-v, which showed algorithm names that Jacksum no longer
      prints, and documented that the style openssl-dgst follows the algorithm names of OpenSSL 3.x and
      later
    • added info about the usage of the internal state value for verification of test vectors submitted for
      the NIST competition in the manpage for skein-256.
    • corrected the list of algorithms that have an alternative implementation in the description of the
      option -A: it named 13 algorithms, while Jacksum actually provides an alternative implementation
      for 28 of them; crc16, crc32_fddi, crc32c, fnv-0_32, fnv-0_64, fnv-1_32, fnv-1_64, fnv-1a_32,
      fnv-1a_64, fugue224, fugue256, fugue384, fugue512, sha-512/224, and sha-512/256 were missing.
      It is documented now as well that -A is ignored for an algorithm that has no alternative
      implementation.
    • added the "Go API" and Homebrew to the compatibility lists
    • reworked the "broken" field of all cryptographic algorithms in the manpage. Instead
      of a bare "yes" or "no" each entry now states which security property is affected (collision, preimage,
      second-preimage resistance, or the use in a MAC), whether an attack is theoretical or practical, the
      year, and a reference. Sponge constructions and truncated variants now also document whether they are
      susceptible to length-extension attacks.
    • reviewed the "published" field and the "comment" text of all algorithms in the ALGORITHMS
      section of the manpage against primary sources and fixed mistakes.

Hash Values

File info:
    name:                      jacksum-4.0.0.jar
    size:                      1637283 bytes

256 bit message digests (hex):
    SHA3-256 (USA):            4726a29a365621906d3d8893b70f71637f42e82fb53043fc8ca6830537bf2177
    SHA-256 (USA):             e0342988412828172186edd4257691ded8f71af2a82d9d800d88c699e06eed76
    SHA-512/256 (USA):         3e17314ece390e30091921697d5ad94b595c919bf2a02c0013614db7c085b412
    SHAKE128 (USA):            3c4b719ea4beded0b225fd2bc38852dec074a3a6e94b6e0a499bb29780cee966
    BLAKE3:                    a8d68a75ff127cd2e8f1a55c0d9b1b8a0fb386cdca92213bb4586b932e1cb6bf
    KangarooTwelve:            e6cfa15d62583c45a9945f98be857a1742b6ec86a587abb5ec3d892eb84dd5c1
    KECCAK256:                 54b18ba3574ddaf13c3e6f2c99033da90f1ab44646f5a519c0d6ca109d8a4fa2
    Kupyna-256 (Ukraine):      32eefffd4976420ae6119e0f3719f4d939daf8d08f1cc4bdc6472fe1cdfe7a50
    LSH-256-256 (South Korea): 4f70f78ffefe616713f176ed37df7db5886285638a2620b0b2ef9826e0d541c7
    SM3 (China):               db115da9ede27fb7068f50b351ddb5b58cb03038f298b54e18ca4d4956df38b5
    STREEBOG 256 (Russia):     032ffc8254dc95f70bad3320ce3cefac8d632a3a188d69011a37923d987ac760

512 bit message digests (base64, no padding):
    SHA3-512 (USA):            OzNvc6/hp7ZPK+O64Ae94mS06yCWP09zLrMDC2XhjGqN2R3/hVCK+tAOpAKnqx6wSTJu0SXgAZIh1qAhwINyRg
    SHA-512 (USA):             EOD4jUJt70KSXmRtRN1PI8WQasrwNolxeEn6TbjJG16zcFBxOgNEncKbXuvVGHibaibE7Wqqvx0Va1SVRMwjcw
    SHAKE256 (USA):            iCgBQ8vJ31hfSiDPNWpdxQa2UChXRu4Fm5n99B4UqS3Tmc3cX9r/GAv4upEkZhf0pbWcFSxgkySa2fu7d2nWXg
    BLAKE2b-512:               PEA8jOSvcV6RPC3tTuJO7cOweygaXmeeJCTckp+fGdIlp3RyPlET/d8GVU9HCMHoSEuExz4rnZuqVXnBczES4A
    KECCAK512:                 IcefZjLpL6wmJHu1yXs1rtFFgl1Dm/NQtP3dEm1YiJA3SAVHucZ2hs59vxlsWlI5GSQ5dj/wmPq2CM411bsyyA
    KUPYNA-512 (Ukraine):      AvwuDYVXzFPgCKwIedmDoH8YcKADLQKqeeAHmrdT3NGx7srskSFe1gWGqIQfzKCz1zo3J1mIXgRBJlaTD49ZVA
    LSH-512-512 (South Korea): 6tlj8WI6SONItDAZkoy0a93/pqlvr/N89tbUpHnJEDhROIBJJ6+4iOslD14Vpb6Y3uZzz3GjCy41oeADz7b1ZQ
    MarsupilamiFourteen:       xWKCKmG+RwnMu48fcyTZitN78AODR1SQriiuPaE4ngYFQeDsSN+vLqmVn+R3poauG8OyQ1hu5lXRi7cvf7fhhQ
    SKEIN-512-512:             MtAvR5v0V/C15IUiWTzsq0gsu61/2Spg8cumXzqV35FeYLCn39doCFr51T7u3MFJheFo5RUgyDhEuO0m97ztIg
    WHIRLPOOL:                 hKruaX/MfVW+iLXvXN7w7eWKilBnoR9HeUeu8rKEBI1PdoeVUEK4TlIpXPcWui98rESjiD4SxsZaEnO1V09pxg

Legacy message digests (hex, avoid if possible):
    MD5 (128 bit):             bfbd37b7b7062b4928b1017672b94042
    RIPEMD-160 (160 bit):      4cc189c19b1dd9733aad6d29e06404ab7c9833d4
    SHA1 (160 bit):            12ffe82fc770bd1464f7e59172c8c64ccf7152ad