Re: MD5P (Variable length hash, kindof)




aie93 wrote:
> memcpy(MD5->data, MD5->s, 4);
> MD5->s = MD5->s % 128;
> MD5->states[0] += MD5->states[2] & (0xFFFFFFFF >> MD5->s);
> MD5->states[1] += MD5->states[3] & (0xFFFFFFFF >> (MD5->s - 64));
> MD5->states[2] &= 0xFFFFFFFF << MD5->s;
> MD5->states[3] &= 0xFFFFFFFF << (MD5->s - 64);
> memcpy(MD5->data+47, MD5->states, 16);
> MD5_Process(MD5);

This doesn't make sense. the states[] variables are 32-bits but MD5->s
can be upto 127. That means

0xFFFFFFFF << MD5->s

Can be 0 for 96 out of 128 possible values and it means states[2] and
states[3] are likely to be zero [or have many zeros].

BOO YAH!

Tom

.



Relevant Pages

  • Re: Inexpensive PCB proto houses?
    ... Upto 6 layers prototype service. ... Tom ... Prev by Date: ...
    (sci.electronics.design)
  • Copy one cell to entire column
    ... Is there an easy way to do the copy/paste or replicate without copying G2 ... Tom ... Prev by Date: ...
    (microsoft.public.excel.misc)
  • Re: Stolen site
    ... Trish did not claim that her site was hijacked, ... John ... Prev by Date: ...
    (soc.genealogy.ireland)
  • Re: ASCII Editor
    ... second hit in Google goes to the homepage) does this more conveniently, ... maybe you can get some inspiration from that... ... Tom ... Prev by Date: ...
    (sci.electronics.design)
  • =?iso-8859-1?q?Wanderschuhe_f=FCr_Hawaii?=
    ... in München dankbar. ... Danke! ... Tom ... Prev by Date: ...
    (de.rec.outdoors)

Quantcast