Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 18:19

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

Advertisement



Basic Client-server with RSA

Discussion on Basic Client-server with RSA within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
Basic Client-server with RSA

hey folks , i was working on a proxy , dont want to leech and hook , need to get it all done by me
done basic client-server connection and added RSA encryption/decryption but there is some bugs
1- only accept numbers from client to server
2- BUG when trying to encrypt the numbers and decrypt them
idea

its client send string to enc. section and it take it back as double , it send it as byte array , server decrypt it and show the decryption as string (the bug is if inpute was 123456 the output will be nan
not 123456)
EDIT : this was for an infinite number inside calculations , fixed in client but not able to do the same with server , working on it also on new base , will be updated tomorrow

need help to fix/develop it (its all done in couple of days learning c#)
got couple more questions
here the code source

also i got couple of questions over here

thanks for helping , sorry if it was long also if u find the codesource not useful for u
codesource in attachments

ill adding disconnection , seal , proxy(middleman) once i fix bugs in this , its my 0.06 beta :P been 3 days learning(C#) so dont go hard on me but ma asm is fine

special thanks for pro4never for his tuts :P
another download link for the attachments : []
scan for the attachments :

humans die but ideas never
Attached Files
File Type: rar NextProxytest0.2.rar (87.0 KB, 31 views)
injection illusion logic is offline  
Old 01/30/2012, 17:01   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
General info on packet structuring, proxies and general conquer routines


Explicit information and examples of how to write a proxy. The source is fully functional just doesn't work with latest version due to the dhkey exchange changes. I don't touch password encryption so those changes will not effect it.


More socket side information on how to write a proxy.




Honestly... I realllyyy suggest reading through the forum first. Every question you're asking is already answered tons of times.


RSA has nothing to do with blowfish. They are different encryption routines. DHKey is the method of exchanging private/public keys which are then used to set up the blowfish encryption algorithm. Most encryption systems use an encryption key to seed the initial encryption values. The problem with this if the two communicating programs need to both be using the same encryption key. Because of this the dhkey system is used to securely (sorta) decide on a shared encryption key (both use).


Honestly it looks like the issue with your 'encryption' system (really just swapping things around... and poorly) is that you don't reverse things properly and in some cases CANNOT reverse properly.

Example...

Convert all 'Q' into 'P'.

How do you then convert this back? You need something that can be reversed and maintain data integrity. If all 'Q' are turned into 'P' then to reverse it all 'P' in encrypted stream have to become 'Q'. This converts EVERYTHING to Q even if P was the original letter pre-encryption.

This is why using your own encryption system is a poor idea when starting out. You can worry about writing your own encryption system later. Use a pre-existing one. Hell... use account encryption from conquer. It's a simple counter based system that's VERY easy to implement.
pro4never is offline  
Old 01/30/2012, 17:34   #3
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
Has anyone written their own implementation of the blowfish cipher using the CFB 64 mode (you know, without using libeay32.dll) or is there a public implementation or algorithm available? Sorry for the slight threadjack.
Lateralus is offline  
Old 01/30/2012, 17:34   #4
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
=i got what u mean , ex : if Q is number then this way will work but if its byte array (even any number array) , it will all just mix up , was working on foreach but didnt really work fine , need to cut them down with some way and then put them back which im doing now
=its the 6th time to rewrite everything (this time im overloading some functions and fixing the encryption system , i know in some point i thought its impossible for some stuff to be swapped but with thinking i figured out some ways )
=sorry about making a lil thread asking for help but it saved me like a day searching for info and guess we are here to help each other ,
--
about "use account encryption from conquer. It's a simple counter based system that's VERY easy to implement." i thought about downloading some good source and keep tracing the client and source , read packets with wpe(packet reader) , duno if its good idea

well i got a favor
give me example (pre written here or anywhere) about

how the dhkey works also its blowfish encryption algorithm (will try to figure it out from your base but still need more about this)

how to figure out stuff needed for dhkey from the client , i found the encryptionkey(doesnt took a min) , but duno info about dhkey which makes me shoot in dark

btw i dont want to learn this just to code proxy , proxy is just a start

thanks for helping
injection illusion logic is offline  
Old 01/30/2012, 17:38   #5
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
Quote:
Originally Posted by injection illusion logic View Post
about "use account encryption from conquer. It's a simple counter based system that's VERY easy to implement." i thought about downloading some good source and keep tracing the client and source , read packets with wpe(packet reader) , duno if its good idea
If you're saying what I think you're saying, you won't be able to get the account server crypt this way. You'll need to reverse it from the client, or yeah, look at public sources.
Lateralus is offline  
Old 01/30/2012, 17:52   #6

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by Lateralus View Post
Has anyone written their own implementation of the blowfish cipher using the CFB 64 mode (you know, without using libeay32.dll) or is there a public implementation or algorithm available? Sorry for the slight threadjack.
Project Manifest doesn't use libeay32.dll and runs on 5135, is that what you're searching for?
Kiyono is offline  
Old 01/30/2012, 17:52   #7
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
and what u think im saying :P ?
umm i guess ill keep working on my **** till a day or tho TILL
i add disconnect , fix bugs with rewritting the whole thing , change enc/dec static , make auth server and a decent server to reply for packets sent , proxy in the middle
once im done those ill be able to look at public source
what im thinking about is a non static encryption system which encrypt the packets with a new encryption when server tell him so
ex :
client to server : here is some packets with seal and encryption1
server to client : this is reply to ur packets with my seal and ur encryption also use another module or ur encryption or another encryption
and so on , lemme rewrite the whole thing and come to ask for more :P
injection illusion logic is offline  
Old 01/30/2012, 18:13   #8
 
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
hey evan,

you should check out openssl. When i wrote my proxy, i realized that there are no easy-to-obtain public cryptography library that supports user-defined padded blowfish64; Sun's cryptographic extension supports only empty array of bytes for the padding.

I got help from Dan (author of nproxy), i think he translated the C implementation of blowfish64 to java, and shared his codes with me.

To answer your question, there are definitely people on this forum who actually played around with the implementation of blowfish64.
shitboi is offline  
Old 01/30/2012, 19:14   #9
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
Quote:
Originally Posted by Kiyono View Post
Project Manifest doesn't use libeay32.dll and runs on 5135, is that what you're searching for?
It uses a custom crypt - that's why.


Quote:
Originally Posted by shitboi View Post
hey evan,

you should check out openssl. When i wrote my proxy, i realized that there are no easy-to-obtain public cryptography library that supports user-defined padded blowfish64; Sun's cryptographic extension supports only empty array of bytes for the padding.

I got help from Dan (author of nproxy), i think he translated the C implementation of blowfish64 to java, and shared his codes with me.

To answer your question, there are definitely people on this forum who actually played around with the implementation of blowfish64.
Ah, thanks. Could you link me to the C implementation of blowfish64? I've searched for it, no luck.
Lateralus is offline  
Old 01/30/2012, 19:56   #10
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
im stucked in some math

if input 2 after enc its 29 and after dec its 29 o-0 lol
enc eq. C = M^E Mod N , M = C^D Mod N (RSA basic enc/dec)
P,Q should be prim numbers
M<N else u should padding , 1<E<PiN

-.- im sick of the RSA , updating topic tomorrow with a rewritten base
injection illusion logic is offline  
Old 01/30/2012, 20:27   #11
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
I don't quite understand what your goal is. You shouldn't need to crack RSA in order to use a proxy (though I'm not that familiar with recent changes... or even semi-recent). Is this Conquer-related or are you asking about RSA or other ciphers in general?
Lateralus is offline  
Old 01/30/2012, 21:48   #12
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by Lateralus View Post
It uses a custom crypt - that's why.




Ah, thanks. Could you link me to the C implementation of blowfish64? I've searched for it, no luck.
No actually, if you decompile BlowfishCFB.dll distro'd with PM it does use blowfish (implemented in native C++, wrapped with Managed C++) w/ out OpenSSL, we never changed the game encryption, only the auth; and spell.
InfamousNoone is offline  
Old 01/30/2012, 23:38   #13
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
Quote:
Originally Posted by InfamousNoone View Post
No actually, if you decompile BlowfishCFB.dll distro'd with PM it does use blowfish (implemented in native C++, wrapped with Managed C++) w/ out OpenSSL, we never changed the game encryption, only the auth; and spell.
Oh sweet. I'll check it out.
Lateralus is offline  
Old 01/31/2012, 19:56   #14
 
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
I found one on codeproject.com I am not sure if i am allowed to directly place a link, but oh well...



shitboi is offline  
Thanks
2 Users
Old 02/01/2012, 14:03   #15
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Quote:
Originally Posted by Lateralus View Post
Has anyone written their own implementation of the blowfish cipher using the CFB 64 mode (you know, without using libeay32.dll) or is there a public implementation or algorithm available? Sorry for the slight threadjack.
Checkout the bouncycastle c# source.
© Haydz is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Service] Flyff Basic Server erstellen
08/03/2011 - elite*gold Trading - 2 Replies
Hiho Elitepvpers, Hier biete ich euch an, euch einen FlyFF Server mit v15/v16 ready/v17 ready ODER Caali Files Server v11 einzurichten (+ auf Wunsch mit Patcher, allerdings kostet die Register Homepage extra!), falls ihr mit den Turtorials immer noch nicht weiterkommt. Die Kosten belaufen sich auf 10 Euro PSC/500 Elitegold (Nach Einrichtung). Voraussetzungen : - v15/v16/v17 Client gedownloaded - entsprechende Serverfiles gedownloaded - SQL Express und Management Studio 2008...
tausche 2 pirox bot keys,1-basic,elite,arschi so wie 1 basic suche 25 euro PSC
06/19/2011 - World of Warcraft Trading - 0 Replies
Hallo leute tausche/vk hier mein Pirox key erstbesitzer und besitze alle daten incl persokopie pvpTool *Basic* Bought on 1. June 2011, 12:29 Expires on 1. June 2036, 12:29 pvpTool *Elite* Bought on 1. June 2011, 12:33 Expires on 1. June 2036, 12:33
Pvptool | Basic und Basic+Elite
02/10/2011 - World of Warcraft Trading - 4 Replies
Hey leute, verkaufe hier folgendes: Basic Lifetime für 12€ und Basic+Elite für 20€. Bezahlen könnt ihr mit Paypal, Moneybookers, oder auch mit psc wenn ihr nen asucasher für pp/mb habt. Lg Robin_-
I BUY ARCHER 130 OR FIRE 130 NO RB ANYONE SERVER WITH BASIC ITENS-
06/15/2010 - Conquer Online 2 Trading - 4 Replies
In English i Buy archer 130 no rb anyone server or fire 130 with basic itens ex: Robe or coat : unique +4 SDG or SPG BS or Bow : Super +4 2 SDG or SPG
Private Server in Visual Basic 6.0, possible?
05/22/2008 - Conquer Online 2 - 3 Replies
Hello fellow elitepvpers! I was wondering if anyone knows the following: Did anyone succeed in making a working private server, written in Visual Basic 6.0? If you can't answer that question, then try this: Do you think it's possible to make a Conquer Online private server, written in Visual Basic 6.0?



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


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.