Get rid of src/rp_kernel_on_cpu.c and src/rp_kernel_on_cpu_optimized.c and use OpenCL emulated kernel version
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _CPU_MD4_H
|
||||
#define _CPU_MD4_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void md4_64 (const u32 block[16], u32 digest[4]);
|
||||
|
||||
#endif // _CPU_MD4_H
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _CPU_OPENCL_EMU_H
|
||||
#define _CPU_OPENCL_EMU_H
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define DEVICE_TYPE -1
|
||||
#define VENDOR_ID -1
|
||||
#define LOCAL_MEM_TYPE 2
|
||||
#define CUDA_ARCH 0
|
||||
#define HAS_VPERM 0
|
||||
#define HAS_VADD3 0
|
||||
#define HAS_VBFE 0
|
||||
#define VECT_SIZE 1
|
||||
|
||||
typedef uint8_t uchar;
|
||||
typedef uint16_t ushort;
|
||||
typedef uint32_t uint;
|
||||
typedef uint64_t ulong;
|
||||
|
||||
typedef uchar u8;
|
||||
typedef ushort u16;
|
||||
typedef uint u32;
|
||||
typedef ulong u64;
|
||||
|
||||
// there's no such thing in plain C, therefore all vector operation cannot work in this emu
|
||||
// which is why VECT_SIZE is set to 1
|
||||
|
||||
typedef u8 u8x;
|
||||
typedef u16 u16x;
|
||||
typedef u32 u32x;
|
||||
typedef u64 u64x;
|
||||
|
||||
typedef uint uint4;
|
||||
|
||||
uint atomic_dec (uint *p);
|
||||
uint atomic_inc (uint *p);
|
||||
|
||||
size_t get_global_id (uint dimindx __attribute__((unused)));
|
||||
size_t get_local_id (uint dimindx __attribute__((unused)));
|
||||
size_t get_local_size (uint dimindx __attribute__((unused)));
|
||||
|
||||
#endif // _CPU_OPENCL_EMU_H
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#include "emu_general.h"
|
||||
|
||||
#define DGST_ELEM 4
|
||||
#define DGST_R0 0
|
||||
#define DGST_R1 1
|
||||
#define DGST_R2 2
|
||||
#define DGST_R3 3
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
||||
|
||||
#include "inc_vendor.h"
|
||||
#include "inc_hash_md4.h"
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#include "emu_general.h"
|
||||
|
||||
#define DGST_ELEM 4
|
||||
#define DGST_R0 0
|
||||
#define DGST_R1 1
|
||||
#define DGST_R2 2
|
||||
#define DGST_R3 3
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
||||
|
||||
#include "inc_vendor.h"
|
||||
//#include "inc_types.h"
|
||||
//#include "inc_common.h"
|
||||
#include "inc_rp.h"
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#include "emu_general.h"
|
||||
|
||||
#define DGST_ELEM 4
|
||||
#define DGST_R0 0
|
||||
#define DGST_R1 1
|
||||
#define DGST_R2 2
|
||||
#define DGST_R3 3
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
||||
|
||||
#include "inc_vendor.h"
|
||||
//#include "inc_types.h"
|
||||
//#include "inc_common.h"
|
||||
#include "inc_rp_optimized.h"
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _EMU_M02501_PURE_H
|
||||
#define _EMU_M02501_PURE_H
|
||||
|
||||
typedef struct wpa_pmk_tmp
|
||||
{
|
||||
u32 out[8];
|
||||
|
||||
} wpa_pmk_tmp_t;
|
||||
|
||||
typedef struct wpa_eapol
|
||||
{
|
||||
u32 pke[32];
|
||||
u32 eapol[64 + 16];
|
||||
u16 eapol_len;
|
||||
u8 message_pair;
|
||||
int message_pair_chgd;
|
||||
u8 keyver;
|
||||
u8 orig_mac_ap[6];
|
||||
u8 orig_mac_sta[6];
|
||||
u8 orig_nonce_ap[32];
|
||||
u8 orig_nonce_sta[32];
|
||||
u8 essid_len;
|
||||
u8 essid[32];
|
||||
u32 keymic[4];
|
||||
u32 hash[4];
|
||||
int nonce_compare;
|
||||
int nonce_error_corrections;
|
||||
int detected_le;
|
||||
int detected_be;
|
||||
|
||||
} wpa_eapol_t;
|
||||
|
||||
KERNEL_FQ void m02501_init (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t));
|
||||
KERNEL_FQ void m02501_loop (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t));
|
||||
KERNEL_FQ void m02501_comp (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t));
|
||||
KERNEL_FQ void m02501_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t));
|
||||
KERNEL_FQ void m02501_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t));
|
||||
KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t));
|
||||
|
||||
#endif // _EMU_M02501_PURE_H
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _RP_KERNEL_ON_CPU_H
|
||||
#define _RP_KERNEL_ON_CPU_H
|
||||
|
||||
int apply_rules (const u32 *cmds, u32 *buf, const int in_len);
|
||||
|
||||
#endif // _RP_KERNEL_ON_CPU_H
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _RP_KERNEL_ON_CPU_OPTIMIZED_H
|
||||
#define _RP_KERNEL_ON_CPU_OPTIMIZED_H
|
||||
|
||||
u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len);
|
||||
|
||||
u32 apply_rules_optimized (const u32 *cmds, u32 buf0[4], u32 buf1[4], const u32 len);
|
||||
|
||||
#endif // _RP_KERNEL_ON_CPU_OPTIMIZED_H
|
||||
Reference in New Issue
Block a user