Solved

# simple question about an affine cipher

Posted on 2008-10-14

I have a question from college. Simple one as I am new to the subject.

2. An affine cipher with a modulus m=31 is used. Given the encryption function

E(x) = (ax+b) mod 31

Determine which of the following values for a and b yield a valid decryption function

------------------------

a B

20 4

21 5

13 7

1 5

------------------------

I have found that the invertible integers mod31 are {1,3,5,7,9,11,15,17,19,21,23,25}

so must utilize one of the invertible integers for a.

any value of b is acceptable, however since everything is mod31 so need to use a

number between 0 and 25.

So I would take it that the answer is 21, 5 i.e. the second one?

I just want to make sure that I am correct and that I am understanding the question correctly.