1 /**
2  * Author......: See docs/credits.txt
3  * License.....: MIT
4  */
5 
6 #include "common.h"
7 #include "types.h"
8 #include "modules.h"
9 #include "bitops.h"
10 #include "convert.h"
11 #include "shared.h"
12 #include "memory.h"
13 #include "cpu_crc32.h"
14 #include "keyboard_layout.h"
15 
16 static const u32   ATTACK_EXEC    = ATTACK_EXEC_OUTSIDE_KERNEL;
17 static const u32   DGST_POS0      = 0;
18 static const u32   DGST_POS1      = 1;
19 static const u32   DGST_POS2      = 2;
20 static const u32   DGST_POS3      = 3;
21 static const u32   DGST_SIZE      = DGST_SIZE_4_5;
22 static const u32   HASH_CATEGORY  = HASH_CATEGORY_FDE;
23 static const char *HASH_NAME      = "TrueCrypt RIPEMD160 + XTS 1536 bit + boot-mode";
24 static const u64   KERN_TYPE      = 6213;
25 static const u32   OPTI_TYPE      = OPTI_TYPE_ZERO_BYTE
26                                   | OPTI_TYPE_SLOW_HASH_SIMD_LOOP;
27 static const u64   OPTS_TYPE      = OPTS_TYPE_PT_GENERATE_LE
28                                   | OPTS_TYPE_BINARY_HASHFILE
29                                   | OPTS_TYPE_KEYBOARD_MAPPING;
30 static const u32   SALT_TYPE      = SALT_TYPE_EMBEDDED;
31 static const char *ST_PASS        = "hashcat";
32 static const char *ST_HASH        = "5e6628907291b0b74a4f43a23fb0693acb71c4379c3a3cc0eafbab40036bbdadfede179e04484aca0f5b6ecf7c7e8abe61d6836be6590838b8f9027da93ba77d076b9a557c958159c5dcddfb70823b7e324bd99b40a8f39410f6afd279df3493b58b9ffce41b65f3afd2fc467f4553a946b85e6ffc74b91c9c38c689d98419339a84d3c6d116274e34482d546407006ee04af03b594998127b2a9716ca4278b1f3050d015af10a9bb11db0465373f3a786c148bb20473377d8e97264b1c4d7ec4179829ce929573b26e5987b59da8591e2dc8e3934830dd0b5ac521c8637e9bb31e4bc084d53bc6a8dc6875e857a4c8c32a577eed3c6cea5beef514160982be2c7d7e2f4d65efa3f4a0e11ac1860ff3160e7cd968e18019abfd0395080a9f8e860c627fc32c63c8b7ef46b203c63cf0f12c05ea65b1f83a5f1fc6ad6cc200a9527151c2b8016a38f1e87be9c960088eaaa98a01d9db8cdacaae26c446a846042a6c0248b666eea7a1be44dc3fc35ce100c3a3eb377e898deb097cfba9246685d7ec8527cdc5e1983c154169178e3d86cd4017606ccc42d25cbdea0aca2b1ac422372cfbb1ad2b7d465449a2c1fbbae35c8e7fdaadd683a7dc991b76aaba08b8706916924407392a2aef458c2e833290dc1ff116f3f49f918e6a133b60728ac7c464e4f3521784cf32866be32877534bb014312c4301d1740781221a5e8758ea4";
33 
module_attack_exec(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)34 u32         module_attack_exec    (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC;     }
module_dgst_pos0(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)35 u32         module_dgst_pos0      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0;       }
module_dgst_pos1(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)36 u32         module_dgst_pos1      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1;       }
module_dgst_pos2(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)37 u32         module_dgst_pos2      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2;       }
module_dgst_pos3(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)38 u32         module_dgst_pos3      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3;       }
module_dgst_size(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)39 u32         module_dgst_size      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE;       }
module_hash_category(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)40 u32         module_hash_category  (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY;   }
module_hash_name(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)41 const char *module_hash_name      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME;       }
module_kern_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)42 u64         module_kern_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE;       }
module_opti_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)43 u32         module_opti_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE;       }
module_opts_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)44 u64         module_opts_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE;       }
module_salt_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)45 u32         module_salt_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE;       }
module_st_hash(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)46 const char *module_st_hash        (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH;         }
module_st_pass(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)47 const char *module_st_pass        (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS;         }
48 
49 typedef struct tc_tmp
50 {
51   u32 ipad[16];
52   u32 opad[16];
53 
54   u32 dgst[64];
55   u32 out[64];
56 
57 } tc_tmp_t;
58 
59 typedef struct tc
60 {
61   u32 salt_buf[32];
62   u32 data_buf[112];
63   u32 keyfile_buf16[16];
64   u32 keyfile_buf32[32];
65   u32 keyfile_enabled;
66   u32 signature;
67 
68   keyboard_layout_mapping_t keyboard_layout_mapping_buf[256];
69   int                       keyboard_layout_mapping_cnt;
70 
71 } tc_t;
72 
73 static const int   ROUNDS_TRUECRYPT_1K         = 1000;
74 static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f;
75 
module_unstable_warning(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra,MAYBE_UNUSED const hc_device_param_t * device_param)76 bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
77 {
78   // AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
79   if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
80   {
81     return true;
82   }
83 
84   return false;
85 }
86 
module_build_plain_postprocess(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const hashes_t * hashes,MAYBE_UNUSED const void * tmps,const u32 * src_buf,MAYBE_UNUSED const size_t src_sz,MAYBE_UNUSED const int src_len,u32 * dst_buf,MAYBE_UNUSED const size_t dst_sz)87 int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const void *tmps, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, MAYBE_UNUSED const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz)
88 {
89   const tc_t *tc = (const tc_t *) hashes->esalts_buf;
90 
91   if (src_len < (int) dst_sz)
92   {
93     memcpy (dst_buf, src_buf, src_len);
94   }
95 
96   return execute_keyboard_layout_mapping (dst_buf, src_len, tc->keyboard_layout_mapping_buf, tc->keyboard_layout_mapping_cnt);
97 }
98 
module_potfile_disable(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)99 bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
100 {
101   const bool potfile_disable = true;
102 
103   return potfile_disable;
104 }
105 
module_outfile_check_disable(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)106 bool module_outfile_check_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
107 {
108   const bool outfile_check_disable = true;
109 
110   return outfile_check_disable;
111 }
112 
module_esalt_size(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)113 u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
114 {
115   const u64 esalt_size = (const u64) sizeof (tc_t);
116 
117   return esalt_size;
118 }
119 
module_tmp_size(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)120 u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
121 {
122   const u64 tmp_size = (const u64) sizeof (tc_tmp_t);
123 
124   return tmp_size;
125 }
126 
module_pw_max(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)127 u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
128 {
129   // this overrides the reductions of PW_MAX in case optimized kernel is selected
130   // IOW, even in optimized kernel mode it support length 64
131 
132   const u32 pw_max = 64;
133 
134   return pw_max;
135 }
136 
module_hash_init_selftest(MAYBE_UNUSED const hashconfig_t * hashconfig,hash_t * hash)137 int module_hash_init_selftest (MAYBE_UNUSED const hashconfig_t *hashconfig, hash_t *hash)
138 {
139   const size_t st_hash_len = strlen (hashconfig->st_hash);
140 
141   char *tmpdata = (char *) hcmalloc (st_hash_len / 2);
142 
143   for (size_t i = 0, j = 0; j < st_hash_len; i += 1, j += 2)
144   {
145     const u8 c = hex_to_u8 ((const u8 *) hashconfig->st_hash + j);
146 
147     tmpdata[i] = c;
148   }
149 
150   const int parser_status = module_hash_decode (hashconfig, hash->digest, hash->salt, hash->esalt, hash->hook_salt, hash->hash_info, tmpdata, st_hash_len / 2);
151 
152 
153 
154   hcfree (tmpdata);
155 
156   return parser_status;
157 }
158 
module_hash_binary_parse(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra,hashes_t * hashes)159 int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, hashes_t *hashes)
160 {
161   // note: if module_hash_binary_parse exists, then module_hash_decode is not called
162 
163   HCFILE fp;
164 
165   if (hc_fopen (&fp, hashes->hashfile, "rb") == false) return (PARSER_HAVE_ERRNO);
166 
167   #define TC_HEADER_SIZE 512
168 
169   char *in = (char *) hcmalloc (TC_HEADER_SIZE);
170 
171   const size_t n = hc_fread (in, 1, TC_HEADER_SIZE, &fp);
172 
173   hc_fclose (&fp);
174 
175   if (n != TC_HEADER_SIZE) return (PARSER_TC_FILE_SIZE);
176 
177   hash_t *hashes_buf = hashes->hashes_buf;
178 
179   hash_t *hash = &hashes_buf[0];
180 
181   const int parser_status = module_hash_decode (hashconfig, hash->digest, hash->salt, hash->esalt, hash->hook_salt, hash->hash_info, in, TC_HEADER_SIZE);
182 
183   if (parser_status != PARSER_OK) return 0;
184 
185   hcfree (in);
186 
187   // keyfiles
188 
189   tc_t *tc = (tc_t *) hash->esalt;
190 
191   if (user_options->truecrypt_keyfiles)
192   {
193     char *keyfiles = hcstrdup (user_options->truecrypt_keyfiles);
194 
195     char *saveptr = NULL;
196 
197     char *keyfile = strtok_r (keyfiles, ",", &saveptr);
198 
199     while (keyfile)
200     {
201       if (hc_path_read (keyfile))
202       {
203         cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf16,  64);
204         cpu_crc32 (keyfile, (u8 *) tc->keyfile_buf32, 128);
205       }
206 
207       keyfile = strtok_r ((char *) NULL, ",", &saveptr);
208     }
209 
210     hcfree (keyfiles);
211 
212     tc->keyfile_enabled = 1;
213   }
214 
215   // keyboard layout mapping
216 
217   if (user_options->keyboard_layout_mapping)
218   {
219     if (hc_path_read (user_options->keyboard_layout_mapping))
220     {
221       initialize_keyboard_layout_mapping (user_options->keyboard_layout_mapping, tc->keyboard_layout_mapping_buf, &tc->keyboard_layout_mapping_cnt);
222     }
223   }
224 
225   return 1;
226 }
227 
module_hash_decode(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED void * digest_buf,MAYBE_UNUSED salt_t * salt,MAYBE_UNUSED void * esalt_buf,MAYBE_UNUSED void * hook_salt_buf,MAYBE_UNUSED hashinfo_t * hash_info,const char * line_buf,MAYBE_UNUSED const int line_len)228 int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len)
229 {
230   u32 *digest = (u32 *) digest_buf;
231 
232   tc_t *tc = (tc_t *) esalt_buf;
233 
234   const float entropy = get_entropy ((const u8 *) line_buf, line_len);
235 
236   if (entropy < MIN_SUFFICIENT_ENTROPY_FILE) return (PARSER_INSUFFICIENT_ENTROPY);
237 
238   memcpy (tc->salt_buf, line_buf, 64);
239 
240   memcpy (tc->data_buf, line_buf + 64, 512 - 64);
241 
242   salt->salt_buf[0] = tc->salt_buf[0];
243 
244   salt->salt_len = 4;
245 
246   salt->salt_iter = ROUNDS_TRUECRYPT_1K - 1;
247 
248   tc->signature = 0x45555254; // "TRUE"
249 
250   digest[0] = tc->data_buf[0];
251 
252   return (PARSER_OK);
253 }
254 
module_init(module_ctx_t * module_ctx)255 void module_init (module_ctx_t *module_ctx)
256 {
257   module_ctx->module_context_size             = MODULE_CONTEXT_SIZE_CURRENT;
258   module_ctx->module_interface_version        = MODULE_INTERFACE_VERSION_CURRENT;
259 
260   module_ctx->module_attack_exec              = module_attack_exec;
261   module_ctx->module_benchmark_esalt          = MODULE_DEFAULT;
262   module_ctx->module_benchmark_hook_salt      = MODULE_DEFAULT;
263   module_ctx->module_benchmark_mask           = MODULE_DEFAULT;
264   module_ctx->module_benchmark_salt           = MODULE_DEFAULT;
265   module_ctx->module_build_plain_postprocess  = module_build_plain_postprocess;
266   module_ctx->module_deep_comp_kernel         = MODULE_DEFAULT;
267   module_ctx->module_deprecated_notice        = MODULE_DEFAULT;
268   module_ctx->module_dgst_pos0                = module_dgst_pos0;
269   module_ctx->module_dgst_pos1                = module_dgst_pos1;
270   module_ctx->module_dgst_pos2                = module_dgst_pos2;
271   module_ctx->module_dgst_pos3                = module_dgst_pos3;
272   module_ctx->module_dgst_size                = module_dgst_size;
273   module_ctx->module_dictstat_disable         = MODULE_DEFAULT;
274   module_ctx->module_esalt_size               = module_esalt_size;
275   module_ctx->module_extra_buffer_size        = MODULE_DEFAULT;
276   module_ctx->module_extra_tmp_size           = MODULE_DEFAULT;
277   module_ctx->module_extra_tuningdb_block     = MODULE_DEFAULT;
278   module_ctx->module_forced_outfile_format    = MODULE_DEFAULT;
279   module_ctx->module_hash_binary_count        = MODULE_DEFAULT;
280   module_ctx->module_hash_binary_parse        = module_hash_binary_parse;
281   module_ctx->module_hash_binary_save         = MODULE_DEFAULT;
282   module_ctx->module_hash_decode_potfile      = MODULE_DEFAULT;
283   module_ctx->module_hash_decode_zero_hash    = MODULE_DEFAULT;
284   module_ctx->module_hash_decode              = module_hash_decode;
285   module_ctx->module_hash_encode_status       = MODULE_DEFAULT;
286   module_ctx->module_hash_encode_potfile      = MODULE_DEFAULT;
287   module_ctx->module_hash_encode              = MODULE_DEFAULT;
288   module_ctx->module_hash_init_selftest       = module_hash_init_selftest;
289   module_ctx->module_hash_mode                = MODULE_DEFAULT;
290   module_ctx->module_hash_category            = module_hash_category;
291   module_ctx->module_hash_name                = module_hash_name;
292   module_ctx->module_hashes_count_min         = MODULE_DEFAULT;
293   module_ctx->module_hashes_count_max         = MODULE_DEFAULT;
294   module_ctx->module_hlfmt_disable            = MODULE_DEFAULT;
295   module_ctx->module_hook_extra_param_size    = MODULE_DEFAULT;
296   module_ctx->module_hook_extra_param_init    = MODULE_DEFAULT;
297   module_ctx->module_hook_extra_param_term    = MODULE_DEFAULT;
298   module_ctx->module_hook12                   = MODULE_DEFAULT;
299   module_ctx->module_hook23                   = MODULE_DEFAULT;
300   module_ctx->module_hook_salt_size           = MODULE_DEFAULT;
301   module_ctx->module_hook_size                = MODULE_DEFAULT;
302   module_ctx->module_jit_build_options        = MODULE_DEFAULT;
303   module_ctx->module_jit_cache_disable        = MODULE_DEFAULT;
304   module_ctx->module_kernel_accel_max         = MODULE_DEFAULT;
305   module_ctx->module_kernel_accel_min         = MODULE_DEFAULT;
306   module_ctx->module_kernel_loops_max         = MODULE_DEFAULT;
307   module_ctx->module_kernel_loops_min         = MODULE_DEFAULT;
308   module_ctx->module_kernel_threads_max       = MODULE_DEFAULT;
309   module_ctx->module_kernel_threads_min       = MODULE_DEFAULT;
310   module_ctx->module_kern_type                = module_kern_type;
311   module_ctx->module_kern_type_dynamic        = MODULE_DEFAULT;
312   module_ctx->module_opti_type                = module_opti_type;
313   module_ctx->module_opts_type                = module_opts_type;
314   module_ctx->module_outfile_check_disable    = module_outfile_check_disable;
315   module_ctx->module_outfile_check_nocomp     = MODULE_DEFAULT;
316   module_ctx->module_potfile_custom_check     = MODULE_DEFAULT;
317   module_ctx->module_potfile_disable          = module_potfile_disable;
318   module_ctx->module_potfile_keep_all_hashes  = MODULE_DEFAULT;
319   module_ctx->module_pwdump_column            = MODULE_DEFAULT;
320   module_ctx->module_pw_max                   = module_pw_max;
321   module_ctx->module_pw_min                   = MODULE_DEFAULT;
322   module_ctx->module_salt_max                 = MODULE_DEFAULT;
323   module_ctx->module_salt_min                 = MODULE_DEFAULT;
324   module_ctx->module_salt_type                = module_salt_type;
325   module_ctx->module_separator                = MODULE_DEFAULT;
326   module_ctx->module_st_hash                  = module_st_hash;
327   module_ctx->module_st_pass                  = module_st_pass;
328   module_ctx->module_tmp_size                 = module_tmp_size;
329   module_ctx->module_unstable_warning         = module_unstable_warning;
330   module_ctx->module_warmup_disable           = MODULE_DEFAULT;
331 }
332