[Feature complete] SHA-3 and Keccak checksum utility
  • C 52%
  • Shell 31.2%
  • Makefile 10.2%
  • Roff 6.6%
Find a file
Mattias Andrée 805f272617
Fix warnings
Signed-off-by: Mattias Andrée <m@maandree.se>
2026-02-23 12:00:52 +01:00
.gitignore Add multicall binary option 2020-10-21 17:22:38 +02:00
algorithm-map Make makefile portable 2023-07-02 22:09:07 +02:00
arg.h Fix arg.h 2017-10-19 15:39:15 +02:00
common.c Style fix 2022-03-25 17:07:44 +01:00
common.h Add sha3sum for compatibility with busybox (-w and -s are however not support) 2020-10-21 16:22:41 +02:00
config.mk Remove -Wall -O3 from CFLAGS 2023-07-05 17:53:55 +02:00
keccaksum.c Generate all C files except common.c and keccaksum.c 2017-10-14 13:33:07 +02:00
LICENSE Update e-mail 2024-10-06 10:02:10 +02:00
Makefile Fix latest commit and prove portability further by replaceing \s with [[:space:]] 2023-12-07 21:58:14 +01:00
README Fix documentation text 2026-02-22 14:01:28 +01:00
sha3sum-mcb.c Add multicall binary option 2020-10-21 17:22:38 +02:00
sha3sum.c Fix warnings 2026-02-23 12:00:52 +01:00
test Add shake128sum and rawshake128sum 2022-02-26 23:21:04 +01:00
unportable.mk Make makefile portable 2023-07-02 22:09:07 +02:00
xsum.man Fix documentation text 2026-02-22 14:01:28 +01:00

NAME
	sha3sum - Keccak, SHA-3, SHAKE, and RawSHAKE checksum utilities

SYNOPSIS
	keccaksum      [option ...] [file ...]
	keccak-224sum  [option ...] [file ...]
	keccak-256sum  [option ...] [file ...]
	keccak-384sum  [option ...] [file ...]
	keccak-512sum  [option ...] [file ...]
	sha3-224sum    [option ...] [file ...]
	sha3-256sum    [option ...] [file ...]
	sha3-384sum    [option ...] [file ...]
	sha3-512sum    [option ...] [file ...]
	shake128sum    [option ...] [file ...]
	shake256sum    [option ...] [file ...]
	shake512sum    [option ...] [file ...]
	rawshake128sum [option ...] [file ...]
	rawshake256sum [option ...] [file ...]
	rawshake512sum [option ...] [file ...]

DESCRIPTION
	Fully configurable byte-orientated checksum utilities
	for Keccak and its close derivatives SHA-3, SHAKE and
	RawSHAKE.

	These utilities can generate checksums or verify the
	checksums of files.

OPTIONS

	-u
		Use upper-case output.

	-l
		Use lower-case output.

	-b
		Use binary output.

	-c
		Check checksums.

	-x
		Use hexadecimal input.

	-v
		Be verbose.

	-R rate
		Select rate.

	-C capacity
		Select capacity.

	-N, -O output-size
		Select output size.

	-S, -B state-size
		Select state size.

	-W word-size
		Select word size.

	-Z squeeze-count
		Select squeeze count.

RATIONALE
	We probably do not need this, but it is nice to have
	in case SHA-2 gets compromised.

SEE ALSO
	libkeccak(7), sum(1), cksum(1), md5sum(1), md6sum(1),
	sha1sum(1), sha224sum(1), sha256sum(1), sha384sum(1),
	sha512sum(1)

PERFORMANCE
	Performance comparison on a 1 GiB file (yes, that is
	quite large) with /dev/urandom data:

	$ keccak-224sum		│	$ keccak-256sum
	real	0m9.550s	│	real	0m9.841s
	user	0m9.223s	│	user	0m9.560s
	sys	0m0.320s	│	sys	0m0.260s
				│
	$ keccak-384sum		│	$ keccak-512sum
	real	0m12.902s	│	real	0m18.084s
	user	0m12.580s	│	user	0m17.823s
	sys	0m0.313s	│	sys	0m0.243s
				│
	$ keccaksum		│	$ sha1sum
	real	0m10.438s	│	real	0m3.421s
	user	0m10.140s	│	user	0m3.157s
	sys	0m0.287s	│	sys	0m0.253s
				│
	$ sha224sum		│	$ sha256sum
	real	0m8.196s	│	real	0m9.361s
	user	0m7.910s	│	user	0m9.097s
	sys	0m0.263s	│	sys	0m0.257s
				│
	$ sha384sum		│	$ sha512sum
	real	0m5.450s	│	real	0m4.507s
	user	0m5.223s	│	user	0m4.247s
	sys	0m0.220s	│	sys	0m0.257s
				│
	$ md5sum		│	$ md6sum
	real	0m2.987s	│	real	1m28.873s
	user	0m2.703s	│	user	1m28.470s
	sys	0m0.283s	│	sys	0m0.360s

	Note: The times are a bit random, and only one run
	has been made. "user" is the most interesting data.
	Additionally, only the pure keccak variants have been
	tested because the difference is between them and the
	other are quite small; and of course the other hashing
	utilities from other packages using other
	algorithm-families.

NOTES
	Packagers are advised to separate sha3sum(1) into its
	own packages, apart from the other commands, as it is
	mearly provided for compatibility and it could cause
	package conflict with other implementations that only
	provide sha3sum(1) such as busybox.