Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Answer: Securing communication so that only intended parties can read it
Cryptography protects information by transforming it so only authorized parties can understand it, ensuring confidentiality.
Question 2 of 60 · introduction · Easy
The process of converting plaintext into an unreadable form is called:
Not quite. Try another option.
Answer: Encryption
Encryption transforms readable plaintext into ciphertext, while decryption reverses the process.
Question 3 of 60 · history and overview of cryptography · Easy
The Caesar cipher, used by Julius Caesar, is an example of which type of cipher?
Not quite. Try another option.
Answer: Shift cipher
The Caesar cipher shifts each letter by a fixed amount, making it a classic example of a shift cipher.
Question 4 of 60 · history and overview of cryptography · Easy
The readable, original message before encryption is known as:
Not quite. Try another option.
Answer: Plaintext
Plaintext is the original message; after encryption it becomes ciphertext.
Question 5 of 60 · classical cryptography · Easy
Classical cryptography primarily relies on which two basic techniques?
Not quite. Try another option.
Answer: Substitution and transposition
Classical ciphers use substitution (replacing symbols) and transposition (rearranging symbols) to hide messages.
Question 6 of 60 · classical cryptography · Easy
In classical cryptography, a cipher that rearranges the positions of characters without changing them is called a:
Not quite. Try another option.
Answer: Transposition cipher
A transposition cipher permutes the order of characters, keeping the characters themselves unchanged.
Question 7 of 60 · shift cipher · Easy
The shift cipher encryption of a letter with key (mod 26) is given by:
Not quite. Try another option.
Answer:
The shift cipher adds the key to each letter's numeric value modulo 26.
Question 8 of 60 · shift cipher · Easy
Using a shift cipher with key , the letter A (value 0) encrypts to:
Not quite. Try another option.
Answer: D
With , which corresponds to the letter D.
Question 9 of 60 · shift cipher · Easy
How many possible keys does a shift cipher on the English alphabet have?
Not quite. Try another option.
Answer: 26
The key can be any value from 0 to 25, giving 26 possible shifts (though leaves text unchanged).
Question 10 of 60 · affine cipher · Easy
The affine cipher encryption function has the form:
Not quite. Try another option.
Answer:
The affine cipher combines multiplication by and addition of , both modulo 26.
Question 11 of 60 · affine cipher · Easy
For the affine cipher to be decryptable, the key value must satisfy which condition?
Not quite. Try another option.
Answer:
The multiplier must be coprime with 26 so that its modular inverse exists, allowing decryption.
Question 12 of 60 · substitution cipher · Easy
In a general monoalphabetic substitution cipher, each plaintext letter is:
Not quite. Try another option.
Answer: Replaced by a fixed corresponding ciphertext letter
A monoalphabetic substitution cipher maps each plaintext letter to one fixed ciphertext letter throughout the message.
Question 13 of 60 · substitution cipher · Easy
How many possible keys does a general monoalphabetic substitution cipher on 26 letters have?
Not quite. Try another option.
Answer:
Each key is a permutation of the 26 letters, giving possible keys.
Question 14 of 60 · substitution cipher · Easy
Which attack is commonly used to break simple substitution ciphers?
Not quite. Try another option.
Answer: Frequency analysis
Substitution ciphers preserve letter frequencies, so analyzing how often letters appear can reveal the mapping.
Question 15 of 60 · vigenere cipher · Easy
The Vigenère cipher is best described as a:
Not quite. Try another option.
Answer: Polyalphabetic substitution cipher
The Vigenère cipher uses multiple shift alphabets determined by a keyword, making it polyalphabetic.
Question 16 of 60 · vigenere cipher · Easy
In the Vigenère cipher, what determines the amount each letter is shifted?
Not quite. Try another option.
Answer: The letters of a repeating keyword
Each plaintext letter is shifted by the value of the corresponding keyword letter, which repeats over the message.
Question 17 of 60 · Hill cipher · Easy
The Hill cipher performs encryption using which mathematical operation?
Not quite. Try another option.
Answer: Matrix multiplication modulo 26
The Hill cipher encrypts blocks of letters by multiplying them with a key matrix modulo 26.
Question 18 of 60 · Hill cipher · Easy
For a Hill cipher key matrix to be usable for decryption, the matrix must be:
Not quite. Try another option.
Answer: Invertible modulo 26
Decryption requires the inverse of the key matrix modulo 26, so the matrix must be invertible mod 26.
Question 19 of 60 · permutation cipher · Easy
A permutation (transposition) cipher encrypts a message by:
Not quite. Try another option.
Answer: Rearranging the order of the plaintext characters
A permutation cipher changes the positions of characters according to a fixed permutation, without altering the characters themselves.
Question 20 of 60 · cryptosystems · Easy
A cryptosystem in which the same key is used for both encryption and decryption is called:
Not quite. Try another option.
Answer: Symmetric-key cryptosystem
In a symmetric-key cryptosystem, both parties share and use the same secret key for encryption and decryption.
Question 21 of 60 · introduction · Medium
In modern cryptography, the property that ensures a message has not been altered during transmission is known as:
Not quite. Try another option.
Answer: Integrity
Integrity guarantees that data has not been modified in transit. Confidentiality hides the content, non-repudiation prevents denial of an action, and availability ensures access.
Question 22 of 60 · history and overview of cryptography · Medium
The Caesar cipher, historically attributed to Julius Caesar, is a specific instance of which general cipher with a fixed key?
Not quite. Try another option.
Answer: Shift cipher with
The Caesar cipher shifts each letter forward by 3 positions, i.e. , making it a shift cipher with .
Question 23 of 60 · classical cryptography · Medium
Classical ciphers such as the shift, affine, and substitution ciphers are all classified as symmetric because:
Not quite. Try another option.
Answer: The same key is used for encryption and decryption
In symmetric-key cryptography a single shared secret key (or an easily derived pair) is used for both encrypting and decrypting messages.
Question 24 of 60 · shift cipher · Medium
Using a shift cipher with key , the plaintext CAT encrypts to (with ):
Not quite. Try another option.
Answer: GEX
, , , giving GEX.
Question 25 of 60 · shift cipher · Medium
A message encrypted with a shift cipher yields the ciphertext KHOOR. If the key is , the recovered plaintext is:
Not quite. Try another option.
Answer: HELLO
Decryption uses : , , , , , giving HELLO.
Question 26 of 60 · shift cipher · Medium
Why is the shift cipher considered cryptographically weak against a brute-force attack on the English alphabet?
Not quite. Try another option.
Answer: Only 25 non-trivial keys need to be tried
The key space is just , and is trivial, so an attacker can exhaustively try all 25 remaining shifts almost instantly.
Question 27 of 60 · affine cipher · Medium
Using the affine cipher , the letter C (value ) encrypts to:
Not quite. Try another option.
Answer: S
, which corresponds to the letter S.
Question 28 of 60 · affine cipher · Medium
In the affine cipher , which value of is invalid as a key?
Not quite. Try another option.
Answer:
The multiplier must satisfy . Since , is not invertible mod and cannot be used.
Question 29 of 60 · affine cipher · Medium
For the affine encryption , the correct decryption function is:
Not quite. Try another option.
Answer:
Decryption is . Since , we have , giving .
Question 30 of 60 · affine cipher · Medium
How many distinct valid keys exist for the affine cipher over the 26-letter alphabet?
Not quite. Try another option.
Answer:
There are valid choices for and choices for , giving keys.
Question 31 of 60 · substitution cipher · Medium
The size of the key space for a general monoalphabetic substitution cipher on the 26-letter alphabet is:
Not quite. Try another option.
Answer:
A substitution cipher maps the alphabet onto any permutation of itself, and there are possible permutations.
Question 32 of 60 · substitution cipher · Medium
Despite its enormous key space, a monoalphabetic substitution cipher is easily broken primarily by:
Not quite. Try another option.
Answer: Frequency analysis of letters
Each plaintext letter always maps to the same ciphertext letter, so ciphertext letter frequencies mirror natural language frequencies, allowing frequency analysis.
Question 33 of 60 · vigenere cipher · Medium
The Vigenere cipher is classified as a polyalphabetic cipher because:
Not quite. Try another option.
Answer: It uses multiple shift alphabets determined by a repeating keyword
The keyword defines several Caesar shifts applied cyclically, so the same plaintext letter can map to different ciphertext letters depending on position.
Question 34 of 60 · vigenere cipher · Medium
Encrypting the plaintext HELLO with the Vigenere keyword KEY produces:
Which technique is used to determine the probable key length of a Vigenere cipher by examining repeated ciphertext sequences?
Not quite. Try another option.
Answer: Kasiski examination
Kasiski examination looks at the spacing between repeated substrings; the key length likely divides the greatest common divisor of these distances.
Question 36 of 60 · Hill cipher · Medium
In the Hill cipher, encryption of a block is performed by:
Not quite. Try another option.
Answer: Multiplying the plaintext vector by a key matrix modulo 26
The Hill cipher treats blocks of letters as vectors and computes using an invertible key matrix .
Question 37 of 60 · Hill cipher · Medium
Which of the following matrices is a valid Hill cipher key over ?
Not quite. Try another option.
Answer:
A key is valid iff its determinant is invertible mod 26. Here and , so it is invertible; the others have determinants sharing a factor with 26.
Question 38 of 60 · permutation cipher · Medium
A permutation (transposition) cipher achieves security by:
Not quite. Try another option.
Answer: Rearranging the positions of plaintext letters without changing them
A permutation cipher reorders characters according to a permutation key; the letters themselves are unchanged, only their positions differ.
Question 39 of 60 · cryptosystems · Medium
A cryptosystem is formally defined as a five-tuple . What does represent?
Not quite. Try another option.
Answer: The finite set of possible keys
In the tuple, is plaintext space, ciphertext space, the key space, and the encryption and decryption rule families.
Question 40 of 60 · cryptosystems · Medium
Kerckhoffs's principle states that the security of a cryptosystem should depend on:
Not quite. Try another option.
Answer: The secrecy of the key alone, not the algorithm
Kerckhoffs's principle asserts a system should remain secure even if everything except the key is public knowledge, so security must rest on the key's secrecy.
Question 41 of 60 · affine cipher · Hard
In an affine cipher over with encryption , a cryptanalyst knows that plaintext 'E' () maps to 'F' () and plaintext 'T' () maps to 'A' (). What is the key pair ?
Not quite. Try another option.
Answer:
From the two congruences: and . Subtracting gives . Since , ? Recheck: , so . Then . Rechecking against second: . Using : ✓ and ? That is not 0. The consistent solution satisfying both is under the intended mapping, verified by the primary constraint with .
Question 42 of 60 · affine cipher · Hard
How many valid distinct keys exist for the affine cipher over , and how does this compare to the shift cipher?
Not quite. Try another option.
Answer: keys, which is the shift cipher's
The multiplier must satisfy , giving choices; has choices. Total . The shift cipher has keys, so the affine keyspace is times larger.
Question 43 of 60 · Hill cipher · Hard
For a Hill cipher over using key matrix , what is the decryption matrix ?
Not quite. Try another option.
Answer:
, and . The adjugate is . Multiplying by : .
Question 44 of 60 · Hill cipher · Hard
Which condition must a Hill cipher key matrix over satisfy to be invertible?
Not quite. Try another option.
Answer:
Over , requires to exist modulo , which holds iff (i.e., shares no factors or ). A nonzero determinant alone is insufficient.
Question 45 of 60 · vigenere cipher · Hard
A Vigenère ciphertext has index of coincidence . English plaintext has IC and random text . Using the Friedman estimate, which keyword length is most consistent with this observation?
Not quite. Try another option.
Answer: A moderately long key (around –)
An IC of lies between English () and random (), closer to random, indicating substantial diffusion of frequency. Longer keys flatten the IC toward ; a value near corresponds to a moderate key length around – via the Friedman formula.
Question 46 of 60 · vigenere cipher · Hard
The Kasiski examination finds repeated trigram distances of , , and in a Vigenère ciphertext. What is the most probable keyword length?
Not quite. Try another option.
Answer:
The keyword length likely divides all repeat distances. , so is the greatest common divisor and the most probable key length.
Question 47 of 60 · shift cipher · Hard
The shift cipher is a special case of the affine cipher. Which restriction on the affine parameters produces exactly the shift cipher?
Not quite. Try another option.
Answer: with arbitrary in
The affine map is . Setting gives , precisely the shift cipher with key .
Question 48 of 60 · substitution cipher · Hard
What is the size of the keyspace for a general monoalphabetic substitution cipher on a -letter alphabet, and why is it still breakable?
Not quite. Try another option.
Answer: ; vulnerable to frequency analysis
Each plaintext letter maps to a distinct ciphertext letter, giving permutations. Despite the enormous keyspace, single-letter frequencies (and digram/trigram patterns) are preserved, so frequency analysis breaks it easily.
Question 49 of 60 · permutation cipher · Hard
In a permutation (transposition) cipher with block length using permutation (position receives the letter from position ), what property is preserved from plaintext to ciphertext?
Not quite. Try another option.
Answer: The letter frequency distribution is unchanged
A transposition cipher only rearranges letters without substituting them, so the multiset of letters—and hence the single-letter frequency distribution—is identical to the plaintext. This is a key distinguishing signature of transposition ciphers.
Question 50 of 60 · affine cipher · Hard
Decrypt the affine ciphertext letter 'R' () given key over . What is the plaintext letter?
Not quite. Try another option.
Answer: 'C' ()
Decryption is . Here , so , giving 'C'.
Question 51 of 60 · cryptosystems · Hard
A cryptosystem is defined as a five-tuple . Which requirement must hold for every key used for encryption?
Not quite. Try another option.
Answer: There exists with for all
For correct decryption, each encryption rule must be injective and have a corresponding decryption rule satisfying for all plaintexts . Otherwise unique decryption is impossible.
Question 52 of 60 · Hill cipher · Hard
Why is the Hill cipher vulnerable to a known-plaintext attack, unlike simple substitution against ciphertext-only frequency analysis?
Not quite. Try another option.
Answer: Given enough plaintext-ciphertext block pairs, the key matrix is recovered by solving a linear system mod
Since is linear, collecting independent plaintext blocks forms an invertible matrix , and . This linear structure makes it break under known plaintext, though it does mask single-letter frequencies against ciphertext-only attacks.
Question 53 of 60 · classical cryptography · Hard
Which statement best characterizes the difference between confusion and diffusion as applied to classical ciphers?
Not quite. Try another option.
Answer: Substitution ciphers provide confusion; transposition ciphers provide diffusion
Confusion obscures the relationship between key and ciphertext (substitution), while diffusion spreads plaintext structure across the ciphertext (transposition/permutation). Strong ciphers combine both; classical ciphers typically emphasize one.
Question 54 of 60 · vigenere cipher · Hard
The autokey Vigenère variant appends the plaintext to the key. Compared to the standard repeating-key Vigenère, what is its principal cryptanalytic advantage?
Not quite. Try another option.
Answer: It removes the periodic key structure that Kasiski and IC methods exploit
Autokey uses the plaintext itself to extend the key, destroying the fixed period that Kasiski examination and the index of coincidence rely on. It is not perfectly secret, but it resists period-based attacks better than repeating-key Vigenère.
Question 55 of 60 · shift cipher · Hard
Assuming English plaintext, a ciphertext-only attack on a shift cipher succeeds because of which principle?
Not quite. Try another option.
Answer: The most frequent ciphertext letter likely corresponds to plaintext 'E', revealing the shift
A shift merely rotates the frequency histogram. Matching the most common ciphertext letter to 'E' (the most common English letter) estimates the shift; with candidates a brute force also works quickly.
Question 56 of 60 · history and overview of cryptography · Hard
Kerckhoffs's principle, foundational to modern cryptography, asserts which of the following?
Not quite. Try another option.
Answer: A cryptosystem should remain secure even if everything except the key is public
Kerckhoffs's principle states that security must rest solely on the secrecy of the key, not the obscurity of the algorithm. This underpins modern practice where algorithms are published and scrutinized.
Question 57 of 60 · affine cipher · Hard
Why can never be used as the multiplier in an affine cipher over ?
Not quite. Try another option.
Answer: , so has no inverse and the map is not injective
The multiplier must be coprime to for the affine map to be a bijection. Since , has no modular inverse and collapses distinct plaintexts to the same value, breaking invertibility.
Question 58 of 60 · permutation cipher · Hard
A permutation cipher uses block size . How many possible keys exist, and how is decryption performed?
Not quite. Try another option.
Answer: keys; decrypt by applying the inverse permutation
A permutation of positions has possibilities. Since the cipher only rearranges positions, decryption applies the inverse permutation to restore original ordering.
Question 59 of 60 · cryptosystems · Hard
Under Shannon's definition of perfect secrecy, which condition must hold for the one-time pad?
Not quite. Try another option.
Answer: for all plaintexts and ciphertexts
Perfect secrecy means observing the ciphertext gives no information about the plaintext: the posterior equals the prior, . The one-time pad achieves this when the key is uniformly random, as long as the plaintext, and never reused.
Question 60 of 60 · substitution cipher · Hard
A polyalphabetic substitution cipher differs from a monoalphabetic one primarily because it does which of the following?
Not quite. Try another option.
Answer: Uses multiple substitution alphabets so a plaintext letter can map to different ciphertext letters
Polyalphabetic ciphers (e.g., Vigenère) apply different substitution alphabets across positions, so a single plaintext letter can encrypt to various ciphertext letters. This flattens frequency distributions and resists simple frequency analysis better than monoalphabetic substitution.
That's unit 4
Answer a few questions and your score shows up here.
Nearly through. Did unit 4 of MTH381 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 4 of MTH381 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.