f4exb / dsdcc

Digital Speech Decoder (DSD) rewritten as a C++ library
286 stars 60 forks source link

Moto BP not working, testing possible #43

Closed Swekkerooni closed 2 years ago

Swekkerooni commented 2 years ago

My apologies for opening like the third or fourth issue about Motorola Basic Privacy.

This added functionality was for me the reason to try DSDcc; installing it was a breeze on debian, currently have running it with rtl_fm. Running dsdccx -h showed me the following: "-k Number of Basic Privacy key for DMR [1..255]"

For clear DMR I use the following command: rtl_fm -f [FREQUENCY]M -M fm -g 1 -s 70K -r 48K -E dc - | dsdccx -fr -i - -o - -U 0 -g 50 | play -q -t s16 -r 8k -c 1 - It decodes audio just fine with non-BP encoded DMR.

I own a Motorola radio which supports DMR and Basic Privacy, so I can test all I want when I want, with the BP key known, it is currently set to 128. For BP DMR I use it with option flag "-k 128": rtl_fm -f [FREQUENCY]M -M fm -g 1 -s 70K -r 48K -E dc - | dsdccx -fr -k 128 -i - -o - -U 0 -g 50 | play -q -t s16 -r 8k -c 1 - However, this output doesn't provide a descrambled audio feed, it is very much still garbled. However, as I own a BP-capable radio, I would be more than happy to provide hands-on raw decoder data and assist anyone with fixing this feature.

iScottybotty commented 2 years ago

The BP Key ID is 128. The BP Key Number, try: 4D89.

Edit. Or try these:

Key 128: x4\xD\x8\x9 4D 09 4D 89 4D 89 0 or \x4D\x09\x4D\x89\x4D\x89\x00

Iscottybotty@gmail.com

f4exb commented 2 years ago

I will not make any effort myself towards supporting BP. However if you make a pull request that fixes this issue I will be glad to accept it.

jurek4321 commented 2 years ago

Can somebody send sample BP wav file?

iScottybotty commented 2 years ago

Hi. This is RAW audio of Moto BP. Let me know what key and comms come back and I’ll confirm.

Ps. I can get RAW BP all day long if you need it. Just ask. 👍

https://drive.google.com/file/d/1tIPNDvbKl28Yx293qYSGnVnNG0SafpE1/view

Scott.

On 21 Dec 2021, at 22:21, jurek4321 @.***> wrote:  Can somebody send sample BP wav file?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

jurek4321 commented 2 years ago

Key is 70 (ED 4A)

iScottybotty commented 2 years ago

You are correct. May I have the formula?

Do you need more? Scott.

On 22 Dec 2021, at 08:47, jurek4321 @.***> wrote:

 Key is 70 (ED 4A)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

jurek4321 commented 2 years ago

Finding the key is very easy. You just need to find ambe frame that repeats the most times(it will be the silence frame) and xor it with F8 01 A9 9F 8C E0. Output will be your key. Unfortunately ambe frames in dsdcc are stored in some wired way. It is like 2 bits of ambe in 1 byte. So i don't know how to implement decryption to dsdcc.

f4exb commented 2 years ago

It is like 2 bits of ambe in 1 byte.

Maybe you are looking at the raw C4FM data that indeed is on 2 bits (4 states).

iScottybotty commented 2 years ago

Back to the drawing board then. I have all 255 keys, long and short, that’s not the issue. Like you, adding that to DSD is difficult for clear voice. 🤷‍♂️

Scott.

On 22 Dec 2021, at 15:31, jurek4321 @.***> wrote:

 Finding the key is very easy. You just need to find ambe frame that repeats the most times(it will be the silence frame) and xor it with F8 01 A9 9F 8C E0. Output will be your key. Unfortunately ambe frames in dsdcc are stored in some wired way. It is like 2 bits of ambe in 1 byte. So i don't know how to implement decryption to dsdcc.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

iScottybotty commented 2 years ago

