b2sum
Calculate or verify BLAKE2 checksums
TLDR
Calculate the BLAKE2 checksum for one or more files
Calculate and save the list of BLAKE2 checksums to a file
Calculate a BLAKE2 checksum from stdin
Read a file of BLAKE2 checksums and filenames and verify all files have matching checksums
Only show a message for missing files or when verification fails
Only show a message when verification fails, ignoring missing files
Check a known BLAKE2 checksum of a file
SYNOPSIS
b2sum [OPTION]... [FILE]...
PARAMETERS
-a, --algorithm=TYPE
select algorithm (blake2b or blake2s)
-b, --binary
use binary output format
-c, --check
read checksums from FILEs and verify them
--debug
output debug information
-l, --length=BYTES
digest length in bytes (blake2b:1-64, blake2s:1-32; default 64)
--tag
use BSD-style checksum format
-w, --warn
warn about unrecognized lines in check files
-z, --zero
end lines with NUL, disable filename escaping
--help
display help and exit
--version
output version information and exit
DESCRIPTION
b2sum is a command-line tool from GNU coreutils for calculating and verifying BLAKE2 checksums. BLAKE2 is a fast, secure cryptographic hash function family, with b2sum primarily handling BLAKE2b (512-bit digest, default 64 bytes) and optionally BLAKE2s (256-bit). It mirrors tools like sha256sum or md5sum, producing checksums for files or stdin. Default output is hexadecimal checksum, two spaces, filename (e.g., ba6a6e762a7eb73a...
file.txt). Supports verification via --check, reading checksum files and reporting matches/mismatches. Key features include adjustable digest lengths, binary output, NUL termination for scripting, and BSD-style tags. BLAKE2 offers high security against collisions/preimages, high speed on modern CPUs, and no known weaknesses, making it ideal for file integrity, digital signatures, and key derivation. Introduced for replacing slower SHA variants in many uses.
CAVEATS
Digest length truncates full hash; verify with exact length used. Blake2s limited to 32 bytes max.
DEFAULT CHECKSUM LINE
<hexdigest> <filename>
(two spaces separate)
VERIFICATION EXIT CODES
0: OK
1: errors, readahead issues
2: general error
HISTORY
Added to GNU coreutils in version 8.26 (January 2017) by Padraig Brady.


