Sample questions
Question 1Easy
Steganography is the practice of:
- Hashing data repeatedly
- Encrypting data with two keys
- Hiding data inside a file
- Signing emails
Answer: C. Hiding data inside a file
Explanation
For example, data can be hidden in the low-order bits of image pixels.
Step-by-step solution
- Steganography hides a message inside another file.
- An example is hiding data in the low bits of image pixels.
- So it hides data inside a file: option C.
Why the other options are wrong
- A. Repeated hashing is not steganography.
- B. Two-key encryption is not hiding data in a file.
- D. Signing emails is about authenticity, not hiding data.
Tip: Steganography = hiding, encryption = scrambling.
Question 2Easy
RSA's security relies on the difficulty of:
- Reversing a string
- Sorting large arrays
- Factoring large numbers
- Finding prime numbers below 100
Answer: C. Factoring large numbers
Explanation
Recovering the private key from n would require factoring n into its two large primes.
Step-by-step solution
- RSA public key includes n = p x q.
- Finding p and q from n is hard for large n.
- That hardness protects the private key.
Why the other options are wrong
- A. Unrelated.
- B. Unrelated.
- D. Primes below 100 are trivial.
Question 3Easy
Which of these is an asymmetric algorithm?
- AES
- ChaCha20
- RSA
- DES
Answer: C. RSA
Explanation
RSA relies on a public/private key pair; AES, DES and ChaCha20 are symmetric ciphers.
Step-by-step solution
- RSA uses a public/private key pair.
- AES, DES and ChaCha20 all use one shared key.
- So RSA is the asymmetric algorithm: option C.
Why the other options are wrong
- A. AES is a symmetric cipher.
- B. ChaCha20 is a symmetric cipher.
- D. DES is a symmetric cipher.
Tip: RSA is the common asymmetric example.
Question 4Easy
SHA-256 is an example of a:
- Hash function
- Digital certificate
- Symmetric cipher
- Key exchange
Answer: A. Hash function
Explanation
SHA-256 produces a 256-bit digest.
Step-by-step solution
- SHA-256 takes an input and produces a fixed 256-bit digest.
- It is one-way and is not a cipher or certificate.
- It is a hash function.
- So SHA-256 is a hash function.
Why the other options are wrong
- B. A digital certificate binds identity to a key; SHA-256 does not.
- C. SHA-256 does not encrypt data with a shared key.
- D. Key exchange is done by protocols such as Diffie-Hellman.
Tip: Hash = fixed-size one-way digest. Cipher = reversible with a key.
Question 5Medium
The "avalanche effect" in hashing means:
- Hash computation slows down over time
- Hashes grow larger with every use
- Small changes alter it a lot
- Similar inputs give similar hashes
Answer: C. Small changes alter it a lot
Explanation
Changing one bit should flip about half the output bits, hiding any relation between similar inputs.
Step-by-step solution
- The avalanche effect means a small change in input changes the output a lot.
- Changing one bit flips about half of the output bits.
- So small changes alter the hash a lot: option C.
Why the other options are wrong
- A. Hash speed does not change over time with the avalanche effect.
- B. Hash output size stays fixed; it does not grow with use.
- D. Similar inputs give very different hashes, which is the opposite.
Tip: Avalanche = a one-bit change gives a very different hash.
Question 6Medium
Why should passwords be hashed with a unique random salt?
- To make hashes shorter to store
- So equal passwords hash differently
- So the server can show passwords to admins
- So passwords can be decrypted later
Answer: B. So equal passwords hash differently
Explanation
Salts defeat precomputed rainbow tables and stop attackers spotting users who share passwords.
Step-by-step solution
- A salt is a random value added to the password before hashing.
- Each user gets a different salt.
- So two users with the same password get different hashes, and precomputed tables stop working.
Why the other options are wrong
- A. Salting does not change hash length.
- C. Hashes are one-way; admins should never see passwords.
- D. Hashes cannot be decrypted; that is the point.
Question 7Medium
How many keys are needed for 10 people to each communicate privately with every other person using symmetric encryption (one key per pair)?
- 90
- 20
- 45
- 10
Answer: C. 45
Explanation
Pairs = n(n - 1)/2
= 10 x 9 / 2
= 45.
Step-by-step solution
- Each pair needs one key.
- Pairs = n(n-1)/2 = 10 x 9 / 2.
- = 45 keys.
Why the other options are wrong
- A. That is n(n-1), counting each pair twice.
- B. That is 2n.
- D. That is just n.
Tip: Pairs formula n(n-1)/2.
Question 8Medium
Alice wants to send Bob a message only Bob can read using asymmetric encryption. She encrypts it with:
- Bob's private key
- Bob's public key
- Alice's private key
- Alice's public key
Answer: B. Bob's public key
Explanation
Only Bob's private key can decrypt data encrypted with his public key.
Step-by-step solution
- Alice wants only Bob to read the message.
- Data encrypted with Bob's public key can be decrypted only with Bob's private key.
- So Alice encrypts with Bob's public key: option B.
Why the other options are wrong
- A. Bob's private key must stay with Bob; Alice does not have it.
- C. Alice's private key would not let Bob read the message.
- D. Alice's public key is public and is not the key that makes Bob able to read it.
Tip: Encrypt with the recipient's public key; sign with your own private key.
Question 9Hard
AES-GCM is popular because it provides:
- Faster key exchange over the internet
- Public-key signatures
- Hashing without any key
- Encryption plus built-in integrity
Answer: D. Encryption plus built-in integrity
Explanation
GCM is an authenticated encryption mode: it detects tampering as well as hiding content.
Step-by-step solution
- AES-GCM encrypts the data.
- It also adds an authentication tag that detects tampering.
- So it gives encryption plus built-in integrity: option D.
Why the other options are wrong
- A. Key exchange is done by protocols such as Diffie-Hellman, not GCM.
- B. Public-key signatures are not part of AES-GCM.
- C. Hashing without a key is not what GCM provides.
Tip: GCM = authenticated encryption.
Question 10Hard
In Diffie-Hellman with p = 23 and g = 5, Alice picks a = 6 and Bob picks b = 15. What is the shared secret?
- 2
- 8
- 19
- 15
Answer: A. 2
Explanation
A = 5^6 mod 23 = 8,
B = 5^15 mod 23 = 19.
Shared = 19^6 mod 23 = 8^15 mod 23 = 2.
Step-by-step solution
- Alice's public value A = 5^6 mod 23 = 8.
- Bob's public value B = 5^15 mod 23 = 19.
- Alice computes B^6 mod 23 = 19^6 mod 23 = 2, and Bob computes A^15 mod 23 = 8^15 mod 23 = 2.
- The shared secret is 2: option A.
Why the other options are wrong
- B. 8 is Alice's public value, not the shared secret.
- C. 19 is Bob's public value, not the shared secret.
- D. 15 is Bob's private exponent, not the shared secret.
Tip: Both sides get the same secret: g^(ab) mod p.
Practise all 41 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →