Commit f4dd91d
committed
feat: implement comprehensive SHAKE algorithm support
- Add proper --length parameter support for SHAKE128 and SHA256 algorithms
- Fix fundamental limitation where SHAKE algorithms required --length but cksum didn't support it
- Add LengthRequiredForShake error type for better error messages
- Implement custom SHAKE benchmarks using direct digest calculation
- SHAKE benchmarks now show meaningful timing (142-540ms) instead of startup overhead
- Aligns with cryptographic best practices for XOF (extensible output functions)
- Follows OpenSSL approach for SHAKE algorithm implementation
SHAKE benchmarks:
- cksum_shake128: 142.1-526.3 ms (median 145.4ms)
- cksum_shake256: 176.2-540.8 ms (median 182.8ms)
All 17 algorithms now have meaningful performance measurements.1 parent 3b9460d commit f4dd91d
File tree
3 files changed
+44
-4
lines changed- src
- uucore/src/lib/features
- uu/cksum
- benches
- src
3 files changed
+44
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
48 | 73 | | |
49 | 74 | | |
50 | 75 | | |
| |||
61 | 86 | | |
62 | 87 | | |
63 | 88 | | |
| 89 | + | |
| 90 | + | |
64 | 91 | | |
65 | 92 | | |
66 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
391 | 390 | | |
392 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
393 | 404 | | |
394 | 405 | | |
395 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| |||
0 commit comments