Finding the key is very easy. You just need to find ambe frame that repeats the most times(it will be the silence frame) and xor it with F8 01 A9 9F 8C E0. Output will be your key. Unfortunately ambe frames in dsdcc are stored in some wired way. It is like 2 bits of ambe in 1 byte. So i don't know how to implement decryption to dsdcc.

Ok. So I've investigated what you said, I still can't discover the key. From playing the raw audio, could you direct me from there with instructions? What am I looking for, how do I identify a silent frame... and then could you explain the conversion to XOR. Thank you.

jurek4321 commented 2 years ago

image When you run LouisErigHerve version of dsd with argument -DMRPrintAmbeVoiceSampleHex you can see ambe frames. On the image you can see that "15 0B 44 D5 61 AA" is repeating, so it is probably a silence frame. When you xor it with "F8 01 A9 9F 8C E0" you get "ED 0A ED 4A ED 4A" and "ED 4A" is key id 70.

iScottybotty commented 2 years ago

Genius. If your in the UK, or ever visit the UK, let me know. I’ll buy you drink. Thank you so much and to you, and everyone else reading this, a very Happy New Year. 👍

Scott.

On 1 Jan 2022, at 14:18, jurek4321 @.***> wrote:



When you run LouisErigHerve version of dsd with argument -DMRPrintAmbeVoiceSampleHex you can see ambe frames. On the image you can see that "15 0B 44 D5 61 AA" is repeating, so it is probably a silence frame. When you xor it with "F8 01 A9 9F 8C E0" you get "ED 0A ED 4A ED 4A" and "ED 4A" is key id 70.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

romanremus commented 2 years ago

hello everyone ..... is there any possibility to compile in linus and be able to use it in windows dsdcc ??? thanks

ahlawy81 commented 2 years ago

does it work with simplex systems ?

romanremus commented 2 years ago

it doesn't decrypt in any way ..... and I don't know how to call it the program ... here I mean input and output ..... Thanks

ahlawy81 commented 2 years ago

It's bp Dmr

On Mon, 14 Feb 2022, 11:24 am romanremus, @.***> wrote:

it doesn't decrypt in any way ..... and I don't know how to call it the program ... here I mean input and output ..... Thanks

— Reply to this email directly, view it on GitHub https://github.com/f4exb/dsdcc/issues/43#issuecomment-1038835120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTXEQP6KNBJIHWUZFCRKQ3U3DBRDANCNFSM5EJCD73A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

ahlawy81 commented 2 years ago

But simplex

On Mon, 14 Feb 2022, 11:57 am midoedo, @.***> wrote:

It's bp Dmr

On Mon, 14 Feb 2022, 11:24 am romanremus, @.***> wrote:

it doesn't decrypt in any way ..... and I don't know how to call it the program ... here I mean input and output ..... Thanks

— Reply to this email directly, view it on GitHub https://github.com/f4exb/dsdcc/issues/43#issuecomment-1038835120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTXEQP6KNBJIHWUZFCRKQ3U3DBRDANCNFSM5EJCD73A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

romanremus commented 2 years ago

I tried to compile it in cygwin and use it in windows but it doesn't work with those input and output settings ..... or can't it be used as much as in linux? Thanks

ahlawy81 commented 2 years ago

You can test directly on your software

On Mon, 14 Feb 2022, 12:46 pm romanremus, @.***> wrote:

I tried to compile it in cygwin and use it in windows but it doesn't work with those input and output settings ..... or can't it be used as much as in linux? Thanks

— Reply to this email directly, view it on GitHub https://github.com/f4exb/dsdcc/issues/43#issuecomment-1038909652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTXEQKLZGJWXABGMLJCQ43U3DJWDANCNFSM5EJCD73A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

ahlawy81 commented 2 years ago

Download it And play it with vlc and change the output to vb audio cable so you can u play it on your software like in dsd

On Mon, 14 Feb 2022, 1:01 pm midoedo, @.***> wrote:

You can test directly on your software

On Mon, 14 Feb 2022, 12:46 pm romanremus, @.***> wrote:

