Search code examples
c#encryptionrijndael

Encrypt a string twice... Good, Bad or Ugly?


I'm working on an encryption class that is using Rijndael algorithm (C#, ASP.Net 4.5), and out of curiosity I was wondering how beneficial would it be to encrypt the string twice. I mean Encrypt the string with a key and then Encrypt the resulting encryption with another key?

Does this make it that much more secure (I know nothing is ever secure and there could be other holes in my software that could be used to exploit)? Is it worth the CPU overhead (not sure how heavy this is but I can't imagine it would light)?

I was looking for some suggestions online but was not able to find any. Any thoughts?


Solution

  • Have a couple of questions that may be of use to you:

    General idea seems to be this point:

    Well, think about it this way. If breaking one encryption with brute force will take longer than the lifetime of the universe, are you any safer with an encryption scheme that will take twice the lifetime of the universe? No. The first encryption cannot be broken. Adding a second encryption just adds computation overhead with no real benefit. - mikeazo

    I would advise asking this question in https://crypto.stackexchange.com/, they may give you more detailed information on the topic.