Ethical Hacking Cryptography and Encryption 1 — Questions and Answers
Question 1: Which hashing algorithm produces a 128-bit hash and is considered cryptographically broken?
- SHA-256
- SHA-1
- MD5 (Correct answer)
- bcrypt
Correct answer: MD5
MD5 produces a 128-bit hash but is considered broken for security purposes due to collision vulnerabilities, where two different inputs can produce the same hash value.
Question 2: What is the difference between symmetric and asymmetric encryption?
- Symmetric uses larger keys; asymmetric uses smaller keys
- Symmetric uses the same key for encryption and decryption; asymmetric uses a key pair (public/private) (Correct answer)
- Symmetric is faster for large keys; asymmetric is faster for small keys
- There is no practical difference in modern cryptography
Correct answer: Symmetric uses the same key for encryption and decryption; asymmetric uses a key pair (public/private)
Symmetric encryption uses one shared key for both encryption and decryption (e.g., AES), while asymmetric encryption uses a mathematically linked public/private key pair (e.g., RSA).
Question 3: Which attack attempts every possible key combination to decrypt encrypted data?
- Dictionary attack
- Rainbow table attack
- Brute force attack (Correct answer)
- Side-channel attack
Correct answer: Brute force attack
A brute force attack systematically tries all possible keys or passwords until the correct one is found, becoming impractical as key length increases exponentially.
Question 4: What is 'key exchange' in cryptography and which protocol is most commonly used?
- Distributing symmetric keys via email; PGP
- Securely establishing a shared secret over an untrusted channel; Diffie-Hellman (Correct answer)
- Storing encryption keys in a hardware module; HSM
- Sharing public keys via certificates; X.509
Correct answer: Securely establishing a shared secret over an untrusted channel; Diffie-Hellman
Diffie-Hellman key exchange allows two parties to securely establish a shared secret over an insecure channel without transmitting the actual key, forming the basis of TLS/SSL security.
Question 5: Which cryptographic attack exploits weaknesses in cipher implementation rather than the algorithm itself?
- Brute force attack
- Side-channel attack (Correct answer)
- Dictionary attack
- Birthday attack
Correct answer: Side-channel attack
Side-channel attacks exploit information leaked from physical implementation (timing, power consumption, electromagnetic emissions) rather than mathematical weaknesses in the algorithm.
Question 6: What is a 'digital certificate' used for in PKI?
- Storing encrypted passwords securely
- Binding a public key to an identity, verified by a trusted Certificate Authority (Correct answer)
- Encrypting network traffic between two endpoints
- Generating one-time passwords for authentication
Correct answer: Binding a public key to an identity, verified by a trusted Certificate Authority
A digital certificate issued by a Certificate Authority (CA) cryptographically binds a public key to an identity (person, server, organization), enabling trust in public key infrastructure.
Which hashing algorithm produces a 128-bit hash and is considered cryptographically broken?