I am using RijndaelManaged in my current project to encrypt data , is there any way tht I can check whether the data is already encrypted or not so i don't end up encrypting it twice?
Asked
Active
Viewed 6,847 times
0
-
Do you also decrypt the data? How does that work if you don't know if it has been encrypted or not? – Ralf de Kleine Jul 22 '10 at 06:47
-
Do you mean to check whether it's already encrypted with that algorithm, or any algorithm? 'Good' encrypted data would not have any pattern or indication that it is encrypted, unless you know what the source data looks like – Kieren Johnstone Jul 22 '10 at 06:55
-
yes we do data decrypt the data – Punit Jul 22 '10 at 06:55
-
i mean to check whether it is already encrypted or not? yeah its better tht if i m able to find tht is encrypted with that algorthim – Punit Jul 22 '10 at 06:57
3 Answers
2
No, there is no reliable way to know whether the data you are examining has already been encrypted. Most plaintext has biases or patterns that can be detected, but those techniques are not guaranteed to work in general. You need to add additional structure to the ciphertext (or the plaintext), for example each ciphertext message or block begins with a 128-bit pattern.

President James K. Polk
- 40,516
- 21
- 95
- 125
0
If data can be compressed, then it normally means encryption (or other compression) has not been applied.

leppie
- 115,091
- 17
- 196
- 297
0
I think this question is a close match to what you are asking. Please leave a comment if the answers to that question were not enough.
-
i checked the solution given in the link, but do you think it is really good tht we shud unecessarily decrypt the value to check whether data is encrypted or not, i don't think so, it impacts perfomance. – Punit Jul 22 '10 at 06:54