TTHSUM(1)
πΈ TTHSUM(1) β the user commands girlies π
okay so bestie, welcome to tthsum, section 1 of the manual (User Commands, we're in the big leagues β¨). she generates or checks TTH message digests and honestly? she's iconic for it.
β¨ NAME β¨
tthsum β generates or checks TTH message digests. that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
tthsum [-bhmpvVw] [-c [file]] | [file...]
π DESCRIPTION π
so tthsum generates or checks TTH checksums β and those are the roots of the Tiger/THEX hash tree, no cap. π³
the Merkle Hash Tree, invented by Ralph Merkle, is a hash construct that's giving desirable properties for verifying the integrity of files and file subranges in an incremental or out-of-order fashion. main character behavior fr fr. and tthsum uses the Tiger hash algorithm, by Ross Anderson and Eli Biham, for both the internal and the leaf nodes. obsessed with the consistency π
the spec of the THEX algorithm lives at:
the spec of the Tiger hash algorithm lives at:
normally, tthsum generates checksums of all the files you hand her as parameters and prints the checksums followed by the filenames. but if you specify -c, only one filename parameter is allowed, periodt. that file should contain checksums and filenames that those checksums refer to, and the files listed in that file get checked against the checksums listed there. see the -c option for more info, iykyk. π
if you specify no file at all, the data will be read from standard input. she'll just wait there for you like a loyal bestie π
π OPTIONS π
-bβ anmd5sumcompatibility option. it does absolutely nothing. like, literally nothing, zero, nada π (md5sumuses-bto treat binary files differently from text files. that's a them thing, not a us thing.)-cβ check the tthsum of all files listed in file against the checksum listed in the same file. the actual format of that file is the same as the output oftthsum. that is, each line in the file describes a file. a line looks like:
<TTH CHECKSUM> <FILENAME>
so for example, if a file were created and its message digest calculated like so:
echo foo > tth-test-file; tthsum tth-test-file
tthsum would report:
A2MPPCGS5CPJV6AOAP37ICDCFV3WYU7PBREC6FY tth-test-file
see NOTES for more information on the digest file format π
-mβ usemmap(2)instead ofread(2)to read the contents of the files to hash. normally, usingreadis cheaper. this all depends on system load, I/O speed, CPU speed, L1 and/or L2 cache size and whatnot. it's giving "it depends" energy π-pβ show the progress. prints the percentage of completeness while hashing on standard error. prints the file position instead of the percentage when the file size is unknown. we love a girl who keeps you updated π-vβ be verbose. print filenames when checking (with-c).-wβ warn on improperly formatted lines when checking (with-c).-h,-Vβ print a small help text or the version, respectively, on standard out. and if an unknown combination of options is encountered, the small help is printed on standard error andtthsumwill return non-zero. read the room, unknown options π«Ά
π RETURN VALUE π
tthsum returns 0 if no error occurred β or, when checking a digest, if at least one line is formatted properly and the TTHs of all properly formatted lines match. slay.
tthsum returns 2 if an unknown combination of options is encountered.
in all other cases, tthsum will return 1. sad girl hours π
π NOTES π
tthsum intentionally uses an interface identical to md5sum. twins, basically π―
tthsum uses BASE32 encoding consisting of the following characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ234567. it will accept lower case letters in the digest input as well, because she's generous like that πΈ
tthsum does not accept long options such as --help. nope. not happening. don't even try it π
a digest file format line looks like: <BASE32><SPACES><FILENAME><EOL>.
BASE32is a 39 character long BASE32 encoded string.SPACESis a set of two spaces (0x20).FILENAMEis the name of the file, encoded in UTF8 and with all control characters (those below0x20) encoded as\xNNor\CC-style escapes. (the backslash is escaped as\\as well. on Windows, backslashes in paths will be translated to slashes for compatibility with real operating systems.) πEOLmay beCRLF(\r\n), just plainLF(\n) or even nothing at end-of-file. she's flexible, she contains multitudes β¨
if you see warnings about an improper locale setup, check your LANG and/or LC_CTYPE environment variables. if these are not set properly, tthsum cannot represent non-ASCII characters (those above 0x7F) in UTF8. see locale(1) for more information or try setting LC_CTYPE to e.g. "en_US". do it for her π
π€ REPORTING BUGS π€
report bugs to <walter+tthsum@wjd.nu>. (be nice, she's trying her best)
π COPYRIGHT π
Copyright Β© 2009 Walter Doekes. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
this is free software: you are free to change and redistribute it. there is NO WARRANTY, to the extent permitted by law. that's the whole legal tea β
π§ AUTHOR π§
tthsum and this manpage were written by Walter Doekes (walter+tthsum@wjd.nu).
the hashing code was copied directly from DC++, an open source peer-to-peer file sharing program by Jacek Sieka (jacek@creatio.se) who had based the hashing code on the one used in BCDC++ (a modified DC++) by Dustin Brody (blackclaw@parsoma.net). after version 1.1.0, the hashing code from the Tiger hash authors is used instead, to support big endian architectures and to remove the need for C++ compilers and libraries. β¨
the md5sum manpage, written by Juho Vuori (javuori@cc.helsinki.fi), was used as a template. this manpage was proofread by Dustin Brody. the collaborative lore is unmatched honestly π«Ά
π¦ SEE ALSO π¦
and that's the whole page bestie!! this was tthsum version 1.3.2, from Dec 2009 β yeah she's a lil vintage, vintage is a vibe π go hash something, ily, bye!! πβ¨π¦π
π¦ where this page comes from
- debian bookworm: tthsum 1.3.2-1+b1
- debian trixie: tthsum 1.3.2-1+b2
- nixos 26.05: tthsum 1.3.2
- nixpkgs unstable: tthsum 1.3.2
- ubuntu jammy: tthsum 1.3.2-1build1
- ubuntu noble: tthsum 1.3.2-1build1
- ubuntu questing: tthsum 1.3.2-1build1
- ubuntu resolute: tthsum 1.3.2-2 Β· GPL-3.0-or-later
- ubuntu stonking: tthsum 1.3.2-3 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms