• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OtclientV8 error RSA Decrypt Failed

edwinaaa

Member
Joined
Jan 31, 2014
Messages
71
Reaction score
11
hello guys how are you, I have a problem with the android client of otclientv8, which when it loads the characters and I'm going to connect it rejects the connection and I get the following error, how can I solve it?


[warning] [ProtocolGame::eek:nRecvFirstMessage] - RSA Decrypt Failed
 
how to do this bro. i've the key.pem but where i put this on otcv8 to login able?
In modules/gamelib/const.lua, here:

Random server-client key pair you can generate here (F5 on site to get new key-pair):
If you are copying key.pem from ots.me, make sure you save file with 'LF' line endings (linux), not CRLF (windows). It may make file unreadable on some OTSes running on Linux.

EDIT:
Client-server RSA files/config must be a 'RSA key-pair'.
If for some reason your server prints RSA Decrypt Failed when you login with OTC, it means your client does not use RSA client key that pairs with server RSA key. You cannot get server key from client key, so easiest solution is to generate new RSA key-pair and replace it on both sides: server and client.
 
Last edited:
Require compile the OTC again after changed?
In modules/gamelib/const.lua, here:

Random server-client key pair you can generate here (F5 on site to get new key-pair):
If you are copying key.pem from ots.me, make sure you save file with 'LF' line endings (linux), not CRLF (windows). It may make file unreadable on some OTSes running on Linux.

EDIT:
Client-server RSA files/config must be a 'RSA key-pair'.
If for some reason your server prints RSA Decrypt Failed when you login with OTC, it means your client does not use RSA client key that pairs with server RSA key. You cannot get server key from client key, so easiest solution is to generate new RSA key-pair and replace it on both sides: server and client.
rsa error.png
i get this error evertything.
 
Require compile the OTC again after changed?
No.
What client and server do you use?
Some custom clients send more than 1 RSA packet (single packet is max. 128 bytes [Tibia uses RSA-1024, 1024 bits = 128 max. bytes of data], if client wants to send more encrypted information during login, it has to send multiple packets encrypted using RSA one after another)
when they connect ex. they send PC information (network card serial number, GPU serial number etc.) in second-third-forth RSA packets, to ban given PC, not just IP.
There are also some bytes send before RSA packet (encrypted data) ex. spr/dat checksums (probably) and operating system (ex. Linux/Windows). Bytes read by TFS before decrypting RSA (128 bytes) of packet:

If you use normal OTC/OTCv8, that sends 1 RSA packet with login and password, but server expects to decrypt 2-4 packets, it will throw same error during login.
If server expects different number of bytes before RSA packet (some extra not encrypted information from client), it will throw same error.

Does it fail to load characters list or to login into game?
OTS has 2 different codes to load logging into account (characters list) and loggin into game: protocollogin.cpp (changed to loading login.php from acc. maker on 12+) and protocolgame.cpp.
OTC(v8) also has 2 codes for that. Logging into account is in Lua ( otcv8-dev/modules/client_entergame at master · OTCv8/otcv8-dev (https://github.com/OTCv8/otcv8-dev/tree/master/modules/client_entergame) ) and logging into is in C++ ( otcv8-dev/src/client/protocolgamesend.cpp at master · OTCv8/otcv8-dev (https://github.com/OTCv8/otcv8-dev/blob/master/src/client/protocolgamesend.cpp#L61) ).
 
Now I put the OTC redemption and it is loading the list of characters, but it doesn't enter the server and it keeps loading without connecting like in the image. no errors appear in the distro.

(edit) my tfs 1.3 for 12.72 but supports 10.98 i think


i'm using TFS 1.3, ZnoteAAC and OTC Redepntion atm. @Gesior.pl

concting server.png
 
Now I put the OTC redemption and it is loading the list of characters
It means that your server somewhat follows OTS (OTC), but 'logging into game' uses different protocol.
What server do you try to run?
Some custom-pokemon-OTS/custom-DB-OTS? They often add pretty random changes to client-server protocol, just to block other clients (bots) from connecting.
 
Back
Top