On 09/01/2026 15:58, Simon Josefsson wrote:
Pádraig Brady <[email protected]> writes:

  'cksum --check' now supports base64 encoded input in untagged format:    - 
for all length adjustable algorithms (blake2b, sha2, sha3),
     - if that base64 input starts with a tag like "SHA1" etc.
   Previously an error was given, about invalid input format.
   [bug introduced in coreutils-9.2]

Oh!  So we now have three valid formats?  How would I generate this new
format?  I tried:

jas@frallan:~/src/release$ ~/src/coreutils-9.9/src/cksum -a sha3 --length 256 
--base64 --untagged gnulib-20260109.bundle
6kYv60oHv7kXpkJM2vUlADWNmh62nus1xA80bJJiJEs=  gnulib-20260109.bundle

With the above untagged format, since coreutils 9.9 you can check it with:
cksum -a sha3 --check

jas@frallan:~/src/release$

I tried to --check various inputs looking like this:

SHA256:6kYv60oHv7kXpkJM2vUlADWNmh62nus1xA80bJJiJEs=  gnulib-20260109.bundle
SHA256: 6kYv60oHv7kXpkJM2vUlADWNmh62nus1xA80bJJiJEs=  gnulib-20260109.bundle

but wasn't able to get anything to work.

cksum (or any ...sum) never supported leading tags like that.

The tagged format is:

SHA3-256 (gnulib-20260109.bundle) = 6kYv60oHv7kXpkJM2vUlADWNmh62nus1xA80bJJiJEs=

which can be checked with just `cksum --check`.
Also note with the above tagged format, you can have different digest types in 
the same file

cheers,
Padraig

Reply via email to