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

0 Members and 2 Guests are viewing this topic.

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: Sniffing the Rigol's internal I2C bus
« Reply #500 on: July 21, 2013, 08:46:00 pm »

DONT USE BELOW, as activates 2102 and also 2202:

2   on   on   ==   ==   ==
3   on   on   ==   ==   on
4   on   on   ==   on   ==
5   on   on   ==   on   on
6   on   on   on   ==   ==
7   on   on   on   ==   on
8   on   on   on   on   ==
9   on   on   on   on   on


Great work! I used DSA9 as cybernet recommended and it works fine.

Why do you still recommend not to use DSA9?

As you can see from your paste, It installs 100M and 200M options, which isn't necessary. 200M supersedes 100M anyway. It likely won't bring any troubles but there's no need for it. DSAZ is equivalent.
 

studio25

  • Guest
Re: Sniffing the Rigol's internal I2C bus
« Reply #501 on: July 21, 2013, 09:30:27 pm »
Great work!

And here's a version without brute force.

Code: [Select]

/*
 ** rigol ds2000 keygen / cybernet & the-eevblog-users
 **
 ** to compile this you need MIRACL from [url]https://github.com/CertiVox/MIRACL[/url]
 ** download the master.zip into a new folder and run 'unzip -j -aa -L master.zip'
 ** then run 'bash linux' to build the miracle.a library
 **
 ** BUILD WITH:
 **
 ** gcc rikey.c -I../MIRACL ../MIRACL/miracl.a -o rikey
 **
 ** adapt -I and path to miracl.a to your environment
 **
 ** more info: https://www.eevblog.com/forum/testgear/sniffing-the-rigol's-internal-i2c-bus/
 **
 ** then fetch private key from EEV Blog and put into "private_key[]=" below, do not prefix with 0x
 ** supply your serial and wanted options, and enjoy !
 **
 **
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include "miracl.h"

#define RIGOL_DS2000

// START OF SETTINGS FOR ECC
#ifdef RIGOL_DS2000
unsigned char private_key[]="8...";   // <- RILOL FILL ME (no 0x prefix !)
unsigned char prime1[]="AEBF94CEE3E707";
unsigned char prime2[]="AEBF94D5C6AA71";
unsigned char curve_a[]="2982";
unsigned char curve_b[]="3408";
unsigned char point1[]="7A3E808599A525";
unsigned char point2[]="28BE7FAFD2A052";
#endif
// END OF SETTINGS FOR ECC

unsigned char vb[]={'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', '8', '9'};

void show_help(void)
{
  printf("./rikey <DSA2XXXXXXXXX> <OPTS>\n\n");
  printf("<DSA2XXXXXXXXX> -  serial number of device\n");
  printf("<OPTS> - \n");
  printf("\t\tDSA? for permanent options\n");
  printf("\t\tVSA? for temporary options\n");
  printf("\n\n");
}
/*
** take serial and options make sha1 hash out of it
 */
static void hashing(unsigned char *opt_str,big hash)
{ /* compute hash function */
  char *p;
  char h[20];
  int ch;
  sha sh;
  shs_init(&sh);
  p=opt_str;
  while(*p)
  {
    shs_process(&sh,*p);
    p++;
  }
  shs_hash(&sh,h);
  bytes_to_big(20,h,hash);
}
/*
** sign the secret message (serial + opts) with the private key
 */
int ecssign(unsigned char *serial, unsigned char *opt, unsigned char *lic1, unsigned char *lic2)
{
  FILE *fp;
  char ifname[50],ofname[50];
  big a,b,p,q,x,y,d,r,s,k,hash;
  epoint *g;
  long seed;
  int bits;
  miracl *mip;
  unsigned char *serial_options;

  /* get public data */
  mip=mirsys(0x320, 0x10);   /* Use Hex internally */
  mip->IOBASE=16;
  a=mirvar(0);
  b=mirvar(0);
  p=mirvar(0);
  q=mirvar(0);
  x=mirvar(0);
  y=mirvar(0);
  d=mirvar(0);
  r=mirvar(0);
  s=mirvar(0);
  k=mirvar(0);
  hash=mirvar(0);

  instr(p,prime1);     /* modulus        */
  instr(a,curve_a);     /* curve parameters */
  instr(b,curve_b);
  instr(q,prime2);     /* order of (x,y) */
  instr(x,point1);     /* (x,y) point on curve of order q */
  instr(y,point2);

  /* randomise */
  seed=1;
  irand(seed);

  ecurve_init(a,b,p,MR_PROJECTIVE);  /* initialise curve */
  g=epoint_init();

  if (!epoint_set(x,y,0,g)) /* initialise point of order q */
  {
    printf("1. Problem - point (x,y) is not on the curve\n");
    exit(0);
  }

  /* calculate r - this can be done offline,
   and hence amortized to almost nothing   */
  bigrand(q,k);
  ecurve_mult(k,g,g);      /* see ebrick.c for method to speed this up */
  epoint_get(g,r,r);
  divide(r,q,q);

  /* get private key of signer */
  instr(d, private_key);

  /* calculate message digest */
  serial_options=calloc(128,1);
  strcpy(serial_options, serial);
  strcat(serial_options, opt);
  hashing(serial_options,hash);

  /* calculate s */
  xgcd(k,q,k,k,k);
  mad(d,r,hash,q,q,s);
  mad(s,k,k,q,q,s);

  cotstr(r,lic1);
  cotstr(s,lic2);
  return 0;
}


/*
** convert string to uppercase chars
 */
unsigned char *strtoupper(unsigned char *str)
{
  unsigned char *newstr, *p;
  p = newstr = (unsigned char*) strdup((char*)str);
  while((*p++=toupper(*p)));
  return newstr;
}

unsigned char * find_match5(unsigned char *code5)
{
  unsigned long long b=0;
  unsigned char *out;
  int i=0;
  out=calloc(5,1);

  // hex2dez
  while (code5[i] != '\0') {
    if (code5[i]>='1' && code5[i]<='9')
      b=b*16+code5[i]-'0';
    else if (code5[i]>='A' && code5[i]<='F')
      b=b*16+code5[i]-'A'+10;
    else if (code5[i]>='a' && code5[i]<='f')
      b=b*16+code5[i]-'a'+10;
    i++;
  }   

  for (i=3;;i--) {
    out[i]=vb[b & 0x1F];
    if (i==0) break;
    b>>=5;
  }
  out[4]='\0';

  return(out);
}

int main(int argc, char *argv[0])
{
  unsigned char *options,*lic1_code, *lic2_code, *lic_all;
  unsigned char *out,*chunk,*temp,*final;
  unsigned char *lic1_key, *lic2_key;
  unsigned char *serial;
  int            v,i=0;

  if (strlen(private_key)<14)
  {
    printf("\n\n");
    printf("set the private_key variable on top of this file\n");
    printf("you can find it here: https://www.eevblog.com/forum/testgear/sniffing-the-rigol's-internal-i2c-bus/msg264690/#msg264690\n");
    printf("\n\n");
    exit(-1);
  }

  if (argc != 3)
  {
    show_help();
    exit(-1);
  }
  serial=strtoupper((unsigned char*)argv[1]);
  options=strtoupper((unsigned char*)argv[2]);
  if (strlen(serial)<13)
  {
    printf("\nINVALID SERIAL LENGTH\n");
    show_help();
    exit(-1);
  }
  if (strlen(options)!=4)
  {
    printf("\nINVALID OPTIONS LENGTH\n");
    show_help();
    exit(-1);
  }
  printf("serial:           %s\n", serial);
  printf("options:          %s\n", options);
  /* sign the message */
  lic1_code=calloc(64,1);
  lic2_code=calloc(64,1);
  ecssign(serial,options,lic1_code, lic2_code);
  printf("lic1-code:        %s\n", lic1_code);
  printf("lic2-code:        %s\n", lic2_code);

  lic_all=calloc(128,1);
  temp=calloc(128,1);
  chunk=calloc(6,1);
  final=calloc(128,1);
  lic1_key=calloc(20,1);
  lic2_key=calloc(20,1);
  strcpy(lic_all, lic1_code);
  strcat(lic_all, "0");
  strcat(lic_all, lic2_code);
  printf("target-code:      %s\n", lic_all);

  // split in 5 byte groups
  // run for lic1_code
  strcat(lic1_code,"0");
  while(i<strlen(lic1_code))
  {
    memcpy(chunk,lic1_code+i,5);
    out=find_match5(chunk);
    if (out)
    {
      strcat(temp, out);
    }
    i=i+5;
  }
  strcpy(lic1_key, temp);

  // run for lic2_code
  strcpy(temp,"");
  i=0;
  while(i<strlen(lic2_code))
  {
    memcpy(chunk,lic2_code+i,5);
    if (strlen(chunk)<5)
    {
      for(v=0;v<5-strlen(chunk);v++)
        strcat(chunk,"0");
    }
    out=find_match5(chunk);
    if (out)
    {
      strcat(temp, out);
    }
    i=i+5;
  }
  strcpy(lic2_key, temp);
  strcpy(temp, lic1_key);
  strcat(temp, lic2_key);
  // now add the options
  memcpy(final, temp, 1);
  final[1]=options[0];
  memcpy(final+2, temp+1,7);
  final[9]=options[1];
  memcpy(final+10, temp+8,7);
  final[17]=options[2];
  memcpy(final+18, temp+15,7);
  final[25]=options[3];
  memcpy(final+26, temp+22,4);
  printf("----------------------------------------------------\n");
  printf("your-license-key: ");
  for(i=0;i<strlen(final);i++)
  {
    if (i%7==0 && i>0) printf("-");
    printf("%c", final[i]);
  }
  printf("\n");
  printf("----------------------------------------------------\n");
}

