MD5 hash ?
Posted: Mon Jul 25, 2011 1:14 pm
I am just having one problem in my understanding of the MD5 hash
//Pre-processing:
append "1" bit to message
append "0" bits until message length in bits ≡ 448 (mod 512)
append bit /* bit (not byte) length of unpadded message as 64-bit little-endian integer */ to message
Does this step mean append a 1 on the right side or left side of my message.
For example if my message was
10100010101010111010101 does it become
110100010101010111010101 or 101000101010101110101011
And after that do I pad with zeros on the right or left of the one.
example
100000000000000...my message ... followed by 64 bit length in little endian of my message
or my message ... 100000000000000.... followed by 64 bit length in little endian of my message
Thanks for any help on this.
//Pre-processing:
append "1" bit to message
append "0" bits until message length in bits ≡ 448 (mod 512)
append bit /* bit (not byte) length of unpadded message as 64-bit little-endian integer */ to message
Does this step mean append a 1 on the right side or left side of my message.
For example if my message was
10100010101010111010101 does it become
110100010101010111010101 or 101000101010101110101011
And after that do I pad with zeros on the right or left of the one.
example
100000000000000...my message ... followed by 64 bit length in little endian of my message
or my message ... 100000000000000.... followed by 64 bit length in little endian of my message
Thanks for any help on this.