DMR: Add More Kirisun Encryption Support; #319

Ciphers added include "Enhanced" "Reinforced" and "Strengthened"; Placeholders for remaining ciphers;
This commit is contained in:
lwvmobile
2026-10-16 11:04:42 -04:00
parent 72b3e5efe4
commit 4005c9b313
10 changed files with 803 additions and 106 deletions

View File

@@ -104,7 +104,15 @@ void playSynthesizedVoiceFS3 (dsd_opts * opts, dsd_state * state)
encL = 0;
}
}
else if (state->payload_algid == 0x24 || state->payload_algid == 0x25 || state->payload_algid == 0x36 || state->payload_algid == 0x37)
else if (state->payload_algid == 0x24 || state->payload_algid == 0x25)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[0] == 1)
{
encL = 0;
}
}
else if (state->payload_algid >= 0x31 && state->payload_algid <= 0x3A)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[0] == 1)
@@ -141,7 +149,15 @@ void playSynthesizedVoiceFS3 (dsd_opts * opts, dsd_state * state)
encR = 0;
}
}
else if (state->payload_algidR == 0x24 || state->payload_algidR == 0x25 || state->payload_algidR == 0x36 || state->payload_algidR == 0x37)
else if (state->payload_algidR == 0x24 || state->payload_algidR == 0x25)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[1] == 1)
{
encR = 0;
}
}
else if (state->payload_algidR >= 0x31 && state->payload_algidR <= 0x3A)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[1] == 1)
@@ -738,13 +754,28 @@ void playSynthesizedVoiceFM (dsd_opts * opts, dsd_state * state)
encL = 0;
}
}
else if (state->payload_algid == 0x84 || state->payload_algid == 0x89 || state->nxdn_cipher_type == 0x3 || state->payload_algid == 0x36 || state->payload_algid == 0x37)
else if (state->payload_algid == 0x84 || state->payload_algid == 0x89 || state->nxdn_cipher_type == 0x3)
{
if (state->aes_key_loaded[0] == 1)
{
encL = 0;
}
}
else if (state->payload_algid >= 0x31 && state->payload_algid <= 0x3A)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[0] == 1)
{
encL = 0;
}
}
else if (state->payload_algidR == 0x26)
{
if (state->straight_ks == 0x26)
{
encL = 0;
}
}
}
//WIP: Mute if on B list (or not W list)
@@ -1157,7 +1188,15 @@ void playSynthesizedVoiceSS3 (dsd_opts * opts, dsd_state * state)
encL = 0;
}
}
else if (state->payload_algid == 0x24 || state->payload_algid == 0x25 || state->payload_algid == 0x36 || state->payload_algid == 0x37)
else if (state->payload_algid == 0x24 || state->payload_algid == 0x25)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[0] == 1)
{
encL = 0;
}
}
else if (state->payload_algid >= 0x31 && state->payload_algid <= 0x3A)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[0] == 1)
@@ -1194,7 +1233,15 @@ void playSynthesizedVoiceSS3 (dsd_opts * opts, dsd_state * state)
encR = 0;
}
}
else if (state->payload_algidR == 0x24 || state->payload_algidR == 0x25 || state->payload_algidR == 0x36 || state->payload_algidR == 0x37)
else if (state->payload_algidR == 0x24 || state->payload_algidR == 0x25)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[1] == 1)
{
encR = 0;
}
}
else if (state->payload_algidR >= 0x31 && state->payload_algidR <= 0x3A)
{
//going to need a better check for this later on, or seperated keys or something
if (state->aes_key_loaded[1] == 1)