# Which compound algorithms would weaken cipher, not strengthen it?

OK, in school, some of the lecturers always say "if you compound the crypto, it may make the cipher weaker".

So, which combinations of algorithms would do this? Why? Can anyone show the mathematical proof?

For example, would RSAk1(AESk2[AESk3[x]]) make the encrypted x weaker? Assuming all keys used are different and randomly generated using a SecureRandom function.

• Hello, while I appreciate the reference, I was not talking about result becoming weaker of the two, and wanted an answer (with mathematical proof), that.. For example (not based on fact, though), RSAk1(AESk2[AESk3[x]]) = DESk4[x]. – user3635998 Mar 22 '16 at 11:58
• That Lindell fellow did not cover different algos, different keys. Please also assume that I have 100% control over the application as a dev. Thanks. The RSAk1(AESk2[AESk3[x]]) = DESk4[x] thing was just an example, I could write RSAk1(AESk2[AESk3[x]]) = 1+1, but that looks ridiculous. – user3635998 Mar 22 '16 at 12:16
• Oh? OK. Thank you for your replies. – user3635998 Mar 22 '16 at 12:20
• I moved my comments into their own answer and deleted them here. – malexmave Mar 22 '16 at 12:30