sha384sum
Calculate or verify SHA384 cryptographic checksums
TLDR
Calculate the SHA384 checksum for one or more files
Calculate and save the list of SHA384 checksums to a file
Calculate a SHA384 checksum from stdin
Read a file of SHA384 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 SHA384 checksum of a file
SYNOPSIS
sha384sum [OPTION]... [FILE]...
PARAMETERS
-b, --binary
Read in binary mode.
-c, --check
Read SHA384 sums from the FILEs and check them.
-t, --text
Read in text mode (default).
-z, --zero
End each output line with NUL, not newline, and disable filename escaping. Useful for xargs -0.
--ignore-missing
Don't fail or report status for missing files when checking.
--quiet
Don't print OK for each successfully verified file.
--status
Don't output anything, status code shows success.
--strict
Exit non-zero for improperly formatted checksum lines.
--tag
Create a BSD-style checksum.
--warn
Warn about improperly formatted checksum lines.
--help
Display help and exit.
--version
Output version information and exit.
DESCRIPTION
The sha384sum command, part of the GNU Core Utilities, computes and verifies 384-bit Secure Hash Algorithm (SHA-384) checksums. SHA-384 is a cryptographic hash function that produces a unique, fixed-length 48-byte (384-bit) hash value for any given input. It is widely used to ensure data integrity and authenticity, providing a strong defense against accidental or malicious alteration of files. Unlike older hash functions like MD5 or SHA-1, SHA-384 offers enhanced security against collision attacks, making it suitable for applications requiring robust cryptographic assurances. The command can generate a checksum for one or more specified files, or from standard input, and displays the hash alongside the filename. Crucially, sha384sum also supports a verification mode, allowing users to check files against a list of pre-computed checksums, ensuring the data remains untampered since the checksum was generated. This utility is indispensable for validating software downloads, checking file backups, and maintaining the trustworthiness of digital assets.
CAVEATS
While sha384sum provides robust cryptographic integrity checks, it's important to note its limitations. SHA-384, like other SHA-2 functions, is not quantum-resistant; its security could theoretically be compromised by large-scale quantum computers in the future. Furthermore, the command itself only ensures data integrity based on a pre-shared checksum; it does not inherently protect against an attacker who can modify both the file and its corresponding checksum. For true authenticity and non-repudiation, the checksum itself must be obtained from a trusted and secure source, such as a digitally signed document or a secure website. Using sha384sum for HMAC (keyed-hash message authentication code) directly is not recommended without proper library support, as it can be vulnerable to length-extension attacks.
USAGE FOR VERIFICATION
When using sha384sum -c to verify files, it is paramount that the checksum file (the list of hashes) is obtained from a trusted and secure source. If an attacker can tamper with both the data file and its corresponding checksum file, the integrity check becomes meaningless. Always verify the source of the checksums before relying on them for data validation.
CRYPTOGRAPHIC STRENGTH
SHA-384 is designed to be highly resistant to collision attacks (finding two different inputs that produce the same hash) and pre-image attacks (finding an input that produces a given hash). It offers a 192-bit security strength against collision attacks, which is considered robust for current security requirements, making it suitable for digital signatures, password hashing, and integrity checks.
HISTORY
The sha384sum command's history is intertwined with the development and adoption of the Secure Hash Algorithm 2 (SHA-2) family. The SHA-2 algorithms, including SHA-384, were designed by the U.S. National Security Agency (NSA) and first published by the National Institute of Standards and Technology (NIST) in 2001 as FIPS PUB 180-2. These algorithms were developed to address potential weaknesses in SHA-1 and provide stronger cryptographic security. As part of the GNU Core Utilities, sha384sum was subsequently integrated into most Linux distributions, making the SHA-384 hashing capability readily accessible to users. Its usage grew significantly as concerns about the security of MD5 and SHA-1 increased, establishing SHA-384 as a standard for ensuring data integrity in many critical applications. The command continues to be actively maintained and updated as part of the ongoing development of coreutils.