Figure out algorithm to numeric key generator with one known input and output I have a software program running on a piece of hardware. To access a specific functionality it runs a challenge-response-like authentication, that is it generates a numerical 4-digit PIN and expects a 4-digit numerical PIN in response. I'm now looking for whether it is possible to come up with the algorithm that is used to generate the response and if so how.

Right now I have one sample pair (7153 - 9533) to work with. Ideally there would be some utility or a formula that I could apply or tweak here. I'm confident that once I figure out what the underlying algorithm is to convert from one 4 digit challenge to the 4 digit response then I will be able to code me a little utility to always get the response.

Since the response is always a 4 digit number that is generated from another 4 digit number I assume that there is only 10,000 possible codes that relate to the 10,000 possible "seeds" so I don't think this should be very hard for me to reverse engineer or brute force, essentially I'm looking for a direction where to start.

So my question (in short):
How would I approach such a problem and can it even be done at all?
Ideally there would be some utility or a formula that I could apply or tweak here. 


I have to say there is no such utility, no such formula. This problem has no solution.

There is 10000! = factorial(10000) different transformations of 4-digit numbers to 4-digit numbers. For instance, your input 7153 and result 9533 can be produced by any of the following functions:

f(x)=(2x+5227) MOD 10000

f(x)=(3x+8074) MOD 10000

f(x)=(x^3+8956) MOD 10000


Knowing a single pair is not sufficient to find out what transformation was used. If they use some simple function, then having more pairs might give (without guarantee) an insight about this function.