87 lines
2.5 KiB
Text
87 lines
2.5 KiB
Text
Other Popular Hash Algorithms:
|
|
|
|
SHA-2 Family:
|
|
The sha1sum tool, which uses SHA-1, is part of the broader SHA (Secure Hash Algorithm) family. Other members of this family include:
|
|
sha256sum (256-bit hash, more secure than SHA-1)
|
|
sha224sum (224-bit hash)
|
|
sha384sum (384-bit hash)
|
|
sha512sum (512-bit hash, offers maximum security in the SHA family)
|
|
|
|
To generate these hashes, tools like sha256sum and sha512sum are typically pre-installed in Linux systems.
|
|
|
|
Example:
|
|
|
|
sha256sum file.txt
|
|
sha512sum file.txt
|
|
|
|
Blake2:
|
|
|
|
Blake2 is a cryptographic hash function designed for high performance and security.
|
|
There are variations like b2sum for computing Blake2 hashes.
|
|
Example command:
|
|
|
|
b2sum file.txt
|
|
|
|
SHA-3 (Keccak):
|
|
|
|
SHA-3 is the latest in the SHA family (different underlying algorithm than SHA-2). It includes hashes like:
|
|
SHA3-224, SHA3-256, SHA3-384, and SHA3-512.
|
|
Tools like OpenSSL or sha3sum (may require installation) can compute these hashes.
|
|
Example (using OpenSSL):
|
|
|
|
openssl sha3-256 file.txt
|
|
|
|
xxHash:
|
|
|
|
A non-cryptographic, fast hash function primarily used for checksums and has very high speed.
|
|
Example (requires installation of xxhash):
|
|
|
|
xxhsum file.txt
|
|
|
|
CRC32:
|
|
|
|
A non-cryptographic checksum often used for simple file integrity checks.
|
|
Example (using cksum):
|
|
|
|
cksum file.txt
|
|
|
|
Note: This is not a cryptographic hash.
|
|
|
|
Whirlpool:
|
|
|
|
Whirlpool is another hashing algorithm, often supported by tools like OpenSSL.
|
|
Example (using openssl):
|
|
|
|
openssl whirlpool file.txt
|
|
|
|
RIPEMD Family:
|
|
|
|
RIPEMD-128 and RIPEMD-160 are older cryptographic hashes. Less common today but still available through libraries like OpenSSL.
|
|
Example:
|
|
|
|
openssl rmd160 file.txt
|
|
|
|
Advanced and Alternative Hashes:
|
|
|
|
Tiger: Another hashing algorithm, less common now. Supported by some advanced libraries.
|
|
Example:
|
|
|
|
openssl tiger file.txt
|
|
|
|
Adler-32: A checksum algorithm faster than CRC32, used where speed is more important than thorough error detection.
|
|
Example (using zlib or special tools).
|
|
|
|
Checking Available Hash Commands:
|
|
|
|
On most Linux systems, you can list the installed checksum/hash commands using:
|
|
|
|
compgen -c | grep sum
|
|
|
|
This will show different tools like md5sum, sha256sum, b2sum, etc.
|
|
Comparing with OpenSSL:
|
|
|
|
Many of the above hash algorithms can also be computed using openssl. For example:
|
|
|
|
openssl dgst -sha256 file.txt
|
|
openssl dgst -md5 file.txt
|
|
openssl dgst -sha512 file.txt
|