All-in-one utility to calculate and verify checksums
xsum can calculate and verify a variety of different checksums/hashes and use these checksums to verify the integrity of one or multiple file(s), similar to UNIX utilities like md5sum or sha1sum. xsum combines support for multiple external libraries to calculate and compare different checksums at the same time.
Compiling xsum should be as simple as running make and sudo make install to install the result.
Check the files config_build.mak and config_system.mak for any customizable settings.
This is a list of all currently supported checksums and the libraries that are required to use them. If one checksum is supported by multiple libraries, only one of them is needed.
| Name | Libraries | Comment |
|---|---|---|
| Adler-32 | botan2 crypto++ mhash zlib | |
| BLAKE-224 | cppcrypto | |
| BLAKE-256 | cppcrypto | |
| BLAKE-384 | cppcrypto | |
| BLAKE-512 | cppcrypto | |
| BLAKE2b-160 | botan2 cppcrypto crypto++ libb2 libsodium libgcrypt¹ | |
| BLAKE2b-256 | botan2 cppcrypto crypto++ libb2 libsodium libgcrypt¹ | |
| BLAKE2b-384 | botan2 cppcrypto crypto++ libb2 libsodium libgcrypt¹ | |
| BLAKE2b-512 | botan2 cppcrypto crypto++ libb2 libsodium libgcrypt¹ openssl⁵ ⁶ ⁷ rhash | |
| BLAKE2b-X | botan2 cppcrypto crypto++ libb2 libsodium | Supported sizes are 8, 16, 24, ..., 512. Some are also supported by libgcrypt or openssl (see above). |
| BLAKE2bp-X | libb2 | Supported sizes are 8, 16, 24, ..., 512 |
| BLAKE2s-128 | cppcrypto crypto++ libb2 libgcrypt¹ | |
| BLAKE2s-160 | cppcrypto crypto++ libb2 libgcrypt¹ | |
| BLAKE2s-224 | cppcrypto crypto++ libb2 libgcrypt¹ | |
| BLAKE2s-256 | cppcrypto crypto++ libb2 libgcrypt¹ openssl⁵ ⁶ ⁷ rhash | |
| BLAKE2s-X | cppcrypto crypto++ libb2 | Supported sizes are 8, 16, 24, ..., 256. Some are also supported by libgcrypt or openssl (see above). |
| BLAKE2sp-X | libb2 | Supported sizes are 8, 16, 24, ..., 256 |
| CRC24 | botan2 libgcrypt | CRC24 as used in OpenPGP |
| CRC32 | botan2 crypto++ mhash libgcrypt liblzma rhash zlib | CRC32 as specified by ISO 3309 |
| CRC64 | liblzma | CRC64 as specified by ECMA-182 |
| ECHO-X | cppcrypto | Supported sizes are 8, 16, 24, ..., 512 |
| EDON-R-256 | rhash | |
| EDON-R-512 | rhash¹¹ | |
| Esch-256 | cppcrypto | |
| Esch-384 | cppcrypto | |
| GOST94 | nettle libgcrypt rhash | GOST R 34.11-94 |
| GOST94-CryptoPro | botan2 gnutls rhash openssl⁵ ⁶ ⁷ | GOST94 with CryptoPro S-box |
| Groestl-X | cppcrypto | Supported sizes are 8, 16, 24, ..., 512 |
| HAS160 | rhash | |
| HAVAL-128 | mhash | |
| HAVAL-160 | mhash | |
| HAVAL-192 | mhash | |
| HAVAL-224 | mhash | |
| HAVAL-256 | mhash | |
| JH-224 | cppcrypto | |
| JH-256 | cppcrypto | |
| JH-384 | cppcrypto | |
| JH-512 | cppcrypto | |
| Keccak-224 | botan2 crypto++ | Keccak-f[1600] (older variant of SHA-3) |
| Keccak-256 | botan2 crypto++ | Keccak-f[1600] (older variant of SHA-3) |
| Keccak-384 | botan2 crypto++ | Keccak-f[1600] (older variant of SHA-3) |
| Keccak-512 | botan2 crypto++ | Keccak-f[1600] (older variant of SHA-3) |
| Kupyna-256 | cppcrypto | |
| Kupyna-512 | cppcrypto | |
| LSH-256 | crypto++ | |
| LSH-256-224 | crypto++ | |
| LSH-512 | crypto++ | |
| LSH-512-256 | crypto++ | |
| LSH-512-384 | crypto++ | |
| MD2 | crypto++ mbedtls³ mhash nettle nss openssl⁵ ⁶ Windows⁸ | |
| MD4 | botan2 crypto++ mbedtls³ mhash nettle libgcrypt rhash openssl⁵ ⁶ Windows⁸ | |
| MD5 | botan2 cppcrypto crypto++ glib gnutls mbedtls³ mhash nettle nss libgcrypt rhash openssl⁵ ⁶ Windows⁸ | |
| MDC2 | openssl⁵ ⁶ ⁷ | |
| RIPEMD128 | crypto++ mhash | |
| RIPEMD160 | botan2 crypto++ mbedtls³ mhash nettle libgcrypt openssl⁵⁶ | |
| RIPEMD256 | crypto++ mhash | |
| RIPEMD320 | crypto++ mhash | |
| SHA1 | botan2 cppcrypto crypto++ glib gnutls mbedtls³ mhash nettle nss libgcrypt rhash openssl⁵ ⁶ Windows⁸ | |
| SHA224 | botan2 cppcrypto crypto++ gnutls mbedtls³ mhash nettle nss libgcrypt rhash openssl⁵ ⁶ | |
| SHA256 | botan2 cppcrypto crypto++ glib gnutls mbedtls³ mhash nettle nss libgcrypt libsodium rhash openssl⁵ ⁶ Windows⁸ | |
| SHA384 | botan2 cppcrypto crypto++ glib⁹ gnutls mbedtls³ mhash nettle nss libgcrypt rhash openssl⁵ ⁶ Windows⁸ | |
| SHA512 | botan2 cppcrypto crypto++ glib⁹ gnutls mbedtls³ mhash nettle nss libgcrypt libsodium rhash openssl⁵ ⁶ Windows⁸ | |
| SHA512-224 | cppcrypto nettle openssl⁵ ⁶ ⁷ | |
| SHA512-256 | cppcrypto nettle openssl⁵ ⁶ ⁷ | |
| SHA3-224 | botan2 cppcrypto crypto++ gnutls nettle² libgcrypt rhash openssl⁵ ⁶ ⁷ | |
| SHA3-256 | botan2 cppcrypto crypto++ gnutls nettle² libgcrypt rhash openssl⁵ ⁶ ⁷ | |
| SHA3-384 | botan2 cppcrypto crypto++ gnutls nettle² libgcrypt rhash openssl⁵ ⁶ ⁷ | |
| SHA3-512 | botan2 cppcrypto crypto++ gnutls nettle² libgcrypt rhash openssl⁵ ⁶ ⁷ | |
| Skein-256-X | cppcrypto | Supported sizes are 8, 16, 24, ..., 256 |
| Skein-512-X | botan2 cppcrypto | Supported sizes are 8, 16, 24, ..., 512 |
| Skein-1024-X | cppcrypto | Supported sizes are 8, 16, 24, ..., 1024 |
| SM3 | botan2 cppcrypto crypto++ openssl⁵ ⁶ ⁷ | |
| Snefru-128 | mhash rhash | |
| Snefru-256 | mhash rhash | |
| Streebog-256 | botan2 cppcrypto gnutls⁴ libgcrypt¹² openssl⁵ ⁶ rhash | GOST R 34.11-2012 |
| Streebog-512 | botan2 cppcrypto gnutls⁴ libgcrypt¹² openssl⁵ ⁶ rhash | GOST R 34.11-2012 |
| Sum | (Built in) | 64-bit sum of all input bytes |
| Tiger | botan2 crypto++ mhash libgcrypt rhash | |
| Tiger2 | libgcrypt | |
| WHIRLPOOL | botan2 cppcrypto crypto++ mhash libgcrypt rhash openssl⁵ ⁶ | |
| XOR | (Built in) | XOR of all input bytes |
| xxHash32 | xxhash | |
| xxHash64 | xxhash | |
| xxHash3-64 | xxhash¹⁰ | |
| xxHash3-128 | xxhash ¹⁰ |
¹) libgcrypt 1.8.0 or higher required for BLAKE2
²) Nettle 3.2 or higher required for SHA-3
³) mbedtls might not have all possible algorithms compiled in, this is auto-detected at build time
⁴) Streebog is supported with gnutls 3.6.8 or higher as previous versions produce incorrect hashes
⁵) libressl is also supported
⁶) Note that before version 3.0, the OpenSSL license was incompatible with xsum's GPLv3.
⁷) BLAKE2 requires OpenSSL 1.1.0 or newer; GOST94 requires OpenSSL before 1.1.0 or LibreSSL; MDC2 is not supported by LibreSSL; SHA512-224, SHA512-256 and SHA3 require OpenSSL 1.1.1 or newer; SM3 requires OpenSSL 1.1.1, LibreSSL 2.9.0 or newer
⁸) xsum supports the Windows CNG API on Windows Vista/Server 2008 or later (build xsum using MinGW)
⁹) SHA512 required glib 2.36 or newer, SHA384 requires glib 2.51 or newer
¹⁰) xxHash 0.8.0 or higher required for xxHash3
¹¹) rhash version 1.4.0 sometimes produced incorrect EDON-R-512 hashes. xsum 1.3 and higher use a different name (EDON-R-512_) internally, causing hashes produced by older versions to be ignored.
¹²) Streebog is supported with libgcrypt 1.9.0 or higher as previous versions produce incorrect hashes
Calculate checksums:
xsum myfile1.txt myfile2.txt > checksums
Verify checksums:
xsum -c checksums
Select a list of checksums to calculate:
xsum -a blake2b-512,md5,sha256,whirlpool myfile.txt
For all available options, see:
xsum --help