mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-19 20:27:26 -05:00
YOLO:
Congratulations for clicking this link, you are now reading this description; Add DES-OFB Decryption Support for P25, NXDN, DMR (Tested); Add DES-XL Decryption Support for P25p1 (Tested); Add AES-OFB Decryption Support for P25, DMR (Tested); NXDN(untested); Add P25p1 PDU Decryption Support; (Untested)(Known Modes); Add Remaining (AES, DES) DMR PDU Decryption Support (Known DMRA Modes)(Untested); Decrypt Tytera 16-bit BP (works depending on model); Add AES Keys example csv file for import; Probably a few bugs that'll need to be massaged out now with all the code additions for several years of stashed code;
This commit is contained in:
73
src/dmr_le.c
73
src/dmr_le.c
@@ -115,12 +115,23 @@ void dmr_late_entry_mi (dsd_opts * opts, dsd_state * state)
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
}
|
||||
//run afterwards, or le verification won't match up properly
|
||||
if (state->payload_algid != 0x21)
|
||||
|
||||
//run expansions afterwards, or le verification won't match up properly
|
||||
|
||||
//DES1
|
||||
if (state->payload_algid == 0x22)
|
||||
{
|
||||
LFSR64 (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
//AES-128 or AES-256
|
||||
if (state->payload_algid == 0x24 || state->payload_algid == 0x25)
|
||||
{
|
||||
LFSR128d (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
}
|
||||
if (slot == 1 && state->payload_algidR != 0)
|
||||
{
|
||||
@@ -134,16 +145,62 @@ void dmr_late_entry_mi (dsd_opts * opts, dsd_state * state)
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
}
|
||||
//run afterwards, or le verification won't match up properly
|
||||
if (state->payload_algidR != 0x21)
|
||||
|
||||
//run expansions afterwards, or le verification won't match up properly
|
||||
|
||||
//DES1
|
||||
if (state->payload_algidR == 0x22)
|
||||
{
|
||||
LFSR64 (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
//AES-128 or AES-256
|
||||
if (state->payload_algidR == 0x24 || state->payload_algidR == 0x25)
|
||||
{
|
||||
LFSR128d (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//run LFSR even if golay fails
|
||||
else if (slot == 0 && state->payload_algid != 0)
|
||||
{
|
||||
//DES1
|
||||
if (state->payload_algid == 0x22)
|
||||
{
|
||||
LFSR64 (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
//AES-128 or AES-256
|
||||
if (state->payload_algid == 0x24 || state->payload_algid == 0x25)
|
||||
{
|
||||
LFSR128d (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
}
|
||||
else if (slot == 1 && state->payload_algidR != 0)
|
||||
{
|
||||
//DES1
|
||||
if (state->payload_algidR == 0x22)
|
||||
{
|
||||
LFSR64 (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
//AES-128 or AES-256
|
||||
if (state->payload_algidR == 0x24 || state->payload_algidR == 0x25)
|
||||
{
|
||||
LFSR128d (state);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void dmr_alg_refresh (dsd_opts * opts, dsd_state * state)
|
||||
@@ -195,8 +252,8 @@ void dmr_alg_reset (dsd_opts * opts, dsd_state * state)
|
||||
state->dropR = 256;
|
||||
state->DMRvcL = 0;
|
||||
state->DMRvcR = 0;
|
||||
state->payload_miP = 0;
|
||||
state->payload_miN = 0;
|
||||
// state->payload_miP = 0; //running these clears out before we can create a new keystream
|
||||
// state->payload_miN = 0; //running these clears out before we can create a new keystream
|
||||
}
|
||||
|
||||
//handle Single Burst (Voice Burst F) or Reverse Channel Signalling
|
||||
|
||||
Reference in New Issue
Block a user