05-15-2017, 07:46 PM
(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).Thank you philsmd, sorry I didn't read that thoroughly I guess. I've changed it to look like this. Does this look correct?
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
/**
* 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!