7
$\begingroup$

I would like to know your view about the title, encrypting a plain text with an affine cipher then encrypting that ciphertext once more using the same cipher, but of course different keys. Would it be more secure?

For me it won't, it still can be brute force, that's what I think and I have read about Vigenere over a Vigenere, so practically they would be the same case, right?

$\endgroup$
  • 1
    $\begingroup$ Well, the key sizes must be different. Otherwise, you can reduce the cascade to one invocation of the base cipher (talking about Vigenère). $\endgroup$ – Artjom B. Jan 13 '16 at 11:54
  • 5
    $\begingroup$ Even if the key sizes are different, it reduces to a single Vigenère with a longer key (whose length is the LCM of the lengths of the two keys). $\endgroup$ – fkraiem Jan 13 '16 at 12:11
13
$\begingroup$

If you combine two affine ciphers, you obtain one affine cipher. Say the first cipher is $e_1(x) = a_1x+b_1$ and the second is $e_2(x) = a_2x+b_2$. Then $e_1(e_2(x)) = a_1(a_2x+b_2)+b_1 = (a_1a_2)x+(a_1b_2+b_1)$.

Note that if $a_1$ and $a_2$ are both relatively prime with the modulus, then so is $a_1a_2$, so the new cipher can also be deciphered.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.