|
|
|
@ -65,9 +65,9 @@ static const char *SIGNATURE_DEVICE_AUTHENTICATION_CODE = "$knx-ip-secure-device
|
|
|
|
|
static const char *SALT_DEVICE_AUTHENTICATION_CODE = "device-authentication-code.1.secure.ip.knx.org";
|
|
|
|
|
static const int ROUNDS_DEVICE_AUTHENTICATION_CODE = 65536;
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
char* jit_build_options = NULL;
|
|
|
|
|
char *jit_build_options = NULL;
|
|
|
|
|
|
|
|
|
|
// Extra treatment for Apple systems
|
|
|
|
|
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
|
|
|
|
@ -96,33 +96,26 @@ char* module_jit_build_options(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB
|
|
|
|
|
return jit_build_options;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u32 module_deep_comp_kernel(MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const u32 salt_pos, MAYBE_UNUSED const u32 digest_pos)
|
|
|
|
|
u32 module_deep_comp_kernel (MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const u32 salt_pos, MAYBE_UNUSED const u32 digest_pos)
|
|
|
|
|
{
|
|
|
|
|
return KERN_RUN_3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
const u64 esalt_size = (const u64) sizeof (blocks_t);
|
|
|
|
|
|
|
|
|
|
return esalt_size;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
const u64 tmp_size = (const u64) sizeof (pbkdf2_sha256_tmp_t);
|
|
|
|
|
|
|
|
|
|
return tmp_size;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u32 module_pw_min(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
|
|
|
|
{
|
|
|
|
|
const u32 pw_min = 0;
|
|
|
|
|
|
|
|
|
|
return pw_min;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
// The ETS 5 allows a maximum of 20 ASCII characters for the password used to derive the device authentication code.
|
|
|
|
|
const u32 pw_max = 20;
|
|
|
|
@ -130,7 +123,7 @@ u32 module_pw_max(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED cons
|
|
|
|
|
return pw_max;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
u32 *digest = (u32 *) digest_buf;
|
|
|
|
|
|
|
|
|
@ -228,7 +221,7 @@ int module_hash_decode(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED
|
|
|
|
|
return (PARSER_OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
const u32 *digest = (const u32 *) digest_buf;
|
|
|
|
|
|
|
|
|
@ -261,7 +254,7 @@ int module_hash_encode(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED
|
|
|
|
|
return line_len;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void module_init(module_ctx_t *module_ctx)
|
|
|
|
|
void module_init (module_ctx_t *module_ctx)
|
|
|
|
|
{
|
|
|
|
|
module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT;
|
|
|
|
|
module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT;
|
|
|
|
@ -327,7 +320,7 @@ void module_init(module_ctx_t *module_ctx)
|
|
|
|
|
module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_pwdump_column = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_pw_max = module_pw_max;
|
|
|
|
|
module_ctx->module_pw_min = module_pw_min;
|
|
|
|
|
module_ctx->module_pw_min = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_salt_max = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_salt_min = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_salt_type = module_salt_type;
|
|
|
|
|