MD5, SHA1 (can hash size be adjusted)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is it possible to adjust the hash size of the algorithm used. I would like
to get a hash size less than 160 bit.

Regards
 
Jesper said:
Is it possible to adjust the hash size of the algorithm used. I would like
to get a hash size less than 160 bit.

I believe the MD5 algorithm is specifically defined to be 128-bit, and
and SHA-1 is defined to produce a 160-bit hash, rather than being
defined for an arbitrary hash size.

In other words, no. Of course, you could always ignore half the hash...
a well-behaved cryptographically-strong hash should be equally pseudo-
random in all bits, so by taking only part of it you should just get a
weaker version in terms of the probability of hash collisions.
 
You can use MGF1 which uses SHA1 underneath. MGF1 can produce a hash of any
size.
sEE IEEE Std 1363-2000 [26] and the draft ANSI X9.44 [1].
 
Back
Top