Author Topic: Sniffing the Rigol's internal I2C bus  (Read 1839812 times)

0 Members and 1 Guest are viewing this topic.

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Sniffing the Rigol's internal I2C bus
« Reply #1775 on: December 09, 2013, 04:54:06 pm »
People with A-models were reporting that keygen doesn't work with the new firmware, but g***! (with a non-A model) reported that it worked for him.

And now I know why - Rigol didn't bother to change the public key either. I found the old public key in the new firmware (encoded by the same bit shuffling algorithm I described earlier). The sequence of encoded bytes is as follows: 97 58 B9 DE 24 C5 11 10, which obviously translates to "8445B2BE29E5C7". I believe Rigol didn't change the keys to maintain backward compatibility with previously sold license codes.

So why isn't the keygen working, then?

Thank you for jumping in and working on this, by the way.  I love it when a community comes together.
 

Offline marmad

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
Re: Sniffing the Rigol's internal I2C bus
« Reply #1776 on: December 09, 2013, 04:54:25 pm »
And now I know why - Rigol didn't bother to change the public key either. I found the old public key in the new firmware (encoded by the same bit shuffling algorithm I described earlier). The sequence of encoded bytes is as follows: 97 58 B9 DE 24 C5 11 10, which obviously translates to "8445B2BE29E5C7". I believe Rigol didn't change the keys to maintain backward compatibility with previously sold license codes.

So the keygen only has to be modified to work with the changed A-model "DS2Dxxxxxxxxx" serial numbers?

Edit: Ahh... I just noticed you edited your post to reflect the possibility of two public keys.

It seems to me that it's likely the presence of a "D" serial number (or jumpers/pull-ups on the PCB) involves using a different public key/technique - and also the availability of the CAN option and 50 Ohm input (which non-A model Hardware v.2 owners are unable to access).
« Last Edit: December 09, 2013, 05:07:43 pm by marmad »
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2185
Re: Sniffing the Rigol's internal I2C bus
« Reply #1777 on: December 09, 2013, 04:58:50 pm »
There has to be some other cause.  Could they have limited the seed (which has been a wide open int32) to a specific value?
 

Offline zombie28

  • Regular Contributor
  • *
  • Posts: 69
Re: Sniffing the Rigol's internal I2C bus
« Reply #1778 on: December 09, 2013, 04:59:40 pm »
So why isn't the keygen working, then?

They may use two separate keys or different hashing/encoding algorithms for 'non-A' and 'A' license codes.
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #1779 on: December 09, 2013, 05:54:26 pm »
They may use two separate keys or different hashing/encoding algorithms for 'non-A' and 'A' license codes.

that explains why the verification routines look a bit different ... i wish the stupid ida signatures would work better, kinda sick of going over the miracl lib again ;)
given the possibility to patch firmware, it probably easier to override it now, then to update the keygen (if the private key can be found this time)


Code: [Select]
SDRAM:EE7440 ECC_8445B2BE29E5C7:   dd 0xDEB95897           # DATA XREF: sub_71C7E+24?
SDRAM:EE7444                 dd 0x1011C524
« Last Edit: December 09, 2013, 06:12:58 pm by cybernet »
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline olsenn

  • Frequent Contributor
  • **
  • Posts: 993
Re: Sniffing the Rigol's internal I2C bus
« Reply #1780 on: December 09, 2013, 06:16:03 pm »
I've read several reports that 300MHz has been enabled in the DS2000 (not 'A') scopes, but that it wasn't actually providing 300MHz? Can anybody confirm or deny this? Also, can the lo-z input be toggled from the menu now?
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Sniffing the Rigol's internal I2C bus
« Reply #1781 on: December 09, 2013, 06:44:00 pm »
I've read several reports that 300MHz has been enabled in the DS2000 (not 'A') scopes, but that it wasn't actually providing 300MHz? Can anybody confirm or deny this? Also, can the lo-z input be toggled from the menu now?

Enabled, yes.  Actually 300MHz?  I don't know.  The 50ohm impedance is present only on the A models and I believe this is a change in the actual hardware that is only present on the A models.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Sniffing the Rigol's internal I2C bus
« Reply #1782 on: December 09, 2013, 06:49:53 pm »
I've read several reports that 300MHz has been enabled in the DS2000 (not 'A') scopes, but that it wasn't actually providing 300MHz? Can anybody confirm or deny this? Also, can the lo-z input be toggled from the menu now?

If you look back a few weeks in this thread you'll see that actual 300MHz bandwidth has been confirmed by several posters by both rise time measurements and -3dB frequency testing.

Personally, I don't have the equipment to confirm the actual bandwidth on mine but I can confirm that it is >200MHz.
 

Offline marmad

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
Re: Sniffing the Rigol's internal I2C bus
« Reply #1783 on: December 09, 2013, 06:54:36 pm »
The 50ohm impedance is present only on the A models and I believe this is a change in the actual hardware that is only present on the A models.

