A few month ago I was reading somewhere that if you re-encrypt an encrypted message, it does not improve its security and it evens makes the cipher less secure. But as I search now, I cannot find any specific article regarding this case. It would be great if you let me know, and it would be awesome it you give me a reference so I can read about it. Thanks in advance.
问题:
回答1:
The answer really depends on the encryption being used.
If you rot-13 your plaintext twice, you get the plaintext back.
If you apply DES twice with different keys, you get the effect of a larger keyspace for an attacker to search. See reference at RSA.
The difference is whether the encryption function forms an algebraic group under functional composition. That is the same as saying the difference depends on whether, for an encryption function F() and keys Ki applied to a message m, does F( K1, F( K2, m)) == F( K3, m ) for some K3?
回答2:
For symmetric block ciphers:
There are two different cases: Encryption using the same key, and encryption using two independent keys.
Using different keys makes the encryption at least as strong as the stronger of the encryptions you use. In practice likely stronger than the stronger, but that's not guaranteed.
Using the same key is more problematic. But in practice it'll likely increase security over the individual cipher.
The main disadvantage of double encryption is that it's twice as slow.
For RSA
Using plain, paddingless RSA, double encrypting with the same key wouldn't increase security at all, since composing RSA encryption results in a single RSA encryption with a combined key.
But that's not relevant in practice, since you don't typically encrypt data directly with RSA, and you almost always use padding.
But a lot depends on what you're doing. For example when hashing, it's very important how the hashes are combined, and when you combine them in the wrong way, you might end up weakening your scheme significantly.
回答3:
Say you had a one-time pad and an xor function . . .
But seriously, it does not really make any difference. Personally, I feel that ciphers should be designed to be effective at one application, because in my experience often repeated applications amplify some artefacts that reduce the entropy of the ciphertext. It's kind of like destructive interference, where a large number of signals line up....that does seem to happen sometimes with repeating the same cipher -- though the effect is (for good ciphers) much less when you use different keys than if you use the same key. But it still makes me uneasy.
I believe the only reason to do it is to chain the plain/ciphertext in both directions so that errors are propagated and persist indicating that the message has been tampered with.