Cryptographic Hashing and Digital Signatures

Hashing and Digital Signatures - CompTIA Security+ SY0-701 - 1.4

1. Introduction to Cryptographic Hashing

A cryptographic hash represents data as a short string of text, also called a message digest or fingerprint. It is irreversible and cannot be used to retrieve original data.

2. Uses of Hashing

a. Verifying Data Integrity

Hashes help verify that downloaded files match their originals, ensuring data integrity.

b. Creating Digital Signatures

Hashes play a crucial role in digital signatures, which ensure authentication, non-repudiation, and integrity.

3. Understanding Hashing Algorithms

a. SHA256 Hashing Algorithm

SHA256 produces a 256-bit output represented as a 64-character hexadecimal value.

b. Avoiding Collisions

Good hashing algorithms minimize collisions. The MD5 algorithm, deprecated due to vulnerabilities, is no longer recommended.

4. Common Applications of Hashing

a. File Verification

Hashes ensure that downloaded files match the original posted version, common in Linux distributions.

b. Password Storage

Instead of storing plaintext passwords, systems store hashed versions using salted hashes for added security.

c. Preventing Rainbow Table Attacks

Rainbow tables store precomputed hash values. Adding a random salt makes passwords resistant to this attack.

5. Digital Signatures

a. Purpose of Digital Signatures

Digital signatures verify message authenticity and integrity, ensuring they haven't been altered.

b. How Digital Signatures Work

Creation: The sender hashes the message and encrypts the hash using their private key to generate a digital signature.
Verification: The recipient decrypts the signature using the sender’s public key and compares the hash to verify authenticity.

c. Practical Use

Email systems and third-party tools provide digital signature functionalities for message authentication.

6. Conclusion

Hashing ensures data integrity, password security, and authentication. SHA256 is widely used for secure hashing, and digital signatures provide an additional layer of security.