0
$\begingroup$

I am curious - If I had a text that I encrpyted with an affine cipher, would superencrypting with another affine cipher (after the first) increase the mathematical security in the final answer?

What if we encrpyted with affine first, then shift?

I think just two shifts would not increase security but I am not sure about these other two scenarios.

2 Answers 2

0

Well a shift is a type of affine cipher (just take $a=1$).

Let's look at what happens when we combine two affine substitutions:

After one we will get (for $a$ coprime to 26):

$x \mapsto ax + b \,\text{ mod }\, 26$

Then the next gives (for $a'$ coprime to 26):

$ax+b \mapsto a'(ax+b) + b' = (aa')x + a'b + b'\, \text{ mod }\, n$.

Note that $aa'$ will also be coprime to $n$ and so we just get another affine substitution! Doing multiple affine subs just gives another affine sub.

  • 0
    I think I see why an affine, then a shift would be the same. 3x+3 is and shift of +3 is the same as affine of 3x+62012-02-25
  • 0
    Yes, and you would get something different if you shifted first.2012-02-25
  • 0
    But it isnt mathematically more secure?2012-02-25
  • 0
    No, you have just got another of the type of cipher you started with and the key is still as likely to be a given possibility as it was before.2012-02-25
1

The composition of two affine ciphers is another affine cipher, so composing them is not going to increase security. At least that's if the modulus is the same.

If the moduli are different, the composition would be slightly more complex than a simple affine cipher, and thus possibly represent an "increase in security" -- but only because the baseline security of affine ciphers is so low.

By "shift", do you mean just an affine cipher with a multiplier of 1? If so, the same goes for that.

  • 0
    Right, it would be a multiplier of 1. I was thinking that two affines would increase security. If we had 2x + 3 and then 3x + 4. This is not the same as 5x + 7. I tried this and it did not give the same answer.2012-02-25
  • 0
    Because you dont combine them by addition...you should be composing them as functions!2012-02-25
  • 0
    But doing $x\mapsto 2x+3$ and then $x\mapsto 3x+4$ _is_ the same as $x\mapsto 6x+13$.2012-02-25
  • 0
    Also $2x+3$ doesn't define an affine sub on the usual alphabet...26 is not coprime to 2.2012-02-25
  • 0
    For 2 shift ciphers, I could just say that shift 1 + shift 2 = shift 3 which is just another shift2012-02-25
  • 0
    Yes, but this is obvious without even thinking about general affine ciphers.2012-02-25