Thread: Encrypted id != 10 (Enabling RSA) PI

Results 1 to 5 of 5
  1. #1 Encrypted id != 10 (Enabling RSA) PI 
    Donator
    revengepk's Avatar
    Join Date
    Nov 2011
    Posts
    267
    Thanks given
    12
    Thanks received
    59
    Rep Power
    20
    I was using a tutorial on how to enable RSA. I did everything right (so I think) and everything compiled without errors (YAY!). I can't login though (not yay).



    Server sided:

    Code:
    loginEncryptPacketSize--;
    						if(loginEncryptPacketSize != (in.get() & 0xff)) {
    							System.out.println("Encrypted size mismatch.");
    							session.close();
    							return false;
    						}
                            byte[] encryptionBytes = new byte[loginEncryptPacketSize];
                            in.get(encryptionBytes);
                            ByteBuffer rsaBuffer = ByteBuffer.wrap(new BigInteger(encryptionBytes)
                                    .modPow(RSA_EXPONENT, RSA_MODULUS).toByteArray());
    						if((rsaBuffer.get() & 0xff) != 10) {
    							System.out.println("Encrypted id != 10.");
    							session.close();
    							return false;
    						}
    						long clientSessionKey = rsaBuffer.getLong();
    						long serverSessionKey = rsaBuffer.getLong();
    						int uid = rsaBuffer.getInt();
    Client Sided:

    Code:
    public void doKeys() {
    		int i = currentOffset;
    		currentOffset = 0;
    		byte abyte0[] = new byte[i];
    		readBytes(i, 0, abyte0);
    		BigInteger biginteger2 = new BigInteger(abyte0);
    		BigInteger biginteger3 = biginteger2.modPow(RSA_EXPONENT, RSA_MODULUS);
    		byte abyte1[] = biginteger3.toByteArray();
    		currentOffset = 0;
    		writeWordBigEndian(abyte1.length);
    		writeBytes(abyte1, abyte1.length, 0);
    	}
    Reply With Quote  
     

  2. #2  
    Catherby Developer
    Mini Slurpee's Avatar
    Join Date
    Apr 2011
    Posts
    747
    Thanks given
    80
    Thanks received
    86
    Rep Power
    31
    Quote Originally Posted by revengepk View Post
    I was using a tutorial on how to enable RSA. I did everything right (so I think) and everything compiled without errors (YAY!). I can't login though (not yay).



    Server sided:

    Code:
    loginEncryptPacketSize--;
    						if(loginEncryptPacketSize != (in.get() & 0xff)) {
    							System.out.println("Encrypted size mismatch.");
    							session.close();
    							return false;
    						}
                            byte[] encryptionBytes = new byte[loginEncryptPacketSize];
                            in.get(encryptionBytes);
                            ByteBuffer rsaBuffer = ByteBuffer.wrap(new BigInteger(encryptionBytes)
                                    .modPow(RSA_EXPONENT, RSA_MODULUS).toByteArray());
    						if((rsaBuffer.get() & 0xff) != 10) {
    							System.out.println("Encrypted id != 10.");
    							session.close();
    							return false;
    						}
    						long clientSessionKey = rsaBuffer.getLong();
    						long serverSessionKey = rsaBuffer.getLong();
    						int uid = rsaBuffer.getInt();
    Client Sided:

    Code:
    public void doKeys() {
    		int i = currentOffset;
    		currentOffset = 0;
    		byte abyte0[] = new byte[i];
    		readBytes(i, 0, abyte0);
    		BigInteger biginteger2 = new BigInteger(abyte0);
    		BigInteger biginteger3 = biginteger2.modPow(RSA_EXPONENT, RSA_MODULUS);
    		byte abyte1[] = biginteger3.toByteArray();
    		currentOffset = 0;
    		writeWordBigEndian(abyte1.length);
    		writeBytes(abyte1, abyte1.length, 0);
    	}
    Send teamviewer details, i'll help you.
    Attached image
    “I have not failed, I've just found 10,000 ways that won't work.”
    “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2018
    Posts
    2
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Quote Originally Posted by Mini Slurpee View Post
    Send teamviewer details, i'll help you.


    WHY does it seem like everyone gets help through teamviewer?
    I'm not giving my TV out to anyone, ever.

    + You're keeping all the knowledge off the web.


    Why is it everyone on this fucking forum wants to use your PC but not just write simple answers.
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member Tylwr's Avatar
    Join Date
    Jul 2012
    Age
    26
    Posts
    478
    Thanks given
    105
    Thanks received
    42
    Rep Power
    15
    Quote Originally Posted by revengepk View Post
    I was using a tutorial on how to enable RSA. I did everything right (so I think) and everything compiled without errors (YAY!). I can't login though (not yay).



    Server sided:

    Code:
    loginEncryptPacketSize--;
    						if(loginEncryptPacketSize != (in.get() & 0xff)) {
    							System.out.println("Encrypted size mismatch.");
    							session.close();
    							return false;
    						}
                            byte[] encryptionBytes = new byte[loginEncryptPacketSize];
                            in.get(encryptionBytes);
                            ByteBuffer rsaBuffer = ByteBuffer.wrap(new BigInteger(encryptionBytes)
                                    .modPow(RSA_EXPONENT, RSA_MODULUS).toByteArray());
    						if((rsaBuffer.get() & 0xff) != 10) {
    							System.out.println("Encrypted id != 10.");
    							session.close();
    							return false;
    						}
    						long clientSessionKey = rsaBuffer.getLong();
    						long serverSessionKey = rsaBuffer.getLong();
    						int uid = rsaBuffer.getInt();
    Client Sided:

    Code:
    public void doKeys() {
    		int i = currentOffset;
    		currentOffset = 0;
    		byte abyte0[] = new byte[i];
    		readBytes(i, 0, abyte0);
    		BigInteger biginteger2 = new BigInteger(abyte0);
    		BigInteger biginteger3 = biginteger2.modPow(RSA_EXPONENT, RSA_MODULUS);
    		byte abyte1[] = biginteger3.toByteArray();
    		currentOffset = 0;
    		writeWordBigEndian(abyte1.length);
    		writeBytes(abyte1, abyte1.length, 0);
    	}
    https://www.rune-server.ee/runescape...le-rsa-pi.html
    Attached image
    Quote my post for me to see your reply.
    Discord: tiller#2854

    Reply With Quote  
     

  6. #5  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    Quote Originally Posted by runemedhelm View Post
    WHY does it seem like everyone gets help through teamviewer?
    I'm not giving my TV out to anyone, ever.

    + You're keeping all the knowledge off the web.


    Why is it everyone on this fucking forum wants to use your PC but not just write simple answers.

    Quote Originally Posted by revengepk View Post
    I was using a tutorial on how to enable RSA. I did everything right (so I think) and everything compiled without errors (YAY!). I can't login though (not yay).



    Server sided:

    Code:
    loginEncryptPacketSize--;
    						if(loginEncryptPacketSize != (in.get() & 0xff)) {
    							System.out.println("Encrypted size mismatch.");
    							session.close();
    							return false;
    						}
                            byte[] encryptionBytes = new byte[loginEncryptPacketSize];
                            in.get(encryptionBytes);
                            ByteBuffer rsaBuffer = ByteBuffer.wrap(new BigInteger(encryptionBytes)
                                    .modPow(RSA_EXPONENT, RSA_MODULUS).toByteArray());
    						if((rsaBuffer.get() & 0xff) != 10) {
    							System.out.println("Encrypted id != 10.");
    							session.close();
    							return false;
    						}
    						long clientSessionKey = rsaBuffer.getLong();
    						long serverSessionKey = rsaBuffer.getLong();
    						int uid = rsaBuffer.getInt();
    Client Sided:

    Code:
    public void doKeys() {
    		int i = currentOffset;
    		currentOffset = 0;
    		byte abyte0[] = new byte[i];
    		readBytes(i, 0, abyte0);
    		BigInteger biginteger2 = new BigInteger(abyte0);
    		BigInteger biginteger3 = biginteger2.modPow(RSA_EXPONENT, RSA_MODULUS);
    		byte abyte1[] = biginteger3.toByteArray();
    		currentOffset = 0;
    		writeWordBigEndian(abyte1.length);
    		writeBytes(abyte1, abyte1.length, 0);
    	}
    It doesn't get much simplier than the error telling you what the issue is.

    "Encrypted id != 10"

    It's saying, the client encrypted id isn't 10.

    To fix; go into your client, find the login packet and see what the encrypted id is. Then change the 10 to whatever the client encrypted id is.
    Attached imageAttached image
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Encrypted id != 10 Error.
    By GodComplex2 in forum Help
    Replies: 6
    Last Post: 01-08-2014, 10:55 PM
  2. Encrypted id !=10 Help needed
    By Heyt in forum Help
    Replies: 2
    Last Post: 09-24-2012, 03:41 AM
  3. Encrypted id != 10. adding rsa
    By Newell in forum Help
    Replies: 4
    Last Post: 08-17-2012, 11:19 AM
  4. Enable RSA [PI]
    By cardnal009 in forum Tutorials
    Replies: 16
    Last Post: 07-14-2012, 12:54 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •