Re: One-to-one Hash functions
From: Peter Pearson (ppearson_at_nowhere.invalid)
Date: 09/16/05
- Next message: Anne & Lynn Wheeler: "Re: how password is stored and check the authentication??"
- Previous message: FX: "Re: how password is stored and check the authentication??"
- In reply to: Unruh: "Re: One-to-one Hash functions"
- Next in thread: pazort_at_gmail.com: "Re: One-to-one Hash functions"
- Reply: pazort_at_gmail.com: "Re: One-to-one Hash functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 16 Sep 2005 10:29:48 -0700
Unruh wrote:
> pazort@gmail.com writes:
>>Essentially, the function should behave in such a way so that if you
>>chose one string length less than or equal to 128-bits, then if you
>>took the hash of all of the possible strings of that size, there would
>>be no collisions, but that may also be able to produce a hash for
>>strings longer than 128 bits; I'm not concerned with collisions over
>>that size.
>
> Why in the world would you want that?
I agree. But, anyway, if you want some (limited) one-wayness
without depending upon a secret key, use this:
hash(x) = 2^x mod 340282366920938463463374607431768196021
Drawbacks:
1. There will be a few collisions among the 2^128
input strings of length 128 bits. However, the
probability of hitting one by accident in a billion
tries is smaller than the probability of getting
struck by a meteorite while reading this posting.
2. It is possible to find a preimage for any given hash
by solving the discrete log problem for this 128-bit
modulus, an undertaking that several readers of this
newsgroup could complete in a day (I think).
In deference to normal standards of responsible adult behavior,
I should point out that, while we've had fun playing with your
strange question, if bad consequences would result from your
scheme's failure to do what you need, you should present this
group with a much clearer picture of your requirements, including
a description of the attacker (if any) who must be thwarted.
-- Peter Pearson To get my email address, substitute: nowhere -> spamcop, invalid -> net
- Next message: Anne & Lynn Wheeler: "Re: how password is stored and check the authentication??"
- Previous message: FX: "Re: how password is stored and check the authentication??"
- In reply to: Unruh: "Re: One-to-one Hash functions"
- Next in thread: pazort_at_gmail.com: "Re: One-to-one Hash functions"
- Reply: pazort_at_gmail.com: "Re: One-to-one Hash functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|