Multiplication-Shift cipher Decyrpt

933 Views Asked by At

I am given sets of numbers to decrypt into letters, 446,882,915 ... these are the first 3. So I've been given K=2, a = 68 and shift b = 7. I've been given alphabet of n = 35 symbols.

I know the methods for encrypted letters to numbers, but for some reason i can't figure out the inverse.

Could anyone start it off for me? or provide me a link on how to do these type of questions? I type 2 graphs Decipher or k graphs but can't find anything

1

There are 1 best solutions below

1
On BEST ANSWER

So you are working with combinations of $2$ letters, I assume (the $k=2$ remark). Every character $c$ in the alphabet has a number $n(c) \in \{0,\ldots,34\} = \{0,\dots n-1\}$; I assume this numbering is known to you.

To encrypt two letters $c_1 c_2$, we consider them as the single number $n(c_1c_2) = 35n(c_1) + n(c_2) \in \{0,\dots,N-1\}$, where $N = n^2$ (similar like for alphabet size $n=10$ we'd get values in $0$ to $99$, e.g.). Then the encrypted number is $68n(c_1c_2) + 7$, modulo $N = 1225$.

Consider the first number $446 = 68n(c_1c_2) + 7$, so subtracting $7$ we get $68n(c_1c_2) = 439$, so we need to "divide" 439 by 68 (modulo $N$).

For this we have to apply Euclid's algorithm to find the inverse of $68$ modulo $1225$, e.g. using this tool. So we have to multiply by 1207 according to this (dividing is the same as multiplying by the inverse!)

And $1207 \cdot 439$ modulo $1225$ equals $673$ which must equal $n(c_1c_2)$, so $n(c_1) = 673 / 35 = 19$ and $n(c_2) = 673$ mod 35, which equals 8. So now you can determine the characters as well, from the mapping.