I believe the DS2000A is HW identical to the DS2000 HW revision 2.0  - except perhaps for some jumpers or setting pull-up resistors. I think Rigol designed the new PCBs to be able to be used for filling existing DS2000 orders - while starting up production of the new A and A-S models.

I think the ONLY reason 50 Ohm impedance (and CAN trigger/decoding) is not available on non-A HW revision 2.0 models is product differentiation.
« Last Edit: December 09, 2013, 07:00:53 pm by marmad »
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Sniffing the Rigol's internal I2C bus
« Reply #1784 on: December 09, 2013, 07:08:28 pm »
I believe the DS2000A is HW identical to the DS2000 HW revision 2.0  - except perhaps for some jumpers or setting pull-up resistors.

Are you basing that on anything known?  I mean no offense.  You've been saying this for a while, so clearly you're sure.  I've not seen any proof (enable A features on hardware sold as non-A) yet.

I think Rigol designed the new PCBs to be able to be used for filling existing DS2000 orders - while starting up production of the new A and A-S models.

Backward compatibility on new hardware does not necessitate forward compatibility on old hardware.  You're probably right, and I think we'll eventually discover a serial number "line in the sand" or board revision where the inclusion of the 50-ohm option starts.
 

Offline staze

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: us
  • I _might_ have a problem...
    • Everybody Staze...
Re: Sniffing the Rigol's internal I2C bus
« Reply #1785 on: December 09, 2013, 07:10:31 pm »
[
I think Rigol designed the new PCBs to be able to be used for filling existing DS2000 orders - while starting up production of the new A and A-S models.

Backward compatibility on new hardware does not necessitate forward compatibility on old hardware.  You're probably right, and I think we'll eventually discover a serial number "line in the sand" or board revision where the inclusion of the 50-ohm option starts.

Yes, hardware version 2. It HAS the 50ohm terminator... and can be switched on with SPI. We just need to figure out how to enable it in the GUI.

I still have a feeling this is nothing more than the firmware checking the serial number, and enabling options based on that. It's the simplest way programmatically, and it would seem Rigol is all about simple.
“Give a man an answer, he’ll keep his job for a day. Teach a man to Google, and he’ll be employed for a lifetime”
 

Offline NikWing

  • Regular Contributor
  • *
  • Posts: 139
  • Country: de
Re: Sniffing the Rigol's internal I2C bus
« Reply #1786 on: December 09, 2013, 07:18:50 pm »
but the S-version has extra hardware for the waveform gen I guess? (beside the extra BNC connectors on the back side)
 

Offline staze

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: us
  • I _might_ have a problem...
    • Everybody Staze...
Re: Sniffing the Rigol's internal I2C bus
« Reply #1787 on: December 09, 2013, 07:19:17 pm »
but the S-version has extra hardware for the waveform gen I guess? (beside the extra BNC connectors on the back side)

Correct.
“Give a man an answer, he’ll keep his job for a day. Teach a man to Google, and he’ll be employed for a lifetime”
 

Offline marmad

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
Re: Sniffing the Rigol's internal I2C bus
« Reply #1788 on: December 09, 2013, 07:25:54 pm »
Are you basing that on anything known?  I mean no offense.  You've been saying this for a while, so clearly you're sure.  I've not seen any proof (enable A features on hardware sold as non-A) yet.
Well, I always write 'I believe' or 'I think' - so I'm not absolutely sure. But I'm basing it on posted photos of HW revision 2.0 boards (showing the areas for AWG module add-on) - as well as other reliable information.

Here is a photo of the input stage of DS2000 HW revision 2.0 and 1.0 compared - with the 50 Ohm input resistor and extra relay clearly visible on 2.0 board.
« Last Edit: December 09, 2013, 07:34:18 pm by marmad »
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Sniffing the Rigol's internal I2C bus
« Reply #1789 on: December 09, 2013, 07:37:37 pm »
I still have a feeling this is nothing more than the firmware checking the serial number, and enabling options based on that. It's the simplest way programmatically, and it would seem Rigol is all about simple.

It is equally simple to check the version of a Rigol ASIC or the firmware revision of some other chip, and those things won't be nearly as easy to change post-manufacture.  Sure, you can change how the firmware does the checking, or change the value the firmware looks for, but if the ASIC itself won't enable 50 ohms, changing the firmware won't do much.

edit: i'm being a debbie downer, sorry.
« Last Edit: December 09, 2013, 07:42:34 pm by Rigby »
 

Offline staze

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: us
  • I _might_ have a problem...
    • Everybody Staze...
Re: Sniffing the Rigol's internal I2C bus
« Reply #1790 on: December 09, 2013, 07:50:08 pm »
I still have a feeling this is nothing more than the firmware checking the serial number, and enabling options based on that. It's the simplest way programmatically, and it would seem Rigol is all about simple.

It is equally simple to check the version of a Rigol ASIC or the firmware revision of some other chip, and those things won't be nearly as easy to change post-manufacture.  Sure, you can change how the firmware does the checking, or change the value the firmware looks for, but if the ASIC itself won't enable 50 ohms, changing the firmware won't do much.

edit: i'm being a debbie downer, sorry.

Yes, but as I mentioned, you can enable 50ohms through SPI... so clearly that's just a GUI thing. =/

But yes, it could be checking something else. I'm just being a Ollie Optimist. =P
“Give a man an answer, he’ll keep his job for a day. Teach a man to Google, and he’ll be employed for a lifetime”
 

Offline WVL_KsZeN

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nl
Re: Sniffing the Rigol's internal I2C bus
« Reply #1791 on: December 09, 2013, 09:53:20 pm »
Here is another datapoint from a ds2072 after hacking it

"DS2202"
DS2a153602xxx
softw 00.01.01.00.02
hw 1.0.1.0.0
spu 03.01.05
wpu 00.06.05
ccu 12.29.00
mc 00.05

stupid of me, I didnt check the hw version before 'upgrading' to DSAZ with rigen v2.0b1. Seeing the other DS2072's reported with HW 2.0 and considering my serial, i think it's weird that mine is reporting HW1.0. I remember reading somewhere that DS2202 will not report the correct HW version, but I cannot find it back again..

Any clues?
 

Offline AndersAnd

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: dk
Re: Sniffing the Rigol's internal I2C bus
« Reply #1792 on: December 09, 2013, 10:05:24 pm »
Any clues?
Don't turn it on, take it apart, as Dave's motto is. Then you can probably see the HW version on the PCB.
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #1793 on: December 09, 2013, 10:26:37 pm »
fully official CAN and 300M Bandwidth on DS2000 (non A) ;-))))) *ole*
will post right option codes in a minute ...
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline marmad

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
Re: Sniffing the Rigol's internal I2C bus
« Reply #1794 on: December 09, 2013, 10:28:59 pm »
fully official CAN and 300M Bandwidth on DS2000 (non A) ;-))))) *ole*
will post right option codes in a minute ...

