MD5: Need Advice
#16
(05-15-2017, 07:23 PM)philsmd Wrote: a, b, c, d, 0x80 and the remaining buffers are all 0 (that should be very obvious if you think about it, it must get shorter if we do not use hex but binary instead, it will be halved i.e. 32/2 = 16).

and I already answered the 2nd question (yeah, all hex conversions must be removed and the binary version/buffer must be used instead):
Quote:these changes need to be done for all places where you find uint_to_hex_lower8 () calls
Thank you philsmd, sorry I didn't read that thoroughly I guess. I've changed it to look like this. Does this look correct?

 /**
     * prepend salt
     */

    switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);

    w3_t[2] = pw_salt_len * 8;
    w3_t[3] = 0;

    w0_t[0] |= a;
    w0_t[1] |= b;
    w0_t[2] |= c;
    w0_t[3] |= d;
    w1_t[0] |= 0x80;
    w1_t[1] |= salt_buf1[1];
    w1_t[2] |= salt_buf1[2];
    w1_t[3] |= salt_buf1[3];
    w2_t[0] |= salt_buf2[0];
    w2_t[1] |= salt_buf2[1];
    w2_t[2] |= salt_buf2[2];
    w2_t[3] |= salt_buf2[3];
    w3_t[0] |= salt_buf3[0];
    w3_t[1] |= salt_buf3[1];
    w3_t[2] |= salt_buf3[2];
    w3_t[3] |= salt_buf3[3];

Thank you again!


Messages In This Thread
MD5: Need Advice - by PWn3R - 05-11-2017, 07:18 PM
RE: MD5: Need Advice - by royce - 05-12-2017, 01:33 AM
RE: MD5: Need Advice - by PWn3R - 05-12-2017, 01:48 AM
RE: MD5: Need Advice - by royce - 05-12-2017, 02:04 AM
RE: MD5: Need Advice - by philsmd - 05-12-2017, 08:55 AM
RE: MD5: Need Advice - by PWn3R - 05-12-2017, 09:12 AM
RE: MD5: Need Advice - by royce - 05-12-2017, 09:04 AM
RE: MD5: Need Advice - by philsmd - 05-12-2017, 09:17 AM
RE: MD5: Need Advice - by PWn3R - 05-12-2017, 09:26 AM
RE: MD5: Need Advice - by PWn3R - 05-12-2017, 06:13 PM
RE: MD5: Need Advice - by epixoip - 05-12-2017, 08:24 PM
RE: MD5: Need Advice - by PWn3R - 05-12-2017, 10:29 PM
RE: MD5: Need Advice - by philsmd - 05-14-2017, 07:03 AM
RE: MD5: Need Advice - by PWn3R - 05-15-2017, 06:01 PM
RE: MD5: Need Advice - by philsmd - 05-15-2017, 07:23 PM
RE: MD5: Need Advice - by PWn3R - 05-15-2017, 07:46 PM
RE: MD5: Need Advice - by philsmd - 05-15-2017, 07:56 PM
RE: MD5: Need Advice - by PWn3R - 05-15-2017, 08:09 PM
RE: MD5: Need Advice - by philsmd - 05-15-2017, 08:27 PM
RE: MD5: Need Advice - by PWn3R - 05-15-2017, 08:31 PM
RE: MD5: Need Advice - by philsmd - 05-15-2017, 08:37 PM
RE: MD5: Need Advice - by PWn3R - 05-15-2017, 10:23 PM