Madaco.net

Pages for other projects:
polyfeild
~ATH interpreter

python library for Ordinal numbers

some parser/interpreter

web3/Ethereum projects

The polyfeild program allows for the creation of something like a hash or a dictionary.
The main difference is that having the dictionary doesn't tell one the keys.
If one has a key, and the dictionary, one can easily find the corresponding value.
But from just the dictionary like object, one cannot find the keys, nor can they find the values.
However, currently it is somewhat slow, even with a low number of key value pairs.

The way this program works is by treating the keys and corresponding values as rational numbers, and interpreting each pair as a point (in Q2),
and creating the polynomial of minimal degree that goes through all of the points.
To find the value that corresponds to a given key, one finds the rational number corresponding to the key, and evaluates the polynomial at that number.
The resulting rational number is then converted into the value.
The polynomial is the thing that is analogous to a dictionary.
If one inputs a key that wasn't in the original list of keys,
One will most likely get an output that appears meaningless,
But because many sets of key/value pairs will result in the same polynomial,
It is "impossible" to determine which points in the polynomial are meaningful, when not given any other information.
In this case, "impossible" means I think it probably cannot be done without resorting to assumptions about what the input or output will look like, and even then, brute force checks would be necessary.
However, there may be attacks that I am not aware of.
After I post the source code, please inform me of any attacks you find on it.
(Also, if you find any attacks before I post the source code, please inform me.)


I haven't thought of many uses for this program yet,
but I have thought of two potential uses.:

1)The first use is encryption.
I don't recommend this use, because just because I haven't found a way to break it,
doesn't mean there isn't a relatively simple one.
However, if you were to use this program for crypto, it could be used like this:

Some collection of message and password pairs would be selected.
Possibly just one.
The passwords are of course the keys, and the messages are the values.
In addition, some number of randomly generated key and value pairs are also created.
The polynomial is sent through an insecure channel (e.g. posted publicly),
and the keys are sent privately (possibly pre-decided-upon).
The other party then simply checks the polynomial at the key.


2)The second use that I have thought of is for games.
Specifically, games written in an interpreted language,
which require that the player have access to the source code of the game.
If the player looks at the source code for the game,
they might look at how the game ends,
or find other surprises that you want to keep secret,
until someone finds them legitimately.
This program offers a partial solution to this problem,
at least for small text based games.


How this would work, is:
A key would be determined from user input, and the current game-state,
and the value corresponding to that key
would be used to (partially) determine the next game state.
(as well as output)
This way, the players cannot simply look at the states near the end,
because they would need to know the state before that, to find the key
and to find that key, they would have to find the one before that,
and so on inductively,
such that they might as well just play the game.


I intent to put this on github, but I haven't yet. For now, a version of it can be found here.
I am still working on improving it, but I don't know if I will upload the improvements until I put it on github.

rightcollumn