1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00:00

VeraCrypt: Increase password length support for non-boot volumes from 64 to 128.

See https://github.com/hashcat/hashcat/issues/2616 for details.
This commit is contained in:
Jens Steube 2021-06-17 09:45:30 +02:00
parent f9fab1cadf
commit 62397283c1
71 changed files with 1605 additions and 1681 deletions

View File

@ -2627,34 +2627,15 @@ DECLSPEC int hc_find_keyboard_layout_map (const u32 search, const int search_len
return -1;
}
DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt)
DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt)
{
u32 out_buf[16] = { 0 };
u32 out_buf[32] = { 0 };
u8 *out_ptr = (u8 *) out_buf;
int out_len = 0;
// TC/VC passwords are limited to 64
u32 w[16];
w[ 0] = w0[0];
w[ 1] = w0[1];
w[ 2] = w0[2];
w[ 3] = w0[3];
w[ 4] = w1[0];
w[ 5] = w1[1];
w[ 6] = w1[2];
w[ 7] = w1[3];
w[ 8] = w2[0];
w[ 9] = w2[1];
w[10] = w2[2];
w[11] = w2[3];
w[12] = w3[0];
w[13] = w3[1];
w[14] = w3[2];
w[15] = w3[3];
// TC/VC passwords are limited to 128
u8 *w_ptr = (u8 *) w;
@ -2733,22 +2714,38 @@ DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w0, u32 *w1, u32 *w2, u32
}
}
w0[0] = out_buf[ 0];
w0[1] = out_buf[ 1];
w0[2] = out_buf[ 2];
w0[3] = out_buf[ 3];
w1[0] = out_buf[ 4];
w1[1] = out_buf[ 5];
w1[2] = out_buf[ 6];
w1[3] = out_buf[ 7];
w2[0] = out_buf[ 8];
w2[1] = out_buf[ 9];
w2[2] = out_buf[10];
w2[3] = out_buf[11];
w3[0] = out_buf[12];
w3[1] = out_buf[13];
w3[2] = out_buf[14];
w3[3] = out_buf[15];
w[ 0] = out_buf[ 0];
w[ 1] = out_buf[ 1];
w[ 2] = out_buf[ 2];
w[ 3] = out_buf[ 3];
w[ 4] = out_buf[ 4];
w[ 5] = out_buf[ 5];
w[ 6] = out_buf[ 6];
w[ 7] = out_buf[ 7];
w[ 8] = out_buf[ 8];
w[ 9] = out_buf[ 9];
w[10] = out_buf[10];
w[11] = out_buf[11];
w[12] = out_buf[12];
w[13] = out_buf[13];
w[14] = out_buf[14];
w[15] = out_buf[15];
w[16] = out_buf[16];
w[17] = out_buf[17];
w[18] = out_buf[18];
w[19] = out_buf[19];
w[20] = out_buf[20];
w[21] = out_buf[21];
w[22] = out_buf[22];
w[23] = out_buf[23];
w[24] = out_buf[24];
w[25] = out_buf[25];
w[26] = out_buf[26];
w[27] = out_buf[27];
w[28] = out_buf[28];
w[29] = out_buf[29];
w[30] = out_buf[30];
w[31] = out_buf[31];
return out_len;
}

View File

@ -256,7 +256,7 @@ DECLSPEC int is_valid_hex_32 (const u32 v);
DECLSPEC int is_valid_base58_8 (const u8 v);
DECLSPEC int is_valid_base58_32 (const u32 v);
DECLSPEC int hc_find_keyboard_layout_map (const u32 search, const int search_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt);
DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt);
DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt);
DECLSPEC void make_utf16be (const u32x *in, u32x *out1, u32x *out2);
DECLSPEC void make_utf16beN (const u32x *in, u32x *out1, u32x *out2);
DECLSPEC void make_utf16le (const u32x *in, u32x *out1, u32x *out2);

View File

@ -33,3 +33,67 @@ DECLSPEC u32 u8add (const u32 a, const u32 b)
return r;
}
DECLSPEC u32 hc_apply_keyfile_tc (u32 *w, const int pw_len, const GLOBAL_AS tc_t *tc)
{
if (tc->keyfile_enabled == 0) return pw_len;
if (pw_len > 64)
{
w[ 0] = u8add (w[ 0], tc->keyfile_buf32[ 0]);
w[ 1] = u8add (w[ 1], tc->keyfile_buf32[ 1]);
w[ 2] = u8add (w[ 2], tc->keyfile_buf32[ 2]);
w[ 3] = u8add (w[ 3], tc->keyfile_buf32[ 3]);
w[ 4] = u8add (w[ 4], tc->keyfile_buf32[ 4]);
w[ 5] = u8add (w[ 5], tc->keyfile_buf32[ 5]);
w[ 6] = u8add (w[ 6], tc->keyfile_buf32[ 6]);
w[ 7] = u8add (w[ 7], tc->keyfile_buf32[ 7]);
w[ 8] = u8add (w[ 8], tc->keyfile_buf32[ 8]);
w[ 9] = u8add (w[ 9], tc->keyfile_buf32[ 9]);
w[10] = u8add (w[10], tc->keyfile_buf32[10]);
w[11] = u8add (w[11], tc->keyfile_buf32[11]);
w[12] = u8add (w[12], tc->keyfile_buf32[12]);
w[13] = u8add (w[13], tc->keyfile_buf32[13]);
w[14] = u8add (w[14], tc->keyfile_buf32[14]);
w[15] = u8add (w[15], tc->keyfile_buf32[15]);
w[16] = u8add (w[16], tc->keyfile_buf32[16]);
w[17] = u8add (w[17], tc->keyfile_buf32[17]);
w[18] = u8add (w[18], tc->keyfile_buf32[18]);
w[19] = u8add (w[19], tc->keyfile_buf32[19]);
w[20] = u8add (w[20], tc->keyfile_buf32[20]);
w[21] = u8add (w[21], tc->keyfile_buf32[21]);
w[22] = u8add (w[22], tc->keyfile_buf32[22]);
w[23] = u8add (w[23], tc->keyfile_buf32[23]);
w[24] = u8add (w[24], tc->keyfile_buf32[24]);
w[25] = u8add (w[25], tc->keyfile_buf32[25]);
w[26] = u8add (w[26], tc->keyfile_buf32[26]);
w[27] = u8add (w[27], tc->keyfile_buf32[27]);
w[28] = u8add (w[28], tc->keyfile_buf32[28]);
w[29] = u8add (w[29], tc->keyfile_buf32[29]);
w[30] = u8add (w[30], tc->keyfile_buf32[30]);
w[31] = u8add (w[31], tc->keyfile_buf32[31]);
return 128;
}
else
{
w[ 0] = u8add (w[ 0], tc->keyfile_buf16[ 0]);
w[ 1] = u8add (w[ 1], tc->keyfile_buf16[ 1]);
w[ 2] = u8add (w[ 2], tc->keyfile_buf16[ 2]);
w[ 3] = u8add (w[ 3], tc->keyfile_buf16[ 3]);
w[ 4] = u8add (w[ 4], tc->keyfile_buf16[ 4]);
w[ 5] = u8add (w[ 5], tc->keyfile_buf16[ 5]);
w[ 6] = u8add (w[ 6], tc->keyfile_buf16[ 6]);
w[ 7] = u8add (w[ 7], tc->keyfile_buf16[ 7]);
w[ 8] = u8add (w[ 8], tc->keyfile_buf16[ 8]);
w[ 9] = u8add (w[ 9], tc->keyfile_buf16[ 9]);
w[10] = u8add (w[10], tc->keyfile_buf16[10]);
w[11] = u8add (w[11], tc->keyfile_buf16[11]);
w[12] = u8add (w[12], tc->keyfile_buf16[12]);
w[13] = u8add (w[13], tc->keyfile_buf16[13]);
w[14] = u8add (w[14], tc->keyfile_buf16[14]);
w[15] = u8add (w[15], tc->keyfile_buf16[15]);
return 64;
}
}