« Last Edit: July 21, 2013, 10:50:33 pm by studio25 »
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #502 on: July 21, 2013, 09:31:51 pm »
because some have asked for it, and it might prove valueable to other equipment,
here are the basic steps to perform something like this.

1. find a good forum on the internet with clever ppl -> that one here is great  :-+
2. see what others have done, but dont keep that direction (e.g. FRAM, great start but to cumbersome for most)
3. if a device is firmware updateable you own 50% already
4. if u can tinker with a device while its running (memory, cpu, breakpoints, watchpoints) you own another 49% (->JTAG !)
5. study the datasheets, and esp. the engineering notes carefully (know your enemy) - companies rarely dev their own stuff if they have something proven premade available.
    in rigols case thats ethernet, webserver, usb, filesystem thats 100% AD VSDK sourcekit - its damn easy to spot this functions and link em to c files/headers.
6. check if there are copyprotection or "lockbox" features as AD calls it - that could prove a showstopper - but luckly not a single memory reference to those registers
    from that point on i was 100% sure its doable.
7. i choose the path to reverse the crypto stuff instead of googling some obvious numbers, because i thought it was fun to do (and it was, learned a lot - e.g. the AD compiler produces crap code)
8. the real kickoff was when some guy posted that one of the routines is a sha1 hash function (it uses distinct values to initialise), made sense, pasted it into google,
    and what came back as first hit was the MIRACL toolkit, and it was damn f*ck me i've seen that structures before  ->  :-DD
9. i could match the subs almost 1:1 by just looking at them at that point - so this made it clear that they use ECC - which was a bummer because ECC is rather secure if implemented correctly.
10. the A/B curve values looked *tiny* and the 56bits of keys .. are well below standard ... so there was a slim chance that it would lead somebody with more math foo to a private key.
     i played several hours with ecssign,ecsgen, etc swapped keys and primes here and there ,but nothing, maybe i had it but missed it - anyhow a email and pm told me to try another key (the right one)
     and again i could not make it work (i had the wrong Q value as i used the one from ROM, not the one from ./schoof) - that cleared with a look into the forum where ppl where able to get riglol to verify the
     key. so a good chunk of kudos goes to the key finders (there are some ppl who mailed them ! :-+)

im pretty damn sure that the entire lineup of rigol as long as its BFIN based, shares a good deal of common code - so apply the same principles to any other device and u will have success sooner or later.

