SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
William Stallings
Chapter:
Classical Encryption Techniques
Exercise:
Problems
Question:1 | ISBN:9781292158587 | Edition: 7

Question

A generalization of the Caesar cipher, known as the affine Caesar cipher, has the following form: For each plaintext letter p, substitute the ciphertext letter C:

                               C = E([a, b], p) = (ap + b) mod 26

A basic requirement of any encryption algorithm is that it be one-to-one. That is, if p ≠ q, then E(k, p) ≠ E(k, q). Otherwise, decryption is impossible, because more than one plaintext character maps into the same ciphertext character. The affine Caesar cipher is not one-to-one for all values of a. For example, for a = 2 and b = 3, then E([a, b], 0) = E([a, b], 13) = 3.
a. Are there any limitations on the value of b? Explain why or why not.
b. Determine which values of a are not allowed.

c. Provide a general statement of which values of a are and are not allowed. Justify
your statement.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

a.

There are no limitations on the value of b in the affine Caesar cipher.

The value of b determines the shift applied to each plaintext letter before modular arithmetic is performed. Since modular arithmetic wraps around the alphabet, any value of b will produce a unique ciphertext letter for each plaintext letter, ensuring a one-to-one mapping.

b.

  • To determine which values of a are not allowed in the affine Caesar cipher, we need to find values of a that result in a non-one-to-one mapping. This occurs when the value of a shares a common factor with the modulus (26 in this case). The common factor means that some plaintext letters will map to the same ciphertext letter, making decryption impossible.
  • In the case of the affine Caesar cipher, the modulus is 26. So, we need to find values of a that have a common factor with 26. The common factors of 26 are 1, 2, 13, and 26. Therefore, the values of a that are not allowed in the affine Caesar cipher are 2, 13, and 26.

c.

In general, the values of a that are allowed in the affine Caesar cipher are the ones that are coprime (have no common factors) with the modulus (26 in this case).

This ensures a one-to-one mapping between plaintext and ciphertext letters. Conversely, the values of a that are not allowed are the ones that share a common factor with the modulus, as they result in a non-one-to-one mapping.

0 0

Discussions

Post the discussion to improve the above solution.