Results 1 to 3 of 3

Thread: java BigInteger

  1. #1
    neur0n
    Guest

    java BigInteger

    I have a program with following registration check.

    regData = new BigInteger(encryptedLicense, 36);
    decoded = regData.modPow(e, n);
    realData = new String(decoded.toByteArray());
    and then check for correct values

    Since n is 1598 bit long only way to keygen it is to replace n.
    I generated my own n and thought it would be piece of cake but I was wrong.

    Problem is that realData must contain character '\' because it is a delimiter.

    I was gonna use this code for keygen.

    licString = "name\\company\\serial";
    m = new BigInteger (licString,36);
    c = m.modPow(d,n);
    license = new String(c.toByteArray());

    Problem is that java BigInteger constructor doesn't accept string with char '\' for radix 36. It takes only small characters and numbers.

    How can I create BigInteger from licString ?

    I don't want to make other changes to the apllication except changing n.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    Your plaintext need NOT to be base36 string. Can be base256 string(e.g byte array).

    licString = "name\\company\\serial";
    m = new BigInteger (licString, 256); //or m = new BigInteger (licString.toByteArray());
    c = m.modPow(d,n);
    license = new String(c.toByteArray()); //should be license = c.toString(36);
    Last edited by Solomon; November 23rd, 2004 at 20:47.
    :DWARNING: Shareware authors are reading your detailed discussions without paying you!:D

  3. #3
    neur0n
    Guest
    Thanks for help. Now it works fine .
    I promise that I have read the FAQ and tried to use the Search to answer my question.

Similar Threads

  1. java obfuscators, which ones?
    By Shub-nigurrath in forum Advanced Reversing and Programming
    Replies: 4
    Last Post: June 7th, 2012, 08:37
  2. Any way to RCE java with ollydbg?
    By alexopth1512 in forum Advanced Reversing and Programming
    Replies: 3
    Last Post: August 5th, 2010, 17:00
  3. Question of BigInteger ...
    By gordon_freeman in forum Advanced Reversing and Programming
    Replies: 2
    Last Post: November 5th, 2003, 18:15
  4. java reversing
    By jimmy in forum Advanced Reversing and Programming
    Replies: 3
    Last Post: April 30th, 2001, 03:33
  5. java : PE & .class
    By keyser in forum Advanced Reversing and Programming
    Replies: 1
    Last Post: December 23rd, 2000, 13:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •