From b01f4e5c2ec741223f0830ac6233c21a8a188812 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 7 Mar 2023 21:53:11 +0100 Subject: [PATCH] corrected ASCII plaintext check from >=20 to >=0x20 --- OpenCL/m25400-pure.cl | 4 ++-- OpenCL/m26610-pure.cl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenCL/m25400-pure.cl b/OpenCL/m25400-pure.cl index 5063d09f1..145196636 100644 --- a/OpenCL/m25400-pure.cl +++ b/OpenCL/m25400-pure.cl @@ -364,7 +364,7 @@ KERNEL_FQ void m25400_comp (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) // we don't use the user-password in the attack now (as we don't need it), // however we could use it in the comparison of the decrypted o-value, // yet it may make this attack a bit more fragile, as now we just check for ASCII - if ((u8OutBufPtr[i] >= 20 && u8OutBufPtr[i] <= 0x7e) || + if ((u8OutBufPtr[i] >= 0x20 && u8OutBufPtr[i] <= 0x7e) || (u8OutBufPtr[i] == u8OutPadPtr[i_padding])) { if (u8OutBufPtr[i] == u8OutPadPtr[i_padding]) @@ -374,7 +374,7 @@ KERNEL_FQ void m25400_comp (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) } else { - if (u8OutBufPtr[i] >= 20 && u8OutBufPtr[i] <= 0x7e) + if (u8OutBufPtr[i] >= 0x20 && u8OutBufPtr[i] <= 0x7e) { //printf("correct ASCII byte[%d]=0x%02x\n", i, u8OutBufPtr[i]); } diff --git a/OpenCL/m26610-pure.cl b/OpenCL/m26610-pure.cl index 1b3827ba7..ea0cac6e3 100644 --- a/OpenCL/m26610-pure.cl +++ b/OpenCL/m26610-pure.cl @@ -376,7 +376,7 @@ KERNEL_FQ void m26610_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sh for(int i=0;i<16;i++) { - if(u8OutBufPtr[i] >=20 && u8OutBufPtr[i] <= 0x7e) { + if(u8OutBufPtr[i] >=0x20 && u8OutBufPtr[i] <= 0x7e) { //if ((gid == 0) && (lid == 0)) printf("correct ASCII byte[%d]=0x%02x\n", i, u8OutBufPtr[i]); } else {