Fix for 0H/s issue on different algorithms
[hashcat.git] / include / types.h
index 2bd32f3..35503ca 100644 (file)
@@ -33,22 +33,28 @@ typedef struct
 
 typedef struct
 {
-  int   V;
-  int   R;
-  int   P;
+  uint iv[4];
 
-  int   enc_md;
+} rar5_t;
 
-  uint  id_buf[8];
-  uint  u_buf[32];
-  uint  o_buf[32];
+typedef struct
+{
+  int  V;
+  int  R;
+  int  P;
+
+  int  enc_md;
 
-  int   id_len;
-  int   o_len;
-  int   u_len;
+  uint id_buf[8];
+  uint u_buf[32];
+  uint o_buf[32];
 
-  uint  rc4key[2];
-  uint  rc4data[2];
+  int  id_len;
+  int  o_len;
+  int  u_len;
+
+  uint rc4key[2];
+  uint rc4data[2];
 
 } pdf_t;
 
@@ -58,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;
 
@@ -121,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];
@@ -155,7 +197,7 @@ typedef struct
 
 typedef struct
 {
-  uint8_t cipher[1040];
+  u8   cipher[1040];
 
 } agilekey_t;
 
@@ -233,10 +275,10 @@ typedef struct
   {
     uint dgst32[16];
     u64  dgst64[8];
-  };
+  } d;
 
-  uint  dgst_len;
-  uint  W_len;
+  uint dgst_len;
+  uint W_len;
 
 } pdf17l8_tmp_t;
 
@@ -254,10 +296,10 @@ typedef struct
 
 typedef struct
 {
-  uint64_t l_alt_result[8];
+  u64  l_alt_result[8];
 
-  uint64_t l_p_bytes[2];
-  uint64_t l_s_bytes[2];
+  u64  l_p_bytes[2];
+  u64  l_s_bytes[2];
 
 } sha512crypt_tmp_t;
 
@@ -282,7 +324,7 @@ typedef struct
 
 typedef struct
 {
-  uint64_t dgst[8];
+  u64  dgst[8];
 
 } bitcoin_wallet_tmp_t;
 
@@ -356,11 +398,11 @@ typedef struct
 
 typedef struct
 {
-  uint64_t ipad[8];
-  uint64_t opad[8];
+  u64  ipad[8];
+  u64  opad[8];
 
-  uint64_t dgst[32];
-  uint64_t out[32];
+  u64  dgst[32];
+  u64  out[32];
 
 } tc64_tmp_t;
 
@@ -409,11 +451,11 @@ typedef struct
 
 typedef struct
 {
-  uint64_t ipad[8];
-  uint64_t opad[8];
+  u64  ipad[8];
+  u64  opad[8];
 
-  uint64_t dgst[8];
-  uint64_t out[8];
+  u64  dgst[8];
+  u64  out[8];
 
 } sha512aix_tmp_t;
 
@@ -429,7 +471,7 @@ typedef struct
 
 typedef struct
 {
-  uint64_t digest_buf[8];
+  u64  digest_buf[8];
 
 } drupal7_tmp_t;
 
@@ -457,7 +499,7 @@ typedef struct
 
 typedef struct
 {
-  uint64_t out[8];
+  u64  out[8];
 
 } office2013_tmp_t;
 
@@ -469,57 +511,57 @@ typedef struct
 
 typedef struct
 {
-  uint32_t ipad[4];
-  uint32_t opad[4];
+  u32  ipad[4];
+  u32  opad[4];
 
-  uint32_t dgst[32];
-  uint32_t out[32];
+  u32  dgst[32];
+  u32  out[32];
 
 } pbkdf2_md5_tmp_t;
 
 typedef struct
 {
-  uint32_t ipad[5];
-  uint32_t opad[5];
+  u32  ipad[5];
+  u32  opad[5];
 
-  uint32_t dgst[32];
-  uint32_t out[32];
+  u32  dgst[32];
+  u32  out[32];
 
 } pbkdf2_sha1_tmp_t;
 
 typedef struct
 {
-  uint32_t ipad[8];
-  uint32_t opad[8];
+  u32  ipad[8];
+  u32  opad[8];
 
-  uint32_t dgst[32];
-  uint32_t out[32];
+  u32  dgst[32];
+  u32  out[32];
 
 } pbkdf2_sha256_tmp_t;
 
 typedef struct
 {
-  uint64_t ipad[8];
-  uint64_t opad[8];
+  u64  ipad[8];
+  u64  opad[8];
 
-  uint64_t dgst[16];
-  uint64_t out[16];
+  u64  dgst[16];
+  u64  out[16];
 
 } pbkdf2_sha512_tmp_t;
 
 typedef struct
 {
-  uint64_t out[8];
+  u64  out[8];
 
 } ecryptfs_tmp_t;
 
 typedef struct
 {
-  uint64_t ipad[8];
-  uint64_t opad[8];
+  u64  ipad[8];
+  u64  opad[8];
 
-  uint64_t dgst[16];
-  uint64_t out[16];
+  u64  dgst[16];
+  u64  out[16];
 
 } oraclet_tmp_t;
 
