Post Pacific  

Go Back   Post Pacific > Lineage2 C# > L2C# General

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 31.10.2008, 22:00   #1
cybersick
Guest
 
Posts: n/a
Default Blowfish & stuff

First of all, this is my scenario:

I'm trying to make a 'custom' auth server (or login server, call it whatever you want). I'm using C# because i like it, and it's easier and quicker (i mean, quicker to develop) than C++, even knowing it's the same crap as Java when it comes to performance and limitations.

So far not many issues, i already got a packet handler working and stuff...

HOWEVER, i'm getting some problems while interpreting the received packets. For example, when i was supposed to be reading an AuthGameGuard packet, i'm getting a random one (so i'm guessing i have issues on the Blowfish algorithm)

Here's the classes i'm using (these are basically l2j stuff converted to c#): link

Can anyone give me a light? Any help will be appreciated Smile

edit: this is what i get (Gracia Part 1 client):

Quote:



[ 11/01 22:58:21 ] Received: C8 C0 5E C1 D5 C2 9B 8F 45 97 F9 4E 78 DD 98 61 45 97 F9 4E 78 DD 98 61 C8 C0 5E C1 D5 C2 9B 8F 45 97 F9 4E 78 DD 98 61

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 1 November 2008. Открыть источник.
 
Old 01.11.2008, 22:00   #2
mexmer
Guest
 
Posts: n/a
Default Blowfish & stuff

only first packet is encrypted with static blowfish key, next packets are encrypted with dynamic blowfish key, generated on runtime, and sent to klient in first packet, also with RSA public key (which is used for encryption of login/password pair).

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 2 November 2008. Открыть источник.
 
Old 02.11.2008, 22:00   #3
cybersick
Guest
 
Posts: n/a
Default Blowfish & stuff

Quote:


Originally Posted by mexmer

only first packet is encrypted with static blowfish key, next packets are encrypted with dynamic blowfish key, generated on runtime, and sent to klient in first packet, also with RSA public key (which is used for encryption of login/password pair).

Hmmm so basically, it starts like this:

Client connects to AuthServer

AuthServer sends blowfish+rsa

Client sends rsa encrypted user+password


Am i right?


Btw i'm trying to make it work with CT1+ clients, so i'm talking about CT1+ client<->server communication Wink


Thanks for helping Smile

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 3 November 2008. Открыть источник.
 
Old 02.11.2008, 22:00   #4
mexmer
Guest
 
Posts: n/a
Default Blowfish & stuff

Quote:


Originally Posted by cybersick

Hmmm so basically, it starts like this:

Client connects to AuthServer

AuthServer sends blowfish+rsa

Client sends rsa encrypted user+password


Am i right?


Btw i'm trying to make it work with CT1+ clients, so i'm talking about CT1+ client<->server communication Wink


Thanks for helping Smile

you are right, but if you want to be more precise you should say


client connects to login server

login server sents rsa + new blowfish - packet encrypted with static blowfish known for client and server

client sends rsa encrypted password + login - packet encrypted with new blowfish


rest of communication encrypted with new blowfish


mechanism and method for login server changed with C4, next with interlude, and remains the same.


in kamael, hellbound, gracia, gracia part 2, there were only changes in client/gameserver communication, not client/login server communication

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 3 November 2008. Открыть источник.
 
Old 02.11.2008, 22:00   #5
cybersick
Guest
 
Posts: n/a
Default Blowfish & stuff

Quote:


Originally Posted by mexmer

you are right, but if you want to be more precise you should say


client connects to login server

login server sents rsa + new blowfish - packet encrypted with static blowfish known for client and server

client sends rsa encrypted password + login - packet encrypted with new blowfish


rest of communication encrypted with new blowfish


mechanism and method for login server changed with C4, next with interlude, and remains the same.


in kamael, hellbound, gracia, gracia part 2, there were only changes in client/gameserver communication, not client/login server communication

Hmmm cool... thanks man, i think i got it Very Happy gonna try it later

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 3 November 2008. Открыть источник.
 
Old 03.11.2008, 22:00   #6
cybersick
Guest
 
Posts: n/a
Default Blowfish & stuff

Quote:


Originally Posted by mexmer

login server sents rsa + new blowfish - packet encrypted with static blowfish known for client and server

wait, but...

http://www.l2jserver.com/svn/branche...ts/InitLS.java

http://svn.assembla.com/svn/L2Emu/tr...ts/InitLS.java


they only send rsa and protocol version Neutral

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 4 November 2008. Открыть источник.
 
Old 03.11.2008, 22:00   #7
mexmer
Guest
 
Posts: n/a
Default Blowfish & stuff

well, you should read source more precisely.

if you do, then you will know, that what you have linked is communication between login server and gameserver not client

this is your source

http://www.l2jserver.com/svn/branche...kets/Init.java

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 4 November 2008. Открыть источник.
 
Old 03.11.2008, 22:00   #8
cybersick
Guest
 
Posts: n/a
Default Blowfish & stuff

ohhhh that explains a lot!


i didn't download l2j's svn and stuff.. i just kept browsing around the sources, so i haven't really linked what communication i was getting... since the folder says 'loginserver' i thought it was client<->login :P


thanks man, that's probably why i was having problems lol

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 4 November 2008. Открыть источник.
 
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:07.