Bkshuf
From Reboil
bkshuf is a variant of shuf that clumps output so each line's neighbors in the input line list tend to remain neighbors in the output line list.
Stats
- Project No.: BK-2020-03
Version history
- v0.1.2: 2023-03-04: GitLab
Objective
The author desires to create a shuf-like utility named bkshuf to mix line lists in order to produce output line lists with the following somewhat conflicting properties:
- Pre-image resistance (PIR)
- An output line's position should not contain information about its input line position.
- Relative order preservation (ROP)
- Two neighboring lines in the input stream should have a high probability of remaining neighbors in the output stream.
The objective is to improve the value of a short random scan of a small fraction of a potentially large input list; output that demonstrates ROP as well as some degree of PIR may achieve this objective. In contrast, the shuf
utility provides PIR but no ROP: a line's neighbor in the output of shuf
is equally likely to be any other random line from the input.
History
See also
- Wikipedia:shuf
- BK-2020-03: personal executables