I tried to compile it in cygwin and use it in windows but it doesn't work with those input and output settings ..... or can't it be used as much as in linux? Thanks

— Reply to this email directly, view it on GitHub https://github.com/f4exb/dsdcc/issues/43#issuecomment-1038909652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTXEQKLZGJWXABGMLJCQ43U3DJWDANCNFSM5EJCD73A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

romanremus commented 2 years ago

I didn't manage to compile the program, you don't have the compiled file to try, it can go to me too

ahlawy81 commented 2 years ago

do you play it on cygwin or cmd

romanremus commented 2 years ago

hello, I built it in cygwin and ran it in cmd ...... can this be a mistake? thank you very much .... is it running in cygwin?

ahlawy81 commented 2 years ago

Yes, it is.

On Sat, 19 Feb 2022, 8:47 am romanremus, @.***> wrote:

hello, I built it in cygwin and ran it in cmd ...... can this be a mistake? thank you very much .... is it running in cygwin?

— Reply to this email directly, view it on GitHub https://github.com/f4exb/dsdcc/issues/43#issuecomment-1045897098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTXEQLY7EBB4DHUNDDMOUDU344HNANCNFSM5EJCD73A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

romanremus commented 2 years ago

can't open dsdcc in input and output Pe vineri, 4 martie 2022, 22:58:32 EET, ahlawy81 @.***> a scris:

Yes, it is.

On Sat, 19 Feb 2022, 8:47 am romanremus, @.***> wrote:

hello, I built it in cygwin and ran it in cmd ...... can this be a mistake? thank you very much .... is it running in cygwin?

— Reply to this email directly, view it on GitHub https://github.com/f4exb/dsdcc/issues/43#issuecomment-1045897098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTXEQLY7EBB4DHUNDDMOUDU344HNANCNFSM5EJCD73A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

ahlawy81 commented 2 years ago

image When you run LouisErigHerve version of dsd with argument -DMRPrintAmbeVoiceSampleHex you can see ambe frames. On the image you can see that "15 0B 44 D5 61 AA" is repeating, so it is probably a silence frame. When you xor it with "F8 01 A9 9F 8C E0" you get "ED 0A ED 4A ED 4A" and "ED 4A" is key id 70.

How about ep /rc4 can we at least know the initialization vector or anything from the signal?

github-actions[bot] commented 2 years ago

This issue is going to be closed due to inactivity

ehsansis0 commented 1 year ago

image When you run LouisErigHerve version of dsd with argument -DMRPrintAmbeVoiceSampleHex you can see ambe frames. On the image you can see that "15 0B 44 D5 61 AA" is repeating, so it is probably a silence frame. When you xor it with "F8 01 A9 9F 8C E0" you get "ED 0A ED 4A ED 4A" and "ED 4A" is key id 70.

Hello I have been working on decrypting the base cipher for a long time. If I'm not mistaken, this file is for Hytera radios and is encrypted in basic mode. Can anyone help me find the key? https://drive.google.com/file/d/19VEyUvuHD-hrQ8sBOIBUnXviPmzNV7SI/view?usp=sharing https://drive.google.com/file/d/1G4g5ljYHgKUlUv3zQtIkc34QKjQaXKVs/view?usp=sharing

ehsansis0 commented 1 year ago

F8 01 A9 9F 8C E0

could you please describe about "F8 01 A9 9F 8C E0". which part of the data is this? is it's extracted from your sanded dmr wave file?

stanag63 commented 1 year ago

Help, when I run the LouisErigHerve v1.8.3 version of dsd what arguments should I put in NXDN, which can see both frames

tomcass240 commented 2 months ago

F8 01 A9 9F 8C E0

could you please describe about "F8 01 A9 9F 8C E0". which part of the data is this? is it's extracted from your sanded dmr wave file?

The F8 01 A9 9F 8C E0 is the AMBE silence frame without encryption. You want to take the xor'ed silence frame, which is obvious because it repeats the most times, and xor it with the silence frame to recover the key.