i plan to get a DG4062 next ;-)
« Last Edit: July 21, 2013, 09:36:37 pm by cybernet »
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 
The following users thanked this post: Zucca

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #503 on: July 21, 2013, 09:32:53 pm »
Great work!

cool stuff ! but now its to quick ;P
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: Sniffing the Rigol's internal I2C bus
« Reply #504 on: July 21, 2013, 09:41:22 pm »
Great work!

And here's a version without brute force.

--snip--
thanks, saved me some work. put the modified function and line in main() in my modified version, works fast like my php version did. :)

Quote from: cybernet
i plan to get a DG4062 next ;-)
I was thinking of doing the same thing...Rigol might have another sale =)
 

Offline synapsis

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
    • Blackcow
Re: Sniffing the Rigol's internal I2C bus
« Reply #505 on: July 21, 2013, 09:54:56 pm »

i plan to get a DG4062 next ;-)

Already ordered my DG4062. ;)

I'm working on a Windows GUI version of your code (gotta give back to the community). I have the miracl lib built. I'm working on the UI, then I'll port your latest code in. If it's not *too* difficult, I'll try and put a button in to send the code over USB to the scope.
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #506 on: July 21, 2013, 09:57:25 pm »
I'm working on a Windows GUI version of your code (gotta give back to the community). I have the miracl lib built. I'm working on the UI, then I'll port your latest code in. If it's not *too* difficult, I'll try and put a button in to send the code over USB to the scope.
:-+

uninstall would be cool too i guess (if there is a way to enumerate installed stuff via usb ?)
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2183
Re: Sniffing the Rigol's internal I2C bus
« Reply #507 on: July 21, 2013, 10:26:07 pm »
I still see one issue in that some people's S/N is changing.  This could be caused by either setting both the 100M and 200M flag (DSA"9") instead of DSAZ, or caused by trying the 100M and/or 200M flags on older firmware (<FW02 "00.01.01.00.02").  I recommend upgrading to this firmware version before trying keys and even then sticking with DSAZ and not using DSA9.  For the people who have had their S/N changed, I don't know if an uninstall using the SCPI command will fix it or not.  Hopefully someone will come up with a hack to fix or set their S/N at some point.
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: Sniffing the Rigol's internal I2C bus
« Reply #508 on: July 21, 2013, 10:27:35 pm »
I have the web generator done, just need somewhere to host it.

Quote from: alank2
I still see one issue in that some people's S/N is changing.
I just checked my FW, it is 0.0.1.0.5 old firmware, even though the unit was made in April of 2013. Loaded 0.1.1.0.2, doesn't change the S/N. However, I did lose 2ns timebase and can't see installed options anymore. I can install an option though.

Right now I am setting up the software so I can uninstall the key and see what happens. Honestly I am not too concerned what the serial shows - if there really is a HW problem, Rigol can't (and really probably wouldn't) care about any software crap on it.
« Last Edit: July 21, 2013, 11:10:13 pm by true »
 

Offline Maalobs

  • Contributor
  • Posts: 16
  • Country: se
Re: Sniffing the Rigol's internal I2C bus
« Reply #509 on: July 21, 2013, 10:42:26 pm »
Truly incredible work! :-+
I can only say a big thank you to everyone involved!

I built the miracl.a lib and the rikey app with the priv key inserted, and ran it on my DS2102's serial with DSAZ as option.
It curiously only produced two characters in the fourth (final) character-group, and it's not accepted by the scope since it lacks the required number of characters.
But using DSAR instead for a maxed out DS2102, did produce a correct license key, and the options-list now shows "Offcial Version" [sic] on every line.

I did this while on 00.00.01.00.05 if it matters.
Afterwards I upgraded to 00.01.01.00.02, and the options-list still shows "Offcial Version" on everything.

My DS2102 serial is 13 characters long btw, and the serial was not changed by entering the DSAR license.
 

Offline zibadun

  • Regular Contributor
  • *
  • Posts: 112
  • Country: us
Re: Sniffing the Rigol's internal I2C bus
« Reply #510 on: July 21, 2013, 10:46:09 pm »
I have the web generator done, just need somewhere to host it.

