Intro To 'sha384sum' Command In Linux
2023-09-27 - By Robert Elder
I use the 'sha384sum' command to compute the SHA384 checksum of a file or stream:
sha384sum file1.txt
bfd76c0ebbd006fee583410547c1887b0292be76d582d96c242d2a792723e3fd6fd061f9d5cfd13b8f961358e6adba4a file1.txt
About SHA 384
The SHA 384 hash function is nearly identical to the SHA 512 hash function. The only major difference is that the output of SHA 384 is truncated from 512 bits to 384 bits. This is similar to how the SHA 224 hash function is a truncated version of the SHA 256 hash function, that uses different initial hash values.
SHA 384 also uses different initial hash values. According to section 5.3.4 SHA-384 of fips180-3_final.pdf, these initial hash values consist of "the first sixty-four bits of the fractional parts of the square roots of the ninth through sixteenth prime numbers.".
One advantage of using SHA 384 it that it has many of the same cryptographic properties of SHA 512, but the resulting hash values require substantially less storage space.
Other Standard Features Of 'sha384sum' Command
All of the SHA family checksums commands support the same flags and features, such as reading input from stdin:
echo "Hello World!" | sha384sum
07f60df0b95043b3a3717638e7776ab76ebaa4fc705ba659063229cf162980c04a9f7496dcda50de6510d40fde3eba8a -
or verifying checksums in the following file 'sha384-checksums.txt':
bfd76c0ebbd006fee583410547c1887b0292be76d582d96c242d2a792723e3fd6fd061f9d5cfd13b8f961358e6adba4a file1.txt
98c11ffdfdd540676b1a137cb1a22b2a70350c9a44171d6b1180c6be5cbb2ee3f79d532c8a1dd9ef2e8e08e752a3babb file2.txt
8fe50e1666b503a0019c85f9dd36425b9a828abf7bf32ca1e8e367a95fbf6db34427311d75fa1788ee5bde0ea163677d file3.txt
sha384sum -c sha384-checksums.txt
file1.txt: OK
file2.txt: OK
file3.txt: OK
And that's why the 'sha384sum' command is my favourite Linux command.
Intro To 'stty' Command In Linux
Published 2023-10-04 |
$1.00 CAD |
Intro To 'nproc' Command In Linux
Published 2023-07-15 |
Intro To 'comm' Command In Linux
Published 2023-09-06 |
How To Force The 'true' Command To Return 'false'
Published 2023-07-09 |
A Surprisingly Common Mistake Involving Wildcards & The Find Command
Published 2020-01-21 |
A Guide to Recording 660FPS Video On A $6 Raspberry Pi Camera
Published 2019-08-01 |
Intro To 'chroot' Command In Linux
Published 2023-06-23 |
Join My Mailing List Privacy Policy |
Why Bother Subscribing?
|