Jump to content
  • Advertisement
Sign in to follow this  
Nice Coder

Fast hash functions?

This topic is 4830 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been thinking about writing a hash function, which is fast to compute, and requires minimal effort, yet cannot be inversed easily. What i was thinking of, is that i compute (x^(y + z) mod n) mod maxsize Where x is a number (which would probably be 2, 3, 5, 7, or 11), z being an offset, which is chosen, so that at y=0, x^(y+z) > n = true. y is your number to be hashed. n is also a number, which is equal to pq where p a nd q are very large prime numbers. (1024 bits each, or more). Maxsise is the size of the output, 2^32 or 2^64 would be common. n, x, and z would not be changable, y and maxsize are. (because you need different things to hash each time...) Now, what i was thinking, is how i would create a function which uses this, so that i can do this, with minimal effort. (also, i will be hashing two strings together mostly, the first string will always remain fixed, the other changing each time). Are these thigs achivable? Are they securish? From, Nice coder

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!