@@ -572,6 +614,30 @@ 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];
+  u32  hash[5];
+  u32  salt[5];   // unused, but makes better valid check
+  u32  iv[2];     // unused, but makes better valid check
+
+} psafe2_hdr;
+
 typedef struct
 {
   char *user_name;
@@ -598,8 +664,8 @@ typedef struct
 
 typedef struct
 {
-  uint     key;
-  uint64_t val;
+  uint key;
+  u64  val;
 
 } hcstat_table_t;
 
@@ -612,27 +678,27 @@ typedef struct
 
 typedef struct
 {
-  char          essid[36];
+  char essid[36];
 
-  unsigned char mac1[6];
-  unsigned char mac2[6];
-  unsigned char nonce1[32];
-  unsigned char nonce2[32];
+  u8   mac1[6];
+  u8   mac2[6];
+  u8   nonce1[32];
+  u8   nonce2[32];
 
-  unsigned char eapol[256];
-  int           eapol_size;
+  u8   eapol[256];
+  int  eapol_size;
 
-  int           keyver;
-  unsigned char keymic[16];
+  int  keyver;
+  u8   keymic[16];
 
 } hccap_t;
 
 typedef struct
 {
-  char     signature[4];
-  uint32_t salt_buf[8];
-  uint32_t iterations;
-  uint32_t hash_buf[8];
+  char signature[4];
+  u32  salt_buf[8];
+  u32  iterations;
+  u32  hash_buf[8];
 
 } psafe3_t;
 
@@ -647,7 +713,7 @@ typedef struct
 
 typedef struct
 {
-  uint64_t cnt;
+  u64    cnt;
 
   #ifdef _POSIX
   struct stat stat;
@@ -671,29 +737,17 @@ typedef struct
 {
   uint cmds[0x100];
 
-} gpu_rule_t;
+} kernel_rule_t;
 
 typedef struct
 {
-  union
-  {
-    uint8_t   hc4[4][ 64];
-    uint32_t  hi4[4][ 16];
-    uint64_t  hl4[4][  8];
+  u32 i[16];
 
-    uint8_t   hc2[2][128];
-    uint32_t  hi2[2][ 32];
-    uint64_t  hl2[2][ 16];
+  u32 pw_len;
 
-    uint8_t   hc1[1][256];
-    uint32_t  hi1[1][ 64];
-    uint64_t  hl1[1][ 32];
-  };
-
-  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;
 
@@ -719,43 +773,35 @@ typedef struct
 
 typedef struct
 {
-  pw_t pw_buf;
+  u32  version_bin;
+  char cwd[256];
+  u32  pid;
 
-  uint cnt;
+  u32  dictpos;
+  u32  maskpos;
 
-} pw_cache_t;
+  u64  words_cur;
 
-typedef struct
-{
-  uint32_t    version_bin;
-  char        cwd[256];
-  uint32_t    pid;
-
-  uint32_t    dictpos;
-  uint32_t    maskpos;
-
-  uint64_t    words_cur;
-
-  uint32_t    argc;
-  char      **argv;
+  u32  argc;
+  char **argv;
 
 } restore_data_t;
 
 typedef struct
 {
-  char     *file_name;
-  long      seek;
-  time_t    ctime;
+  char   *file_name;
+  long   seek;
+  time_t ctime;
 
 } outfile_data_t;
 
 typedef struct
 {
-  char     *buf;
-  uint32_t  incr;
-  uint32_t  avail;
-  uint32_t  cnt;
-  uint32_t  pos;
+  char *buf;
+  u32  incr;
+  u32  avail;
+  u32  cnt;
+  u32  pos;
 
 } wl_data_t;
 
@@ -803,177 +849,230 @@ typedef struct
 
 } wordr_t;
 
+typedef struct
+{
+  char *device_name;
+  char *alias_name;
+
+} tuning_db_alias_t;
+
+typedef struct
+{
+  char *device_name;
+  int   attack_mode;
+  int   hash_type;
+  int   workload_profile;
+  int   vector_width;
+  int   kernel_accel;
+  int   kernel_loops;
+
+} tuning_db_entry_t;
+
+typedef struct
+{
+  tuning_db_alias_t *alias_buf;
+  int                alias_cnt;
+
+  tuning_db_entry_t *entry_buf;
+  int                entry_cnt;
+
+} tuning_db_t;
+
 #define RULES_MAX   256
 #define PW_MIN      0
 #define PW_MAX      54
 #define PW_MAX1     (PW_MAX + 1)
 #define PW_DICTMAX  31
 #define PW_DICTMAX1 (PW_DICTMAX + 1)
+#define PARAMCNT    32
 
 struct __hc_device_param
 {
-  uint              device_id;
+  cl_device_id      device;
+  cl_device_type    device_type;
 
-  uint              sm_major;
-  uint              sm_minor;
-  uint              kernel_exec_timeout;
+  uint    device_id;
+  uint    platform_devices_id;   // for mapping with hms devices
 
-  uint              gpu_processors;
-  uint              gpu_processor_cores;
-  uint              gpu_threads;
-  uint              gpu_accel;
-  uint64_t          gpu_maxmem_alloc;
-  uint              gpu_power;          // these both are based on their _user counterpart
-  uint              gpu_blocks;         // but are modified by autotuner and used inside crack loops
-  uint              gpu_power_user;
-  uint              gpu_blocks_user;
+  bool    skipped;
 
-  uint              size_pws;
-  uint              size_tmps;
-  uint              size_hooks;
-  uint              size_root_css;
-  uint              size_markov_css;
-  uint              size_digests;
-  uint              size_salts;
-  uint              size_shown;
-  uint              size_results;
-  uint              size_plains;
+  uint    sm_major;
+  uint    sm_minor;
+  uint    kernel_exec_timeout;
 
-  uint (*pw_add)    (struct __hc_device_param *, const uint8_t *, const uint);
+  uint    device_processors;
+  uint    device_processor_cores;
+  u64     device_maxmem_alloc;
+  u64     device_global_mem;
+  u32     device_maxclock_frequency;
 
-  void (*pw_transpose) (const pw_t *, pw_t *);
+  uint    vector_width;
 
-  FILE             *combs_fp;
-  comb_t           *combs_buf;
+  uint    kernel_threads;
+  uint    kernel_loops;
+  uint    kernel_accel;
+  uint    kernel_loops_min;
+  uint    kernel_loops_max;
+  uint    kernel_accel_min;
+  uint    kernel_accel_max;
+  uint    kernel_power;
+  uint    kernel_power_user;
 
-  void             *hooks_buf;
+  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;
+  uint    size_salts;
+  uint    size_shown;
+  uint    size_results;
+  uint    size_plains;
 
-  pw_cache_t       *pw_caches;
+  FILE   *combs_fp;
+  comb_t *combs_buf;
 
-  pw_t             *pws_buf;
-  uint              pws_cnt;
-  uint64_t          pw_cnt;
+  void   *hooks_buf;
 
-  uint64_t          words_off;
-  uint64_t          words_done;
+  pw_t   *pws_buf;
+  uint    pws_cnt;
 
-  uint             *result;
+  u64     words_off;
+  u64     words_done;
 
-  uint              outerloop_pos;
-  uint              outerloop_left;
+  uint   *result;
 
-  uint              innerloop_pos;
-  uint              innerloop_left;
+  uint    outerloop_pos;
+  uint    outerloop_left;
 
-  uint              speed_pos;
-  uint64_t          speed_cnt[SPEED_CACHE];
-  float             speed_ms[SPEED_CACHE];
-  hc_timer_t        speed_rec[SPEED_CACHE];
+  uint    innerloop_pos;
+  uint    innerloop_left;
 
-  hc_timer_t        timer_speed;
+  uint    exec_pos;
+  double  exec_ms[EXEC_CACHE];
 
-  // device specific attributes starting
+  // this is "current" speed
 
-  char             *device_name;
-  char             *device_version;
-  char             *driver_version;
+  uint    speed_pos;
+  u64     speed_cnt[SPEED_CACHE];
+  double  speed_ms[SPEED_CACHE];
 
-  cl_device_id      device;
+  hc_timer_t timer_speed;
 
-  cl_kernel         kernel1;
-  cl_kernel         kernel12;
-  cl_kernel         kernel2;
-  cl_kernel         kernel23;
-  cl_kernel         kernel3;
-  cl_kernel         kernel_mp;
-  cl_kernel         kernel_mp_l;
-  cl_kernel         kernel_mp_r;
-  cl_kernel         kernel_amp;
-  cl_kernel         kernel_tb;
-  cl_kernel         kernel_tm;
-
-  cl_context        context;
-
-  cl_program        program;
-  cl_program        program_mp;
-  cl_program        program_amp;
-
-  cl_command_queue  command_queue;
-
-  cl_mem            d_pws_buf;
-  cl_mem            d_pws_amp_buf;
-  cl_mem            d_words_buf_l;
-  cl_mem            d_words_buf_r;
-  cl_mem            d_rules;
-  cl_mem            d_rules_c;
-  cl_mem            d_combs;
-  cl_mem            d_combs_c;
-  cl_mem            d_bfs;
-  cl_mem            d_bfs_c;
-  cl_mem            d_tm_c;
-  cl_mem            d_bitmap_s1_a;
-  cl_mem            d_bitmap_s1_b;
-  cl_mem            d_bitmap_s1_c;
-  cl_mem            d_bitmap_s1_d;
-  cl_mem            d_bitmap_s2_a;
-  cl_mem            d_bitmap_s2_b;
-  cl_mem            d_bitmap_s2_c;
-  cl_mem            d_bitmap_s2_d;
-  cl_mem            d_plain_bufs;
-  cl_mem            d_digests_buf;
-  cl_mem            d_digests_shown;
-  cl_mem            d_salt_bufs;
-  cl_mem            d_esalt_bufs;
-  cl_mem            d_bcrypt_bufs;
-  cl_mem            d_tmps;
-  cl_mem            d_hooks;
-  cl_mem            d_result;
-  cl_mem            d_scryptV_buf;
-  cl_mem            d_root_css_buf;
-  cl_mem            d_markov_css_buf;
-
-  #define PARAMCNT 32
-
-  void             *kernel_params[PARAMCNT];
-  void             *kernel_params_mp[PARAMCNT];
-  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];
-
-  uint32_t          kernel_params_buf32[PARAMCNT];
-
-  uint32_t          kernel_params_mp_buf32[PARAMCNT];
-  uint64_t          kernel_params_mp_buf64[PARAMCNT];
-
-  uint32_t          kernel_params_mp_r_buf32[PARAMCNT];
-  uint64_t          kernel_params_mp_r_buf64[PARAMCNT];
-
-  uint32_t          kernel_params_mp_l_buf32[PARAMCNT];
-  uint64_t          kernel_params_mp_l_buf64[PARAMCNT];
-
-  uint32_t          kernel_params_amp_buf32[PARAMCNT];
+  // device specific attributes starting
 
+  char   *device_name;
+  char   *device_name_chksum;
+  char   *device_version;
+  char   *driver_version;
+
+  bool    opencl_v12;
+
+  cl_uint vendor_id;
+
+  cl_kernel  kernel1;
+  cl_kernel  kernel12;
+  cl_kernel  kernel2;
+  cl_kernel  kernel23;
+  cl_kernel  kernel3;
+  cl_kernel  kernel_mp;
+  cl_kernel  kernel_mp_l;
+  cl_kernel  kernel_mp_r;
+  cl_kernel  kernel_amp;
+  cl_kernel  kernel_tm;
+  cl_kernel  kernel_weak;
+
+  cl_context context;
+
+  cl_program program;
+  cl_program program_mp;
+  cl_program program_amp;
+  cl_program program_weak;
+
+  cl_command_queue command_queue;
+
+  cl_mem  d_pws_buf;
+  cl_mem  d_pws_amp_buf;
+  cl_mem  d_words_buf_l;
+  cl_mem  d_words_buf_r;
+  cl_mem  d_rules;
+  cl_mem  d_rules_c;
+  cl_mem  d_combs;
+  cl_mem  d_combs_c;
+  cl_mem  d_bfs;
+  cl_mem  d_bfs_c;
+  cl_mem  d_tm_c;
+  cl_mem  d_bitmap_s1_a;
+  cl_mem  d_bitmap_s1_b;
+  cl_mem  d_bitmap_s1_c;
+  cl_mem  d_bitmap_s1_d;
+  cl_mem  d_bitmap_s2_a;
+  cl_mem  d_bitmap_s2_b;
+  cl_mem  d_bitmap_s2_c;
+  cl_mem  d_bitmap_s2_d;
+  cl_mem  d_plain_bufs;
+  cl_mem  d_digests_buf;
+  cl_mem  d_digests_shown;
+  cl_mem  d_salt_bufs;
+  cl_mem  d_esalt_bufs;
+  cl_mem  d_bcrypt_bufs;
+  cl_mem  d_tmps;
+  cl_mem  d_hooks;
+  cl_mem  d_result;
+  cl_mem  d_scryptV_buf;
+  cl_mem  d_root_css_buf;
+  cl_mem  d_markov_css_buf;
+
+  void   *kernel_params[PARAMCNT];
+  void   *kernel_params_mp[PARAMCNT];
+  void   *kernel_params_mp_r[PARAMCNT];
+  void   *kernel_params_mp_l[PARAMCNT];
+  void   *kernel_params_amp[PARAMCNT];
+  void   *kernel_params_tm[PARAMCNT];
+
+  u32     kernel_params_buf32[PARAMCNT];
+
+  u32     kernel_params_mp_buf32[PARAMCNT];
+  u64     kernel_params_mp_buf64[PARAMCNT];
+
+  u32     kernel_params_mp_r_buf32[PARAMCNT];
+  u64     kernel_params_mp_r_buf64[PARAMCNT];
+
+  u32     kernel_params_mp_l_buf32[PARAMCNT];
+  u64     kernel_params_mp_l_buf64[PARAMCNT];
+
+  u32     kernel_params_amp_buf32[PARAMCNT];
 };
 
 typedef struct __hc_device_param hc_device_param_t;
 
+#ifdef HAVE_HWMON
 typedef struct
 {
-  union {
+  union
+  {
+    #ifdef HAVE_ADL
     HM_ADAPTER_AMD amd;
+    #endif
+
+    #if defined(HAVE_NVML) || defined(HAVE_NVAPI)
     HM_ADAPTER_NV  nv;
-  } adapter_index;
+    #endif
 
-  int od_version;
+  } adapter_index;
 
-  int fan_supported;
+  int     od_version;
+  int     fan_supported;
 
-  // int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
-  // int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
+  // int     busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
+  // int     devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
 
 } hm_attrs_t;
+#endif // HAVE_HWMON
 
 typedef struct
 {
@@ -981,71 +1080,86 @@ typedef struct
    * threads
    */
 
-  uint                vendor_id;
+  uint    devices_status;
+  uint    devices_cnt;
+  uint    devices_active;
+
+  hc_device_param_t *devices_param;
 
-  uint                devices_status;
-  uint                devices_cnt;
-  hc_device_param_t  *devices_param;
+  /**
+   * workload specific
+   */
 
-  uint                gpu_blocks_all;
+  uint    kernel_power_all;
+  float   kernel_power_div;
 
   /**
    * attack specific
    */
 
-  uint                wordlist_mode;
-  uint                hashlist_mode;
-  uint                hashlist_format;
+  uint    wordlist_mode;
+  uint    hashlist_mode;
+  uint    hashlist_format;
+
+  uint    attack_mode;
+  uint    attack_kern;
+  uint    attack_exec;
 
-  uint                attack_mode;
-  uint                attack_kern;
-  uint                attack_exec;
+  uint    kernel_rules_cnt;
 
-  uint                gpu_rules_cnt;
-  gpu_rule_t         *gpu_rules_buf;
+  kernel_rule_t *kernel_rules_buf;
 
-  uint                combs_mode;
-  uint                combs_cnt;
+  uint    combs_mode;
+  uint    combs_cnt;
 
-  uint                bfs_cnt;
+  uint    bfs_cnt;
 
-  uint                css_cnt;
-  cs_t               *css_buf;
+  uint    css_cnt;
+  cs_t   *css_buf;
 
-  cs_t               *root_css_buf;
-  cs_t               *markov_css_buf;
+  cs_t   *root_css_buf;
+  cs_t   *markov_css_buf;
 
-  char               *rule_buf_l;
-  char               *rule_buf_r;
-  int                 rule_len_l;
-  int                 rule_len_r;
+  char   *rule_buf_l;
+  char   *rule_buf_r;
+  int     rule_len_l;
+  int     rule_len_r;
+
+  /**
+   * opencl library stuff
+   */
+
+  void   *ocl;
 
   /**
    * hardware watchdog
    */
 
-  HM_LIB              hm_dll;
-  hm_attrs_t          hm_device[DEVICES_MAX];
+  #ifdef HAVE_HWMON
+  void   *hm_nv;
+  void   *hm_amd;
+  hm_attrs_t hm_device[DEVICES_MAX];
+  #endif
 
   /**
    * hashes
    */
 
-  uint                digests_cnt;
-  uint                digests_done;
-  uint                digests_saved;
+  uint    digests_cnt;
+  uint    digests_done;
+  uint    digests_saved;
 
-  void               *digests_buf;
-  uint               *digests_shown;
-  uint               *digests_shown_tmp;
+  void   *digests_buf;
+  uint   *digests_shown;
+  uint   *digests_shown_tmp;
 
-  uint                salts_cnt;
-  uint                salts_done;
+  uint    salts_cnt;
+  uint    salts_done;
 
-  salt_t             *salts_buf;
-  uint               *salts_shown;
+  salt_t *salts_buf;
+  uint   *salts_shown;
 
-  void               *esalts_buf;
+  void   *esalts_buf;
 
   /**
    * logging
@@ -1060,10 +1174,10 @@ typedef struct
    * crack-per-time
    */
 
-  cpt_t  cpt_buf[CPT_BUF];
-  int    cpt_pos;
-  time_t cpt_start;
-  uint64_t cpt_total;
+  cpt_t   cpt_buf[CPT_BUF];
+  int     cpt_pos;
+  time_t  cpt_start;
+  u64     cpt_total;
 
   /**
    * user
@@ -1101,6 +1215,7 @@ typedef struct
   uint    quiet;
   uint    force;
   uint    benchmark;
+  uint    benchmark_repeats;
   uint    runtime;
   uint    remove;
   uint    remove_timer;
@@ -1111,13 +1226,11 @@ typedef struct
   uint    hex_wordlist;
   uint    pw_min;
   uint    pw_max;
-  float   gpu_blocks_div;
-  uint    gpu_accel;
-  uint    gpu_loops;
   uint    powertune_enable;
   uint    scrypt_tmto;
   uint    segment_size;
   char   *truecrypt_keyfiles;
+  uint    workload_profile;
 
   uint    hash_mode;
   uint    hash_type;
@@ -1133,9 +1246,11 @@ typedef struct
   uint    dgst_pos2;
   uint    dgst_pos3;
 
+  #ifdef HAVE_HWMON
   uint    gpu_temp_disable;
   uint    gpu_temp_abort;
   uint    gpu_temp_retain;
+  #endif
 
   char  **rp_files;
   uint    rp_files_cnt;
@@ -1148,42 +1263,42 @@ typedef struct
    * used for restore
    */
 
-  uint64_t skip;
-  uint64_t limit;
+  u64     skip;
+  u64     limit;
 
   restore_data_t *rd;
 
-  uint64_t checkpoint_cur_words;  // used for the "stop at next checkpoint" feature
+  u64     checkpoint_cur_words;     // used for the "stop at next checkpoint" feature
 
   /**
    * status, timer
    */
 
-  time_t     runtime_start;
-  time_t     runtime_stop;
+  time_t  runtime_start;
+  time_t  runtime_stop;
 
-  time_t     proc_start;
-  time_t     proc_stop;
+  time_t  proc_start;
+  time_t  proc_stop;
 
-  uint64_t   words_cnt;
-  uint64_t   words_cur;
-  uint64_t   words_base;
+  u64     words_cnt;
+  u64     words_cur;
+  u64     words_base;
 
-  uint64_t  *words_progress_done;      // progress number of words done     per salt
-  uint64_t  *words_progress_rejected;  // progress number of words rejected per salt
-  uint64_t  *words_progress_restored;  // progress number of words restored per salt
+  u64    *words_progress_done;      // progress number of words done     per salt
+  u64    *words_progress_rejected;  // progress number of words rejected per salt
+  u64    *words_progress_restored;  // progress number of words restored per salt
 
   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
     */
 
   hashinfo_t **hash_info;
-  uint         username;
+  uint    username;
 
   int (*sort_by_digest) (const void *, const void *);