Bruno Haible via Gnulib discussion list <[email protected]> writes: > Simon Josefsson wrote: >> Having to specify the hash algorithm is tedious for users... maybe we >> should use the following style instead, and merely suggest '--check': > > I disagree: > 1) What is tedious for users is to understand that they are supposed to > copy-and-paste a line from the documentation into an 'echo' statement. > Compared to that, pasting one or two more options is trivial. > 2) You are suggesting to change the documentation to match a tool. It > would be better to change the tool to match the style used in the > documentation.
Yes, but the current line does not have any information about the hash algorithm: +6kYv60oHv7kXpkJM2vUlADWNmh62nus1xA80bJJiJEs= gnulib-20260109.bundle vs SHA3-256 (gnulib-20260109.bundle) = 6kYv60oHv7kXpkJM2vUlADWNmh62nus1xA80bJJiJEs= so there is no reliable way to change the tool to guess the first format is for SHA3-256. Running all hash algorithms in parallel and accept one that matches would be insecure. I've never been a fan of the second format above, but I think this argument is compelling to me. Formats to convey hash values should include the hash algorithm identifier, otherwise people could be tricked into using the wrong algorithm. I don't see any immediate problem with our release announcements, because the hash algorithm is clear from context in them, but this is also about establishing a good pattern. To avoid '-a FOO' the input format need to mention which hash algorithm to use, and we have that in the default behaviour of cksum with the tagged format. I don't think having the user supply the algorithm will bring any additional security information, but just make things harder. /Simon
signature.asc
Description: PGP signature
