First 50 of 199 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Introduction and History of Cryptography
Which classical cipher replaces each plaintext letter with a letter a fixed number of positions further along the alphabet?
- Atbash cipher
- Vigenère cipher
- Caesar cipher Correct answer.
- Playfair cipher
Explanation
The Caesar cipher is a monoalphabetic substitution that shifts every letter by a constant offset, so the same plaintext letter always maps to the same ciphertext letter. That fixed, uniform shift is what distinguishes it from polyalphabetic and digraphic systems.
Question 2Introduction and History of Cryptography
The Atbash cipher is best described as which type of transformation?
- A transposition of columns in a grid
- A reciprocal substitution that reverses the alphabet Correct answer.
- A polybius square coordinate lookup
- A keyword-driven polyalphabetic substitution
Explanation
Atbash maps the first letter of the alphabet to the last, the second to the second-last, and so on, so applying it twice returns the original text. This reciprocal, self-inverse property is its defining characteristic.
Question 3Introduction and History of Cryptography
Which historical cipher is the classic example of a transposition cipher?
- Scytale Correct answer.
- Affine cipher
- Vigenère cipher
- Hill cipher
Explanation
The Spartan scytale wrapped a strip of leather around a rod so that letters were written across the turns; unwinding it scrambled the order while preserving the letters themselves. That reordering without substitution is the hallmark of transposition.
Question 4Introduction and History of Cryptography
In the Vigenère cipher, what determines how far each plaintext letter is shifted?
- The frequency of the letter in the language
- The corresponding letter of a repeating keyword Correct answer.
- The position of the letter within its word
- The numeric value of the previous ciphertext letter
Explanation
Vigenère aligns a repeating keyword against the plaintext and uses each keyword letter's value as the shift for that position. Because the shift cycles with the keyword, the same plaintext letter can encrypt differently at different positions.
Question 5Introduction and History of Cryptography
Why did the one-time pad remain unbroken when used correctly?
- It applies a different substitution alphabet for every word
- It encrypts each character twice for redundancy
- Its key is as long as the message, truly random, and used only once Correct answer.
- It relies on a very large but fixed keyword
Explanation
A properly implemented one-time pad combines plaintext with a random key stream equal in length to the message, never reused. This gives perfect secrecy: every possible plaintext remains equally likely given the ciphertext.
Question 6Introduction and History of Cryptography
Which device is historically significant as an early mechanical rotor cipher machine used by Germany in World War II?
- Lorenz SZ40
- Enigma machine Correct answer.
- Babbage difference engine
- Jefferson disk
Explanation
The Enigma is the best-known rotor machine, using rotating wheels to create a changing polyalphabetic substitution for each keypress. Its capture and cryptanalysis, notably at Bletchley Park, are central to the history of modern cryptography.
Question 7Introduction and History of Cryptography
Steganography differs from cryptography primarily in that steganography does what?
- Conceals the existence of a message rather than scrambling its content Correct answer.
- Uses a public key to encrypt the message body
- Replaces letters according to a keyword alphabet
- Compresses the message to save bandwidth
Explanation
Cryptography hides the meaning of a message while its presence is evident; steganography hides the message itself inside a carrier such as an image or text. Both may be combined, but the defining goal of steganography is concealment of existence.
Question 8Introduction and History of Cryptography
Which statement correctly distinguishes a block cipher from a stream cipher?
- A block cipher always uses asymmetric keys, while a stream cipher always uses symmetric keys
- A block cipher produces variable-length output, while a stream cipher produces fixed-length output
- A block cipher cannot be used in software, while a stream cipher can
- A block cipher encrypts fixed-size chunks, while a stream cipher encrypts data one symbol at a time Correct answer.
Explanation
Block ciphers process data in fixed-size blocks such as 64 or 128 bits, whereas stream ciphers generate a key stream and combine it with the plaintext symbol by symbol. Both are symmetric techniques, so the distinction is about data handling, not key type.
Question 9Introduction and History of Cryptography
In a substitution cipher, what remains unchanged between plaintext and ciphertext?
- The order of the words
- The total number of characters Correct answer.
- The position of each character
- The frequency distribution of characters
Explanation
Substitution replaces characters in place, so the length and character positions stay the same while the symbols change. This length preservation is one reason substitution ciphers leak structural information.
Question 10Introduction and History of Cryptography
A cryptanalyst notices that the letter E in an English plaintext appears as Q in the ciphertext about 12 percent of the time. Which attack is being applied?
- Meet-in-the-middle attack
- Chosen-ciphertext attack
- Brute-force key search
- Frequency analysis Correct answer.
Explanation
Frequency analysis exploits the fact that natural languages have characteristic letter frequencies that survive monoalphabetic substitution. Matching the most common ciphertext letters to the most common plaintext letters reveals the mapping.
Question 11Introduction and History of Cryptography
Which technique defeated the Vigenère cipher when the key length was unknown?
- Side-channel power analysis
- Rainbow table lookup
- Kasiski examination Correct answer.
- Differential cryptanalysis
Explanation
The Kasiski examination finds repeated ciphertext sequences and measures the distances between them; common factors of those distances suggest the keyword length. Once the length is known, the text can be split into Caesar-like columns and solved by frequency analysis.
Question 12Introduction and History of Cryptography
Why is a monoalphabetic substitution cipher with a 26-letter alphabet vulnerable to exhaustive key search in a way that the Vigenère cipher is not?
- It encrypts in blocks of 128 bits
- Its key space is limited to permutations of 26 letters, while Vigenère keys can be arbitrarily long Correct answer.
- It uses asymmetric keys that are publicly distributed
- Its ciphertext is always shorter than the plaintext
Explanation
A simple substitution key is a permutation of the alphabet, giving 26 factorial possibilities, which is large but still attackable with frequency analysis rather than brute force alone. Vigenère's security scales with key length, so longer keywords produce a much larger effective key space.
Question 13Introduction and History of Cryptography
The Playfair cipher encrypts plaintext in which unit?
- Single letters
- Pairs of letters Correct answer.
- Whole words
- Blocks of 64 bits
Explanation
Playfair builds a 5x5 grid from a keyword and encrypts digraphs using rules for same-row, same-column, and rectangle cases. Encrypting pairs flattens single-letter frequency counts, making it harder to break than simple substitution.
Question 14Introduction and History of Cryptography
What is the primary weakness of the Caesar cipher that makes it trivial to break?
- It requires a shared asymmetric key
- It uses a different alphabet for every letter
- Its key space is only 25 possible shifts Correct answer.
- Its ciphertext is longer than its plaintext
Explanation
With only 25 meaningful shifts, an attacker can try every key by hand or with a short script. Even without brute force, the preserved letter frequencies reveal the shift immediately.
Question 15Introduction and History of Cryptography
Which historical development is credited with moving cryptography from hand ciphers toward machine-based encryption?
- The publication of the Diffie-Hellman paper
- The creation of the Polybius square
- The adoption of the Advanced Encryption Standard
- The invention of the rotor machine Correct answer.
Explanation
Rotor machines such as Enigma automated polyalphabetic substitution, allowing far more complex and rapidly changing keys than hand methods. This mechanization set the stage for electronic and digital cryptography.
Question 16Introduction and History of Cryptography
In the Hill cipher, encryption of a block of plaintext is performed by which operation?
- Matrix multiplication modulo 26 Correct answer.
- Substitution using a keyword alphabet
- Bitwise XOR with a key stream
- Columnar transposition of the block
Explanation
The Hill cipher treats a block of letters as a vector and multiplies it by an invertible key matrix modulo 26. Because the operation mixes all letters in the block, changing one plaintext letter alters the whole ciphertext block.
Question 17Introduction and History of Cryptography
A message is hidden by altering the least significant bits of pixel values in an image. Which concept does this illustrate?
- Digital steganography Correct answer.
- Key escrow
- Digital signature
- Hash-based authentication
Explanation
Embedding data in the low-order bits of a carrier medium hides the message's existence while leaving the image visually nearly unchanged. This is a modern digital form of steganography rather than a cryptographic transformation.
Question 18Introduction and History of Cryptography
Which statement about the Polybius square is accurate?
- It applies a key matrix to blocks of letters
- It encrypts by shifting each letter three positions
- It uses a rotor to change alphabets per keystroke
- It maps each letter to a pair of coordinates in a grid Correct answer.
Explanation
The Polybius square arranges the alphabet in a grid so each letter is represented by its row and column numbers. This coordinate encoding converts letters into numeric symbols and underlies later fractionating ciphers.
Question 19Introduction and History of Cryptography
Which pair correctly matches a cipher with its classification?
- Vigenère - polyalphabetic substitution Correct answer.
- Caesar - transposition cipher
- Rail fence - block cipher
- Columnar transposition - substitution cipher
Explanation
Vigenère is polyalphabetic because its keyword causes multiple substitution alphabets across the message. Columnar transposition and rail fence are transpositions, and Caesar is a monoalphabetic substitution.
Question 20Introduction and History of Cryptography
Why does a one-time pad fail to provide perfect secrecy if the same key stream is reused?
- The cipher automatically switches to an asymmetric mode
- Reusing the pad lets an attacker XOR two ciphertexts to cancel the key and expose plaintext relationships Correct answer.
- The key becomes too long to store securely
- The plaintext must be padded to a block boundary
Explanation
When the same pad encrypts two messages, combining the ciphertexts cancels the key stream and yields the XOR of the two plaintexts. That relationship leaks substantial information and defeats the perfect-secrecy guarantee.
Question 21Introduction and History of Cryptography
A ciphertext consists of exactly the same multiset of letters as its plaintext, but their order is scrambled. Which property identifies the cipher?
- It is a homophonic substitution cipher
- It is a transposition cipher Correct answer.
- It is a one-time pad
- It is a polyalphabetic substitution cipher
Explanation
Transposition permutes the positions of characters without changing which characters appear, so the letter inventory is preserved. Substitution and pad-based ciphers change the symbols themselves and therefore alter that inventory.
Question 22Introduction and History of Cryptography
Why does the Playfair cipher use a 5x5 grid rather than a 6x6 grid in its classic form?
- It excludes vowels to reduce frequency leakage
- It merges I and J to fit 26 letters into 25 cells Correct answer.
- It requires a cell for the space character
- It reserves one row for numeric digits
Explanation
The English alphabet has 26 letters but a 5x5 grid has only 25 cells, so Playfair conventionally combines I and J into one cell. This convention preserves a simple square while accommodating the full alphabet.
Question 23Introduction and History of Cryptography
An analyst finds that the distance between repeated trigrams in a Vigenère ciphertext are 24, 36, and 60. What is the most likely keyword length suggested by the Kasiski method?
- 12 Correct answer.
- 7
- 26
- 5
Explanation
The Kasiski method looks for the greatest common divisor of the distances between repeated sequences, since the repetition arises when the keyword realigns. The GCD of 24, 36, and 60 is 12, making it the strongest candidate for the key length.
Question 24Introduction and History of Cryptography
Why is a homophonic substitution cipher more resistant to simple frequency analysis than a standard monoalphabetic substitution?
- It maps frequent plaintext letters to several different ciphertext symbols Correct answer.
- It reorders letters according to a keyword
- It encrypts each letter with a rotating rotor
- It uses a different key for every recipient
Explanation
Homophonic substitution flattens the ciphertext frequency distribution by giving common plaintext letters multiple possible symbols. An attacker can no longer assume the most frequent ciphertext symbol corresponds to E.
Question 25Introduction and History of Cryptography
Which historical figure is associated with the first documented description of a polyalphabetic cipher using a tabula recta?
- Leon Battista Alberti Correct answer.
- Claude Shannon
- Auguste Kerckhoffs
- Alan Turing
Explanation
Alberti described a cipher disk and a changing-alphabet scheme in the fifteenth century, an early step toward polyalphabetic substitution. His work predates the better-known Vigenère formulation by more than a century.
Question 26Introduction and History of Cryptography
Which classical cipher replaces each plaintext letter with the letter a fixed number of positions further along the alphabet, making it a simple monoalphabetic substitution?
- Playfair cipher
- Vigenère cipher
- Caesar cipher Correct answer.
- Hill cipher
Explanation
The Caesar cipher shifts each letter by a constant amount, so every plaintext letter maps to exactly one ciphertext letter regardless of its position in the message. That constant-shift property is what defines it as a monoalphabetic substitution cipher.
Question 27Introduction and History of Cryptography
In the context of cryptography, what does the term 'plaintext' refer to?
- The secret key used to control encryption and decryption
- The original readable message before encryption Correct answer.
- The scrambled output produced by an encryption algorithm
- The mathematical transformation applied to a message
Explanation
Plaintext is the original, intelligible message that a sender wants to protect; encryption transforms it into ciphertext. The term applies regardless of whether the message is text, binary data, or any other form.
Question 28Introduction and History of Cryptography
Which historical cipher is credited to Julius Caesar and involves shifting each letter by three positions in the alphabet?
- Atbash cipher
- Caesar cipher Correct answer.
- Scytale cipher
- Affine cipher
Explanation
The Caesar cipher is traditionally described as a shift of three positions, so A becomes D, B becomes E, and so on. It is one of the earliest documented substitution ciphers and is named after Julius Caesar, who reportedly used it for military correspondence.
Question 29Introduction and History of Cryptography
A message is encrypted by writing it in rows and then reading the columns to produce the ciphertext. Which classical technique does this describe?
- Rail fence cipher
- Monoalphabetic substitution
- Columnar transposition Correct answer.
- Route cipher
Explanation
Columnar transposition writes the plaintext into rows under a keyword or fixed width and then reads down the columns in a specified order to form the ciphertext. The letters themselves are unchanged; only their positions are rearranged.
Question 30Introduction and History of Cryptography
Which statement best explains why the Vigenère cipher resisted simple frequency analysis for centuries?
- It uses a different Caesar shift for each letter based on a repeating keyword Correct answer.
- It transposes letters according to a geometric pattern
- It encrypts pairs of letters, hiding single-letter frequencies
- It replaces each letter with a randomly chosen homophone
Explanation
The Vigenère cipher applies a sequence of Caesar shifts determined by a keyword, so the same plaintext letter can map to different ciphertext letters at different positions. This polyalphabetic behavior flattens single-letter frequency counts and defeats naive frequency analysis until the key length is determined.
Question 31Introduction and History of Cryptography
Why is the one-time pad considered to offer perfect secrecy when used correctly?
- Because it uses a 256-bit block cipher in counter mode
- Because it hides the message inside an image file
- Because it relies on the computational difficulty of factoring large integers
- Because the key is as long as the message, truly random, and never reused Correct answer.
Explanation
A one-time pad combines plaintext with a key that is at least as long as the message, uniformly random, and used only once. Under those conditions every possible plaintext remains equally likely given the ciphertext, which is the definition of perfect secrecy.
Question 32Introduction and History of Cryptography
A cryptanalyst examining a Vigenère ciphertext finds that repeated sequences occur at distances of 20, 30, and 45 characters. What is the most likely key length indicated by these distances?
- 45
- 5 Correct answer.
- 15
- 10
Explanation
The Kasiski examination looks for the greatest common divisor of the distances between repeated ciphertext sequences, because those repeats often arise from the same plaintext aligned with the same key position. The GCD of 20, 30, and 45 is 5, making 5 the most likely key length.
Question 33Introduction and History of Cryptography
Which property of the Enigma machine most directly limited the effectiveness of its encryption despite its large theoretical key space?
- It encrypted the same letter to itself, never mapping a letter to itself Correct answer.
- It relied on a single rotor for all encryption
- Its rotor wiring never changed between messages
- It used a fixed substitution alphabet for every message
Explanation
Because of the reflector, Enigma never encrypted a letter to itself, which gave analysts a powerful constraint for eliminating impossible plaintext guesses. This self-encryption weakness, combined with operational mistakes such as repeated message keys, contributed to its eventual compromise.
Question 34Introduction and History of Cryptography
In a homophonic substitution cipher, why does each plaintext letter map to multiple ciphertext symbols?
- To reduce the key length needed for encryption
- To allow the cipher to be used for transposition
- To ensure the ciphertext is always shorter than the plaintext
- To flatten the frequency distribution of ciphertext symbols Correct answer.
Explanation
Homophonic substitution assigns several ciphertext symbols to frequent plaintext letters so that each symbol appears with roughly equal frequency. This flattens the ciphertext frequency distribution and makes simple frequency analysis much less effective.
Question 35Symmetric Cryptography & Hashes
AES is a block cipher. What is its fixed block size, regardless of whether the 128-, 192-, or 256-bit key is selected?
- 192 bits
- 128 bits Correct answer.
- 256 bits
- 512 bits
Explanation
The AES standard fixes the block size at 128 bits (16 bytes) for every key length; only the key schedule and round count vary. Candidates often confuse the key size options with the block size, but the data block is always 128 bits.
Question 36Symmetric Cryptography & Hashes
Which structure does DES use to process its 64-bit input block?
- A sponge construction with permutation rounds
- A Merkle-Damgard compression loop
- A Feistel network with 16 rounds Correct answer.
- A substitution-permutation network with 10 rounds
Explanation
DES is a Feistel cipher: the 64-bit block is split into two 32-bit halves and pushed through 16 rounds, each using a 48-bit subkey derived from the 56-bit key. Feistel structure lets decryption reuse the same hardware with reversed subkey order.
Question 37Symmetric Cryptography & Hashes
What is the effective key length of the original DES algorithm once parity bits are removed, and why does this matter for brute-force resistance?
- 112 bits, because the key is applied twice
- 48 bits, because each round subkey is 48 bits
- 56 bits, because 8 of the 64 key bits are parity Correct answer.
- 64 bits, because all key bits are used in the schedule
Explanation
DES takes a 64-bit key but discards 8 parity bits, leaving a 56-bit effective key space of about 7.2 x 10^16 values. That space was exhaustible by dedicated hardware, which is why DES was replaced by triple DES and eventually AES.
Question 38Symmetric Cryptography & Hashes
Which mode of operation turns a block cipher into a stream-like keystream generator by encrypting an incrementing counter for each block?
- CFB mode
- CTR mode Correct answer.
- CBC mode
- ECB mode
Explanation
Counter (CTR) mode encrypts a nonce plus counter value for each block and XORs the result with plaintext, producing a keystream. Because blocks are independent, CTR allows parallel encryption and random access, but the counter must never repeat under the same key.
Question 39Symmetric Cryptography & Hashes
Which hash algorithm is built on the Merkle-Damgard construction and produces a 160-bit digest now considered broken for collision resistance?
- SHA-3-256
- BLAKE2s
- SHA-256
- SHA-1 Correct answer.
Explanation
SHA-1 outputs 160 bits and follows Merkle-Damgard padding and chaining. Practical collision attacks (SHAttered) made it unsuitable for signatures and certificates, so NIST deprecated it for digital signature generation.
Question 40Symmetric Cryptography & Hashes
Which property must a cryptographic hash satisfy so that finding any two distinct inputs with the same digest is computationally infeasible?
- Second-preimage resistance
- Avalanche effect
- Collision resistance Correct answer.
- Preimage resistance
Explanation
Collision resistance means no efficient method exists to find any pair x != y with H(x) = H(y). It is stronger than second-preimage resistance, which fixes one input and asks for a different input with the same digest.
Question 41Symmetric Cryptography & Hashes
In a Feistel cipher, which operation combines the round function output with the other half of the block?
- Bitwise XOR Correct answer.
- Bitwise AND
- Modular multiplication
- Left circular shift
Explanation
Feistel rounds compute F(half, subkey) and XOR it into the opposite half, then swap halves. XOR is chosen because it is its own inverse, so the same round function works for encryption and decryption.
Question 42Symmetric Cryptography & Hashes
A legacy system uses 3DES in two-key mode (2TDEA). What is its effective security strength against meet-in-the-middle attack?
- About 168 bits
- About 56 bits
- About 80 bits
- About 112 bits Correct answer.
Explanation
Two-key triple DES applies EDE with K1, K2, K1, giving 112 bits of effective strength because a meet-in-the-middle attack reduces the nominal 112-bit key material to roughly 2^112 work, and NIST treats it as about 80-112 bits depending on guidance. Three-key 3DES approaches 112 bits as well due to similar attacks.
Question 43Symmetric Cryptography & Hashes
An application encrypts many records with AES-CBC using a fixed, hard-coded IV. What is the primary security consequence?
- The cipher degrades to a stream cipher with a repeating keystream
- The AES key schedule becomes invertible, exposing the key
- Ciphertext blocks can no longer be decrypted without the IV
- Identical plaintext prefixes produce identical first ciphertext blocks, leaking equality of data Correct answer.
Explanation
CBC XORs the IV into the first plaintext block, so a constant IV makes equal first blocks encrypt identically, revealing pattern equality across records. A fresh unpredictable IV per message prevents this deterministic leakage.
Question 44Symmetric Cryptography & Hashes
Why is ECB mode considered unsuitable for encrypting structured data such as bitmap images or database fields?
- It cannot be combined with padding, so partial blocks are lost
- It requires a unique nonce for every block, which is impractical at scale
- Equal plaintext blocks encrypt to equal ciphertext blocks, preserving visible patterns Correct answer.
- It expands every block by one byte, breaking fixed-length records
Explanation
ECB encrypts each block independently, so identical plaintext blocks map to identical ciphertext blocks, exposing structure such as repeated fields or image contours. Randomized or chained modes (CBC, CTR, GCM) break that determinism.
Question 45Symmetric Cryptography & Hashes
In AES, which step provides confusion by substituting each byte via a fixed invertible lookup table?
- SubBytes Correct answer.
- AddRoundKey
- MixColumns
- ShiftRows
Explanation
SubBytes applies the S-box to every state byte, a nonlinear substitution that creates confusion between key and ciphertext. ShiftRows and MixColumns provide diffusion, while AddRoundKey combines the round key.
Question 46Symmetric Cryptography & Hashes
A developer needs authenticated encryption so that tampering with ciphertext is detected. Which AES mode should be selected?
- CFB
- OFB
- GCM Correct answer.
- CBC
Explanation
GCM combines CTR-mode encryption with GHASH authentication, producing a tag that verifies integrity and authenticity of both ciphertext and associated data. CBC, CFB, and OFB provide confidentiality only and need a separate MAC such as HMAC.
Question 47Symmetric Cryptography & Hashes
What is the primary purpose of a keyed hash such as HMAC rather than a plain hash like SHA-256?
- To increase the digest length beyond 256 bits
- To compress the message before encryption
- To make the hash collision resistant without a key
- To provide message authentication using a shared secret key Correct answer.
Explanation
HMAC nests a secret key into the hash computation so only parties holding the key can produce or verify the tag, giving message authentication and integrity. A plain hash anyone can compute cannot prove origin.
Question 48Symmetric Cryptography & Hashes
An attacker captures a CBC-encrypted cookie and flips a bit in ciphertext block C(i-1). What happens to the decrypted plaintext?
- Only block P(i-1) becomes garbled and P(i) is unchanged
- Block P(i) is corrupted in the same bit position and P(i-1) becomes garbled Correct answer.
- The entire message after block i is garbled due to chaining
- Decryption fails entirely and no plaintext is produced
Explanation
In CBC decryption, P(i) = D(C(i)) XOR C(i-1), so flipping a bit in C(i-1) flips the corresponding plaintext bit in P(i). The same corrupted block also garbles P(i-1) because C(i-1) is itself decrypted to form that block.
Question 49Symmetric Cryptography & Hashes
Why does CTR mode require that a counter value never repeat under the same key?
- Reusing a counter causes the block cipher to reject the key
- Reusing a counter forces the mode into ECB behavior
- Reusing a counter halves the effective key length
- Reusing a counter reuses keystream, so XOR of two ciphertexts reveals plaintext XOR Correct answer.
Explanation
CTR encrypts the counter to form keystream, so a repeated counter yields the same keystream for two messages. XORing the two ciphertexts cancels the keystream and leaves the XOR of plaintexts, from which content can be recovered.
Question 50Symmetric Cryptography & Hashes
Which statement about SHA-256 versus SHA-512 is accurate?
- SHA-512 uses 80 rounds and a 512-bit block, while SHA-256 uses 64 rounds and a 512-bit block
- Both use 64 rounds, but SHA-512 operates on 64-bit words and a 1024-bit block Correct answer.
- SHA-512 is a sponge construction while SHA-256 is Merkle-Damgard
- SHA-256 produces a 256-bit digest from a 1024-bit block, while SHA-512 uses a 512-bit block
Explanation
SHA-256 and SHA-512 share the same round count of 64 but differ in word size and block size: SHA-256 uses 32-bit words and 512-bit blocks, SHA-512 uses 64-bit words and 1024-bit blocks. Both are Merkle-Damgard designs with different digest lengths.