with SNMPv3, follow optimized logic path with pw_len <= 64, update changes/readme entries

pull/2924/head
Gabriele Gristina 3 years ago
parent 496805cccf
commit 951ca699cf

@ -32,6 +32,11 @@
#define SNMPV3_MAX_ENGINE_ELEMS 16 // 16 * 4 = 64 > 32, also has to be multiple of 64
#define SNMPV3_MAX_PNUM_ELEMS 4 // 4 * 4 = 16 > 9
#define SNMPV3_MAX_PW_LENGTH_OPT 64
#define SNMPV3_TMP_ELEMS_OPT ((SNMPV3_MAX_PW_LENGTH_OPT * SNMPV3_MAX_PW_LENGTH) / 4)
// (64 * 64) / 4 = 1024
// for pw length > 64 we use global memory reads
typedef struct hmac_md5_tmp
{
u32 tmp_md5[SNMPV3_TMP_ELEMS];
@ -189,10 +194,7 @@ KERNEL_FQ void m25000_loop (KERN_ATTR_TMPS_ESALT (hmac_md5_tmp_t, snmpv3_t))
const int pw_len64 = pw_len * 64;
#define SNMPV3_TMP_ELEMS_OPT 1024 // 1024 = (64 max pw length * 64) / sizeof (u32)
// for pw length > 64 we use global memory reads
if (pw_len < 64)
if (pw_len <= SNMPV3_MAX_PW_LENGTH_OPT)
{
u32 tmp_shared[SNMPV3_TMP_ELEMS_OPT];

@ -30,6 +30,11 @@
#define SNMPV3_MAX_ENGINE_ELEMS 16 // 16 * 4 = 64 > 32, also has to be multiple of 64
#define SNMPV3_MAX_PNUM_ELEMS 4 // 4 * 4 = 16 > 9
#define SNMPV3_MAX_PW_LENGTH_OPT 64
#define SNMPV3_TMP_ELEMS_OPT ((SNMPV3_MAX_PW_LENGTH_OPT * SNMPV3_MAX_PW_LENGTH) / 4)
// (64 * 64) / 4 = 1024
// for pw length > 64 we use global memory reads
typedef struct hmac_md5_tmp
{
u32 tmp[SNMPV3_TMP_ELEMS];
@ -147,13 +152,10 @@ KERNEL_FQ void m25100_loop (KERN_ATTR_TMPS_ESALT (hmac_md5_tmp_t, snmpv3_t))
const int pw_len64 = pw_len * 64;
#define SNMPV3_TMP_ELEMS_OPT 1024 // 1024 = (64 max pw length * 64) / sizeof (u32)
// for pw length > 64 we use global memory reads
u32 tmp[SNMPV3_TMP_ELEMS_OPT];
if (pw_len < 64)
if (pw_len <= SNMPV3_MAX_PW_LENGTH_OPT)
{
u32 tmp[SNMPV3_TMP_ELEMS_OPT];
for (int i = 0; i < pw_len64 / 4; i++)
{
tmp[i] = tmps[gid].tmp[i];

@ -30,6 +30,11 @@
#define SNMPV3_MAX_ENGINE_ELEMS 16 // 16 * 4 = 64 > 32, also has to be multiple of 64
#define SNMPV3_MAX_PNUM_ELEMS 4 // 4 * 4 = 16 > 9
#define SNMPV3_MAX_PW_LENGTH_OPT 64
#define SNMPV3_TMP_ELEMS_OPT ((SNMPV3_MAX_PW_LENGTH_OPT * SNMPV3_MAX_PW_LENGTH) / 4)
// (64 * 64) / 4 = 1024
// for pw length > 64 we use global memory reads
typedef struct hmac_sha1_tmp
{
u32 tmp[SNMPV3_TMP_ELEMS];
@ -149,13 +154,10 @@ KERNEL_FQ void m25200_loop (KERN_ATTR_TMPS_ESALT (hmac_sha1_tmp_t, snmpv3_t))
const int pw_len64 = pw_len * 64;
#define SNMPV3_TMP_ELEMS_OPT 1024 // 1024 = (64 max pw length * 64) / sizeof (u32)
// for pw length > 64 we use global memory reads
u32 tmp[SNMPV3_TMP_ELEMS_OPT];
if (pw_len < 64)
if (pw_len <= SNMPV3_MAX_PW_LENGTH_OPT)
{
u32 tmp[SNMPV3_TMP_ELEMS_OPT];
for (int i = 0; i < pw_len64 / 4; i++)
{
tmp[i] = tmps[gid].tmp[i];

@ -30,6 +30,11 @@
#define SNMPV3_MAX_ENGINE_ELEMS 16 // 16 * 4 = 64 > 32, also has to be multiple of 64
#define SNMPV3_MAX_PNUM_ELEMS 4 // 4 * 4 = 16 > 9
#define SNMPV3_MAX_PW_LENGTH_OPT 64
#define SNMPV3_TMP_ELEMS_OPT ((SNMPV3_MAX_PW_LENGTH_OPT * SNMPV3_MAX_PW_LENGTH) / 4)
// (64 * 64) / 4 = 1024
// for pw length > 64 we use global memory reads
typedef struct hmac_sha224_tmp
{
u32 tmp[SNMPV3_TMP_ELEMS];
@ -155,10 +160,7 @@ KERNEL_FQ void m26700_loop (KERN_ATTR_TMPS_ESALT (hmac_sha224_tmp_t, snmpv3_t))
const int pw_len64 = pw_len * 64;
#define SNMPV3_TMP_ELEMS_OPT 1024 // 1024 = (64 max pw length * 64) / sizeof (u32)
// for pw length > 64 we use global memory reads
if (pw_len < 64)
if (pw_len <= SNMPV3_MAX_PW_LENGTH_OPT)
{
u32 tmp[SNMPV3_TMP_ELEMS_OPT];

@ -30,6 +30,11 @@
#define SNMPV3_MAX_ENGINE_ELEMS 16 // 16 * 4 = 64 > 32, also has to be multiple of 64
#define SNMPV3_MAX_PNUM_ELEMS 4 // 4 * 4 = 16 > 9
#define SNMPV3_MAX_PW_LENGTH_OPT 64
#define SNMPV3_TMP_ELEMS_OPT ((SNMPV3_MAX_PW_LENGTH_OPT * SNMPV3_MAX_PW_LENGTH) / 4)
// (64 * 64) / 4 = 1024
// for pw length > 64 we use global memory reads
typedef struct hmac_sha256_tmp
{
u32 tmp[SNMPV3_TMP_ELEMS];
@ -155,10 +160,7 @@ KERNEL_FQ void m26800_loop (KERN_ATTR_TMPS_ESALT (hmac_sha256_tmp_t, snmpv3_t))
const int pw_len64 = pw_len * 64;
#define SNMPV3_TMP_ELEMS_OPT 1024 // 1024 = (64 max pw length * 64) / sizeof (u32)
// for pw length > 64 we use global memory reads
if (pw_len < 64)
if (pw_len <= SNMPV3_MAX_PW_LENGTH_OPT)
{
u32 tmp[SNMPV3_TMP_ELEMS_OPT];

@ -56,6 +56,8 @@
- Added hash-mode: SNMPv3 HMAC-SHA1-96
- Added hash-mode: SNMPv3 HMAC-SHA224-128
- Added hash-mode: SNMPv3 HMAC-SHA256-192
- Added hash-mode: SNMPv3 HMAC-SHA384-256
- Added hash-mode: SNMPv3 HMAC-SHA512-384
* changes v6.2.2 -> v6.2.3

@ -158,8 +158,10 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or
- SNMPv3 HMAC-MD5-96/HMAC-SHA1-96
- SNMPv3 HMAC-MD5-96
- SNMPv3 HMAC-SHA1-96
- SNMPv3 HMAC-SHA256-192
- SNMPv3 HMAC-SHA224-128
- SNMPv3 HMAC-SHA256-192
- SNMPv3 HMAC-SHA384-256
- SNMPv3 HMAC-SHA512-384
- WPA-EAPOL-PBKDF2
- WPA-EAPOL-PMK
- WPA-PBKDF2-PMKID+EAPOL

Loading…
Cancel
Save