Lably
Skip to content

Cksum

  • 2 min read
  • 4 chapters

Related on Lably

Through Command (computing), Operating system and Microsoft Windows

The cksum command can be used to verify that files transferred by unreliable means arrived intact. However, the CRC checksum calculated by the cksum command is not cryptographically secure: While it guards against accidental corruption (it is unlikely that the corrupted data will have the same checksum as the intended data), it is not difficult for an attacker to deliberately corrupt the file in a specific way that its checksum is unchanged. Unix-like systems typically include other commands for cryptographically secure checksums, such as sha256sum.

The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.

Latest GNU Coreutils cksum provides additional checksum algorithms via -a option, as an extension beyond POSIX.

Interoperability

The standard cksum command, as found on most Unix and Unix-like operating systems (including Linux, *BSD, macOS, and Solaris) uses a CRC algorithm based on the ethernet standard frame check and is therefore interoperable between implementations. This is in contrast to the sum command, which is not as interoperable and not compatible with the CRC-32 calculation. On Tru64 operating systems, the cksum command returns a different CRC value, unless the environment variable CMD_ENV is set to xpg4.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication