Sign in to follow this  
Nice Coder

Finite field hash function?

Recommended Posts

I have been thinking, about a combination safe. This basically is a keyed hash function which takes your combination and a key, and returns a number, which is then used to encrypt the safes pac file. (so that you can't even find out which files there are without having the correct combination). How it works. You have your modulous, keymod. You have a number of input numbers, NUM. You have an array of random numbers, combo[num] These are you key. Basically, it urns like this
if the number of input numbers is not even, add the number 0 to the end of the array.
set x = 0
Do until we have processed all of the users numbers.
cobination += (combo[x] * inputnumber[x]) mod keymod
combination -= (combo[x + 1] * inputnumber[x + 1)
if combination < 0 then combination = keymod + combination
x = x + 2
loop
Now, this basically works on a finite field, arranged like a circle. You move one way or the other (based on wether this is an odd or even combination number), an amount found by using the combo number and the input number, through a function (like * maybe +, as long as it always returns a positive number, then its ok). My question comes in two parts: If you have the key If you don't have the key For each of those two situations, is it possible to find out the correct combination in less then n / 2 average tests? From, Nice coder [Edited by - Nice Coder on February 10, 2005 12:40:36 AM]

Share this post


Link to post
Share on other sites
That might not be the clearest wording...

I wish to protect the input, when you don't have the hash. (but can check if a given hash is correct).

1. If you have the keys (ie, the array of numbers, the mod, ect), can you reverse the function, and return a list of combinations from the hash, quickly?

2. If you have the keys, Can you find the data that you enter quickly.

3. Without the keys, how much harder is it to reverse?

4. How does this change, then you have the hash?

5. what if you have the input numbers, hash, but not the keys?

Assume that you have only the modulous, but not the array of numbers.
How difficult is it to generate an array of numbers which works?

Are there any major problems?

I was thinking about having an IV, which would just be a random number (part of the key) which the sequence starts at.
So, you would start at IV, then move inp0 * arr[0] to the left, then inp1 * arr[1] to the right, ect. Until you hit the desired value.

How does this effect the security of the algorithm?

From,
Nice coder

Share this post


Link to post
Share on other sites
Ok, I've read your first post before, and it wasn't clear enough to me to get the point.
For people like me, if you got a specific theoretical-like problem, you've got to write it's specification. Otherwise, I would just end up being confused...

So for the base algorithm: what numbers do you have, how many, how are they called?
Precisely, what is your output?

For the changed algorithm: same questions.

And finally: what do you want to reverse, that is: what do you want to get from what (names of the variables, please)?

Hope you have not given up yet ;)
/def

((different time zone, so: till monday..))

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this