- #1

- 4

- 0

## Main Question or Discussion Point

On a recent outing with friends we came up on a debate and im hoping someone can help me find out who was right. The discussion was on whether one could create an equation where in you have 2 unknown variables and any number of known variables and the solution, that will allow you to solve for the 2 unknown variables.

For the issue at hand we had agreed on the following details.

1) All variables must be between Hex values (0-F). (we decided to keep it simple)

2) You must use some form of reduction in size so that your answer is the same number of characters as your input. (whether you ditch the higher values or mathmaticaly reduce them is up to you) IE if you use 4 hex values for each variable, your answer must not be greater than 4 hex values. (binary reduction is easy to do: If there are overflow bits, just XOR with a known value to reduce - which is fully reversable so you arent loosing any information)

3) You must have 2 unknown variables.

4) You may have any number of known variables in your function. You can choose 3, 5, 42, etc.

5) You may use any math you wish, as long as you adhear to rule 2 for the function solution.

6) You must be able to solve using only one function.

7) You are allowed to generate lookup tables to help you solve if you need.

8) You must be able to provide examples of how your function is solveable in reverse.

He agrued that you could create a single function that when a person knows the solution and all but 2 variables, they can compute the two missing variables. The matter isnt if this is easy to do computationaly, but if it is possible. His possible solution was to use something like the CRC16 or any of the CRC hashes or a one way hash function from something like RSA. Now due to the computational complexity of using RSA, he suggested using a system of only 4 bytes of data instead of the full 64bytes. But his argument was that you could create a function (algorithm) where in you could know all but two of the variables and be able to calculate thier exact value, and that you wouldnt have the problem of collisions. (More than one possible pair of values that would give you the known answer). For example, take the equation ((((A/B) * C) / D) * E) = F. If you know F and can choose to know any 3 variables from A, B, C, D, E. Could you solve the for the other 2 without having another equation at your disposal.

My stance was that you would need 2 solutions to be able to solve for either unknown variable. I Do not believe that calculating every possible value of those two unknown variables would enable you to prove the exact values, as without anything to use as a referance (another known solution); you would end with with 2 or more possible answers for those variables and would not be able to determine which of them was correct.

However since we are keeping the variable size small, and we are allowed to use lookup tables; it may be possible to create a function that this is possible to do, simply by brute forcing all possible values for your two unknown variables. But would this give you only one result per function solution (Variable F) or would you be left with collisions?

As a last question before we split up for the night the challange was altered. Same basic rules except this time you have 3 unknown variables and any number of known; but you have 2 known functions each with their own known answer. Would this be possible as well? (this will be the discussion when we get together again.)

For the issue at hand we had agreed on the following details.

1) All variables must be between Hex values (0-F). (we decided to keep it simple)

2) You must use some form of reduction in size so that your answer is the same number of characters as your input. (whether you ditch the higher values or mathmaticaly reduce them is up to you) IE if you use 4 hex values for each variable, your answer must not be greater than 4 hex values. (binary reduction is easy to do: If there are overflow bits, just XOR with a known value to reduce - which is fully reversable so you arent loosing any information)

3) You must have 2 unknown variables.

4) You may have any number of known variables in your function. You can choose 3, 5, 42, etc.

5) You may use any math you wish, as long as you adhear to rule 2 for the function solution.

6) You must be able to solve using only one function.

7) You are allowed to generate lookup tables to help you solve if you need.

8) You must be able to provide examples of how your function is solveable in reverse.

He agrued that you could create a single function that when a person knows the solution and all but 2 variables, they can compute the two missing variables. The matter isnt if this is easy to do computationaly, but if it is possible. His possible solution was to use something like the CRC16 or any of the CRC hashes or a one way hash function from something like RSA. Now due to the computational complexity of using RSA, he suggested using a system of only 4 bytes of data instead of the full 64bytes. But his argument was that you could create a function (algorithm) where in you could know all but two of the variables and be able to calculate thier exact value, and that you wouldnt have the problem of collisions. (More than one possible pair of values that would give you the known answer). For example, take the equation ((((A/B) * C) / D) * E) = F. If you know F and can choose to know any 3 variables from A, B, C, D, E. Could you solve the for the other 2 without having another equation at your disposal.

My stance was that you would need 2 solutions to be able to solve for either unknown variable. I Do not believe that calculating every possible value of those two unknown variables would enable you to prove the exact values, as without anything to use as a referance (another known solution); you would end with with 2 or more possible answers for those variables and would not be able to determine which of them was correct.

However since we are keeping the variable size small, and we are allowed to use lookup tables; it may be possible to create a function that this is possible to do, simply by brute forcing all possible values for your two unknown variables. But would this give you only one result per function solution (Variable F) or would you be left with collisions?

As a last question before we split up for the night the challange was altered. Same basic rules except this time you have 3 unknown variables and any number of known; but you have 2 known functions each with their own known answer. Would this be possible as well? (this will be the discussion when we get together again.)