Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is encrypting twice good or bad? [closed]

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.

like image 805
Erfan Avatar asked Dec 16 '22 03:12

Erfan


1 Answers

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?

like image 110
Heath Hunnicutt Avatar answered Jan 14 '23 05:01

Heath Hunnicutt