Learn. Practice. Feel prepared.
Cryptography Objective Questions and Answers
This cryptography quiz contains carefully curated objective questions with correct answers and clear explanations. It is designed for developers, security learners, and interview preparation, covering modern encryption, hashing, authentication, and security best practices.
Practice Cryptography MCQs with Detailed Explanations
Answer at least 12 questions to submit and verify answers.
1 Which algorithm is symmetric? Easy
Correct answer:
AES
AES is a symmetric encryption algorithm that uses the same key for encryption and decryption. You can try AES encryption online using Devglan’s AES Encrypt Decrypt Tool.
2 What does HMAC primarily provide? Easy
Correct answer:
Integrity and authenticity
HMAC ensures data integrity and authenticity using a shared secret key. You can generate HMAC values using the HMAC-SHA256 Online Tool.
3 Which hash function is considered broken due to collisions? Easy
Correct answer:
MD5
MD5 is vulnerable to collision attacks and should not be used for security-sensitive purposes. You can test hashes using the MD5 Hash Generator.
4 Which property ensures that data has not been altered? Easy
Correct answer:
Integrity
Integrity ensures that data remains unchanged during transmission or storage. Hashing and HMAC are commonly used to achieve integrity.
5 Which algorithm is used for secure password hashing? Easy
Correct answer:
Argon2
Argon2 is a modern, secure password hashing algorithm designed to resist brute-force attacks. You can experiment with it using the PBKDF2 & Argon2 Password Hash Tool.
6 Which algorithm is asymmetric? Easy
Correct answer:
RSA
RSA is an asymmetric algorithm that uses a public and private key pair. You can try RSA encryption using the RSA Encrypt Decrypt Tool.
7 What is the primary purpose of Base64 encoding? Easy
Correct answer:
Binary-to-text encoding
Base64 is used to encode binary data into text for safe transmission, not for security. Try it using the Base64 Encode Decode Tool.
8 Which DES variant applies encryption three times? Easy
Correct answer:
Triple DES
Triple DES (3DES) applies DES encryption three times to increase security. You can test it using the Triple DES Encrypt Decrypt Tool.
9 What does a digital signature primarily provide? Medium
Correct answer:
Authentication and integrity
Digital signatures ensure authentication, integrity, and non-repudiation using asymmetric cryptography.
10 Which algorithm is used in JWT signing by default? Medium
Correct answer:
HS256
JWT commonly uses HS256 (HMAC with SHA-256) for signing. You can decode and validate tokens using the JWT Decoder & Validator.
11 What is the main weakness of SHA-1? Medium
Correct answer:
Collision attacks
SHA-1 is vulnerable to collision attacks and is no longer considered secure for cryptographic use.
12 Which encryption mode provides authentication as well? Medium
Correct answer:
GCM
AES-GCM provides both encryption and authentication. It is widely used in modern secure systems.
13 What is the purpose of a salt in password hashing? Medium
Correct answer:
Prevent rainbow table attacks
Salting prevents precomputed rainbow table attacks by making each hash unique.
14 Which algorithm is used in ChaCha20-Poly1305? Medium
Correct answer:
Stream cipher with MAC
ChaCha20-Poly1305 combines a stream cipher with a MAC for authenticated encryption. You can try it using the ChaCha20-Poly1305 Tool.
15 Which property ensures a sender cannot deny sending a message? Medium
Correct answer:
Non-repudiation
Non-repudiation ensures the sender cannot deny having sent a message, typically achieved using digital signatures.