MD5(1)

πŸ“¦
version 0.14 Β· 3 versions
, in alpine 3.24, nixos 26.05, nixpkgs unstable

🌸 MD5(1) β€” the message-digest manual, but make it bestie ✨

okay so picture this: the General Commands Manual section, and it's giving checksum central. The whole girlie squad is here β€” md5, sha1, sha256, and sha512 β€” and they all live in this one page together. Let's get into it πŸ’…


πŸŽ€ NAME

md5, sha1, sha256, sha512 β€” calculate a message digest (checksum) for a file

like... literally, that's the whole job. you give it a file, it gives you a fingerprint. iconic.


✨ SYNOPSIS

md5 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]
sha1 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]
sha256 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]
sha512 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]

four commands, same outfit, different algorithm. pick your main character πŸ’–


πŸ¦‹ DESCRIPTION

So these utilities take a message of arbitrary length as input and produce a message digest (checksum) of that input as output. And here's the cute part β€” the math girlies conjecture that it is computationally infeasible to produce two messages that have the same message digest (that's called a collision, bestie), or to produce any message that hits some prespecified target message digest you picked out in advance. slay.

Which algorithm you get β€” MD5, SHA-1, SHA-256, or SHA-512 β€” is determined by the name you used to invoke the utility. so the name is the whole personality. iykyk.

okay slight tea though: collisions have now been produced for MD5, and are theorized for SHA-1, so their use is deprecated. yes that's a real warning, not me being dramatic for once 😭

The options for use with each command are as follows:

  • -b β€” output checksums in base64 notation, not hexadecimal. fancy encoding moment ✨
  • -C checklist β€” compare the checksum of each file against the checksums in the checklist. Any specified file that is not listed in the checklist will generate an error. no gatekeeping allowed, apparently 😀
  • -c β€” if this option is specified, the file options become checklists. Each checklist should contain hash results in the normal format, and those get verified against the specified paths. Output consists of the digest used, the file name, and an OK, FAILED, or MISSING for the result of the comparison. This will validate any of the supported checksums (see cksum(1)). If no file is given, stdin is used. the vibe check for your files fr fr 🫢
  • -h hashfile β€” place the checksum into hashfile instead of stdout. putting it somewhere specific, we love a destination.
  • -p β€” echoes stdin to stdout and appends the checksum to stdout. double feature πŸ’–
  • -q β€” only print the checksum (quiet mode). no small talk, just the digest. mysterious. love that for her.
  • -r β€” reverse the format of the hash algorithm output, making it match the output format used by cksum(1). the remix version πŸ”₯
  • -s string β€” prints a checksum of the given string. no file needed, just vibes.
  • -t β€” runs a built-in time trial. Specifying -t multiple times results in the number of rounds being multiplied by 10 for each additional flag. so -t is fun, -tt is a workout, -ttt is a lifestyle πŸ’€
  • -x β€” runs a built-in test script. she brought her own homework, obsessed πŸ‘‘

πŸ‘‘ EXIT STATUS

These utilities exit 0 on success, and >0 if an error occurs. zero = we ate. anything above zero = something went off 😭


🌈 SEE ALSO

cksum(1)

(the one she keeps mentioning in the options. go say hi.)


⭐ STANDARDS

R. Rivest, The MD5 Message-Digest Algorithm, RFC 1321, April 1992. J. Burrows, The Secure Hash Standard, FIPS PUB 180-1.

D. Eastlake and P. Jones, US Secure Hash Algorithm 1 (SHA1), RFC 3174, September 2001. Secure Hash Standard, FIPS PUB 180-2.

citations!! she did her research, she showed her sources, academic baddie energy πŸŽ“πŸ’…


πŸ’€ CAVEATS

Since collisions have been found for MD5, the use of sha256 is recommended instead. like... read that again. MD5 is not the moment anymore. sha256 is the moment. protect yourself 🫢

not me begging you to actually switch algorithms. this is a real security note, bestie, please internalize it 😭

πŸ’œ and that's the page!! this beauty is from Debian, dated December 4, 2014, and it's the MD5(1) manual β€” General Commands Manual, periodt. go hash something and stay safe out there πŸ¦‹βœ¨

πŸ“¦ where this page comes from