AxCrypt 2: only copy/use as little data as required

pull/2517/head
philsmd 4 years ago
parent 00ba7168fe
commit 3627840bbc
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

@ -31,7 +31,7 @@ typedef struct axcrypt2_tmp
u64 out[8];
u32 KEK[4];
u32 data[36];
u32 data[10];
} axcrypt2_tmp_t;
@ -371,7 +371,7 @@ KERNEL_FQ void m23500_init2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t))
tmps[gid].KEK[2] = KEK[2] ^ salt[2];
tmps[gid].KEK[3] = KEK[3] ^ salt[3];
for (int i = 0; i < 36; i++)
for (int i = 0; i < 10; i++)
{
tmps[gid].data[i] = esalt_bufs[digests_offset].data[i];
}
@ -447,9 +447,9 @@ KERNEL_FQ void m23500_loop2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t))
ukey[2] = tmps[gid].KEK[2];
ukey[3] = tmps[gid].KEK[3];
u32 data[36];
u32 data[10];
for (int i = 0; i < 36; i++)
for (int i = 0; i < 10; i++)
{
data[i] = tmps[gid].data[i];
}
@ -492,7 +492,7 @@ KERNEL_FQ void m23500_loop2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t))
}
}
for (int i = 0; i < 36; i++)
for (int i = 0; i < 10; i++)
{
tmps[gid].data[i] = data[i];
}

@ -31,7 +31,7 @@ typedef struct axcrypt2_tmp
u64 out[8];
u32 KEK[8];
u32 data[36];
u32 data[14];
} axcrypt2_tmp_t;
@ -383,7 +383,7 @@ KERNEL_FQ void m23600_init2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t))
tmps[gid].KEK[6] = KEK[6] ^ salt[6];
tmps[gid].KEK[7] = KEK[7] ^ salt[7];
for (int i = 0; i < 36; i++)
for (int i = 0; i < 14; i++)
{
tmps[gid].data[i] = esalt_bufs[digests_offset].data[i];
}
@ -463,9 +463,9 @@ KERNEL_FQ void m23600_loop2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t))
ukey[6] = tmps[gid].KEK[6];
ukey[7] = tmps[gid].KEK[7];
u32 data[36];
u32 data[14];
for (int i = 0; i < 36; i++)
for (int i = 0; i < 14; i++)
{
data[i] = tmps[gid].data[i];
}
@ -508,7 +508,7 @@ KERNEL_FQ void m23600_loop2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t))
}
}
for (int i = 0; i < 36; i++)
for (int i = 0; i < 14; i++)
{
tmps[gid].data[i] = data[i];
}

@ -61,7 +61,7 @@ typedef struct axcrypt2_tmp
u64 out[8];
u32 KEK[4];
u32 data[36];
u32 data[10];
} axcrypt2_tmp_t;

@ -61,7 +61,7 @@ typedef struct axcrypt2_tmp
u64 out[8];
u32 KEK[8];
u32 data[36];
u32 data[14];
} axcrypt2_tmp_t;

Loading…
Cancel
Save