Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 19:57

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

Advertisement



C# encryptGamePacket

Discussion on C# encryptGamePacket within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2018
Posts: 83
Received Thanks: 59
C# encryptGamePacket

Hi

Have someone c# code to encrypt game packets? Or have free time to translate from c++ to c# this code ?
Rajmund1337 is offline  
Old 06/07/2019, 17:15   #2

 
Blowa's Avatar
 
elite*gold: 98
Join Date: Jan 2010
Posts: 631
Received Thanks: 1,726

(Contains Vendetta + Login encryption)

The client cryptography is easily transpilable from what is already written here :

I didn't write synchronous encoders, which is kinda useless in THIS case (however, there are cases where cryptography could be done asynchronously, through a dedicated microservice for example)

Also, I didn't release a package yet but there will be one really soon.
Btw this does not include the Client cryptography for the World (I decided not to release it in c#)

Enjoy.
Blowa is offline  
Thanks
1 User
Old 06/07/2019, 18:00   #3
 
elite*gold: 0
Join Date: Apr 2018
Posts: 83
Received Thanks: 59
Rajmund1337 is offline  
Thanks
1 User
Old 06/08/2019, 05:04   #4
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
Quote:
Originally Posted by Cryless~ View Post
Do you want me to explain you difference between Encryption and Encoding? Were you the one talking about AppendAllText()? I higly reccomend you to talk less and study more.







“Talk is cheap. Show me the code.” cit. Linus Torvalds

It is very sad to read your code.

I would be proud of you if 1 single thing was done right in 1 of your projects.

But I am not.

I also believe that you fused your brain by talking about microservices so much that you could no longer conceive of a reality without them.
In this specific case this is just a bad definition.
Nostale Packets are both encrypted and encoded. The goal of the encryption is to hide the packet to make it difficult to understand.

Unfortunately they use a homemade algorithm which is close to Caesar cipher https://en.m.wikipedia.org/wiki/Caesar_cipher which is a bad encryption algorithm.
0Lucifer0 is offline  
Old 06/08/2019, 07:47   #5
 
Cryless~'s Avatar
 
elite*gold: 0
Join Date: Sep 2015
Posts: 480
Received Thanks: 529
Quote:
Originally Posted by 0Lucifer0 View Post
In this specific case this is just a bad definition.
Nostale Packets are both encrypted and encoded. The goal of the encryption is to hide the packet to make it difficult to understand.

Unfortunately they use a homemade algorithm which is close to Caesar cipher https://en.m.wikipedia.org/wiki/Caesar_cipher which is a bad encryption algorithm.
From your link:

Quote:
In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques.
You still need a key which is private and the main purpose is hiding data.

It does not matter the complexity of the algorithm.
Cryless~ is offline  
Old 06/08/2019, 07:51   #6
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
Yes but nostale encryption is using keys to bitshift the value of each bytes. Nostale packet is encryption not encoding (actually it’s both but encryption is part of it)
Nostale is using something really close to Caesar cipher.
0Lucifer0 is offline  
Old 06/08/2019, 08:50   #7
 
Cryless~'s Avatar
 
elite*gold: 0
Join Date: Sep 2015
Posts: 480
Received Thanks: 529
Quote:
Originally Posted by 0Lucifer0 View Post
Yes but nostale encryption is using keys to bitshift the value of each bytes. Nostale packet is encryption not encoding (actually it’s both but encryption is part of it)
Nostale is using something really close to Caesar cipher.
How is shifting related to Encoding?

Encoding is the process of converting data from one form to another.

Shifting is an arithmetic operation.

Following your logic also +, -, * and / are part of Encoding but you are wrong.

Doing 1+1=2 is not Encoding.
It is changing a value to another using a given tool (in that case +).

You can use any operator to achieve Encoding. It still does not mean that they are connected each other.

You can not consider shifting as part of Encoding.

It is standalone.
Cryless~ is offline  
Old 06/08/2019, 10:44   #8
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
Quote:
Originally Posted by Cryless~ View Post
How is shifting related to Encoding?

Encoding is the process of converting data from one form to another.

Shifting is an arithmetic operation.

Following your logic also +, -, * and / are part of Encoding but you are wrong.

Doing 1+1=2 is not Encoding. It is changing a value to another using a given tool (in that case +).

You can use any operator to achieve Encoding. It still does not mean that they are connected each other.

You can not consider shifting as part of Encoding.

It is standalone.
I did not. This is encryption not encoding... shifting is exactly what a Caesar code is doing. Caesar is not encoding it’s encryption. So nostale is using encryption for those packets. It’s also using encoding(using different codepage depending on the server). That’s why nostale is using both.
0Lucifer0 is offline  
Thanks
2 Users
Old 06/08/2019, 11:32   #9
 
Cryless~'s Avatar
 
elite*gold: 0
Join Date: Sep 2015
Posts: 480
Received Thanks: 529
Quote:
Originally Posted by 0Lucifer0 View Post
I did not. This is encryption not encoding... shifting is exactly what a Caesar code is doing. Caesar is not encoding it’s encryption. So nostale is using encryption for those packets. It’s also using encoding(using different codepage depending on the server). That’s why nostale is using both.
You are right saying NosTale is using different character encoding depending by the server but it does not change how the packet is encrypted/decrypted.

I thought with encoding you were referring to the shift.
My bad.

My point here was to show @ the difference between Encoding and Encryption. In his project it is wrong. Nor is it the only error. He implemented all the design patterns incorrectly. Instead of talking about others, he should focus on what he does.

I would like to see more people like you with whom I can have a pleasant discussion from which we can gather some useful information to improve ourselves.

But I ask too much.
Cryless~ is offline  
Reply




All times are GMT +2. The time now is 19:57.


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