how long before some places start re-badging the scopes and selling them as upgraded models, or selling the keys at a "discount"? 
call me paranoid  :o
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #511 on: July 21, 2013, 10:52:29 pm »
I have the web generator done, just need somewhere to host it.

how long before some places start re-badging the scopes and selling them as upgraded models, or selling the keys at a "discount"? 
call me paranoid  :o

if they have a DS2202 sticker for me, i take one ;-)  :-DD
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline bluesmoke

  • Contributor
  • Posts: 24
  • Country: us
Re: Sniffing the Rigol's internal I2C bus
« Reply #512 on: July 21, 2013, 11:43:44 pm »
It looks like doing this is not without risk!
I also tried the DSAZ key as the DSA9 didn't give a complete code. Scope needed a second cold reboot to start and serial was set to 1 like true and cybernet. I was on firmware 5 so I thought I'd upgrade. If I install 2 or 3 (even by the poweron/help method) the scope hangs and will not boot. Going back to 5 gets it going again. Tried to uninstall the code but it looks like it is permanent....

Any way to reset a serial?

Oh well...C'est la vie!
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #513 on: July 21, 2013, 11:52:54 pm »
could be that DSAZ/9 cause something to be overwritten in FRAM when on FW05 - i had your issue with FW02, then downgraded to FW05 (released serial is #1) - then applied DSAH code, then back up to FW02 - scope hang *once* after the FW02 firmware flash (right most DOT filled on boot screen iirc), but powercycled and it was ok started several times since then no issues - and serial #1 i dont care about it. i dont plan to touch FRAM, but you could check for your old serial in there, its probably there, has to be ;-) - i *think* there might be an engineering menu hidden somewhere, but the serial port stuff which uses the keypad was to annoying for me to go over. maybe somebody else figures that one out ;-)
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 

Offline bluesmoke

  • Contributor
  • Posts: 24
  • Country: us
Re: Sniffing the Rigol's internal I2C bus
« Reply #514 on: July 22, 2013, 12:00:51 am »
Thanks Cybernet.... I'll try the DSAH code and see if I can get back to 2 or 3

UPDATE:  Tried a bunch of keys but it refuses to go back to a DS2072. I did eventually get it to accept firmware 3 then 2... now just the serial to  look into.... Fantastic work guys!
« Last Edit: July 22, 2013, 02:04:39 am by bluesmoke »
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: Sniffing the Rigol's internal I2C bus
« Reply #515 on: July 22, 2013, 12:05:28 am »
When upgrading from the old firmware, the scope reverted to 2072 which is why I lost 2ns timebase.

Since then I can go forward, backward, reboot in the middle, flash with bootloader, install keys, uninstall, install trial or permanent LLLL and power cycle, install trial or permanent LLLL and uninstall, doesn't matter - it's always a 2202 now with sn #1.

Not a big deal, just weird / frustrating trying to change it.
« Last Edit: July 22, 2013, 12:32:00 am by true »
 

Offline poida_pie

  • Regular Contributor
  • *
  • Posts: 119
  • Country: au
Re: Sniffing the Rigol's internal I2C bus
« Reply #516 on: July 22, 2013, 12:08:12 am »
works fine using cybernet's code. I tried Studio's modified code but it segfaulted.
Ubuntu 32 bit virtual machine, installed DSAZ code onto a plain old DS2072 with no trials installed or hacked.

(to do this I needed to send a VSA9 code to make everything volatile and so not retained over reboots.
This also removed the persistent DS2202 model description)

After reboot, no trail time reminder, all options installed. The machine's serial number was not altered.
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2183
Re: Sniffing the Rigol's internal I2C bus
« Reply #517 on: July 22, 2013, 12:15:26 am »
i *think* there might be an engineering menu hidden somewhere, but the serial port stuff which uses the keypad was to annoying for me to go over. maybe somebody else figures that one out ;-)

You would be the person in the know to try to find an engineering menu - they sure love hiding them in odd keystroke sequences...
 

Offline darrylp

  • Regular Contributor
  • *
  • Posts: 127
  • Country: gb
