Skip to main content

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 1, 2016 at 14:14 comment added user34734 The message begins with: W I S K Further, you know that ASCI code is encrypted using an encryption function of the form $$E (x) = ax + b$$ Calculations were done with$$mod 256256$$ 064066 158368 092525 143358 099354 141643 110102 051667 024006 190286 133343 This is it.
Jun 1, 2016 at 14:06 comment added user34734 @IlmariKaronen Sorry if it went off-topic, that wasn't my intention. I genuily don't know how to solve an equation of this type. I triple checked and my description of the ciphering method is correct...
Jun 1, 2016 at 12:06 comment added Ilmari Karonen @Lada: A simple brute force check shows that $14 a \equiv 161954 \pmod{256256}$ has no solutions. Thus, either your known plaintext (or ciphertext) or your description of the ciphering method is incorrect. (Also, while asking how to solve a particular type of cipher is OK, asking to have a particular piece of ciphertext decoded is considered off-topic here. Thus, even though it may not help you with this specific ciphertext, Charles's answer really does cover the entire on-topic part of your question.)
May 31, 2016 at 21:44 comment added user34734 87-73 = 14 (not coprime to 256256) 87-83 = 4 (not coprime to 256256) 87-75 = 12 (not coprime to 256256) 75-73 = 2 (not coprime to 256256) 83-75 = 8 (not coprime to 256256) 83-73 = 10 (not coprime to 256256) "18304" You mean that a = 18304 ?
May 31, 2016 at 21:12 comment added Charles None of the ${4\choose2}=6$ possibilities work? How odd. I guess you could just compute each of the 14 possibilities my analysis gives mod 18304.
May 31, 2016 at 20:30 comment added user34734 I did indeed only have WISK, but I highly suspect the first 8 letters are WISKUNDE, since that means math in dutch. Besides with just WISK I can't find a coprime with 256256.
May 31, 2016 at 20:27 comment added Charles @Lada Where does D come from? I thought you only had WISK.
May 31, 2016 at 20:13 comment added user34734 What am I doing wrong? I in ASCII is 73 and Din ASCII is 68. Substracting them I get the formula: $$ 5a\equiv48266\pmod{256256}. $$ Using the extended Euclidean algorithm I find that a 214658 is. I also calculate that b: $$ 110102 - 68 * 214658\equiv119950\pmod{256256}. $$ Whenever I insert these values ( a and b ) in the original formula: $$ E(x)=ax+bmod256256 $$ I only get the correct values for I and D. What am I doing wrong this time? I can not find a coprime in 256256 with just the letters W I S K by the way, or did I forget something?
May 31, 2016 at 19:23 comment added Charles @Lada: $78a+b-(73a+b)=5a$, not $5a+b.$ You then get $a$ from the extended Euclidean algorithm, and to get $b$ you compute, say, $092525-73a$.
May 31, 2016 at 19:07 comment added user34734 Thanks for the reply, I got a few questions though. What exactly do you mean by, substitute? Assuming the first seven letters are: W I S K U N D E, can I do the following? E is 73 in ASCII and N is 78 in ASCII. Therefore having: $$ 78a+b\equiv141643\pmod{256256}. $$ and $$ 73a+b\equiv092525\pmod{256256}. $$ Subtracting them $$ 5a+b\equiv49118\pmod{256256}. $$ I believe 5 is coprime to 256256. If I follow your equation: $$ 5a\equiv49118\pmod{256256}. $$ How exactly do I calculate b? Sorry if the questions seem obvious, having a hard time comprehending.
May 31, 2016 at 18:04 review First posts
May 31, 2016 at 18:23
May 31, 2016 at 18:01 history answered Charles CC BY-SA 3.0