DMR TYT BP16 Encryption Mode WIP; #302

Code is not working as-is, committed for anonymous submitter to have access to certain items in code;
This commit is contained in:
lwvmobile
2025-08-15 12:21:27 -04:00
parent c888dfc1d6
commit 8f092e293f
6 changed files with 240 additions and 106 deletions

View File

@@ -988,6 +988,9 @@ typedef struct
//tyt_ap=1 active
int tyt_ap;
int tyt_bp;
int tyt_ep;
} dsd_state;
/*
@@ -1157,6 +1160,8 @@ int readImbe4400Data (dsd_opts * opts, dsd_state * state, char *imbe_d);
int readAmbe2450Data (dsd_opts * opts, dsd_state * state, char *ambe_d);
void keyring(dsd_opts * opts, dsd_state * state);
void read_sdrtrunk_json_format (dsd_opts * opts, dsd_state * state);
void ambe2_codeword_print_f (dsd_opts * opts, char ambe_fr[4][24]);
void ambe2_codeword_print_b (dsd_opts * opts, char ambe_fr[4][24]);
void openMbeInFile (dsd_opts * opts, dsd_state * state);
void closeMbeOutFile (dsd_opts * opts, dsd_state * state);
void closeMbeOutFileR (dsd_opts * opts, dsd_state * state); //tdma slot 2
@@ -1607,6 +1612,9 @@ void aes_cfb_bytewise_payload_crypt (uint8_t * iv, uint8_t * key, uint8_t * in,
void aes_ctr_bytewise_payload_crypt (uint8_t * iv, uint8_t * key, uint8_t * payload, int type);
void aes_ctr_bitwise_payload_crypt (uint8_t * iv, uint8_t * key, uint8_t * payload, int type);
//Tytera Encryption Modes
int tyt16_ambe2_codeword_keystream(dsd_state * state, char ambe_fr[4][24], int idx, int fnum);
//Hytera Enhanced
void hytera_enhanced_rc4_setup(dsd_opts * opts, dsd_state * state, unsigned long long int key_value, unsigned long long int mi_value);
unsigned long long int hytera_lfsr(uint8_t * mi, uint8_t * taps, uint8_t len);