logo

Question detail

Use the following simple Vernam-cipher convention: represent A to Z as 0 to 25; encryption is c = (p + k) mod 26; decryption is p = (c - k) mod 26. Encrypt the plaintext DOG using the key QHF, then decrypt the ciphertext to recover DOG. Explain why the Vernam cipher is considered to have perfect security and state the rule about reusing the key.

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

Question

Type

practice

Style

Topic

Representing images, sound and other data

Exam-style question

Try this first

Use the following simple Vernam-cipher convention: represent A to Z as 0 to 25; encryption is c = (p + k) mod 26; decryption is p = (c - k) mod 26. Encrypt the plaintext DOG using the key QHF, then decrypt the ciphertext to recover DOG. Explain why the Vernam cipher is considered to have perfect security and state the rule about reusing the key.

Model answer

What a good answer should say

  • Using A = 0, B = 1, and so on: D is 3 and Q is 16, so (3 + 16) mod 26 = 19, which is T.
  • O is 14 and H is 7, so (14 + 7) mod 26 = 21, which is V.
  • G is 6 and F is 5, so (6 + 5) mod 26 = 11, which is L.
  • The ciphertext is TVL.

Explanation

Why this works

The same key values are added during encryption and subtracted during decryption, using modulo 26 to keep values within the alphabet. Perfect security depends on the key being uniformly random and never reused.

This distinguishes the Vernam cipher from ciphers whose security is based on computational difficulty.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.