From 38ad11dbef237e50f16a82558ba52401c8f3e377 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Mon, 29 Dec 2025 22:36:47 -0500 Subject: [PATCH] Fix AES-OFB type on .mbe file playback; #329 --- src/dsd_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dsd_file.c b/src/dsd_file.c index 35ebb0a..dfa62e5 100644 --- a/src/dsd_file.c +++ b/src/dsd_file.c @@ -1549,7 +1549,7 @@ void read_sdrtrunk_json_format (dsd_opts * opts, dsd_state * state) if (alg_id == 0x89) //128, or 256 aes_ofb_keystream_output(kiv+5, aes_key, ks_bytes, 0, 16); //16*16=256 - else aes_ofb_keystream_output(kiv+5, aes_key, ks_bytes, 0, 16); //16*16=256 + else aes_ofb_keystream_output(kiv+5, aes_key, ks_bytes, 2, 16); //16*16=256 if (protocol == 1) //Phase 1 IMBE start on 27 for AES-OFB (16 discard + 9 LCW + 2 reserved) unpack_byte_array_into_bit_array(ks_bytes+27, ks, 256-19); //unpack starting after discard @@ -1570,7 +1570,7 @@ void read_sdrtrunk_json_format (dsd_opts * opts, dsd_state * state) if (alg_id == 0x89) //128, or 256 aes_ofb_keystream_output(backup_iv, aes_key, ks_bytes, 0, 16); //16*16=256 - else aes_ofb_keystream_output(backup_iv, aes_key, ks_bytes, 0, 16); //16*16=256 + else aes_ofb_keystream_output(backup_iv, aes_key, ks_bytes, 2, 16); //16*16=256 unpack_byte_array_into_bit_array(ks_bytes+27, ks_i, 256-19); //unpack starting after discard }