Timeline for How does this affine cipher work?
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 7, 2016 at 14:54 | comment | added | user94293 | @Lada: Yes, the new problem is not solvable. | |
Jun 7, 2016 at 14:41 | comment | added | user34734 | @user94293 Correct, but is there any other way I could get $gcd(a,n)=1$ with my numbers? Did I even do it the correct way? I also know that $a$ and $b$ are primes. Are you telling me this problem is also not solvable? | |
Jun 7, 2016 at 14:30 | comment | added | user94293 | @Lada: Encryption should be injective: each ciphertext has then a unique corresponding plaintext. For the affine cipher, this is guaranteed if $\gcd(a,n) = 1$. In your case, $\gcd(28002,215475) = 39$ and so the plaintext message cannot be fully recovered. You could suggest your teacher to use a prime modulus, for example, $n = 255259$. | |
Jun 7, 2016 at 11:42 | comment | added | user34734 |
@Charles and @user94293 You were correct, it was incorrect. I got a new one but I can't seem to solve it again... $$E(x)=ax+b mod 215475$$ The first 4 letters are W i s k and the encrypted text is: 091238 057542 070713 195800 138772 029721 035480 Each group of 6 numbers resembles 2 letters. What I did was: W i in ASCII is 087105 and s k is 115107 $$ 115107a+b\equiv057542\pmod{215475}. $$ $$ 087105a+b\equiv091238\pmod{215475}. $$ Subtracting I get: $$ 28002a\equiv181779\pmod{215475}. $$ $28002$ is not coprime to $215475$ .. What's the issue?
|
|
Jun 2, 2016 at 15:59 | comment | added | user94293 |
@Lada: Assuming that ASCII codes are concatenated (i.e., $x = 087073$ for WI and $x=083057$ for SK ), this yields $a=249951$ and $b=158979$. The problem is that this $a$ cannot be inverted modulo $256256$: $\gcd(249951,256256) = 13$.
|
|
Jun 2, 2016 at 15:17 | comment | added | user34734 |
@Charles @user94293 Well, this might be the issue: According to my teacher W I are encrypted to $064066$ and S K to $158368$
|
|
Jun 2, 2016 at 13:42 | history | edited | user94293 | CC BY-SA 3.0 |
added 4 characters in body
|
Jun 1, 2016 at 19:52 | comment | added | Charles | I concur -- the problem, as written, is not solvable. | |
Jun 1, 2016 at 16:25 | comment | added | user94293 | Since decryption is given by $E^{-1}(y) = (y-b)\cdot a^{-1} \bmod 256256$, the value of $a$ defining encryption should be relatively prime to $256256$; i.e., $\gcd(a,256256) = 1$. You should check that with your teacher. | |
Jun 1, 2016 at 16:19 | history | edited | user94293 | CC BY-SA 3.0 |
added 4 characters in body
|
Jun 1, 2016 at 15:35 | comment | added | user34734 | I will come with an answer tomorrow, interesting way of approaching the problem by the way, never thought of it. | |
Jun 1, 2016 at 15:04 | history | answered | user94293 | CC BY-SA 3.0 |