How hard would it be to find the encryption algorithm used if you know both the plaintext and ciphertext of a string, so that you can reutilize that algorithm in a future application. Are there any programs out there that curently have this capability?
I know that the application of such an idea may not be sound, but it's more of a proof of concept idea than anything else at this point.
Outside of any very basic encryption algorithms that are already known to be (easily) breakable, I don't think this is plausible.
If one were able to come up with an algorithm that would describe that instance of plaintext, it would be impossible to prove that the algorithm was the one used, unless you have a large sample size.
For example, if I had:
You could draw the conclusion that the encryption algorithm is just a reversal of letters, but the ciphertext could have been the result of millions of shifts, XORs, etc. There would be no way to have confidence.
But you can always try and see what happens...
Obviously, more than 1 algorithm could come up with the same reult on a given string and not another. ie:
plain = 5; cipher = 250 plain^2 * 10 = cipher or plain * 50 = cipher
You would need at least two values to validate your findings. However, I'm just looking for something that would allow me see what has been done to reach the conclusion.
Even brute forcing against various ciphers would be fine as long as I'm told which cipher is used in the end.
Any help finding applications that do this already or ideas on how to implent this in my own application would be most apreciated.