Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

This question already has an answer here:

I would like to know if there are any security risks/gains from encrypting twice, i.e. $$\text{plaintext}\xrightarrow{encrypt}\text{intermediate text}\xrightarrow{encrypt}\text{ciphertext}.$$ I would like to know if there are known gains/risks to what I'm looking at. Perhaps certain pairs of systems are compatible while others are detrimental. Or perhaps some systems are obviously its own inverse (like the one-time pad).

I would like to hear your thoughts and if there is a survey paper, that would be great as well. Thanks!

share|improve this question

marked as duplicate by e-sushi, rath, Gilles, B-Con, Maeher Oct 16 '13 at 6:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

1 Answer 1

I found this information which may be useful for you:

The general rule as far as I know, is that encrypting twice (regardless if its using the same cipher or not) is rarely ever going to produce positive side effects. In some cases it completely breaks the cipher:

For example in rot-13, encrypting the plaintext twice simply decrypts it:

E(E(pt)) = pt

I should note that rot-13 is not a cipher you should be using in practice, but I included it here just to show how certain ciphers will exhibit weaker strength when used twice.

Having said all this, it is generally safe to encrypt twice (i.e. wont make the cipher text weaker) as long as different keys are used during each step (see here for a better explanation).

share|improve this answer
1  
I seriously doubt anyone who knows cryptography would actually consider using ROT13 as a 'cipher'. ;) –  e-sushi Oct 11 '13 at 12:32
    
I know it's not to be considered a practical cipher, but I just wanted to use it as an example to show that encrypting twice does not usually have the side effect of causing stronger ciphertext, but is usually the opposite. –  Michael Aquilina Oct 11 '13 at 12:33
1  
That's why I added that smiley. I surely understood your intention. Problem is, if you choose independent keys upon each encryption, no current cryptographic algorithm will fall like your hypothetical use of ROT13 would. Now, you don't have to, but maybe you could think about changing "For example" to "Simplified example" or "Hypothetical example". That way, we can be sure that "absolute beginners" don't misunderstand and actually go use that in practice. As said, it's just something I think would make your answer more perfect… but please feel invited to ignore me in case you think different. –  e-sushi Oct 11 '13 at 12:43
add comment

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