mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-13 01:07:24 -05:00
DMR: Fix Hytera OTA Encryption VLC Pseudo Call Information TGT Value on Slot 2. Verbage Tweaks; #373
DMR: Fix Kirisun "Ultra" Cipher Name in Code (Ultra, not Ultimate). Remove Unvalidated Code Bits regarding Kirisun; #319
This commit is contained in:
@@ -1063,7 +1063,7 @@ void decode_block(const uint64_t input[2], uint64_t output[2], const uint8_t sch
|
||||
output[1] = left_word;
|
||||
}
|
||||
|
||||
void kirisun_ultimate_keystream_creation(dsd_state *state)
|
||||
void kirisun_ultra_keystream_creation(dsd_state *state)
|
||||
{
|
||||
uint8_t slot = 0;
|
||||
if (state->currentslot == 0)
|
||||
@@ -1237,6 +1237,6 @@ void kirisun_keystream_creation(dsd_state * state)
|
||||
kirisun_top_keystream_creation(state);
|
||||
|
||||
else if (algid == 0x3A)
|
||||
kirisun_ultimate_keystream_creation(state);
|
||||
kirisun_ultra_keystream_creation(state);
|
||||
|
||||
}
|
||||
|
||||
@@ -89,23 +89,24 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
//so assign static value
|
||||
if (state->hota_enc_check)
|
||||
{
|
||||
uint32_t t_target = 8686868;
|
||||
if (type == 1)
|
||||
{
|
||||
if (slot == 0)
|
||||
{
|
||||
state->lastsrc = source;
|
||||
state->lasttg = 8686868;
|
||||
state->lasttg = t_target;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->lastsrcR = source;
|
||||
state->lasttgR = 8686868;
|
||||
state->lasttgR = t_target;
|
||||
}
|
||||
|
||||
fprintf (stderr, "\n%s", KYEL);
|
||||
fprintf (stderr, " SLOT %d ", slot+1);
|
||||
fprintf(stderr, "TGT=%u SRC=%u ", state->lasttg, source);
|
||||
fprintf (stderr, "Forced Pseudo Call Information");
|
||||
fprintf(stderr, "TGT=%u SRC=%u ", t_target, source);
|
||||
fprintf (stderr, "Encrypted Pseudo Call Information");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
|
||||
return;
|
||||
@@ -114,7 +115,7 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
{
|
||||
fprintf (stderr, "\n%s", KRED);
|
||||
fprintf (stderr, " SLOT %d", slot+1);
|
||||
fprintf (stderr, " TLC Undecryptable;");
|
||||
fprintf (stderr, " TLC Encrypted;");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
return;
|
||||
}
|
||||
@@ -122,7 +123,7 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
{
|
||||
fprintf (stderr, "%s", KRED);
|
||||
fprintf (stderr, " SLOT %d", slot+1);
|
||||
fprintf (stderr, " EMB LC Undecryptable;");
|
||||
fprintf (stderr, " EMB LC Encrypted;");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
return;
|
||||
}
|
||||
@@ -132,7 +133,7 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
{
|
||||
fprintf (stderr, "%s", KRED);
|
||||
fprintf (stderr, " SLOT %d", slot+1);
|
||||
fprintf (stderr, " EMB LC Missing CTX; Undecryptable;");
|
||||
fprintf (stderr, " EMB LC Missing CTX; Encrypted;");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ void dmr_sbrc (dsd_opts * opts, dsd_state * state, uint8_t power)
|
||||
state->hota_sbrc_idx2[state->currentslot] = -1;
|
||||
fprintf (stderr, "%s \n", KRED);
|
||||
fprintf (stderr, " SLOT %d ", slot+1);
|
||||
fprintf (stderr, "SB_RC Missing IDX; Undecryptable;");
|
||||
fprintf (stderr, "SB_RC Missing IDX; Encrypted;");
|
||||
fprintf (stderr, "%s\n", KNRM);
|
||||
goto SBRC_END;
|
||||
}
|
||||
@@ -488,7 +488,7 @@ void dmr_sbrc (dsd_opts * opts, dsd_state * state, uint8_t power)
|
||||
state->hota_sbrc_idx2[state->currentslot] = -1;
|
||||
fprintf (stderr, "%s \n", KRED);
|
||||
fprintf (stderr, " SLOT %d ", slot+1);
|
||||
fprintf (stderr, "SB_RC Incorrect IDX or FEC Errors; Undecryptable;");
|
||||
fprintf (stderr, "SB_RC Incorrect IDX or FEC Errors; Encrypted;");
|
||||
fprintf (stderr, "%s\n", KNRM);
|
||||
goto SBRC_END;
|
||||
}
|
||||
@@ -496,7 +496,7 @@ void dmr_sbrc (dsd_opts * opts, dsd_state * state, uint8_t power)
|
||||
{
|
||||
fprintf (stderr, "%s \n", KRED);
|
||||
fprintf (stderr, " SLOT %d ", slot+1);
|
||||
fprintf (stderr, "SB_RC Undecryptable;");
|
||||
fprintf (stderr, "SB_RC Encrypted;");
|
||||
fprintf (stderr, "%s\n", KNRM);
|
||||
goto SBRC_END;
|
||||
}
|
||||
|
||||
10
src/dmr_ms.c
10
src/dmr_ms.c
@@ -167,16 +167,6 @@ void dmrMS (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
}
|
||||
|
||||
//Kirisun Check VC-F for Enc Identifiers -- has bad fec, unless its loaded differently
|
||||
//SEE: https://patents.google.com/patent/CN102307075A/en?q=(kirisun)&q=(dmr)&oq=kirisun
|
||||
// if (opts->dmr_le == 3 && vc == 6)
|
||||
// {
|
||||
// bool kokay = 0;
|
||||
// // kokay = Golay_24_12_decode(syncdata);
|
||||
// unsigned long long int kirisun = (unsigned long long int)ConvertBitIntoBytes(&syncdata[0], 48);
|
||||
// fprintf (stderr, "Kiri: %012llX; Golay Okay: %d; \n", kirisun, kokay);
|
||||
// }
|
||||
|
||||
for(i = 0; i < 8; i++) emb_pdu[i + 0] = syncdata[i];
|
||||
for(i = 0; i < 8; i++) emb_pdu[i + 8] = syncdata[i + 40];
|
||||
|
||||
|
||||
@@ -88,12 +88,7 @@ void dmr_pi (dsd_opts * opts, dsd_state * state, uint8_t PI_BYTE[], uint32_t CRC
|
||||
fprintf (stderr, "Encryption;");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
|
||||
//disable late entry for DMRA, Flag 3 for future check of VC-F 48-bit region with Golay 24,12 Encoding
|
||||
//SEE: https://patents.google.com/patent/CN102307075A/en?q=(kirisun)&q=(dmr)&oq=kirisun
|
||||
//tested patent above with information provided, VC-F had a SB, but the 48-bit
|
||||
//full value yielded bad Golay results, and user submitted info contradicts this patent for samples provided
|
||||
//Late Entry MI does appear to work, however, and reports a good CRC for that as well,
|
||||
//reverse engineered LFSR for Kirisun lines up with the late entry for 32-bit MI values.
|
||||
//flag late entry SB for Kirisun
|
||||
opts->dmr_le = 3;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user