Wow... fast  ;D
 

Offline AndersAnd

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: dk
Re: Sniffing the Rigol's internal I2C bus
« Reply #1795 on: December 09, 2013, 10:31:01 pm »
fully official CAN and 300M Bandwidth on DS2000 (non A) ;-))))) *ole*
will post right option codes in a minute ...
Great work as always, so Christmas came early this year  :-+
Is the 50 ohm option enabled too for those with a non A model with HW ver. 2 with 50 ohm input already populated?
« Last Edit: December 09, 2013, 10:32:58 pm by AndersAnd »
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #1796 on: December 09, 2013, 10:34:15 pm »
for FW 00.02.01.00.03 - on a DS2000 (NON A version only !)

Code: [Select]
0x1C080    - DSEA - PROTOCOL ANALYSIS - CAN
0x1C040    - DSCA - BANDWIDTH - 300M Bandwidth (takes a reboot to show up in System Info)
0x1C020    - DSBA - (installs option, but i dont see it ?)
0x1C010    - DSAS - BANDWIDTH - 200M Bandwidth
<known codes still work - see elsewhere>

enable 0x1C0E7 -> all but 100/200M bandwidth-> DSHH

i wonder if 0x1C020 is the 50Ohm option, which my hw probably doesnt support.

UPDATE: despite being DS2302 model, bw limit option is only NONE,20M,100M - somebody better confirm that NONE = 300M ;-)
« Last Edit: December 09, 2013, 10:51:46 pm by cybernet »
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #1797 on: December 09, 2013, 10:42:09 pm »
And now I know why - Rigol didn't bother to change the public key either. I found the old public key in the new firmware (encoded by the same bit shuffling algorithm I described earlier). The sequence of encoded bytes is as follows: 97 58 B9 DE 24 C5 11 10, which obviously translates to "8445B2BE29E5C7". I believe Rigol didn't change the keys to maintain backward compatibility with previously sold license codes. Alternatively they may use two separate keys for 'non-A' and 'A' license codes.

they use the same curve parameter, but another point on the curve for the DS2000A - i will see if i can find the new point - if not, patch it so it reverts to the known parameters.
a modified gel will also tell if they use signed code now or not ... thanks for finding the obsfuscation - with that info it wasnt too hard.

___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline nack

  • Regular Contributor
  • *
  • Posts: 75
  • Country: nl
Re: Sniffing the Rigol's internal I2C bus
« Reply #1798 on: December 09, 2013, 10:48:10 pm »
Wow cybernet, you keep blowing my mind with your knowledge and firmware modification skills  :clap:
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2185
Re: Sniffing the Rigol's internal I2C bus
« Reply #1799 on: December 09, 2013, 10:49:18 pm »
So are you loading these codes with 00.01.01.00.02 and then upgrading to 00.02.01.00.03 to utilize them?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf