Skip to content
CJ edited this page May 2, 2024 · 6 revisions

Why is RSA important?

RSA is an encryption algorithm. It's used towards the end of login protocol to protect sensitive information (ISAAC seed, username, password) sent from the client from being sniffed. For that reason, it's incredibly important that the default RSA keys that Luna ships with are changed.

Generating new keys

You can generate new keys by using the official key generator for Luna. Either download the raw source code or the JAR provided in its latest release.

Once you've done that, run the JAR or source code. Two files should appear in the same directory named rsapub.json and rsapriv.json. Those files contain your unique public and private RSA keys.

Server & client configuration

rsapub.json contains the public key. It goes in the client, and is safe for everyone to see. If the official Luna client is being used, the file can simply be placed in ./rsa/ and it will be automatically be read when the client is launched. For any other client, the values will need to be extracted from the file and implemented manually.

rsapriv.json contains the private key. It goes in the server, and no one should have easy access to it. A malicious party that obtains your private key can more or less completely bypass RSA encryption until the keys are changed. The file can be simply placed in ./data/rsa/ and it will be automatically read when the server launches.


Continue to next section.