Add mangle to mode 60 attack 3
[hashcat.git] / include / types.h
index a694593..37e877c 100644 (file)
@@ -6,6 +6,12 @@
 #ifndef TYPES_H
 #define TYPES_H
 
+#ifdef _WIN
+#define EOL "\r\n"
+#else
+#define EOL "\n"
+#endif
+
 typedef struct
 {
   uint salt_buf[16];
@@ -26,8 +32,6 @@ typedef struct
   uint scrypt_N;
   uint scrypt_r;
   uint scrypt_p;
-  uint scrypt_tmto;
-  uint scrypt_phy;
 
 } salt_t;
 
@@ -285,9 +289,9 @@ typedef struct
 
 typedef struct
 {
-  uint P[256];
+  uint salt_buf[32];
 
-} scrypt_tmp_t;
+} win8phone_t;
 
 typedef struct
 {
@@ -643,8 +647,7 @@ typedef struct
 
 typedef struct
 {
-  u32 KEK[5];
-
+  u32 KEK[4];
   u32 lsb[4];
   u32 cipher[4];
 
@@ -914,7 +917,7 @@ typedef struct
 #define PW_MAX1     (PW_MAX + 1)
 #define PW_DICTMAX  31
 #define PW_DICTMAX1 (PW_DICTMAX + 1)
-#define PARAMCNT    32
+#define PARAMCNT    64
 
 struct __hc_device_param
 {
@@ -931,7 +934,6 @@ struct __hc_device_param
   uint    kernel_exec_timeout;
 
   uint    device_processors;
-  uint    device_processor_cores;
   u64     device_maxmem_alloc;
   u64     device_global_mem;
   u32     device_maxclock_frequency;
@@ -984,6 +986,12 @@ struct __hc_device_param
   uint    exec_pos;
   double  exec_ms[EXEC_CACHE];
 
+  // workaround cpu spinning
+
+  double  exec_us_prev1[EXPECTED_ITERATIONS];
+  double  exec_us_prev2[EXPECTED_ITERATIONS];
+  double  exec_us_prev3[EXPECTED_ITERATIONS];
+
   // this is "current" speed
 
   uint    speed_pos;
@@ -1002,6 +1010,10 @@ struct __hc_device_param
 
   bool    opencl_v12;
 
+  double  nvidia_spin_damp;
+
+  cl_platform_id platform;
+
   cl_uint device_vendor_id;
   cl_uint platform_vendor_id;
 
@@ -1054,7 +1066,10 @@ struct __hc_device_param
   cl_mem  d_tmps;
   cl_mem  d_hooks;
   cl_mem  d_result;
-  cl_mem  d_scryptV_buf;
+  cl_mem  d_scryptV0_buf;
+  cl_mem  d_scryptV1_buf;
+  cl_mem  d_scryptV2_buf;
+  cl_mem  d_scryptV3_buf;
   cl_mem  d_root_css_buf;
   cl_mem  d_markov_css_buf;
 
@@ -1086,9 +1101,10 @@ typedef struct __hc_device_param hc_device_param_t;
 #ifdef HAVE_HWMON
 typedef struct
 {
-  HM_ADAPTER_ADL   adl;
-  HM_ADAPTER_NVML  nvml;
-  HM_ADAPTER_NVAPI nvapi;
+  HM_ADAPTER_ADL     adl;
+  HM_ADAPTER_NVML    nvml;
+  HM_ADAPTER_NVAPI   nvapi;
+  HM_ADAPTER_XNVCTRL xnvctrl;
 
   int od_version;
 
@@ -1110,6 +1126,9 @@ typedef struct
 
   hc_device_param_t *devices_param;
 
+  uint    shutdown_inner;
+  uint    shutdown_outer;
+
   /**
    * workload specific
    */
@@ -1164,6 +1183,7 @@ typedef struct
   void      *hm_adl;
   void      *hm_nvml;
   void      *hm_nvapi;
+  void      *hm_xnvctrl;
   hm_attrs_t hm_device[DEVICES_MAX];
   #endif
 
@@ -1187,6 +1207,9 @@ typedef struct
 
   void   *esalts_buf;
 
+  uint    scrypt_tmp_size;
+  uint    scrypt_tmto_final;
+
   /**
    * logging
    */
@@ -1241,7 +1264,6 @@ typedef struct
   uint    quiet;
   uint    force;
   uint    benchmark;
-  uint    benchmark_repeats;
   uint    runtime;
   uint    remove;
   uint    remove_timer;
@@ -1305,6 +1327,8 @@ typedef struct
   time_t  runtime_start;
   time_t  runtime_stop;
 
+  time_t  prepare_time;
+
   time_t  proc_start;
   time_t  proc_stop;