View File

@ -7,5 +7,6 @@
#define _INC_TRUECRYPT_KEYFILE_H
DECLSPEC u32 u8add (const u32 a, const u32 b);
DECLSPEC u32 hc_apply_keyfile_tc (u32 *w, const int pw_len, const GLOBAL_AS tc_t *tc);
#endif // _INC_TRUECRYPT_KEYFILE_H

View File

@ -0,0 +1,99 @@
/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#include "inc_vendor.h"
#include "inc_types.h"
#include "inc_platform.h"
#include "inc_common.h"
#include "inc_veracrypt_keyfile.h"
DECLSPEC u32 u8add (const u32 a, const u32 b)
{
const u32 a1 = (a >> 0) & 0xff;
const u32 a2 = (a >> 8) & 0xff;
const u32 a3 = (a >> 16) & 0xff;
const u32 a4 = (a >> 24) & 0xff;
const u32 b1 = (b >> 0) & 0xff;
const u32 b2 = (b >> 8) & 0xff;
const u32 b3 = (b >> 16) & 0xff;
const u32 b4 = (b >> 24) & 0xff;
const u32 r1 = (a1 + b1) & 0xff;
const u32 r2 = (a2 + b2) & 0xff;
const u32 r3 = (a3 + b3) & 0xff;
const u32 r4 = (a4 + b4) & 0xff;
const u32 r = r1 << 0
| r2 << 8
| r3 << 16
| r4 << 24;
return r;
}
DECLSPEC u32 hc_apply_keyfile_vc (u32 *w, const int pw_len, const GLOBAL_AS vc_t *vc)
{
if (vc->keyfile_enabled == 0) return pw_len;
if (pw_len > 64)
{
w[ 0] = u8add (w[ 0], vc->keyfile_buf32[ 0]);
w[ 1] = u8add (w[ 1], vc->keyfile_buf32[ 1]);
w[ 2] = u8add (w[ 2], vc->keyfile_buf32[ 2]);
w[ 3] = u8add (w[ 3], vc->keyfile_buf32[ 3]);
w[ 4] = u8add (w[ 4], vc->keyfile_buf32[ 4]);
w[ 5] = u8add (w[ 5], vc->keyfile_buf32[ 5]);
w[ 6] = u8add (w[ 6], vc->keyfile_buf32[ 6]);
w[ 7] = u8add (w[ 7], vc->keyfile_buf32[ 7]);
w[ 8] = u8add (w[ 8], vc->keyfile_buf32[ 8]);
w[ 9] = u8add (w[ 9], vc->keyfile_buf32[ 9]);
w[10] = u8add (w[10], vc->keyfile_buf32[10]);
w[11] = u8add (w[11], vc->keyfile_buf32[11]);
w[12] = u8add (w[12], vc->keyfile_buf32[12]);
w[13] = u8add (w[13], vc->keyfile_buf32[13]);
w[14] = u8add (w[14], vc->keyfile_buf32[14]);
w[15] = u8add (w[15], vc->keyfile_buf32[15]);
w[16] = u8add (w[16], vc->keyfile_buf32[16]);
w[17] = u8add (w[17], vc->keyfile_buf32[17]);
w[18] = u8add (w[18], vc->keyfile_buf32[18]);
w[19] = u8add (w[19], vc->keyfile_buf32[19]);
w[20] = u8add (w[20], vc->keyfile_buf32[20]);
w[21] = u8add (w[21], vc->keyfile_buf32[21]);
w[22] = u8add (w[22], vc->keyfile_buf32[22]);
w[23] = u8add (w[23], vc->keyfile_buf32[23]);
w[24] = u8add (w[24], vc->keyfile_buf32[24]);
w[25] = u8add (w[25], vc->keyfile_buf32[25]);
w[26] = u8add (w[26], vc->keyfile_buf32[26]);
w[27] = u8add (w[27], vc->keyfile_buf32[27]);
w[28] = u8add (w[28], vc->keyfile_buf32[28]);
w[29] = u8add (w[29], vc->keyfile_buf32[29]);
w[30] = u8add (w[30], vc->keyfile_buf32[30]);
w[31] = u8add (w[31], vc->keyfile_buf32[31]);
return 128;
}
else
{
w[ 0] = u8add (w[ 0], vc->keyfile_buf16[ 0]);
w[ 1] = u8add (w[ 1], vc->keyfile_buf16[ 1]);
w[ 2] = u8add (w[ 2], vc->keyfile_buf16[ 2]);
w[ 3] = u8add (w[ 3], vc->keyfile_buf16[ 3]);
w[ 4] = u8add (w[ 4], vc->keyfile_buf16[ 4]);
w[ 5] = u8add (w[ 5], vc->keyfile_buf16[ 5]);
w[ 6] = u8add (w[ 6], vc->keyfile_buf16[ 6]);
w[ 7] = u8add (w[ 7], vc->keyfile_buf16[ 7]);
w[ 8] = u8add (w[ 8], vc->keyfile_buf16[ 8]);
w[ 9] = u8add (w[ 9], vc->keyfile_buf16[ 9]);
w[10] = u8add (w[10], vc->keyfile_buf16[10]);
w[11] = u8add (w[11], vc->keyfile_buf16[11]);
w[12] = u8add (w[12], vc->keyfile_buf16[12]);
w[13] = u8add (w[13], vc->keyfile_buf16[13]);
w[14] = u8add (w[14], vc->keyfile_buf16[14]);
w[15] = u8add (w[15], vc->keyfile_buf16[15]);
return 64;
}
}

View File

@ -0,0 +1,12 @@
/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#ifndef _INC_VERACRYPT_KEYFILE_H
#define _INC_VERACRYPT_KEYFILE_H
DECLSPEC u32 u8add (const u32 a, const u32 b);
DECLSPEC u32 hc_apply_keyfile_vc (u32 *w, const int pw_len, const GLOBAL_AS vc_t *vc);
#endif // _INC_VERACRYPT_KEYFILE_H

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc_tmp
@ -108,52 +110,50 @@ KERNEL_FQ void m06211_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
ripemd160_hmac_ctx_t ripemd160_hmac_ctx;
ripemd160_hmac_init_64 (&ripemd160_hmac_ctx, w0, w1, w2, w3);
ripemd160_hmac_init (&ripemd160_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = ripemd160_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = ripemd160_hmac_ctx.ipad.h[1];
@ -173,6 +173,11 @@ KERNEL_FQ void m06211_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
{
ripemd160_hmac_ctx_t ripemd160_hmac_ctx2 = ripemd160_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j << 24;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc_tmp
@ -108,52 +110,50 @@ KERNEL_FQ void m06212_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
ripemd160_hmac_ctx_t ripemd160_hmac_ctx;
ripemd160_hmac_init_64 (&ripemd160_hmac_ctx, w0, w1, w2, w3);
ripemd160_hmac_init (&ripemd160_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = ripemd160_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = ripemd160_hmac_ctx.ipad.h[1];
@ -173,6 +173,11 @@ KERNEL_FQ void m06212_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
{
ripemd160_hmac_ctx_t ripemd160_hmac_ctx2 = ripemd160_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j << 24;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc_tmp
@ -108,52 +110,50 @@ KERNEL_FQ void m06213_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
ripemd160_hmac_ctx_t ripemd160_hmac_ctx;
ripemd160_hmac_init_64 (&ripemd160_hmac_ctx, w0, w1, w2, w3);
ripemd160_hmac_init (&ripemd160_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = ripemd160_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = ripemd160_hmac_ctx.ipad.h[1];
@ -173,6 +173,11 @@ KERNEL_FQ void m06213_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
{
ripemd160_hmac_ctx_t ripemd160_hmac_ctx2 = ripemd160_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j << 24;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc64_tmp
@ -130,105 +132,50 @@ KERNEL_FQ void m06221_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w4[0] = pws[gid].i[16];
w4[1] = pws[gid].i[17];
w4[2] = pws[gid].i[18];
w4[3] = pws[gid].i[19];
w5[0] = pws[gid].i[20];
w5[1] = pws[gid].i[21];
w5[2] = pws[gid].i[22];
w5[3] = pws[gid].i[23];
w6[0] = pws[gid].i[24];
w6[1] = pws[gid].i[25];
w6[2] = pws[gid].i[26];
w6[3] = pws[gid].i[27];
w7[0] = pws[gid].i[28];
w7[1] = pws[gid].i[29];
w7[2] = pws[gid].i[30];
w7[3] = pws[gid].i[31];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
w4[0] = hc_swap32_S (w4[0]);
w4[1] = hc_swap32_S (w4[1]);
w4[2] = hc_swap32_S (w4[2]);
w4[3] = hc_swap32_S (w4[3]);
w5[0] = hc_swap32_S (w5[0]);
w5[1] = hc_swap32_S (w5[1]);
w5[2] = hc_swap32_S (w5[2]);
w5[3] = hc_swap32_S (w5[3]);
w6[0] = hc_swap32_S (w6[0]);
w6[1] = hc_swap32_S (w6[1]);
w6[2] = hc_swap32_S (w6[2]);
w6[3] = hc_swap32_S (w6[3]);
w7[0] = hc_swap32_S (w7[0]);
w7[1] = hc_swap32_S (w7[1]);
w7[2] = hc_swap32_S (w7[2]);
w7[3] = hc_swap32_S (w7[3]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha512_hmac_ctx_t sha512_hmac_ctx;
sha512_hmac_init_128 (&sha512_hmac_ctx, w0, w1, w2, w3, w4, w5, w6, w7);
sha512_hmac_init_swap (&sha512_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1];
@ -254,6 +201,15 @@ KERNEL_FQ void m06221_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t))
{
sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc64_tmp
@ -130,105 +132,50 @@ KERNEL_FQ void m06222_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w4[0] = pws[gid].i[16];
w4[1] = pws[gid].i[17];
w4[2] = pws[gid].i[18];
w4[3] = pws[gid].i[19];
w5[0] = pws[gid].i[20];
w5[1] = pws[gid].i[21];
w5[2] = pws[gid].i[22];
w5[3] = pws[gid].i[23];
w6[0] = pws[gid].i[24];
w6[1] = pws[gid].i[25];
w6[2] = pws[gid].i[26];
w6[3] = pws[gid].i[27];
w7[0] = pws[gid].i[28];
w7[1] = pws[gid].i[29];
w7[2] = pws[gid].i[30];
w7[3] = pws[gid].i[31];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
w4[0] = hc_swap32_S (w4[0]);
w4[1] = hc_swap32_S (w4[1]);
w4[2] = hc_swap32_S (w4[2]);
w4[3] = hc_swap32_S (w4[3]);
w5[0] = hc_swap32_S (w5[0]);
w5[1] = hc_swap32_S (w5[1]);
w5[2] = hc_swap32_S (w5[2]);
w5[3] = hc_swap32_S (w5[3]);
w6[0] = hc_swap32_S (w6[0]);
w6[1] = hc_swap32_S (w6[1]);
w6[2] = hc_swap32_S (w6[2]);
w6[3] = hc_swap32_S (w6[3]);
w7[0] = hc_swap32_S (w7[0]);
w7[1] = hc_swap32_S (w7[1]);
w7[2] = hc_swap32_S (w7[2]);
w7[3] = hc_swap32_S (w7[3]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha512_hmac_ctx_t sha512_hmac_ctx;
sha512_hmac_init_128 (&sha512_hmac_ctx, w0, w1, w2, w3, w4, w5, w6, w7);
sha512_hmac_init_swap (&sha512_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1];
@ -254,6 +201,15 @@ KERNEL_FQ void m06222_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t))
{
sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc64_tmp
@ -130,105 +132,50 @@ KERNEL_FQ void m06223_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w4[0] = pws[gid].i[16];
w4[1] = pws[gid].i[17];
w4[2] = pws[gid].i[18];
w4[3] = pws[gid].i[19];
w5[0] = pws[gid].i[20];
w5[1] = pws[gid].i[21];
w5[2] = pws[gid].i[22];
w5[3] = pws[gid].i[23];
w6[0] = pws[gid].i[24];
w6[1] = pws[gid].i[25];
w6[2] = pws[gid].i[26];
w6[3] = pws[gid].i[27];
w7[0] = pws[gid].i[28];
w7[1] = pws[gid].i[29];
w7[2] = pws[gid].i[30];
w7[3] = pws[gid].i[31];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
w4[0] = hc_swap32_S (w4[0]);
w4[1] = hc_swap32_S (w4[1]);
w4[2] = hc_swap32_S (w4[2]);
w4[3] = hc_swap32_S (w4[3]);
w5[0] = hc_swap32_S (w5[0]);
w5[1] = hc_swap32_S (w5[1]);
w5[2] = hc_swap32_S (w5[2]);
w5[3] = hc_swap32_S (w5[3]);
w6[0] = hc_swap32_S (w6[0]);
w6[1] = hc_swap32_S (w6[1]);
w6[2] = hc_swap32_S (w6[2]);
w6[3] = hc_swap32_S (w6[3]);
w7[0] = hc_swap32_S (w7[0]);
w7[1] = hc_swap32_S (w7[1]);
w7[2] = hc_swap32_S (w7[2]);
w7[3] = hc_swap32_S (w7[3]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha512_hmac_ctx_t sha512_hmac_ctx;
sha512_hmac_init_128 (&sha512_hmac_ctx, w0, w1, w2, w3, w4, w5, w6, w7);
sha512_hmac_init_swap (&sha512_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1];
@ -254,6 +201,15 @@ KERNEL_FQ void m06223_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t))
{
sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc_tmp
@ -210,69 +212,50 @@ KERNEL_FQ void m06231_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
whirlpool_hmac_ctx_t whirlpool_hmac_ctx;
whirlpool_hmac_init_64 (&whirlpool_hmac_ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
whirlpool_hmac_init_swap (&whirlpool_hmac_ctx, w, pw_len, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
tmps[gid].ipad[ 0] = whirlpool_hmac_ctx.ipad.h[ 0];
tmps[gid].ipad[ 1] = whirlpool_hmac_ctx.ipad.h[ 1];
@ -314,6 +297,11 @@ KERNEL_FQ void m06231_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
{
whirlpool_hmac_ctx_t whirlpool_hmac_ctx2 = whirlpool_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc_tmp
@ -210,69 +212,50 @@ KERNEL_FQ void m06232_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
whirlpool_hmac_ctx_t whirlpool_hmac_ctx;
whirlpool_hmac_init_64 (&whirlpool_hmac_ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
whirlpool_hmac_init_swap (&whirlpool_hmac_ctx, w, pw_len, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
tmps[gid].ipad[ 0] = whirlpool_hmac_ctx.ipad.h[ 0];
tmps[gid].ipad[ 1] = whirlpool_hmac_ctx.ipad.h[ 1];
@ -314,6 +297,11 @@ KERNEL_FQ void m06232_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
{
whirlpool_hmac_ctx_t whirlpool_hmac_ctx2 = whirlpool_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -21,7 +21,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -30,9 +32,9 @@ typedef struct tc
} tc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_truecrypt_keyfile.cl"
#endif
typedef struct tc_tmp
@ -210,69 +212,50 @@ KERNEL_FQ void m06233_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_tc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
whirlpool_hmac_ctx_t whirlpool_hmac_ctx;
whirlpool_hmac_init_64 (&whirlpool_hmac_ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
whirlpool_hmac_init_swap (&whirlpool_hmac_ctx, w, pw_len, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
tmps[gid].ipad[ 0] = whirlpool_hmac_ctx.ipad.h[ 0];
tmps[gid].ipad[ 1] = whirlpool_hmac_ctx.ipad.h[ 1];
@ -314,6 +297,11 @@ KERNEL_FQ void m06233_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t))
{
whirlpool_hmac_ctx_t whirlpool_hmac_ctx2 = whirlpool_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -150,52 +152,50 @@ KERNEL_FQ void m13711_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
ripemd160_hmac_ctx_t ripemd160_hmac_ctx;
ripemd160_hmac_init_64 (&ripemd160_hmac_ctx, w0, w1, w2, w3);
ripemd160_hmac_init (&ripemd160_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = ripemd160_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = ripemd160_hmac_ctx.ipad.h[1];
@ -215,6 +215,11 @@ KERNEL_FQ void m13711_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
ripemd160_hmac_ctx_t ripemd160_hmac_ctx2 = ripemd160_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j << 24;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -201,52 +203,50 @@ KERNEL_FQ void m13712_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
ripemd160_hmac_ctx_t ripemd160_hmac_ctx;
ripemd160_hmac_init_64 (&ripemd160_hmac_ctx, w0, w1, w2, w3);
ripemd160_hmac_init (&ripemd160_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = ripemd160_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = ripemd160_hmac_ctx.ipad.h[1];
@ -266,6 +266,11 @@ KERNEL_FQ void m13712_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
ripemd160_hmac_ctx_t ripemd160_hmac_ctx2 = ripemd160_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j << 24;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -266,52 +268,50 @@ KERNEL_FQ void m13713_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
ripemd160_hmac_ctx_t ripemd160_hmac_ctx;
ripemd160_hmac_init_64 (&ripemd160_hmac_ctx, w0, w1, w2, w3);
ripemd160_hmac_init (&ripemd160_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = ripemd160_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = ripemd160_hmac_ctx.ipad.h[1];
@ -331,6 +331,11 @@ KERNEL_FQ void m13713_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
ripemd160_hmac_ctx_t ripemd160_hmac_ctx2 = ripemd160_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j << 24;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc64_tmp
@ -172,105 +174,50 @@ KERNEL_FQ void m13721_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w4[0] = pws[gid].i[16];
w4[1] = pws[gid].i[17];
w4[2] = pws[gid].i[18];
w4[3] = pws[gid].i[19];
w5[0] = pws[gid].i[20];
w5[1] = pws[gid].i[21];
w5[2] = pws[gid].i[22];
w5[3] = pws[gid].i[23];
w6[0] = pws[gid].i[24];
w6[1] = pws[gid].i[25];
w6[2] = pws[gid].i[26];
w6[3] = pws[gid].i[27];
w7[0] = pws[gid].i[28];
w7[1] = pws[gid].i[29];
w7[2] = pws[gid].i[30];
w7[3] = pws[gid].i[31];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
w4[0] = hc_swap32_S (w4[0]);
w4[1] = hc_swap32_S (w4[1]);
w4[2] = hc_swap32_S (w4[2]);
w4[3] = hc_swap32_S (w4[3]);
w5[0] = hc_swap32_S (w5[0]);
w5[1] = hc_swap32_S (w5[1]);
w5[2] = hc_swap32_S (w5[2]);
w5[3] = hc_swap32_S (w5[3]);
w6[0] = hc_swap32_S (w6[0]);
w6[1] = hc_swap32_S (w6[1]);
w6[2] = hc_swap32_S (w6[2]);
w6[3] = hc_swap32_S (w6[3]);
w7[0] = hc_swap32_S (w7[0]);
w7[1] = hc_swap32_S (w7[1]);
w7[2] = hc_swap32_S (w7[2]);
w7[3] = hc_swap32_S (w7[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha512_hmac_ctx_t sha512_hmac_ctx;
sha512_hmac_init_128 (&sha512_hmac_ctx, w0, w1, w2, w3, w4, w5, w6, w7);
sha512_hmac_init_swap (&sha512_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1];
@ -296,6 +243,15 @@ KERNEL_FQ void m13721_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t))
{
sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc64_tmp
@ -223,105 +225,50 @@ KERNEL_FQ void m13722_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w4[0] = pws[gid].i[16];
w4[1] = pws[gid].i[17];
w4[2] = pws[gid].i[18];
w4[3] = pws[gid].i[19];
w5[0] = pws[gid].i[20];
w5[1] = pws[gid].i[21];
w5[2] = pws[gid].i[22];
w5[3] = pws[gid].i[23];
w6[0] = pws[gid].i[24];
w6[1] = pws[gid].i[25];
w6[2] = pws[gid].i[26];
w6[3] = pws[gid].i[27];
w7[0] = pws[gid].i[28];
w7[1] = pws[gid].i[29];
w7[2] = pws[gid].i[30];
w7[3] = pws[gid].i[31];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
w4[0] = hc_swap32_S (w4[0]);
w4[1] = hc_swap32_S (w4[1]);
w4[2] = hc_swap32_S (w4[2]);
w4[3] = hc_swap32_S (w4[3]);
w5[0] = hc_swap32_S (w5[0]);
w5[1] = hc_swap32_S (w5[1]);
w5[2] = hc_swap32_S (w5[2]);
w5[3] = hc_swap32_S (w5[3]);
w6[0] = hc_swap32_S (w6[0]);
w6[1] = hc_swap32_S (w6[1]);
w6[2] = hc_swap32_S (w6[2]);
w6[3] = hc_swap32_S (w6[3]);
w7[0] = hc_swap32_S (w7[0]);
w7[1] = hc_swap32_S (w7[1]);
w7[2] = hc_swap32_S (w7[2]);
w7[3] = hc_swap32_S (w7[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha512_hmac_ctx_t sha512_hmac_ctx;
sha512_hmac_init_128 (&sha512_hmac_ctx, w0, w1, w2, w3, w4, w5, w6, w7);
sha512_hmac_init_swap (&sha512_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1];
@ -347,6 +294,15 @@ KERNEL_FQ void m13722_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t))
{
sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc64_tmp
@ -288,105 +290,50 @@ KERNEL_FQ void m13723_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w4[0] = pws[gid].i[16];
w4[1] = pws[gid].i[17];
w4[2] = pws[gid].i[18];
w4[3] = pws[gid].i[19];
w5[0] = pws[gid].i[20];
w5[1] = pws[gid].i[21];
w5[2] = pws[gid].i[22];
w5[3] = pws[gid].i[23];
w6[0] = pws[gid].i[24];
w6[1] = pws[gid].i[25];
w6[2] = pws[gid].i[26];
w6[3] = pws[gid].i[27];
w7[0] = pws[gid].i[28];
w7[1] = pws[gid].i[29];
w7[2] = pws[gid].i[30];
w7[3] = pws[gid].i[31];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
w4[0] = hc_swap32_S (w4[0]);
w4[1] = hc_swap32_S (w4[1]);
w4[2] = hc_swap32_S (w4[2]);
w4[3] = hc_swap32_S (w4[3]);
w5[0] = hc_swap32_S (w5[0]);
w5[1] = hc_swap32_S (w5[1]);
w5[2] = hc_swap32_S (w5[2]);
w5[3] = hc_swap32_S (w5[3]);
w6[0] = hc_swap32_S (w6[0]);
w6[1] = hc_swap32_S (w6[1]);
w6[2] = hc_swap32_S (w6[2]);
w6[3] = hc_swap32_S (w6[3]);
w7[0] = hc_swap32_S (w7[0]);
w7[1] = hc_swap32_S (w7[1]);
w7[2] = hc_swap32_S (w7[2]);
w7[3] = hc_swap32_S (w7[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha512_hmac_ctx_t sha512_hmac_ctx;
sha512_hmac_init_128 (&sha512_hmac_ctx, w0, w1, w2, w3, w4, w5, w6, w7);
sha512_hmac_init_swap (&sha512_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1];
@ -412,6 +359,15 @@ KERNEL_FQ void m13723_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t))
{
sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -252,69 +254,50 @@ KERNEL_FQ void m13731_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
whirlpool_hmac_ctx_t whirlpool_hmac_ctx;
whirlpool_hmac_init_64 (&whirlpool_hmac_ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
whirlpool_hmac_init_swap (&whirlpool_hmac_ctx, w, pw_len, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
tmps[gid].ipad[ 0] = whirlpool_hmac_ctx.ipad.h[ 0];
tmps[gid].ipad[ 1] = whirlpool_hmac_ctx.ipad.h[ 1];
@ -356,6 +339,11 @@ KERNEL_FQ void m13731_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
whirlpool_hmac_ctx_t whirlpool_hmac_ctx2 = whirlpool_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -303,69 +305,50 @@ KERNEL_FQ void m13732_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
whirlpool_hmac_ctx_t whirlpool_hmac_ctx;
whirlpool_hmac_init_64 (&whirlpool_hmac_ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
whirlpool_hmac_init_swap (&whirlpool_hmac_ctx, w, pw_len, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
tmps[gid].ipad[ 0] = whirlpool_hmac_ctx.ipad.h[ 0];
tmps[gid].ipad[ 1] = whirlpool_hmac_ctx.ipad.h[ 1];
@ -407,6 +390,11 @@ KERNEL_FQ void m13732_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
whirlpool_hmac_ctx_t whirlpool_hmac_ctx2 = whirlpool_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -368,69 +370,50 @@ KERNEL_FQ void m13733_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
whirlpool_hmac_ctx_t whirlpool_hmac_ctx;
whirlpool_hmac_init_64 (&whirlpool_hmac_ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
whirlpool_hmac_init_swap (&whirlpool_hmac_ctx, w, pw_len, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7);
tmps[gid].ipad[ 0] = whirlpool_hmac_ctx.ipad.h[ 0];
tmps[gid].ipad[ 1] = whirlpool_hmac_ctx.ipad.h[ 1];
@ -472,6 +455,11 @@ KERNEL_FQ void m13733_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
whirlpool_hmac_ctx_t whirlpool_hmac_ctx2 = whirlpool_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -156,69 +158,50 @@ KERNEL_FQ void m13751_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha256_hmac_ctx_t sha256_hmac_ctx;
sha256_hmac_init_64 (&sha256_hmac_ctx, w0, w1, w2, w3);
sha256_hmac_init_swap (&sha256_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1];
@ -244,6 +227,15 @@ KERNEL_FQ void m13751_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -207,69 +209,50 @@ KERNEL_FQ void m13752_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha256_hmac_ctx_t sha256_hmac_ctx;
sha256_hmac_init_64 (&sha256_hmac_ctx, w0, w1, w2, w3);
sha256_hmac_init_swap (&sha256_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1];
@ -295,6 +278,15 @@ KERNEL_FQ void m13752_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc_tmp
@ -272,69 +274,50 @@ KERNEL_FQ void m13753_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
sha256_hmac_ctx_t sha256_hmac_ctx;
sha256_hmac_init_64 (&sha256_hmac_ctx, w0, w1, w2, w3);
sha256_hmac_init_swap (&sha256_hmac_ctx, w, pw_len);
tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0];
tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1];
@ -360,6 +343,15 @@ KERNEL_FQ void m13753_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t))
{
sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w4[4];
u32 w5[4];
u32 w6[4];
u32 w7[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc64_sbog_tmp
@ -222,69 +224,50 @@ KERNEL_FQ void m13771_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
streebog512_hmac_ctx_t streebog512_hmac_ctx;
streebog512_hmac_init_64 (&streebog512_hmac_ctx, w0, w1, w2, w3, s_sbob_sl64);
streebog512_hmac_init_swap (&streebog512_hmac_ctx, w, pw_len, s_sbob_sl64);
tmps[gid].ipad_hash[0] = streebog512_hmac_ctx.ipad.h[0];
tmps[gid].ipad_hash[1] = streebog512_hmac_ctx.ipad.h[1];
@ -328,6 +311,11 @@ KERNEL_FQ void m13771_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t))
{
streebog512_hmac_ctx_t streebog512_hmac_ctx2 = streebog512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc64_sbog_tmp
@ -273,69 +275,50 @@ KERNEL_FQ void m13772_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
streebog512_hmac_ctx_t streebog512_hmac_ctx;
streebog512_hmac_init_64 (&streebog512_hmac_ctx, w0, w1, w2, w3, s_sbob_sl64);
streebog512_hmac_init_swap (&streebog512_hmac_ctx, w, pw_len, s_sbob_sl64);
tmps[gid].ipad_hash[0] = streebog512_hmac_ctx.ipad.h[0];
tmps[gid].ipad_hash[1] = streebog512_hmac_ctx.ipad.h[1];
@ -379,6 +362,11 @@ KERNEL_FQ void m13772_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t))
{
streebog512_hmac_ctx_t streebog512_hmac_ctx2 = streebog512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -23,7 +23,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -36,10 +38,10 @@ typedef struct vc
} vc_t;
#ifdef KERNEL_STATIC
#include "inc_truecrypt_keyfile.cl"
#include "inc_truecrypt_crc32.cl"
#include "inc_truecrypt_xts.cl"
#include "inc_veracrypt_xts.cl"
#include "inc_veracrypt_keyfile.cl"
#endif
typedef struct vc64_sbog_tmp
@ -338,69 +340,50 @@ KERNEL_FQ void m13773_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t))
* base
*/
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
u32 w[32];
w0[0] = pws[gid].i[ 0];
w0[1] = pws[gid].i[ 1];
w0[2] = pws[gid].i[ 2];
w0[3] = pws[gid].i[ 3];
w1[0] = pws[gid].i[ 4];
w1[1] = pws[gid].i[ 5];
w1[2] = pws[gid].i[ 6];
w1[3] = pws[gid].i[ 7];
w2[0] = pws[gid].i[ 8];
w2[1] = pws[gid].i[ 9];
w2[2] = pws[gid].i[10];
w2[3] = pws[gid].i[11];
w3[0] = pws[gid].i[12];
w3[1] = pws[gid].i[13];
w3[2] = pws[gid].i[14];
w3[3] = pws[gid].i[15];
w[ 0] = pws[gid].i[ 0];
w[ 1] = pws[gid].i[ 1];
w[ 2] = pws[gid].i[ 2];
w[ 3] = pws[gid].i[ 3];
w[ 4] = pws[gid].i[ 4];
w[ 5] = pws[gid].i[ 5];
w[ 6] = pws[gid].i[ 6];
w[ 7] = pws[gid].i[ 7];
w[ 8] = pws[gid].i[ 8];
w[ 9] = pws[gid].i[ 9];
w[10] = pws[gid].i[10];
w[11] = pws[gid].i[11];
w[12] = pws[gid].i[12];
w[13] = pws[gid].i[13];
w[14] = pws[gid].i[14];
w[15] = pws[gid].i[15];
w[16] = pws[gid].i[16];
w[17] = pws[gid].i[17];
w[18] = pws[gid].i[18];
w[19] = pws[gid].i[19];
w[20] = pws[gid].i[20];
w[21] = pws[gid].i[21];
w[22] = pws[gid].i[22];
w[23] = pws[gid].i[23];
w[24] = pws[gid].i[24];
w[25] = pws[gid].i[25];
w[26] = pws[gid].i[26];
w[27] = pws[gid].i[27];
w[28] = pws[gid].i[28];
w[29] = pws[gid].i[29];
w[30] = pws[gid].i[30];
w[31] = pws[gid].i[31];
const u32 pw_len = pws[gid].pw_len;
u32 pw_len = pws[gid].pw_len;
hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
hc_execute_keyboard_layout_mapping (w, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);
w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]);
w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]);
w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]);
w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]);
w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]);
w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]);
w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]);
w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]);
w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]);
w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]);
w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]);
w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]);
w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]);
w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]);
w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]);
w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]);
w0[0] = hc_swap32_S (w0[0]);
w0[1] = hc_swap32_S (w0[1]);
w0[2] = hc_swap32_S (w0[2]);
w0[3] = hc_swap32_S (w0[3]);
w1[0] = hc_swap32_S (w1[0]);
w1[1] = hc_swap32_S (w1[1]);
w1[2] = hc_swap32_S (w1[2]);
w1[3] = hc_swap32_S (w1[3]);
w2[0] = hc_swap32_S (w2[0]);
w2[1] = hc_swap32_S (w2[1]);
w2[2] = hc_swap32_S (w2[2]);
w2[3] = hc_swap32_S (w2[3]);
w3[0] = hc_swap32_S (w3[0]);
w3[1] = hc_swap32_S (w3[1]);
w3[2] = hc_swap32_S (w3[2]);
w3[3] = hc_swap32_S (w3[3]);
pw_len = hc_apply_keyfile_vc (w, pw_len, &esalt_bufs[DIGESTS_OFFSET]);
streebog512_hmac_ctx_t streebog512_hmac_ctx;
streebog512_hmac_init_64 (&streebog512_hmac_ctx, w0, w1, w2, w3, s_sbob_sl64);
streebog512_hmac_init_swap (&streebog512_hmac_ctx, w, pw_len, s_sbob_sl64);
tmps[gid].ipad_hash[0] = streebog512_hmac_ctx.ipad.h[0];
tmps[gid].ipad_hash[1] = streebog512_hmac_ctx.ipad.h[1];
@ -444,6 +427,11 @@ KERNEL_FQ void m13773_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t))
{
streebog512_hmac_ctx_t streebog512_hmac_ctx2 = streebog512_hmac_ctx;
u32 w0[4];
u32 w1[4];
u32 w2[4];
u32 w3[4];
w0[0] = j;
w0[1] = 0;
w0[2] = 0;

View File

@ -13,6 +13,7 @@
- Alias Devices: Show a warning in case the user specifically listed a device to use which in a later step is skipped because it is an alias of another active device
- Backend Information: Added new column showing the PCI Address per CUDA/OpenCL device to easier identify broken cards
- VeraCrypt: Increase password length support for non-boot volumes from 64 to 128
##
## Technical

View File

@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
int cpu_crc32 (const char *filename, u8 keytab[64]);
int cpu_crc32 (const char *filename, u8 *keytab, const size_t keytabsz);
u32 cpu_crc32_buffer (const u8 *buf, const size_t length);
#endif // _CPU_CRC32_H

View File

@ -360,7 +360,6 @@ CXXFLAGS :=
EMU_OBJS_ALL := emu_general emu_inc_common emu_inc_platform emu_inc_scalar emu_inc_simd
EMU_OBJS_ALL += emu_inc_rp emu_inc_rp_optimized
EMU_OBJS_ALL += emu_inc_truecrypt_crc32 emu_inc_truecrypt_keyfile emu_inc_truecrypt_xts emu_inc_veracrypt_xts
EMU_OBJS_ALL += emu_inc_hash_md4 emu_inc_hash_md5 emu_inc_hash_ripemd160 emu_inc_hash_sha1 emu_inc_hash_sha256 emu_inc_hash_sha384 emu_inc_hash_sha512 emu_inc_hash_streebog256 emu_inc_hash_streebog512 emu_inc_ecc_secp256k1
EMU_OBJS_ALL += emu_inc_cipher_aes emu_inc_cipher_camellia emu_inc_cipher_des emu_inc_cipher_kuznyechik emu_inc_cipher_serpent emu_inc_cipher_twofish

View File

@ -88,7 +88,7 @@ u32 cpu_crc32_buffer (const u8 *buf, const size_t length)
return crc ^ 0xffffffff;
}
int cpu_crc32 (const char *filename, u8 keytab[64])
int cpu_crc32 (const char *filename, u8 *keytab, const size_t keytabsz)
{
u32 crc = ~0U;
@ -110,10 +110,10 @@ int cpu_crc32 (const char *filename, u8 keytab[64])
{
crc = crc32tab[(crc ^ buf[fpos]) & 0xff] ^ (crc >> 8);
keytab[kpos++] += (crc >> 24) & 0xff; if (kpos >= 64) kpos = 0;
keytab[kpos++] += (crc >> 16) & 0xff; if (kpos >= 64) kpos = 0;
keytab[kpos++] += (crc >> 8) & 0xff; if (kpos >= 64) kpos = 0;
keytab[kpos++] += (crc >> 0) & 0xff; if (kpos >= 64) kpos = 0;
keytab[kpos++] += (crc >> 24) & 0xff; if (kpos >= keytabsz) kpos = 0;
keytab[kpos++] += (crc >> 16) & 0xff; if (kpos >= keytabsz) kpos = 0;
keytab[kpos++] += (crc >> 8) & 0xff; if (kpos >= keytabsz) kpos = 0;
keytab[kpos++] += (crc >> 0) & 0xff; if (kpos >= keytabsz) kpos = 0;
}
hcfree (buf);

View File

@ -1,11 +0,0 @@
/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#include "common.h"
#include "types.h"
#include "emu_general.h"
#include "inc_truecrypt_crc32.cl"

View File

@ -1,11 +0,0 @@
/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#include "common.h"
#include "types.h"
#include "emu_general.h"
#include "inc_truecrypt_keyfile.cl"

View File

@ -1,11 +0,0 @@
/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#include "common.h"
#include "types.h"
#include "emu_general.h"
#include "inc_truecrypt_xts.cl"

View File

@ -1,11 +0,0 @@
/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#include "common.h"
#include "types.h"
#include "emu_general.h"
#include "inc_veracrypt_xts.cl"

View File

@ -59,7 +59,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -204,13 +206,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -59,7 +59,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -204,13 +206,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -59,7 +59,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -202,13 +204,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -60,7 +60,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -138,8 +140,6 @@ int module_hash_init_selftest (MAYBE_UNUSED const hashconfig_t *hashconfig, hash
const int parser_status = module_hash_decode (hashconfig, hash->digest, hash->salt, hash->esalt, hash->hook_salt, hash->hash_info, tmpdata, st_hash_len / 2);
hcfree (tmpdata);
return parser_status;
@ -189,13 +189,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -60,7 +60,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -138,8 +140,6 @@ int module_hash_init_selftest (MAYBE_UNUSED const hashconfig_t *hashconfig, hash
const int parser_status = module_hash_decode (hashconfig, hash->digest, hash->salt, hash->esalt, hash->hook_salt, hash->hash_info, tmpdata, st_hash_len / 2);
hcfree (tmpdata);
return parser_status;
@ -189,13 +189,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -60,7 +60,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -187,13 +189,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -59,7 +59,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -197,13 +199,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -59,7 +59,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -197,13 +199,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -59,7 +59,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -193,13 +195,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -60,7 +60,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -198,13 +200,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -60,7 +60,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -198,13 +200,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -60,7 +60,9 @@ typedef struct tc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -198,13 +200,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
tc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -145,7 +147,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 64; // VC nowadays support 128, but RipeMD160 for container were removed before update from 64->128
return pw_max;
}
@ -214,13 +216,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -145,7 +147,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 64; // VC nowadays support 128, but RipeMD160 for container were removed before update from 64->128
return pw_max;
}
@ -214,13 +216,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -145,7 +147,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 64; // VC nowadays support 128, but RipeMD160 for container were removed before update from 64->128
return pw_max;
}
@ -214,13 +216,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -155,7 +157,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -224,13 +226,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -155,7 +157,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -224,13 +226,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -155,7 +157,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -224,13 +226,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -134,7 +136,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -203,13 +205,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -134,7 +136,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -203,13 +205,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -134,7 +136,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -203,13 +205,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -216,13 +218,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -216,13 +218,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -216,13 +218,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -164,7 +166,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -233,13 +235,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -164,7 +166,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -233,13 +235,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -65,7 +65,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -164,7 +166,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -233,13 +235,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -235,13 +237,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -235,13 +237,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -66,7 +66,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -235,13 +237,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -69,7 +69,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -158,7 +160,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -227,13 +229,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -69,7 +69,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -158,7 +160,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -227,13 +229,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping

View File

@ -69,7 +69,9 @@ typedef struct vc
{
u32 salt_buf[32];
u32 data_buf[112];
u32 keyfile_buf[16];
u32 keyfile_buf16[16];
u32 keyfile_buf32[32];
u32 keyfile_enabled;
u32 signature;
keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
@ -158,7 +160,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
// this overrides the reductions of PW_MAX in case optimized kernel is selected
// IOW, even in optimized kernel mode it support length 64
const u32 pw_max = 64;
const u32 pw_max = 128;
return pw_max;
}
@ -227,13 +229,16 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{
if (hc_path_read (keyfile))
{
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf16, 64);
cpu_crc32 (keyfile, (u8 *) vc->keyfile_buf32, 128);
}
keyfile = strtok_r ((char *) NULL, ",", &saveptr);
}
hcfree (keyfiles);
vc->keyfile_enabled = 1;
}
// keyboard layout mapping