Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypting Traffic #68

Closed
prostheboss opened this issue Sep 3, 2022 · 2 comments
Closed

Encrypting Traffic #68

prostheboss opened this issue Sep 3, 2022 · 2 comments
Labels
Question This issue is a question or a request for help/clarification

Comments

@prostheboss
Copy link

Currently the data is sent unencrypted between the client and server which is fine for most use cases, however it could prove slightly problematic for certain applications such as chat messages etc

How could one integrate encryption with Riptide, would it be on the Message layer or would it be wrapping the TCP socket?

@tom-weiland tom-weiland added the Question This issue is a question or a request for help/clarification label Sep 4, 2022
@tom-weiland
Copy link
Collaborator

You could either convert the string to bytes yourself and encrypt them before using message.AddBytes, or you'd have to modify the source code and add an encryption/decryption step before sending/after receiving the data.

Are you sure you need to encrypt chat messages though? I'm pretty sure most games only encrypt login-related traffic and don't bother with the rest—it's just a waste of CPU power since the data isn't sensitive or anything.

@prostheboss
Copy link
Author

I think chats tend to be encrypted with AAA games, not totally sure though.. and when it comes to processing power, most modern CPU's have optimized instruction sets for encryption so I don't think it would make much of a difference for less frequent data transfers like chats or turn based games. But I guess you are right about general game communication.
I was at first a little concerned about malicious packet sniffing or manipulation but I guess having decent server code would mean you could mitigate those problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question This issue is a question or a request for help/clarification
Projects
None yet
Development

No branches or pull requests

2 participants