Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Guides & Templates
You last visited: Today at 02:34

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

Advertisement



Fastest method to generate key3, key4 (standerd conquer encryption)

Discussion on Fastest method to generate key3, key4 (standerd conquer encryption) within the CO2 Guides & Templates forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Fastest method to generate key3, key4 (standerd conquer encryption)

Because I'll probably never need this again, I might as well demonstrate how exactly to generate key3 and key4 faster than coemu's gay slow method.

You'll actually have to have some knowledge of coding to be able to convert this to C# to use in your source (because most sources are in C#... I wonder why...).

Note to disclaimer: This probably isn't the "fastest" method, but it's the fastest method I've developed.

Code:
#define sqr(x) x * x
#define ptr(t, i, v) (((t*)v) + i)
void SetKeys(DWORD* inKey1, DWORD* inKey2)
{
	DWORD dwKey1 = ((*inKey1 + *inKey2) ^ 0x4321) ^ *inKey1;
	DWORD dwKey2 = sqr(*inKey1);
	Key3 = new unsigned char[256];
	Key4 = new unsigned char[256];
	for (unsigned char i = 0; i < 64; i++)
	{
		*ptr(DWORD, i, Key3) = dwKey1 ^ *ptr(DWORD, i, Key1);
		*ptr(DWORD, i, Key4) = dwKey2 ^ *ptr(DWORD, i, Key2);
	}
}
InfamousNoone is offline  
Old 07/03/2008, 08:47   #2
 
leavemealone's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 2,168
Received Thanks: 8,593
I havn't tested it but i just typed this up for C# users may work.

Code:
private unsafe uint sqr(uint x)
{
	uint Result = x * x;
        return Result;
}
private unsafe uint ptr(byte i, uint Key)
{
	uint Result = *(((uint*)Key) + i);
        return Result;
}
private unsafe void SetKeys(uint* inKey1, uint* inKey2)
{
	uint dwKey1 = ((*inKey1 + *inKey2) ^ 0x4321) ^ *inKey1;
        uint dwKey2 = sqr(*inKey1);
        Key3 = new byte[256];
        Key4 = new byte[256];
        for (byte i = 0; i < 64; i++)
        {
        	uint Result1 = ptr(i, Convert.ToUInt32(Key3));
        	Result1 = dwKey1 ^ ptr(i, Convert.ToUInt32(Key1));
        	uint Result2 = ptr(i, Convert.ToUInt32(Key4));
		Result1 = dwKey2 ^ ptr(i, Convert.ToUInt32(Key2));
	}
}
leavemealone is offline  
Old 07/03/2008, 13:49   #3
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
Code:
public unsafe void SetKeys(uint* inKey1, uint* inKey2)
        {
            uint dwKey1 = ((*inKey1 + *inKey2) ^ 0x4321) ^ *inKey1;
            uint dwKey2 = (uint)(dwKey1 * dwKey1);
            Key3 = new byte[256];
            Key4 = new byte[256];
            fixed (void* uKey1 = ConquerKeys.Key1, uKey3 = Key3,
                         uKey2 = ConquerKeys.Key2, uKey4 = Key4)
            {
                for (sbyte i = 0; i < 64; i++)
                {
                    *(((uint*)uKey3) + i) = dwKey1 ^ *(((uint*)uKey1) + i);
                    *(((uint*)uKey4) + i) = dwKey2 ^ *(((uint*)uKey2) + i);
                }
            }
        }
ConquerKeys.Key1 = KeyOne
ConquerKeys.Key2 = KeyTwo

Note: It's your own work infamous.
tanelipe is offline  
Old 07/08/2008, 23:57   #4
 
elite*gold: 0
Join Date: Sep 2006
Posts: 1
Received Thanks: 0
What are the keys for?
Hawk2006 is offline  
Old 07/09/2008, 05:32   #5
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
They're used in the encryption of packets.
InfamousNoone is offline  
Reply


Similar Threads Similar Threads
Fastest Leveling Method?
01/06/2010 - Dekaron - 11 Replies
Hey guys, was just wondering what yalls leveling method was, ive been reading around in the forums, and i hear of insane leveling, ex. 100+ levels in 3 days.. wtf?
Conquer Password Encryption?
12/25/2007 - Conquer Online 2 - 4 Replies
Me and my bro are currently making a private server and we need help with the password encryption. Any help would be greatly appreciated. :D
Conquer encryption keys someone?
11/20/2007 - Conquer Online 2 - 9 Replies
Hey, Does someone have the conquer packet encryption keys for me? the new ones? I need them hard ;) Thanks.



All times are GMT +1. The time now is 02:35.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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