S
Sloede
I don't know whether this is the right place to pose this question,
but I don't know any better group:
When I tried to implement the md5 algorithm in c I never got the
expected digests until I looked up the appendix of rfc1321 where
Rivest gives an reference implementation in C.
The RFC says "append the length of the message (before padding) as two
32-bit words, least significant word first, lsb-first as well. But
actually Rivest does save the length in a 32-bit word but then shifts
it 3 bits to the left!
What I get for a message length of one:
0x00000001 0x00000000
But he gets:
0x00000008 0x00000000
Does anyone know the reason for that and can explain it to me? Or does
anyone have a least a clue?
but I don't know any better group:
When I tried to implement the md5 algorithm in c I never got the
expected digests until I looked up the appendix of rfc1321 where
Rivest gives an reference implementation in C.
The RFC says "append the length of the message (before padding) as two
32-bit words, least significant word first, lsb-first as well. But
actually Rivest does save the length in a 32-bit word but then shifts
it 3 bits to the left!
What I get for a message length of one:
0x00000001 0x00000000
But he gets:
0x00000008 0x00000000
Does anyone know the reason for that and can explain it to me? Or does
anyone have a least a clue?