Merge pull request #311 from fgaudreault/master
[hashcat.git] / include / types.h
index e262b46..621a92a 100644 (file)
@@ -64,6 +64,10 @@ typedef struct
   uint eapol[64];
   int  eapol_size;
   int  keyver;
+  u8   orig_mac1[6];
+  u8   orig_mac2[6];
+  u8   orig_nonce1[32];
+  u8   orig_nonce2[32];
 
 } wpa_t;
 
@@ -127,6 +131,38 @@ typedef struct
 
 } krb5pa_t;
 
+typedef struct
+{
+  uint account_info[512];
+  uint checksum[4];
+  uint edata2[2560];
+  uint edata2_len;
+
+} krb5tgs_t;
+
+typedef struct
+{
+  u32 version;
+  u32 algorithm;
+
+  /* key-file handling */
+  u32 keyfile_len;
+  u32 keyfile[8];
+
+  u32 final_random_seed[8];
+  u32 transf_random_seed[8];
+  u32 enc_iv[4];
+  u32 contents_hash[8];
+
+  /* specific to version 1 */
+  u32 contents_len;
+  u32 contents[75000];
+
+  /* specific to version 2 */
+  u32 expected_bytes[8];
+
+} keepass_t;
+
 typedef struct
 {
   uint salt_buf[16];
@@ -578,6 +614,21 @@ typedef struct
 
 } seven_zip_t;
 
+typedef struct
+{
+  u32 KEK[5];
+
+  u32 lsb[4];
+  u32 cipher[4];
+
+} axcrypt_tmp_t;
+
+typedef struct
+{
+  u32 tmp_digest[8];
+
+} keepass_tmp_t;
+
 typedef struct
 {
   u32  random[2];
@@ -651,6 +702,13 @@ typedef struct
 
 } psafe3_t;
 
+typedef struct 
+{
+  u32 salt_buf[128];
+  u32 salt_len;
+
+} pstoken_t;
+
 typedef struct
 {
   char    plain_buf[256];
@@ -690,25 +748,13 @@ typedef struct
 
 typedef struct
 {
-  union
-  {
-    u8   hc4[4][ 64];
-    u32  hi4[4][ 16];
-    u64  hl4[4][  8];
+  u32 i[16];
 
-    u8   hc2[2][128];
-    u32  hi2[2][ 32];
-    u64  hl2[2][ 16];
+  u32 pw_len;
 
-    u8   hc1[1][256];
-    u32  hi1[1][ 64];
-    u64  hl1[1][ 32];
-  } h;
-
-  uint pw_len;
-  uint alignment_placeholder_1;
-  uint alignment_placeholder_2;
-  uint alignment_placeholder_3;
+  u32 alignment_placeholder_1;
+  u32 alignment_placeholder_2;
+  u32 alignment_placeholder_3;
 
 } pw_t;
 
@@ -732,18 +778,10 @@ typedef struct
 
 } comb_t;
 
-typedef struct
-{
-  pw_t pw_buf;
-
-  uint cnt;
-
-} pw_cache_t;
-
 typedef struct
 {
   u32  version_bin;
-  char cwd[1024];
+  char cwd[256];
   u32  pid;
 
   u32  dictpos;
@@ -890,6 +928,10 @@ struct __hc_device_param
   uint    size_pws;
   uint    size_tmps;
   uint    size_hooks;
+  uint    size_bfs;
+  uint    size_combs;
+  uint    size_rules;
+  uint    size_rules_c;
   uint    size_root_css;
   uint    size_markov_css;
   uint    size_digests;
@@ -898,20 +940,13 @@ struct __hc_device_param
   uint    size_results;
   uint    size_plains;
 
-  uint  (*pw_add)       (struct __hc_device_param *, const u8 *, const uint);
-
-  void  (*pw_transpose) (const pw_t *, pw_t *);
-
   FILE   *combs_fp;
   comb_t *combs_buf;
 
   void   *hooks_buf;
 
-  pw_cache_t *pw_caches;
-
   pw_t   *pws_buf;
   uint    pws_cnt;
-  u64     pw_cnt;
 
   u64     words_off;
   u64     words_done;
@@ -927,11 +962,11 @@ struct __hc_device_param
   uint    exec_pos;
   double  exec_ms[EXEC_CACHE];
 
+  // this is "current" speed
+
   uint    speed_pos;
   u64     speed_cnt[SPEED_CACHE];
-  float   speed_ms[SPEED_CACHE];
-
-  hc_timer_t speed_rec[SPEED_CACHE];
+  double  speed_ms[SPEED_CACHE];
 
   hc_timer_t timer_speed;
 
@@ -955,7 +990,6 @@ struct __hc_device_param
   cl_kernel  kernel_mp_l;
   cl_kernel  kernel_mp_r;
   cl_kernel  kernel_amp;
-  cl_kernel  kernel_tb;
   cl_kernel  kernel_tm;
   cl_kernel  kernel_weak;
 
@@ -1005,7 +1039,6 @@ struct __hc_device_param
   void   *kernel_params_mp_r[PARAMCNT];
   void   *kernel_params_mp_l[PARAMCNT];
   void   *kernel_params_amp[PARAMCNT];
-  void   *kernel_params_tb[PARAMCNT];
   void   *kernel_params_tm[PARAMCNT];
 
   u32     kernel_params_buf32[PARAMCNT];
@@ -1265,7 +1298,7 @@ typedef struct
   hc_timer_t timer_running;         // timer on current dict
   hc_timer_t timer_paused;          // timer on current dict
 
-  float   ms_paused;                // timer on current dict
+  double  ms_paused;                // timer on current dict
 
   /**
     * hash_info and username