# Thread: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

1. ## f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

In this cryptosystem we use the ordinary English alphabet A,...,Z with the letters numbered from 0 to 25. We number digraphs using enumaration to base 26. We encode digraphs using the affine transformation

f(x) ≡ 213x + 111 (mod 676).

How would you encode the message FINAL?

2. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

Note the following
$676 = 26^2$

$na &\equiv nb \mod n^2 \iff a &\equiv b \mod n.$ (Show through definition to be convinced.)

$f(x) &\equiv 213x + 111 \mod 26 \iff f(x) &\equiv 5x + 7 \mod 26$

EDIT://
Nevermind. Above isn't as useful as I thought.
I'll go through one letter, F = 6, the straightforward way.

$f(6) = 213(6) + 111 = 1389 \mod 676 &\equiv 37 \mod 676$

3. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

thankyou, but how is F = 6, shouldnt it be F=5?

4. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

If A=0, B=1 ... F=5
If A=1, B=2 ... F=6

5. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

Yes, you're right. F=5

6. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

ok so,
f(5) = 213 (5) + 111 = 1176 mod 676 ≡ 125 mod 676 ?

what do i do after this step? am i able to convert F into another letter?

7. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

It wouldn't be another letter. Remember, you're using digraphs. 125 is the resulting digraph from the function.

8. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

right, so for the answer, i would have 5 numbers ( one for each letter)?

9. ## Re: f(x) ≡ 213 x + 111 (mod 676). How would you encode the message FINAL

I think so, yes.
I did some more research on affine transformations. Those that I could find use functions that involve mod 26. In that case, you could have a correspondence between letters to letters. ex. f(x) = x + 1 mod(26) is a simple Caesar cipher. A->B, etc.

So for F,
f(5) = 213 (5) + 111 = 1176 = 500 mod 676 (Not sure why you got 125 on second look)

Hence FINAL can be mapped to 500-?-?-?-?

One can imagine the number 500 being encoded into a single character under a mod(676) affine transformation.

Thankyou