You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't understand why the follow code is written like this.
According to the MD5 algorithm, it is filled with first 1 and 0 at last. Why do we need this step?
` for (offset = initial_len + 1; offset < new_len; offset++)
msg[offset] = 0;
// append the len in bits at the end of the buffer.
to_bytes(initial_len*8, msg + new_len);
// initial_len>>29 == initial_len*8>>32, but avoids overflow.
to_bytes(initial_len>>29, msg + new_len + 4);`
The text was updated successfully, but these errors were encountered:
in the above: msg = (uint8_t*)malloc(new_len + 8); memcpy(msg, initial_msg, initial_len);``
so the 0 to initial of msg is the true msg, the initial to new_len should be the padding, so we need to msg[initial_len]=0x80 and the msg[offset]=0
I don't understand why the follow code is written like this.
According to the MD5 algorithm, it is filled with first 1 and 0 at last. Why do we need this step?
` for (offset = initial_len + 1; offset < new_len; offset++)
msg[offset] = 0;
The text was updated successfully, but these errors were encountered: