mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-17 03:07:24 -05:00
Vertex Standard 10 Char and 64 Char Encryption Support; #316
Special mode of 0:0 to apply the inversion to the interlevaed frame if present without application of a keystream for analysis; Misc Tweaks to VTX STD ENC Header and VTX TMS message; TG Value loading of VTX 10 char keys available only by #define VERTEX_KEY40_BY_TG which will override the Moto BP loadout;
This commit is contained in:
@@ -599,7 +599,14 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
}
|
||||
if (state->rkey_array[hash] != 0)
|
||||
{
|
||||
#ifdef VERTEX_KEY40_BY_TG
|
||||
state->vtx40_key = state->rkey_array[hash] & 0xFFFFFFFFFF;
|
||||
vertex_40_keystream_creation(state, state->vtx40_key);
|
||||
#elif VERTEX_KEY256_BY_TG
|
||||
//TODO: This
|
||||
#else
|
||||
state->K = state->rkey_array[hash] & 0xFF; //doesn't exceed 255
|
||||
#endif
|
||||
state->K1 = state->H = state->rkey_array[hash] & 0xFFFFFFFFFF; //doesn't exceed 40-bit limit
|
||||
opts->dmr_mute_encL = 0;
|
||||
// fprintf (stderr, "Key: %X ", state->rkey_array[hash]);
|
||||
@@ -619,6 +626,20 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
}
|
||||
}
|
||||
|
||||
if ( (state->vtx_key_loaded != 0 && state->dmr_so & 0x40 && state->payload_keyid == 0 && state->dmr_fid == 0x10) ||
|
||||
(state->vtx_key_loaded != 0 && state->forced_alg_id == 1) )
|
||||
{
|
||||
if (memcmp(ambe_d, ambe_silence, 49) != 0)
|
||||
{
|
||||
for (int i = 0; i < 49; i++)
|
||||
{
|
||||
if (i < 8 || i > 11)
|
||||
ambe_d[i] ^= (char)state->static_ks_bits[0][i];
|
||||
}
|
||||
}
|
||||
opts->dmr_mute_encL = 0; //shim to unmute
|
||||
}
|
||||
|
||||
if ( (state->K1 > 0 && state->dmr_so & 0x40 && state->payload_keyid == 0 && state->dmr_fid == 0x68) ||
|
||||
(state->K1 > 0 && state->forced_alg_id == 1) )
|
||||
{
|
||||
@@ -1066,7 +1087,14 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
}
|
||||
if (state->rkey_array[hash] != 0)
|
||||
{
|
||||
#ifdef VERTEX_KEY40_BY_TG
|
||||
state->vtx40_key = state->rkey_array[hash] & 0xFFFFFFFFFF;
|
||||
vertex_40_keystream_creation(state, state->vtx40_key);
|
||||
#elif VERTEX_KEY256_BY_TG
|
||||
//TODO: This
|
||||
#else
|
||||
state->K = state->rkey_array[hash] & 0xFF; //doesn't exceed 255
|
||||
#endif
|
||||
state->K1 = state->H = state->rkey_array[hash] & 0xFFFFFFFFFF; //doesn't exceed 40-bit limit
|
||||
opts->dmr_mute_encR = 0;
|
||||
// fprintf (stderr, "Key: %X ", state->rkey_array[hash]);
|
||||
@@ -1086,6 +1114,20 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
}
|
||||
}
|
||||
|
||||
if ( (state->vtx_key_loaded != 0 && state->dmr_soR & 0x40 && state->payload_keyidR == 0 && state->dmr_fidR == 0x10) ||
|
||||
(state->vtx_key_loaded != 0 && state->forced_alg_id == 1) )
|
||||
{
|
||||
if (memcmp(ambe_d, ambe_silence, 49) != 0)
|
||||
{
|
||||
for (int i = 0; i < 49; i++)
|
||||
{
|
||||
if (i < 8 || i > 11)
|
||||
ambe_d[i] ^= (char)state->static_ks_bits[1][i];
|
||||
}
|
||||
}
|
||||
opts->dmr_mute_encR = 0; //shim to unmute
|
||||
}
|
||||
|
||||
if ( (state->K1 > 0 && state->dmr_soR & 0x40 && state->payload_keyidR == 0 && state->dmr_fidR == 0x68) ||
|
||||
(state->K1 > 0 && state->forced_alg_id == 1))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user