Which cipher uses a keyword to determine shifts for each letter in the plaintext?

Prepare for the CodeHS AP Computer Science Principles Exam with multiple choice questions, detailed explanations, and helpful hints. Boost your confidence and get ready for your exam!

Multiple Choice

Which cipher uses a keyword to determine shifts for each letter in the plaintext?

Explanation:
The idea being tested is keyword-driven, per-letter shifting in a substitution scheme. In this approach, a chosen keyword determines how much each letter of the plaintext is shifted, and that amount changes from position to position because the keyword is repeated as needed. For each plaintext letter, you look at the corresponding letter of the repeated keyword, convert that keyword letter to a shift amount (A=0, B=1, ..., Z=25), and shift the plaintext letter by that amount. This creates different shifts for successive letters, making the cipher polyalphabetic rather than a single fixed shift. That per-letter, keyword-based shifting is what the Vigenère cipher does, which is why it’s the correct match. The other ciphers don’t use a keyword to drive a varying shift pattern: the Caesar cipher applies one fixed shift to every letter; the affine cipher applies a fixed linear transformation to each letter, independent of a keyword; the Playfair cipher uses digraph substitution based on a 5x5 grid and isn’t about shifting each letter by a position from a keyword.

The idea being tested is keyword-driven, per-letter shifting in a substitution scheme. In this approach, a chosen keyword determines how much each letter of the plaintext is shifted, and that amount changes from position to position because the keyword is repeated as needed. For each plaintext letter, you look at the corresponding letter of the repeated keyword, convert that keyword letter to a shift amount (A=0, B=1, ..., Z=25), and shift the plaintext letter by that amount. This creates different shifts for successive letters, making the cipher polyalphabetic rather than a single fixed shift.

That per-letter, keyword-based shifting is what the Vigenère cipher does, which is why it’s the correct match. The other ciphers don’t use a keyword to drive a varying shift pattern: the Caesar cipher applies one fixed shift to every letter; the affine cipher applies a fixed linear transformation to each letter, independent of a keyword; the Playfair cipher uses digraph substitution based on a 5x5 grid and isn’t about shifting each letter by a position from a keyword.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy