Originally Posted by
Zakawer2
I want to remove the RSA encryption on login so I can login using most standard clients that have encryption disabled. How do I do this?
Or you can just toggle RSA?
I would never remove this because then you're prone to packet sniffers.
In your Buffer or Stream class.
Code:
public void encodeRSA(BigInteger exponent, BigInteger modulus) {
int length = position;
position = 0;
byte[] buffer = new byte[length];
readData(buffer, 0, length);
byte[] rsa = buffer;
if (Configuration.ENABLE_RSA) {
rsa = new BigInteger(buffer).modPow(exponent, modulus).toByteArray();
}
position = 0;
writeByte(rsa.length);
writeBytes(rsa, 0, rsa.length);
}
If you have no clue where that's at then go to Client -> void login
You should see something like this
Code:
outgoing.setPosition(0);
outgoing.writeByte(10); // Secure id
outgoing.writeInt(seed[0]);
outgoing.writeInt(seed[1]);
outgoing.writeInt(seed[2]);
outgoing.writeInt(seed[3]);
outgoing.writeInt(SignLink.getUid());
outgoing.writeJString(name);
outgoing.writeJString(password);
outgoing.encodeRSA(RSA_EXPONENT, RSA_MODULUS);
If you're using eclipse, you can hit CTRL + CLICK on the encodeRSA method and it will bring you to where that method is.
If you toggle RSA via the Client, then you need to do the same for the server. There's already a toggle in the server for that.