Skip to content

cksum: Accept SHAKE algorithms#10772

Merged
RenjiSann merged 4 commits into
uutils:mainfrom
RenjiSann:cksum-shake-fix
Feb 8, 2026
Merged

cksum: Accept SHAKE algorithms#10772
RenjiSann merged 4 commits into
uutils:mainfrom
RenjiSann:cksum-shake-fix

Conversation

@RenjiSann

Copy link
Copy Markdown
Collaborator

@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@RenjiSann
RenjiSann force-pushed the cksum-shake-fix branch 2 times, most recently from ac03a07 to 8e60327 Compare February 6, 2026 17:26
@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tail/tail-n0f. tests/tail/tail-n0f is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@oech3

oech3 commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

On Arch Linux, shake128sum -N non_negative_integer /dev/null is possible:

       -N, -O output-size
              Change the output size.

@RenjiSann

Copy link
Copy Markdown
Collaborator Author

On Arch Linux, shake128sum -N non_negative_integer /dev/null is possible:

       -N, -O output-size
              Change the output size.

Since we are embedding this in cksum, I'd rather keep -l to not pollute the --help and argument processing with algorithm-specific flags.

@RenjiSann
RenjiSann force-pushed the cksum-shake-fix branch 2 times, most recently from e6ace7d to 36a9386 Compare February 7, 2026 01:36
@RenjiSann
RenjiSann marked this pull request as ready for review February 7, 2026 01:36
@RenjiSann

Copy link
Copy Markdown
Collaborator Author

I have an issue with what behavior should we prefer for --length sanitization. Since we're expecting a bit length we're always full bytes, any value not a multiple of 8 doesn't make sense. So either:
a) Like BLAKE2b, we make values that are not a multiple of 8 an invalid argument;
b) Or, like this website, we round this value to the biggest smaller multiple of 8.

For the sake of consistency within our tool, I'm more inclined to do a).

WDYT @oech3

@oech3

oech3 commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Hmm...

$ shake128sum -N 1 /dev/null
01  /dev/null
$ shake128sum -N 2 /dev/null
03  /dev/null
$ shake128sum -N 3 /dev/null
07  /dev/null
$ shake128sum -N 4 /dev/null
0f  /dev/null
$ shake128sum -N 5 /dev/null
1f  /dev/null
$ shake128sum -N 6 /dev/null
3f  /dev/null
$ shake128sum -N 7 /dev/null
7f  /dev/null
$ shake128sum -N 8 /dev/null
7f  /dev/null

$ shake128sum /dev/null
7f9c2ba4e88f827d616045507605853e  /dev/null
$ shake128sum -N 128 /dev/null
7f9c2ba4e88f827d616045507605853e  /dev/null

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/misc/usage_vs_getopt (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/follow-name (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@RenjiSann

Copy link
Copy Markdown
Collaborator Author

I see, that's not what our hashsum implementation used to do, but it's quite easy to implement

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tail/symlink. tests/tail/symlink is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/follow-name (fails in this run but passes in the 'main' branch)

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/pr/bounded-memory is no longer failing!

@RenjiSann
RenjiSann merged commit 4853729 into uutils:main Feb 8, 2026
155 checks passed
@RenjiSann
RenjiSann deleted the cksum-shake-fix branch February 8, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants