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
    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
    Yes, but this is obvious without even thinking about general affine ciphers.2012-02-25