30. Which of the following describes the difference between encryption and hashing?

Answer: B

Explanation:

Encryption replaces cleartext with ciphertext, while hashing calculates a checksum.

Encryption transforms readable data (cleartext) into an unreadable format (ciphertext) to protect its confidentiality during transmission or storage, while hashing generates a fixed-size string (checksum) from input data to verify its integrity.

A) Encryption protects data in transit, while hashing protects data at rest.

This statement is incorrect because both encryption and hashing can be used for data in transit and data at rest. Encryption specifically focuses on confidentiality, while hashing is primarily used for integrity verification, not protection.

B) Encryption replaces cleartext with ciphertext, while hashing calculates a checksum.

This statement is correct. Encryption does indeed convert cleartext into ciphertext, making it unreadable without the appropriate key, while hashing produces a unique checksum that represents the original data, which is useful for integrity checks.

C) Encryption ensures data integrity, while hashing ensures data confidentiality.

This statement is incorrect. Encryption is primarily used to ensure data confidentiality by making it unreadable, whereas hashing is intended to ensure data integrity by providing a unique representation that can be verified.

D) Encryption uses a public-key exchange, while hashing uses a private key.

This statement is misleading. While encryption can utilize public-key cryptography, hashing does not involve keys at all; it simply generates a fixed-length output based on the input data without any key management.

Conclusion

The correct answer, B, accurately distinguishes the primary functions of encryption and hashing, emphasizing encryption's role in converting cleartext to ciphertext and hashing's purpose in generating a checksum for data integrity. All other options either misrepresent the functions of encryption and hashing or incorrectly attribute their characteristics.