From 1180e0760d5d94cef24768ca8518cd349b51b3ab Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Fri, 4 Mar 2016 16:06:11 +0100 Subject: [PATCH] Cleanup -m 1760 kernels to latest standard --- OpenCL/m01760_a0.cl | 172 ++++++++++++++++++------------------- OpenCL/m01760_a3.cl | 200 +++++++++++++++++++++++--------------------- 2 files changed, 192 insertions(+), 180 deletions(-) diff --git a/OpenCL/m01760_a0.cl b/OpenCL/m01760_a0.cl index bfd0e9fa2..6fae200da 100644 --- a/OpenCL/m01760_a0.cl +++ b/OpenCL/m01760_a0.cl @@ -277,18 +277,16 @@ __kernel void m01760_m04 (__global pw_t *pws, __global kernel_rule_t * rules_bu if (gid >= gid_max) return; u32 pw_buf0[4]; - - pw_buf0[0] = pws[gid].i[ 0]; - pw_buf0[1] = pws[gid].i[ 1]; - pw_buf0[2] = pws[gid].i[ 2]; - pw_buf0[3] = pws[gid].i[ 3]; - u32 pw_buf1[4]; - pw_buf1[0] = pws[gid].i[ 4]; - pw_buf1[1] = pws[gid].i[ 5]; - pw_buf1[2] = pws[gid].i[ 6]; - pw_buf1[3] = pws[gid].i[ 7]; + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; const u32 pw_len = pws[gid].pw_len; @@ -297,50 +295,54 @@ __kernel void m01760_m04 (__global pw_t *pws, __global kernel_rule_t * rules_bu */ u32 salt_buf0[4]; - - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - u32 salt_buf1[4]; + u32 salt_buf2[4]; + u32 salt_buf3[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); + salt_buf0[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); + salt_buf0[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); + salt_buf0[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); + salt_buf1[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); + salt_buf1[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); + salt_buf1[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); + salt_buf1[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); + salt_buf2[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); + salt_buf2[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf2[2] = swap32_S (salt_bufs[salt_pos].salt_buf[10]); + salt_buf2[3] = swap32_S (salt_bufs[salt_pos].salt_buf[11]); + salt_buf3[0] = swap32_S (salt_bufs[salt_pos].salt_buf[12]); + salt_buf3[1] = swap32_S (salt_bufs[salt_pos].salt_buf[13]); + salt_buf3[2] = swap32_S (salt_bufs[salt_pos].salt_buf[14]); + salt_buf3[3] = swap32_S (salt_bufs[salt_pos].salt_buf[15]); + + const u32 salt_len = salt_bufs[salt_pos].salt_len; /** * pads */ u32x w0_t[4]; - - w0_t[0] = swap32 (salt_buf0[0]); - w0_t[1] = swap32 (salt_buf0[1]); - w0_t[2] = swap32 (salt_buf0[2]); - w0_t[3] = swap32 (salt_buf0[3]); - u32x w1_t[4]; - - w1_t[0] = swap32 (salt_buf1[0]); - w1_t[1] = swap32 (salt_buf1[1]); - w1_t[2] = swap32 (salt_buf1[2]); - w1_t[3] = swap32 (salt_buf1[3]); - u32x w2_t[4]; - - w2_t[0] = 0; - w2_t[1] = 0; - w2_t[2] = 0; - w2_t[3] = 0; - u32x w3_t[4]; - w3_t[0] = 0; - w3_t[1] = 0; - w3_t[2] = 0; - w3_t[3] = 0; + w0_t[0] = salt_buf0[0]; + w0_t[1] = salt_buf0[1]; + w0_t[2] = salt_buf0[2]; + w0_t[3] = salt_buf0[3]; + w1_t[0] = salt_buf1[0]; + 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]; u64x ipad[8]; u64x opad[8]; @@ -417,18 +419,16 @@ __kernel void m01760_s04 (__global pw_t *pws, __global kernel_rule_t * rules_bu if (gid >= gid_max) return; u32 pw_buf0[4]; - - pw_buf0[0] = pws[gid].i[ 0]; - pw_buf0[1] = pws[gid].i[ 1]; - pw_buf0[2] = pws[gid].i[ 2]; - pw_buf0[3] = pws[gid].i[ 3]; - u32 pw_buf1[4]; - pw_buf1[0] = pws[gid].i[ 4]; - pw_buf1[1] = pws[gid].i[ 5]; - pw_buf1[2] = pws[gid].i[ 6]; - pw_buf1[3] = pws[gid].i[ 7]; + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; const u32 pw_len = pws[gid].pw_len; @@ -437,50 +437,54 @@ __kernel void m01760_s04 (__global pw_t *pws, __global kernel_rule_t * rules_bu */ u32 salt_buf0[4]; - - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - u32 salt_buf1[4]; + u32 salt_buf2[4]; + u32 salt_buf3[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); + salt_buf0[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); + salt_buf0[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); + salt_buf0[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); + salt_buf1[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); + salt_buf1[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); + salt_buf1[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); + salt_buf1[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); + salt_buf2[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); + salt_buf2[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf2[2] = swap32_S (salt_bufs[salt_pos].salt_buf[10]); + salt_buf2[3] = swap32_S (salt_bufs[salt_pos].salt_buf[11]); + salt_buf3[0] = swap32_S (salt_bufs[salt_pos].salt_buf[12]); + salt_buf3[1] = swap32_S (salt_bufs[salt_pos].salt_buf[13]); + salt_buf3[2] = swap32_S (salt_bufs[salt_pos].salt_buf[14]); + salt_buf3[3] = swap32_S (salt_bufs[salt_pos].salt_buf[15]); + + const u32 salt_len = salt_bufs[salt_pos].salt_len; /** * pads */ u32x w0_t[4]; - - w0_t[0] = swap32 (salt_buf0[0]); - w0_t[1] = swap32 (salt_buf0[1]); - w0_t[2] = swap32 (salt_buf0[2]); - w0_t[3] = swap32 (salt_buf0[3]); - u32x w1_t[4]; - - w1_t[0] = swap32 (salt_buf1[0]); - w1_t[1] = swap32 (salt_buf1[1]); - w1_t[2] = swap32 (salt_buf1[2]); - w1_t[3] = swap32 (salt_buf1[3]); - u32x w2_t[4]; - - w2_t[0] = 0; - w2_t[1] = 0; - w2_t[2] = 0; - w2_t[3] = 0; - u32x w3_t[4]; - w3_t[0] = 0; - w3_t[1] = 0; - w3_t[2] = 0; - w3_t[3] = 0; + w0_t[0] = salt_buf0[0]; + w0_t[1] = salt_buf0[1]; + w0_t[2] = salt_buf0[2]; + w0_t[3] = salt_buf0[3]; + w1_t[0] = salt_buf1[0]; + 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]; u64x ipad[8]; u64x opad[8]; diff --git a/OpenCL/m01760_a3.cl b/OpenCL/m01760_a3.cl index d2119afa7..c0166f248 100644 --- a/OpenCL/m01760_a3.cl +++ b/OpenCL/m01760_a3.cl @@ -137,22 +137,22 @@ static void hmac_sha512_pad (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u64 u64x w2_t[4]; u64x w3_t[4]; - w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ 0x3636363636363636; - w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ 0x3636363636363636; - w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ 0x3636363636363636; - w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ 0x3636363636363636; - w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ 0x3636363636363636; - w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ 0x3636363636363636; - w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ 0x3636363636363636; - w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ 0x3636363636363636; - w2_t[0] = 0x3636363636363636; - w2_t[1] = 0x3636363636363636; - w2_t[2] = 0x3636363636363636; - w2_t[3] = 0x3636363636363636; - w3_t[0] = 0x3636363636363636; - w3_t[1] = 0x3636363636363636; - w3_t[2] = 0x3636363636363636; - w3_t[3] = 0x3636363636363636; + w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ (u64x) 0x3636363636363636; + w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ (u64x) 0x3636363636363636; + w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ (u64x) 0x3636363636363636; + w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ (u64x) 0x3636363636363636; + w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ (u64x) 0x3636363636363636; + w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ (u64x) 0x3636363636363636; + w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ (u64x) 0x3636363636363636; + w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ (u64x) 0x3636363636363636; + w2_t[0] = (u64x) 0x3636363636363636; + w2_t[1] = (u64x) 0x3636363636363636; + w2_t[2] = (u64x) 0x3636363636363636; + w2_t[3] = (u64x) 0x3636363636363636; + w3_t[0] = (u64x) 0x3636363636363636; + w3_t[1] = (u64x) 0x3636363636363636; + w3_t[2] = (u64x) 0x3636363636363636; + w3_t[3] = (u64x) 0x3636363636363636; ipad[0] = SHA512M_A; ipad[1] = SHA512M_B; @@ -165,22 +165,22 @@ static void hmac_sha512_pad (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u64 sha512_transform (w0_t, w1_t, w2_t, w3_t, ipad); - w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ 0x5c5c5c5c5c5c5c5c; - w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ 0x5c5c5c5c5c5c5c5c; - w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ 0x5c5c5c5c5c5c5c5c; - w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ 0x5c5c5c5c5c5c5c5c; - w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ 0x5c5c5c5c5c5c5c5c; - w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ 0x5c5c5c5c5c5c5c5c; - w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ 0x5c5c5c5c5c5c5c5c; - w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ 0x5c5c5c5c5c5c5c5c; - w2_t[0] = 0x5c5c5c5c5c5c5c5c; - w2_t[1] = 0x5c5c5c5c5c5c5c5c; - w2_t[2] = 0x5c5c5c5c5c5c5c5c; - w2_t[3] = 0x5c5c5c5c5c5c5c5c; - w3_t[0] = 0x5c5c5c5c5c5c5c5c; - w3_t[1] = 0x5c5c5c5c5c5c5c5c; - w3_t[2] = 0x5c5c5c5c5c5c5c5c; - w3_t[3] = 0x5c5c5c5c5c5c5c5c; + w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ (u64x) 0x5c5c5c5c5c5c5c5c; + w2_t[0] = (u64x) 0x5c5c5c5c5c5c5c5c; + w2_t[1] = (u64x) 0x5c5c5c5c5c5c5c5c; + w2_t[2] = (u64x) 0x5c5c5c5c5c5c5c5c; + w2_t[3] = (u64x) 0x5c5c5c5c5c5c5c5c; + w3_t[0] = (u64x) 0x5c5c5c5c5c5c5c5c; + w3_t[1] = (u64x) 0x5c5c5c5c5c5c5c5c; + w3_t[2] = (u64x) 0x5c5c5c5c5c5c5c5c; + w3_t[3] = (u64x) 0x5c5c5c5c5c5c5c5c; opad[0] = SHA512M_A; opad[1] = SHA512M_B; @@ -272,50 +272,54 @@ static void m01760m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le */ u32 salt_buf0[4]; - - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - u32 salt_buf1[4]; + u32 salt_buf2[4]; + u32 salt_buf3[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); + salt_buf0[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); + salt_buf0[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); + salt_buf0[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); + salt_buf1[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); + salt_buf1[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); + salt_buf1[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); + salt_buf1[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); + salt_buf2[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); + salt_buf2[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf2[2] = swap32_S (salt_bufs[salt_pos].salt_buf[10]); + salt_buf2[3] = swap32_S (salt_bufs[salt_pos].salt_buf[11]); + salt_buf3[0] = swap32_S (salt_bufs[salt_pos].salt_buf[12]); + salt_buf3[1] = swap32_S (salt_bufs[salt_pos].salt_buf[13]); + salt_buf3[2] = swap32_S (salt_bufs[salt_pos].salt_buf[14]); + salt_buf3[3] = swap32_S (salt_bufs[salt_pos].salt_buf[15]); + + const u32 salt_len = salt_bufs[salt_pos].salt_len; /** * pads */ u32x w0_t[4]; - - w0_t[0] = swap32 (salt_buf0[0]); - w0_t[1] = swap32 (salt_buf0[1]); - w0_t[2] = swap32 (salt_buf0[2]); - w0_t[3] = swap32 (salt_buf0[3]); - u32x w1_t[4]; - - w1_t[0] = swap32 (salt_buf1[0]); - w1_t[1] = swap32 (salt_buf1[1]); - w1_t[2] = swap32 (salt_buf1[2]); - w1_t[3] = swap32 (salt_buf1[3]); - u32x w2_t[4]; - - w2_t[0] = 0; - w2_t[1] = 0; - w2_t[2] = 0; - w2_t[3] = 0; - u32x w3_t[4]; - w3_t[0] = 0; - w3_t[1] = 0; - w3_t[2] = 0; - w3_t[3] = 0; + w0_t[0] = salt_buf0[0]; + w0_t[1] = salt_buf0[1]; + w0_t[2] = salt_buf0[2]; + w0_t[3] = salt_buf0[3]; + w1_t[0] = salt_buf1[0]; + 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]; u64x ipad[8]; u64x opad[8]; @@ -378,50 +382,54 @@ static void m01760s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le */ u32 salt_buf0[4]; - - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - u32 salt_buf1[4]; + u32 salt_buf2[4]; + u32 salt_buf3[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); + salt_buf0[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); + salt_buf0[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); + salt_buf0[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); + salt_buf1[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); + salt_buf1[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); + salt_buf1[2] = swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); + salt_buf1[3] = swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); + salt_buf2[0] = swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); + salt_buf2[1] = swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf2[2] = swap32_S (salt_bufs[salt_pos].salt_buf[10]); + salt_buf2[3] = swap32_S (salt_bufs[salt_pos].salt_buf[11]); + salt_buf3[0] = swap32_S (salt_bufs[salt_pos].salt_buf[12]); + salt_buf3[1] = swap32_S (salt_bufs[salt_pos].salt_buf[13]); + salt_buf3[2] = swap32_S (salt_bufs[salt_pos].salt_buf[14]); + salt_buf3[3] = swap32_S (salt_bufs[salt_pos].salt_buf[15]); + + const u32 salt_len = salt_bufs[salt_pos].salt_len; /** * pads */ u32x w0_t[4]; - - w0_t[0] = swap32 (salt_buf0[0]); - w0_t[1] = swap32 (salt_buf0[1]); - w0_t[2] = swap32 (salt_buf0[2]); - w0_t[3] = swap32 (salt_buf0[3]); - u32x w1_t[4]; - - w1_t[0] = swap32 (salt_buf1[0]); - w1_t[1] = swap32 (salt_buf1[1]); - w1_t[2] = swap32 (salt_buf1[2]); - w1_t[3] = swap32 (salt_buf1[3]); - u32x w2_t[4]; - - w2_t[0] = 0; - w2_t[1] = 0; - w2_t[2] = 0; - w2_t[3] = 0; - u32x w3_t[4]; - w3_t[0] = 0; - w3_t[1] = 0; - w3_t[2] = 0; - w3_t[3] = 0; + w0_t[0] = salt_buf0[0]; + w0_t[1] = salt_buf0[1]; + w0_t[2] = salt_buf0[2]; + w0_t[3] = salt_buf0[3]; + w1_t[0] = salt_buf1[0]; + 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]; u64x ipad[8]; u64x opad[8];