# [ACCEPTED]-Is encrypting twice good or bad?-encryption

The answer really depends on the encryption 11 being used.

If you rot-13 your plaintext twice, you 10 get the plaintext back.

If you apply DES twice 9 with different keys, you get the effect 8 of a larger keyspace for an attacker to 7 search. See reference at RSA.

The difference is whether the encryption 6 function forms an algebraic group under 5 functional composition. That is the same 4 as saying the difference depends on whether, for 3 an encryption function **F()** and keys *Ki* applied 2 to a message *m*, does F( *K1*, F( *K2*, *m*)) == F( *K3*, *m* ) for 1 some *K3*?

## For symmetric block ciphers:

There are two different cases: Encryption 22 using the same key, and encryption using 21 two independent keys.

Using different keys 20 makes the encryption at least as strong 19 as the stronger of the encryptions you use. In 18 practice likely stronger than the stronger, but 17 that's not guaranteed.

Using the same key 16 is more problematic. But in practice it'll 15 likely increase security over the individual 14 cipher.

The main disadvantage of double encryption 13 is that it's twice as slow.

## For RSA

Using plain, paddingless 12 RSA, double encrypting with the same key 11 wouldn't increase security at all, since 10 composing RSA encryption results in a single 9 RSA encryption with a combined key.

But that's 8 not relevant in practice, since you don't 7 typically encrypt data directly with RSA, and 6 you almost always use padding.

But a lot 5 depends on what you're doing. For example 4 when hashing, it's very important how the 3 hashes are combined, and when you combine 2 them in the wrong way, you might end up 1 weakening your scheme significantly.

Say you had a one-time pad and an xor function 18 . . .

But seriously, it does not really make 17 any difference. Personally, I feel that 16 ciphers should be designed to be effective 15 at one application, because in my experience 14 often repeated applications amplify some 13 artefacts that reduce the entropy of the 12 ciphertext. It's kind of like destructive 11 interference, where a large number of signals 10 line up....that does seem to happen sometimes 9 with repeating the same cipher -- though 8 the effect is (for good ciphers) much less 7 when you use different keys than if you 6 use the same key. But it still makes me 5 uneasy.

I believe the only reason to do 4 it is to chain the plain/ciphertext in both 3 directions so that errors are propagated 2 and persist indicating that the message 1 has been tampered with.

More Related questions

We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.