DMR: Reconfigure dmr_le;

Reconfigure dmr_le so that it can be completely disabled for Hytera Enhanced, or Late Entry MI only for DMRA, or Late Entry MI and Key/Alg for DMRA;

Misc Hytera Enhanced Setup Tweaks;
This commit is contained in:
lwvmobile
2025-03-26 00:54:08 -04:00
parent 88c76c4a6c
commit 4b75211ad0
5 changed files with 28 additions and 14 deletions

View File

@@ -34,7 +34,6 @@ void dmr_pi (dsd_opts * opts, dsd_state * state, uint8_t PI_BYTE[], uint32_t CRC
state->payload_keyid = PI_BYTE[2];
state->payload_mi = ((unsigned long long int)PI_BYTE[3] << 32ULL) | ((unsigned long long int)PI_BYTE[4] << 24) |
((unsigned long long int)PI_BYTE[5] << 16) | ((unsigned long long int)PI_BYTE[6] << 8) | ((unsigned long long int)PI_BYTE[7] << 0);
hytera_enhanced_enc_setup(opts, state, state->R, state->payload_mi); //need to redo part of this (no key loader yet)
}
else
{
@@ -42,7 +41,6 @@ void dmr_pi (dsd_opts * opts, dsd_state * state, uint8_t PI_BYTE[], uint32_t CRC
state->payload_keyidR = PI_BYTE[2];
state->payload_miR = ((unsigned long long int)PI_BYTE[3] << 32ULL) | ((unsigned long long int)PI_BYTE[4] << 24) |
((unsigned long long int)PI_BYTE[5] << 16) | ((unsigned long long int)PI_BYTE[6] << 8) | ((unsigned long long int)PI_BYTE[7] << 0);
hytera_enhanced_enc_setup(opts, state, state->RR, state->payload_miR); //need to redo part of this (no key loader yet)
}
fprintf (stderr, "%s ", KYEL);
@@ -72,7 +70,7 @@ void dmr_pi (dsd_opts * opts, dsd_state * state, uint8_t PI_BYTE[], uint32_t CRC
fprintf (stderr, " AES-256;");
//disable late entry for DMRA (hopefully, there aren't any systems running both DMRA and Hytera Enhanced mixed together)
opts->dmr_le = 0;
opts->dmr_le = 2;
// fprintf (stderr, " (Checksum Okay);");
}