Is there a piece of software that will help me convert "Hex" code based on already known input and output?

0

The title is a little confusing, but the jist of it is this:

I have a list of "HexCode" (I use that term loosely as they are not actually hex codes) from both before conversion and after conversion. For example;

Input: aaea095f      Output: 201328c,3f,42,f4,f4
       01efb53c

I don't have the algorithm necessary to convert them directly, and am reliant on using two programs to convert from one hex type (HexType1) to another hex type (HexType2) before I can get them to the end conversion (HexType3).

My goal is to automate the process of converting, but by not knowing the algorithm myself, I cannot do that with my current tools. Is there a piece of software where I can feed the list of before and after conversions, and it generate an algorithm based on what I gave it for future use?

I understand that creating an algorithm based on limited inputs would most likely not yield the best results, but I have many conversions already done with which to enhance the algorithm produced.

Addendum: I mistakenly described my codes as cryptographic in nature when they are closer to Hex values. I'm sorry for any confusion this has caused. I changed "Key" to "HexCode" to help clarify my point better.

Hebon

Posted 2015-11-11T01:19:34.283

Reputation: 241

Question was closed 2015-11-11T03:51:45.613

1Do you have any information about the relationship between the input and output? – Paul – 2015-11-11T01:49:24.527

Unfortunately the majority of my conversions were through the two apps I use. I did have some documentation lying around, but I cant find it and I don't think I will be any time soon. – Hebon – 2015-11-11T02:02:52.623

Do a search .... – Xavierjazz – 2015-11-11T03:01:57.353

Thanks, but the documentation was stored on a website that is now defunct. – Hebon – 2015-11-11T03:28:42.160

@hebon Worth a try: https://archive.org/ ?

– Peter – 2015-11-11T12:11:50.677

Answers

2

Since you brought up cryptography, one of the cool things good cryptographic algorithms do is, they make it nigh impossible to guess the exact algorithm (i.e. function plus key) that was used to encrypt something even if you have access to the input and output. Even if you have a small number of samples (i.e. a few billion) of inputs and matching outputs, you will not be able to predict the output that's generated by a new input.

In other words, what you want to do can't be done, unless you feed the program all possible inputs and outputs. You need to know more about the algorithm than just the inputs and outputs.


EDIT: There exist algorithms like neural networks - and a few others - which can be "trained" with a given set of inputs and outputs. For example, a neural network can be trained to tag pictures of birds in a set of random pictures. These sound like the simple and perfect solution, but the world is not that easy. Before training a neural network, it must be structured to match the problem it needs to solve, and in this case that requires additional information about what the algorithm it mimics does, otherwise training the network will fail.

Peter

Posted 2015-11-11T01:19:34.283

Reputation: 4 199

Thank you for your input, but It is not cryptographic in nature, I just used that to describe the numbers themselves. They more closely resemble Hex and I have changed my post to reflect that. – Hebon – 2015-11-11T03:36:36.143

1That's already one thing you know other than the inputs and outputs. The more additional information you use, the more likely it is that the problem becomes solvable. But inputs and outputs on their own are not enough, I'm afraid. – Peter – 2015-11-11T03:39:21.537