Is there a way to check if an NSString
is encrypted by RSA? I looked around on stackoverflow and haven't found a reliable way of doing this. Not sure if this is possible or not.
Asked
Active
Viewed 53 times
1

Weakman10122
- 371
- 2
- 14
-
string is a string. How would you know if its encrypted? I mean it can contain any kind of string chars which may look like encrypted or maybe they are not. I don't think there will ever be a true test. You can assume its encrypted and try decrypting it. – Sam B Aug 10 '16 at 20:07
-
I thought there might've been some algorithm to detect if it is encrypted or not. – Weakman10122 Aug 10 '16 at 20:10
-
forget objectiveC for a moment, is there any algorithm in any programming language that you can use to find out for sure that a string is encrypted? If not, then programming language is not the issue here. – Sam B Aug 10 '16 at 20:12
-
The basic goal of encrypting data is to hide the information it contains. That means making it appear to be as close to random data as possible. You can measure the entropy of the string, but I don't believe there's a way, without the original key, to determine that a particular algorithm was used. (Aside from what cryptanalysis does. To say "this was encrypted with X method" would probably be to break that method.) – jscs Aug 10 '16 at 20:14
-
the reason why I brought up objective c besides being the language I'm working with is because usually a task like this requires some kind of library. Thanks for clearing it up everyone. – Weakman10122 Aug 10 '16 at 20:16