Re: How to shorten output of a hash function?



Kristian Gjøsteen <kristiag+news@xxxxxxxxxxxx> wrote:

Simon Johnson <simon.johnson@xxxxxxxxx> wrote:

1) Just use the first N bytes.

For 1: a hash function where the first N bytes are fixed to zero.

Why is having of all zeros a problem? It should be just as hard to
find a collision against a hash of all zeros as it should any other
hash value.

I'm sure you can come up with a collision for the hash function
h:{0,1}* -> {0,1} given by h(x) = 0^n. :-)

Aren't hash functions meant to emulate PRFs? I don't know what you mean
by (^n), but your example doesn't look remotely like a PRF.


Greets,
Ertugrul.


--
nightmare = unsafePerformIO (getWrongWife >>= sex)

.



Relevant Pages

  • Re: How to shorten output of a hash function?
    ... Simon Johnson wrote: ... a hash function where the first N bytes are fixed to zero. ... Why is having of all zeros a problem? ... I'm sure you can come up with a collision for the hash function ...
    (sci.crypt)
  • Re: How to shorten output of a hash function?
    ... for SHA-type hash functions, truncation is reasonable. ... a hash function where the first N bytes are fixed to zero. ... Why is having of all zeros a problem? ...
    (sci.crypt)
  • Re: Hash Function problem
    ... It depends what do you call _fast_ hash function. ... I just want the risk of collision to be lower than, ... use the full 160 bits out of MD5 or SHA-1. ... decrease the input cardinality or raise hashcode output bits number. ...
    (comp.programming)
  • Re: keys and counters
    ... how many times can the counter be incremented before there is a collision in the hash, that is what i am asking. ... A hash function operated in such a counter mode as you suggest does not have this property - if I can guess or discover the input to the first block then I will know all the other blocks. ... You might think that some attacks are unreasonable/infeasible but do you really know what is possible to the world's largest employer of mathematicians, who have had for many years the world's largest computer budget and unlimited access to 60 plus years of classified research or what is possible for any of the other multi-billion dollar "smaller" big brothers?. ...
    (sci.crypt)
  • Re: Question about tcp hash function tcp_hashfn()
    ... TCP implementation in Linux. ... efficient hash function. ... on the length of the collision list. ... at startup further reducing the size of collision lists. ...
    (Linux-Kernel)

Quantcast