1

For a company working with a legacy system I'm trying to reverse engineer an old encryption method they use. The sourcecode for this software is missing or so I've been told. (or maybe they don't want me to see the complete workings of the system).

Anyway the system uses a UNIQUE identifier and some other information to create a key. This key is used to encrypt some data.

I need to reverse engineer this algorithm. (I may be in waaay over my head here but I'm gonna try).

I am in posession of the information used to create the key, and the encrypted AND unencrypted data. So my best bet was to use a "Know Plaintext attack". But I'm looking for some tips or sites with more information on how to proceed.

I know this might be an impossible task, but hey it's nice to try, right?

2
  • Do you have access to the object code? Is an implementation running somewhere? Commented Mar 31, 2011 at 11:37
  • 1
    If it's "some old" encryption method, chances are good it's a well-known algorithm such as for example DES or TEA. Only fools and geniusses write their own crypto algorithms. Thus, one of the things you might want to do first is google those algorithms. All of them use some well-known constants for s-boxes etc. If you search the executable with a hex editor, and you find said constants, you know what algorithm it is. This is a billion times easier and faster than a cryptoanalysis based on known plaintext. For example, if you find 0x9e3779b9 in a program, chances are good it's TEA. Commented Mar 31, 2011 at 15:14

3 Answers 3

3

You might try to proceed this way:

  1. encrypt simple repetitive messages ("aaaa", "bbb") of different lengths and start analize the statistics correlation of input to output of different metrics(length of the input correlated to the length of the output, number of occurrences of a character in the input correlated to occurrences of any characters in the output, etc)
  2. if you find some statistics correlation try to make an hypothesis and start doing some other experiments giving more complicated inputs to you encryption function
Sign up to request clarification or add additional context in comments.

1 Comment

I think that may be the best approach for now.
1

Your task is not impossible - just improbable.

If you're in possession of the key and the plaintext then I'd suggest running them through as many standard algorithms as you can. It's very likely that whoever implemented the system used a common implementation of a standard algorithm.

You might fall short, since any sufficiently modern cipher should not be susceptible to a known plaintext attack: http://en.wikipedia.org/wiki/Known-plaintext_attack

1 Comment

Yeah it's probably a long shot. I just thought I'd get an opinion from some people with more knowledge of the matter. I don't think running the data through well-known algorithms will help much as there are just so many.
1

I'd have to question motives here, this isn't a crackers site. Even if they don't have the source they should have the specifications if it's not a standard encryption form. Either way, I can't believe they'd have a system engineered to store encrypted data with no way of retrieving it so a decrypter is available, in which case, decrypt the data, implement a new documented encryption technology and re-encrypt the data using that. It'll be soooo much easier than trying to crack an unknown encryption routine.

1 Comment

You are right there is a decrypter available. Howver at the moment they wish to keep using the old encrypted data. Without re-encrypting it using a new algorithm, to be "backward compatible".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.