Re: One-to-one Hash functions

From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 09/17/05


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.



Relevant Pages

  • Re: One-to-one Hash functions
    ... I need absolutely zero chance of collisions when hashing ... > 128-bit strings to make this work. ... output space are identical, you need exactly one input to be mapped to one ...
    (sci.crypt)
  • [Full-disclosure] Re: choice-point screw-up and secure hashes
    ... > discover your salting algorithm directly). ... a keyed hashing algorithm would be great. ... encryption won't solve the problem. ... help protect the data in transit, it would help protect the data from ...
    (Full-Disclosure)
  • Re: Hashed PWs more secure than encrypted PWs?
    ... >>Can anybody explain how is it that hashing is more secure than ... >>attack to get the encryption key. ... stated above which is that the secret key could be stolen. ...
    (comp.security.unix)
  • Re: Hashed PWs more secure than encrypted PWs?
    ... >>Can anybody explain how is it that hashing is more secure than ... >>attack to get the encryption key. ... stated above which is that the secret key could be stolen. ...
    (comp.security.unix)
  • Secure password storage/transmisson - Internet
    ... encryption and one-way hashing algorithms. ... User sends unencrypted password to authenticating application ... With the asymmetric one-way hashing technique: ...
    (alt.computer.security)