Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 18:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Clean KeyExchange Implementation [SSL]

Discussion on Clean KeyExchange Implementation [SSL] within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 05/29/2012, 10:40   #16
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
Quote:
Originally Posted by Korvacs View Post
Code:
public class KeyExchange
    {
        public ClientKeyPacket CKeyPacket;
        public byte[] ClientIV = new byte[8];
        public DH Exchange;
        public bool Exchanged;
        public byte[] ServerIV = new byte[8];
        public ServerKeyPacket SKeyPacket;

        public KeyExchange()
        {
            Random random = new Random();
            random.NextBytes(this.ServerIV);
            random.NextBytes(this.ClientIV);
            string str = "E7A69EBDF105F2A6BBDEAD7E798F76A209AD73FB466431E2E7352ED262F8C558F10BEFEA977DE9E21DCEE9B04D245F300ECCBBA03E72630556D011023F9E857F";
            string str2 = "05";
            this.Exchange = new DH(BigNumber.FromHexString(str), BigNumber.FromHexString(str2));
            this.Exchange.GenerateKeys();
            this.SKeyPacket = new ServerKeyPacket(this.ClientIV, this.ServerIV, str, str2, this.Exchange.PublicKey.ToHexString());
        }

        public void HandleClientKeyPacket(ClientKeyPacket CKeyPacket, GameCryptographer Cryptographer)
        {
            Cryptographer.Blowfish.SetKey(this.Exchange.ComputeKey(BigNumber.FromHexString(CKeyPacket.PublicKey)));
            Cryptographer.Blowfish.EncryptIV = new byte[8];
            Cryptographer.Blowfish.DecryptIV = new byte[8];
        }

        public void ResetIVs(GameCryptographer Cryptographer)
        {
            Cryptographer.Blowfish.DecryptIV = new byte[8];
            Cryptographer.Blowfish.EncryptIV = new byte[8];
        }
    }
^ Publicly available.
Yeah you took that straight from your wiki, Ult & Haydz's implementation, There's not really much competitiveness with them.

There implementation is "as messy" as mine, All I have is an extra method, and its near enough the same regarding "messyness", so I don't see how you can call my work messy & not the implementation you just linked.
_DreadNought_ is offline  
Old 05/29/2012, 10:54   #17


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Its much more readable imo, neater, less code etc.

I personally would rewrite most of the other classes to be neater aswell, or just use external calls instead, and the packets i would rewrite again to be far in a away more organised than yours/other examples.

Your example imo is in no way as improved as you believe it to be...
Korvacs is offline  
Reply


Similar Threads Similar Threads
Blowfish CFB64 (C++ implementation)
05/04/2012 - CO2 PServer Guides & Releases - 6 Replies
In a project I have (not CO2 related), I use Blowfish with the Cipher Feedback (CFB64) mode. So, I made a C++ implementation. As the project will be open-source at some point. I don't care of releasing my implementation. Header: // * ************************************************** ********** // * * START: blowfish.h * // * ************************************************** ********** // *...
[Question] KeyExchange
05/09/2011 - CO2 Private Server - 2 Replies
Hey everyone, can anyone please Explain to me how is the KeyExchange working in the new Clients !! string P = "E7A69EBDF105F2A6BBDEAD7E798F76A209AD73FB4664 31E2E7352ED262F8C558F10BEFEA977DE9E21DCEE9B04D245F 300ECCBBA03E72630556D011023F9E857F"; string G = "05"; string tqs = "TQServer"; and like what is the P,G and tqs refering to!? or how can i use it
Zoom Hack [implementation]
01/22/2010 - GW Exploits, Hacks, Bots, Tools & Macros - 34 Replies
Just a small Zoom Hack. How to do: 1. Run Guild Wars (you won't be able to run the hack without running instance of Guild Wars) 2. choose an Value (69-75).* 3. press 'Freeze'.
Zoom Hack Implementation [NEW!]
12/30/2009 - GW Exploits, Hacks, Bots, Tools & Macros - 36 Replies
Hello Boy's and Girl's. Some of you People know my old Zoom Hack http://www.elitepvpers.com/forum/gw-exploits-hacks- bots-tools-macros/233285-zoom-hack-implementation. html This one was working well, but i decided to recode and review it. Now it works with Scrollwheel and is Hotkeycontroled. At the moment you can't move the Camera but it'll come in the next update. Anyway, you can freez/unfreez it in any Zoom. http://www3.pic-upload.de/21.06.09/lk725d.jpg



All times are GMT +1. The time now is 18:14.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.