Re: Sniffing the Rigol's internal I2C bus
« Reply #518 on: July 22, 2013, 12:17:52 am »
well my DS2072, was using the permanent LLLLL code, and was showing as a DS2202.

anyway, can confirm input the trial key returned mine back to saying it was a DS2072

I built the keygen on a linux64 box,  and it doesnt work using the brute force or the lookup table for the keys on my ubuntu 10.04lts system

so took the same code over to a linux 32bit box, made the library ( .a file ) and the two versions of the keygen, and while both on the 64bit or the 32bit box both gave diffent keys )  the bruteforce on the 32bit box has worked, and given me a DS2202 :-)

survived full power off / on.  am happy.


I see a version to make an ARM code of the library, so will see what codes that comes up with.
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: Sniffing the Rigol's internal I2C bus
« Reply #519 on: July 22, 2013, 03:31:39 am »
Yeah, no choice of codes will get mine back as a 2072...seems completely stuck as a 2202.

I noticed the same problems with the 64 bit and cpp versions of MIRACL (because I was having problems with the non-cpp versions I had to use that one first), the generated values are different and they don't work either. I don't know, not a MIRACL hacker, can't say what is going on and not super interested.

I've got an online generator up; PM me if you need it to generate a code. Still could use a host though since this is on a private personal server. No warranties or guarantees etc.
« Last Edit: July 22, 2013, 03:45:47 am by true »
 

Offline roli_bark

  • Regular Contributor
  • *
  • Posts: 170
Re: Sniffing the Rigol's internal I2C bus
« Reply #520 on: July 22, 2013, 06:22:24 am »
Assuming that the ECC curve is the same, will "rikey.c" work for the DS4000 series as well ?

No Mem upgrade option there (they all  come the same). But YES, most probably for the options for BW & Serial Decode. They should be upgradable.
 

Offline dmginc

  • Contributor
  • Posts: 15
  • Country: au
Re: Sniffing the Rigol's internal I2C bus
« Reply #521 on: July 22, 2013, 06:32:59 am »
Assuming that the ECC curve is the same, will "rikey.c" work for the DS4000 series as well ?

No Mem upgrade option there (they all  come the same). But YES, most probably for the options for BW & Serial Decode. They should be upgradable.

I'd like to know this as well... Anyone got a DS4xxx to test?  ;D
 

studio25

  • Guest
Re: Sniffing the Rigol's internal I2C bus
« Reply #522 on: July 22, 2013, 06:47:57 am »
works fine using cybernet's code. I tried Studio's modified code but it segfaulted.

Should now be fixed.
 

Offline Orange

  • Frequent Contributor
  • **
  • Posts: 346
  • Country: nl
Re: Sniffing the Rigol's internal I2C bus
« Reply #523 on: July 22, 2013, 07:16:02 am »
I have two Linux systems here, a 32bit and a 64bit, both running Linux mint Cinnamon.

Installed the MIRACL on both systems (only difference was the bash linux vs the linux64

Compiled the rikey.c from cybernet on both systems.

I get different results for the key when I run it on a 32 bit or 64bit system. The one on the 64bit system was accepted. I did not dare to try it again with the 32bit version on my scope.

Why would there be a difference between 32bit and 64bit systems ?

ps. the version from studio25 gives also different results even on the same system....
 

Offline cybernet

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
  • pm deactivated, use the search function ...
Re: Sniffing the Rigol's internal I2C bus
« Reply #524 on: July 22, 2013, 07:25:12 am »
I have two Linux systems here, a 32bit and a 64bit, both running Linux mint Cinnamon.

Installed the MIRACL on both systems (only difference was the bash linux vs the linux64

Compiled the rikey.c from cybernet on both systems.

I get different results for the key when I run it on a 32 bit or 64bit system. The one on the 64bit system was accepted. I did not dare to try it again with the 32bit version on my scope.

Why would there be a difference between 32bit and 64bit systems ?

ps. the version from studio25 gives also different results even on the same system....

could be that the bigrand function gets seeded differently on 32 vs 64bit
___________________
"all rights reversed :-)"
R0=-0x18;
UNLINK;
RTS;
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf