I would like to learn more about a specific set of non invertible functions:
- The function should accept 2 inputs: one hidden and the other visible. The output and the function should also be visible.
- The hidden input will not change, the visible will.
- The function should be deterministic. Collisions are acceptable given there are not too many.
An important requirement is that given a long enough hidden parameter 10-20 characters it will not be possible calculate the output of the function given another visible input (which includes not being able to calculate the hidden parameter…).
When I say possible to calculate I mean that one would have to basically brute force all the possible combinations for 10-20ish characters and that there is no simple mathematical shortcut.
This is my current algorithm:
x- hidden input string v- visible input string
I first mix the inputs. Once one of them is finished append the rest of the other on the end, so for example :
if len(x)>len(v): s = [x,v,x,v, … ,x[len(v)],v[len(v)], … ,x[len(x)-1],x[len(x)]]
Now calculate the output by:
associating each character in s with a predefined number such as a:1 b:2 …
output = 1 for each item in s: output += truncate(sin(output+item)) // truncate for similar behavior // on different sin implementation
The output should be a number between
Will this algorithm fulfill the requirements I mentioned above?
More specifically – for the same hidden input, given multiple visible inputs and their associated visible outputs – can an attacker easily find the output for an additional visible input?
How do I name these functions (So that I can read more about these constructs)?