Re: One-to-one Hash functions
From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 09/17/05
- Next message: Unruh: "Re: Generating good quality 128bit random numbers"
- Previous message: David Eather: "Re: One-to-one Hash functions"
- In reply to: Luc The Perverse: "Re: One-to-one Hash functions"
- Next in thread: Luc The Perverse: "Re: One-to-one Hash functions"
- Reply: Luc The Perverse: "Re: One-to-one Hash functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 17 Sep 2005 14:35:19 GMT
"Luc The Perverse" <sll_noSpamlicious_z_XXX_m@cc.usu.edu> writes:
><pazort@gmail.com> wrote in message
>news:1126902920.610936.277230@g47g2000cwa.googlegroups.com...
>> Unfortunatly, I need absolutely zero chance of collisions when hashing
>> 128-bit strings to make this work. I will, however, be working only
>> with 256-bit strings... I realize it seems rediculous at the moment,
>> but if my idea works, I'll post it here, and it'll make far more sense.
>Hmmm . . . ok
>I have a good idea
>VarBitL ThingToBeHashed
>BitL_128 HashValue
>if (ThingToBeHashed.bLength() == 128)
> HashValue = ThingToBeHashed;
>else
> HashValue = SHA1_hash(ThingToBeHashed);
>If for some odd reason the hash has to be different that the 128 bit key,
>then XOR it with a PRNG or use a block cipher.
>For there to be -NO COLLISIONS- in a hashing function where the input and
>output space are identical, you need exactly one input to be mapped to one
>output. The easiest way is setting them equal.
As I responded a while ago, any encryption has just this feature. Thus use
a 128 bit encryption with your own private key for <=128 bits. For greater,
do whatever you want.
- Next message: Unruh: "Re: Generating good quality 128bit random numbers"
- Previous message: David Eather: "Re: One-to-one Hash functions"
- In reply to: Luc The Perverse: "Re: One-to-one Hash functions"
- Next in thread: Luc The Perverse: "Re: One-to-one Hash functions"
- Reply: Luc The Perverse: "Re: One-to-one Hash functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|