Author Topic: Virus to crack RSA for nspire? :P  (Read 69659 times)

0 Members and 2 Guests are viewing this topic.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Virus to crack RSA for nspire? :P
« Reply #30 on: June 30, 2010, 01:51:13 pm »
Quote
I had been messing around with mine and wondering why the secret key 'd' for the TI-84+ keys I've been testing with always comes up wrong, and so I tried on the perl script and it was ALSO wrong. Can someone verify this just to make sure this is not just a fluke?
Indeed, the value of d computed by the Perl script for the 84+ key, and the one that can be found at various places, do not match... but, er, the following piece of Java code outputs the same value as the Perl code !!!
        p = new BigInteger("94489014C63CC9E1E1ADB192DBBDD1F78F90A630DA9C86EFC4CBCA44E5B4D54D",16);
        q = new BigInteger("19D431AF2794229620B884E3750D622D1C74F2E4569DC15486FC8D5A3BCDFE2F5",16);
        // Find PQ and phiPQ
        pq = p.multiply(q);
        phiPQ = (p.subtract(BigInteger.ONE)).multiply(q.subtract(BigInteger.ONE));
        
        // Find E
        e = new BigInteger("11");
        
        // Find D
        d = e.modInverse(phiPQ);
        System.out.println("d: " + d.toString(16));
Why ?


Mistake caught by BrandonW on #ti: PEBKAC on my side, I was using 11 (decimal) instead of 0x11 (hex) for e. With 11 in base 16, the values of d match. Tribal, maybe you did the same ?
« Last Edit: June 30, 2010, 03:32:44 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline quasi_Phthalo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 90
  • Rating: +1/-1
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #31 on: June 30, 2010, 02:42:45 pm »
i was messing around with really smalls keys just for the fun of it, and sometimes my d would come out negative and i'd have to add phiPQ to it

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Virus to crack RSA for nspire? :P
« Reply #32 on: June 30, 2010, 03:46:31 pm »
BTW, my LFSR-randomized TF Perl code unconditionally divides n by p, no matter p is even or odd. This is because in Perl, letting it do so is faster (on my computer, anyway) than shifting p right while it's even, and dividing n by p only when p is odd. However, I'd expect things to be different in C: both parity test and 1-bit right shift can be performed in many less processor instructions than computing a ~1024-bit number modulo a ~512-bit number...
« Last Edit: June 30, 2010, 03:49:37 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #33 on: June 30, 2010, 04:05:59 pm »
I only think that people would more or less be willing to do it if all the had to do was put a program on their computer, that could easily be uninstalled by removing one file.  (Well, except the temporary data files.)

Also, for anyone thinking about Trial Division, I promise it won't work.  If you write a program that starts with three, and adds two to every number after that, it will take absolutely forever.  Distributed computing won't change that.

So then, I would be okay with boinc.  Will you set it up, Lionel?

Offline quasi_Phthalo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 90
  • Rating: +1/-1
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #34 on: June 30, 2010, 04:20:48 pm »
Quote
If you write a program that starts with three
wouldn't it be best to start at sqrt(n) and work either up or down (both if adventuresome) because don't the factors usually have about half as many digits as n? so, they'd be closer to sqrt(n) than 3 or n/3
« Last Edit: June 30, 2010, 04:25:12 pm by quasi_Phthalo »

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #35 on: June 30, 2010, 04:22:08 pm »
If we use the GNFS, how in the world will we find a computer powerful enough to solve the matrix?

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #36 on: June 30, 2010, 04:25:09 pm »
offtopic, i know absolutely nothing about the nspire or what RSA is, or what you're trying to do. However, bwang's post made my day. it needed to be noted. [/offtopic]

on a more related note.. would anyone care to explain exactly what you are trying to do? or link me to a good article?


Offline quasi_Phthalo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 90
  • Rating: +1/-1
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #37 on: June 30, 2010, 04:28:37 pm »
well, you could try the wikipedia page on rsa keys

basically, we've got this number n, and we know that it is the product of two VERY LARGE prime numbers p and q. And there's this other number d that we really want to have, but the only way to get it is to break into TI headquarters, or figure out what p and q are. The only way to do that is with a sophisticated 'guess and check' system that would possibly take years
« Last Edit: June 30, 2010, 04:30:33 pm by quasi_Phthalo »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #38 on: June 30, 2010, 04:32:15 pm »
that sounds.. depressingly hopeless  :-\ and what are the possible benefits of getting this number d?


Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #39 on: June 30, 2010, 04:34:46 pm »
RSA is a public/private key cryptographic system.  Basically, there is a key that we have that is the public key.  If we factor the public key, then we can find the private key.  The thing is, although factoring a number sounds easy and possible in your head, like counting, these numbers are far beyond a person's comprehension.  They are mind blowing huge, and that is just the 512 bit ones.  We're talking about 1024 bit here.  Very hard to factor.

I don't exactly know how GNFS works, though.

Offline quasi_Phthalo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 90
  • Rating: +1/-1
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #40 on: June 30, 2010, 04:35:55 pm »
it essentially lets us *cough*hack*cough* the nspire, write custom OSes for it, etc.

and GNFS (general number field sieve) is the 'sophisticated' part of the guess and check system
« Last Edit: June 30, 2010, 04:36:46 pm by quasi_Phthalo »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #41 on: June 30, 2010, 04:38:10 pm »
that's a lot of faith TI is hinging on one number...
sounds interesting though. i'll do some of my own research later.


Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #42 on: June 30, 2010, 04:43:21 pm »
We should use Cabamap.

It would be so lolworthy if we cracked the Nspire key with an 84...

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Virus to crack RSA for nspire? :P
« Reply #43 on: June 30, 2010, 04:50:14 pm »
With an 84? Are you crazy? Use a TI-81.
@nemo: They have good reason to have faith in that number. It's encrypted with 1024-bit encryption. To put that into perspective, it took a team with extremely high-tech resources about 2 years to decrypt a 768-bit number.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Virus to crack RSA for nspire? :P
« Reply #44 on: June 30, 2010, 04:52:01 pm »
1024 bits is 128 bytes.  That is a big number.  It would be impossible with a ti-84.