PDA

View Full Version : RSA


darcnier88
12-20-2004, 12:17 PM
Does anyone have a clue how to decrypt RSA encryption? and then reencrypt it so the file will work?

jbb
12-20-2004, 12:44 PM
I understand RSA encryption but I'm not exactly sure what you mean here. What do you want to decrypt? Do you have the public and private keys?

darcnier88
12-20-2004, 01:13 PM
Ok. For example Lineage 2 has a file now with there new release and if you run a server you cant edit the weapons, armor, ect files without putting it back to the state it was before. You can open it and add what you wont but it wont show up until you can reencrypt it so the client will read it.

jbb
12-20-2004, 01:35 PM
Ah, I see. :(

It sounds more like a digital signature than encryption as such.
If it is an RSA digital signature then what they do is calculate a SHA1 hash of the contents of the file, and then encrypt that hash value using the private RSA key.

The client will have the public RSA key and can use that to deterrmine if the file was properly signed using tha matching private key. It proves both that the file was not modifed since it was signed, and also that it was signed using the private key that matches the public key in the client.

If that's the case then without the public key you can't re-sign the modifed files. I'm speculating here with no knowledge of what they have actually done but If this *is* what they are using then you're unfortunatly not going to be able to sign the files.

Your only hope would be to modify the client to expect your own key instead but that's not the question you asked.

darcnier88
12-20-2004, 02:51 PM
How would I modify the client to do that?

jbb
12-20-2004, 08:26 PM
No idea :(
Well, I expect there would be many, many hours of work with a disassembler and debugger to figure out how it did what it did and how to change it.

Not something I could do myself