1 /**
2  * Author......: Robert Guetzkow
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 
13 static const u32   ATTACK_EXEC    = ATTACK_EXEC_OUTSIDE_KERNEL;
14 static const u32   DGST_POS0      = 0;
15 static const u32   DGST_POS1      = 1;
16 static const u32   DGST_POS2      = 2;
17 static const u32   DGST_POS3      = 3;
18 static const u32   DGST_SIZE      = DGST_SIZE_4_4;
19 static const u32   HASH_CATEGORY  = HASH_CATEGORY_NETWORK_SERVER;
20 static const char *HASH_NAME      = "KNX IP Secure - Device Authentication Code";
21 static const u64   KERN_TYPE      = 25900;
22 static const u32   OPTI_TYPE      = OPTI_TYPE_SLOW_HASH_SIMD_LOOP;
23 static const u64   OPTS_TYPE      = OPTS_TYPE_PT_GENERATE_LE
24                                   | OPTS_TYPE_DEEP_COMP_KERNEL;
25 static const u32   SALT_TYPE      = SALT_TYPE_EMBEDDED;
26 static const char *ST_PASS        = "hashcat";
27 static const char *ST_HASH        = "$knx-ip-secure-device-authentication-code$*3033*fa7c0d787a9467c209f0a6e7cf16069ed704f3959dce19e45d7935c0a91bce41*f927640d9bbe9a4b0b74dd3289ad41ec";
28 
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)29 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)30 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)31 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)32 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)33 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)34 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)35 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)36 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)37 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)38 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)39 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)40 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)41 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)42 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;         }
43 
44 /* Details of the protocol design can be found in ISO 22510:2019 and the application notes published by the KNX Association. */
45 
46 typedef struct blocks
47 {
48   u32 b1[4];
49   u32 b2[4];
50   u32 b3[4];
51 
52 } blocks_t;
53 
54 typedef struct pbkdf2_sha256_tmp
55 {
56   u32 ipad[8];
57   u32 opad[8];
58 
59   u32 dgst[32];
60   u32 out[32];
61 
62 } pbkdf2_sha256_tmp_t;
63 
64 static const char *SIGNATURE_DEVICE_AUTHENTICATION_CODE = "$knx-ip-secure-device-authentication-code$";
65 static const char *SALT_DEVICE_AUTHENTICATION_CODE      = "device-authentication-code.1.secure.ip.knx.org";
66 static const int   ROUNDS_DEVICE_AUTHENTICATION_CODE    = 65536;
67 
module_jit_build_options(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 hashes_t * hashes,MAYBE_UNUSED const hc_device_param_t * device_param)68 char *module_jit_build_options(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 hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
69 {
70   char *jit_build_options = NULL;
71 
72   // Extra treatment for Apple systems
73   if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
74   {
75     return jit_build_options;
76   }
77 
78   // NVIDIA GPU
79   if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
80   {
81     hc_asprintf(&jit_build_options, "-D _unroll");
82   }
83 
84   // HIP
85   if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
86   {
87     hc_asprintf (&jit_build_options, "-D _unroll");
88   }
89 
90   // ROCM
91   if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
92   {
93     hc_asprintf(&jit_build_options, "-D _unroll");
94   }
95 
96   return jit_build_options;
97 }
98 
module_deep_comp_kernel(MAYBE_UNUSED const hashes_t * hashes,MAYBE_UNUSED const u32 salt_pos,MAYBE_UNUSED const u32 digest_pos)99 u32 module_deep_comp_kernel (MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const u32 salt_pos, MAYBE_UNUSED const u32 digest_pos)
100 {
101   return KERN_RUN_3;
102 }
103 
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)104 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)
105 {
106   const u64 esalt_size = (const u64) sizeof (blocks_t);
107 
108   return esalt_size;
109 }
110 
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)111 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)
112 {
113   const u64 tmp_size = (const u64) sizeof (pbkdf2_sha256_tmp_t);
114 
115   return tmp_size;
116 }
117 
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)118 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)
119 {
120   // The ETS 5 allows a maximum of 20 ASCII characters for the password used to derive the device authentication code.
121   const u32 pw_max = 20;
122 
123   return pw_max;
124 }
125 
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)126 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)
127 {
128   u32 *digest = (u32 *) digest_buf;
129 
130   blocks_t *blocks = (blocks_t *) esalt_buf;
131 
132   token_t token;
133 
134   token.token_cnt = 4;
135 
136   token.signatures_cnt = 1;
137   token.signatures_buf[0] = SIGNATURE_DEVICE_AUTHENTICATION_CODE;
138 
139   // Signature
140   token.sep[0]     = '*';
141   token.len_min[0] = 42;
142   token.len_max[0] = 42;
143   token.attr[0]    = TOKEN_ATTR_VERIFY_LENGTH
144                    | TOKEN_ATTR_VERIFY_SIGNATURE;
145 
146   // Secure Session Identifier    (from SESSION_RESPONSE)
147   token.sep[1]     = '*';
148   token.len_min[1] = 4;
149   token.len_max[1] = 4;
150   token.attr[1]    = TOKEN_ATTR_VERIFY_LENGTH
151                    | TOKEN_ATTR_VERIFY_HEX;
152 
153   // XOR of Client Public Value X (from SESSION_REQUEST)
154   //    and Server Public Value Y (from SESSION_RESPONSE)
155   token.sep[2]     = '*';
156   token.len_min[2] = 64;
157   token.len_max[2] = 64;
158   token.attr[2]    = TOKEN_ATTR_VERIFY_LENGTH
159                    | TOKEN_ATTR_VERIFY_HEX;
160 
161   // Message Authentication Code  (from SESSION_RESPONSE)
162   token.sep[3]     = '*';
163   token.len_min[3] = 32;
164   token.len_max[3] = 32;
165   token.attr[3]    = TOKEN_ATTR_VERIFY_LENGTH
166                    | TOKEN_ATTR_VERIFY_HEX;
167 
168   const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token);
169 
170   if (rc_tokenizer != PARSER_OK) return (rc_tokenizer);
171 
172   const u8 *secure_session_identifier_pos = token.buf[1];
173   const int secure_session_identifier_len = token.len[1];
174 
175   const u8 *public_value_xor_pos = token.buf[2];
176   const int public_value_xor_len = token.len[2];
177 
178   const u8 *mac_pos = token.buf[3];
179 
180   u8 secure_session_identifier[2];
181   u8 public_value_xor[32];
182 
183   hex_decode (secure_session_identifier_pos, secure_session_identifier_len, (u8 *) &secure_session_identifier);
184   hex_decode (public_value_xor_pos, public_value_xor_len, (u8 *) &public_value_xor);
185 
186   digest[0] = hex_to_u32 ((const u8 *) &mac_pos[0]);
187   digest[1] = hex_to_u32 ((const u8 *) &mac_pos[8]);
188   digest[2] = hex_to_u32 ((const u8 *) &mac_pos[16]);
189   digest[3] = hex_to_u32 ((const u8 *) &mac_pos[24]);
190 
191   u8 b1[16] = { 0x00, //-x Length of the associated data
192                 0x28, //_|
193                 0x06, //-x KNX IP Secure header of SESSION_RESPONSE
194                 0x10, // |
195                 0x09, // |
196                 0x52, // |
197                 0x00, // |
198                 0x38, //_|
199                 secure_session_identifier[0],
200                 secure_session_identifier[1],
201                 public_value_xor[0],
202                 public_value_xor[1],
203                 public_value_xor[2],
204                 public_value_xor[3],
205                 public_value_xor[4],
206                 public_value_xor[5] };
207   memcpy (blocks->b1, b1, sizeof(b1));
208 
209   memcpy (blocks->b2, &public_value_xor[6], 16);
210 
211   // The bytes that don't get set are zero padding
212   memset (blocks->b3, 0, 16);
213   memcpy (blocks->b3, &public_value_xor[22], 10);
214 
215   // The salt used in the derivation of the device authentication code is constant
216   size_t salt_len = strlen(SALT_DEVICE_AUTHENTICATION_CODE); // exclude the null byte
217   memcpy (salt->salt_buf, SALT_DEVICE_AUTHENTICATION_CODE, salt_len);
218   salt->salt_len = salt_len;
219   salt->salt_iter = ROUNDS_DEVICE_AUTHENTICATION_CODE - 1;
220 
221   return (PARSER_OK);
222 }
223 
module_hash_encode(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const void * digest_buf,MAYBE_UNUSED const salt_t * salt,MAYBE_UNUSED const void * esalt_buf,MAYBE_UNUSED const void * hook_salt_buf,MAYBE_UNUSED const hashinfo_t * hash_info,char * line_buf,MAYBE_UNUSED const int line_size)224 int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
225 {
226   const u32 *digest = (const u32 *) digest_buf;
227 
228   blocks_t *blocks = (blocks_t *) esalt_buf;
229 
230   u8 secure_session_identifier[2];
231   u8 secure_session_identifier_hex[5] = { 0 };
232   u8 public_value_xor[32];
233   u8 public_value_xor_hex[65] = { 0 };
234 
235   memcpy (secure_session_identifier, &(blocks->b1[2]), 2);
236 
237   memcpy (&public_value_xor[ 0], ((u8 *) &blocks->b1[2]) + 2,  6);
238   memcpy (&public_value_xor[ 6], &(blocks->b2[0]), 16);
239   memcpy (&public_value_xor[22], &(blocks->b3[0]), 10);
240 
241   hex_encode(secure_session_identifier, 2, secure_session_identifier_hex);
242   hex_encode(public_value_xor, 32, public_value_xor_hex);
243 
244   const int line_len = snprintf (line_buf, line_size, "%s*%s*%s*%08x%08x%08x%08x",
245     SIGNATURE_DEVICE_AUTHENTICATION_CODE,
246     secure_session_identifier_hex,
247     public_value_xor_hex,
248     byte_swap_32 (digest[0]),
249     byte_swap_32 (digest[1]),
250     byte_swap_32 (digest[2]),
251     byte_swap_32 (digest[3])
252   );
253 
254   return line_len;
255 }
256 
module_init(module_ctx_t * module_ctx)257 void module_init (module_ctx_t *module_ctx)
258 {
259   module_ctx->module_context_size             = MODULE_CONTEXT_SIZE_CURRENT;
260   module_ctx->module_interface_version        = MODULE_INTERFACE_VERSION_CURRENT;
261 
262   module_ctx->module_attack_exec              = module_attack_exec;
263   module_ctx->module_benchmark_esalt          = MODULE_DEFAULT;
264   module_ctx->module_benchmark_hook_salt      = MODULE_DEFAULT;
265   module_ctx->module_benchmark_mask           = MODULE_DEFAULT;
266   module_ctx->module_benchmark_salt           = MODULE_DEFAULT;
267   module_ctx->module_build_plain_postprocess  = MODULE_DEFAULT;
268   module_ctx->module_deep_comp_kernel         = module_deep_comp_kernel;
269   module_ctx->module_deprecated_notice        = MODULE_DEFAULT;
270   module_ctx->module_dgst_pos0                = module_dgst_pos0;
271   module_ctx->module_dgst_pos1                = module_dgst_pos1;
272   module_ctx->module_dgst_pos2                = module_dgst_pos2;
273   module_ctx->module_dgst_pos3                = module_dgst_pos3;
274   module_ctx->module_dgst_size                = module_dgst_size;
275   module_ctx->module_dictstat_disable         = MODULE_DEFAULT;
276   module_ctx->module_esalt_size               = module_esalt_size;
277   module_ctx->module_extra_buffer_size        = MODULE_DEFAULT;
278   module_ctx->module_extra_tmp_size           = MODULE_DEFAULT;
279   module_ctx->module_extra_tuningdb_block     = MODULE_DEFAULT;
280   module_ctx->module_forced_outfile_format    = MODULE_DEFAULT;
281   module_ctx->module_hash_binary_count        = MODULE_DEFAULT;
282   module_ctx->module_hash_binary_parse        = MODULE_DEFAULT;
283   module_ctx->module_hash_binary_save         = MODULE_DEFAULT;
284   module_ctx->module_hash_decode_potfile      = MODULE_DEFAULT;
285   module_ctx->module_hash_decode_zero_hash    = MODULE_DEFAULT;
286   module_ctx->module_hash_decode              = module_hash_decode;
287   module_ctx->module_hash_encode_status       = MODULE_DEFAULT;
288   module_ctx->module_hash_encode_potfile      = MODULE_DEFAULT;
289   module_ctx->module_hash_encode              = module_hash_encode;
290   module_ctx->module_hash_init_selftest       = MODULE_DEFAULT;
291   module_ctx->module_hash_mode                = MODULE_DEFAULT;
292   module_ctx->module_hash_category            = module_hash_category;
293   module_ctx->module_hash_name                = module_hash_name;
294   module_ctx->module_hashes_count_min         = MODULE_DEFAULT;
295   module_ctx->module_hashes_count_max         = MODULE_DEFAULT;
296   module_ctx->module_hlfmt_disable            = MODULE_DEFAULT;
297   module_ctx->module_hook_extra_param_size    = MODULE_DEFAULT;
298   module_ctx->module_hook_extra_param_init    = MODULE_DEFAULT;
299   module_ctx->module_hook_extra_param_term    = MODULE_DEFAULT;
300   module_ctx->module_hook12                   = MODULE_DEFAULT;
301   module_ctx->module_hook23                   = MODULE_DEFAULT;
302   module_ctx->module_hook_salt_size           = MODULE_DEFAULT;
303   module_ctx->module_hook_size                = MODULE_DEFAULT;
304   module_ctx->module_jit_build_options        = module_jit_build_options;
305   module_ctx->module_jit_cache_disable        = MODULE_DEFAULT;
306   module_ctx->module_kernel_accel_max         = MODULE_DEFAULT;
307   module_ctx->module_kernel_accel_min         = MODULE_DEFAULT;
308   module_ctx->module_kernel_loops_max         = MODULE_DEFAULT;
309   module_ctx->module_kernel_loops_min         = MODULE_DEFAULT;
310   module_ctx->module_kernel_threads_max       = MODULE_DEFAULT;
311   module_ctx->module_kernel_threads_min       = MODULE_DEFAULT;
312   module_ctx->module_kern_type                = module_kern_type;
313   module_ctx->module_kern_type_dynamic        = MODULE_DEFAULT;
314   module_ctx->module_opti_type                = module_opti_type;
315   module_ctx->module_opts_type                = module_opts_type;
316   module_ctx->module_outfile_check_disable    = MODULE_DEFAULT;
317   module_ctx->module_outfile_check_nocomp     = MODULE_DEFAULT;
318   module_ctx->module_potfile_custom_check     = MODULE_DEFAULT;
319   module_ctx->module_potfile_disable          = MODULE_DEFAULT;
320   module_ctx->module_potfile_keep_all_hashes  = MODULE_DEFAULT;
321   module_ctx->module_pwdump_column            = MODULE_DEFAULT;
322   module_ctx->module_pw_max                   = module_pw_max;
323   module_ctx->module_pw_min                   = MODULE_DEFAULT;
324   module_ctx->module_salt_max                 = MODULE_DEFAULT;
325   module_ctx->module_salt_min                 = MODULE_DEFAULT;
326   module_ctx->module_salt_type                = module_salt_type;
327   module_ctx->module_separator                = MODULE_DEFAULT;
328   module_ctx->module_st_hash                  = module_st_hash;
329   module_ctx->module_st_pass                  = module_st_pass;
330   module_ctx->module_tmp_size                 = module_tmp_size;
331   module_ctx->module_unstable_warning         = MODULE_DEFAULT;
332   module_ctx->module_warmup_disable           = MODULE_DEFAULT;
333 }
334