RevenantX / LiteNetLib

Lite reliable UDP library for Mono and .NET
https://revenantx.github.io/LiteNetLib/index.html
MIT License
3.05k stars 494 forks source link

encryption on the serilizationlayer? #175

Closed christopherpross closed 6 years ago

christopherpross commented 6 years ago

Hi, sorry I have a question, maybe the developers of this great library can help me. I have to encrypt and decrypt data, specific login username and password. How I can encrypt or obvuscate it, in the right way? The way should work on windows, linux and mac and should produce same results in each OS. I tried to use aes, but i got different results on different OS. Have someone an idea or a hint for me, how I can transfer the login package securily to the server?

Hopefuly someone can help me, thank you!

best regards, Christopher

RevenantX commented 6 years ago

@christopherpross if you doing cross-platform project - better will be to use dotnetcore. You must get similar results in encryption with dotnetcore

christopherpross commented 6 years ago

@RevenantX: thank you for the quick answer, but there is a problem, at some point I have to use .net, because my Project is a update service for serial .net applications. That means, I need access from .net in the update of the specific application. Well, use a rudp lib is maybe not the best way for an updater, but I want to use the same library in all parts to build a uniform interface and so on. I don't need a encryption, which is so strong like aes, it should only strong enugh to prefent "bad guys" to get the login data quickly. Have you another idea? Thank you!

RevenantX commented 6 years ago

@christopherpross for updater better just use plain TCP sockets or some helper classes like TCPClient/TCPServer. About encryption this is strange. On Linux/Mono and Windows/.NET you must get same encryption results. Maybe there is just some bugs in that code?

christopherpross commented 6 years ago

@RevenantX: hm,bit would be better to work with an high-level library. Is an updater with litenetlib not possible, or why do you recomment plain tcp? If I can encrypt and decrypt correctly, it is possible to do the stuff with litenetlib or I need some other library? Maybe I can search for a bug in the encryption / decryption.

RevenantX commented 6 years ago

@christopherpross

Is an updater with litenetlib not possible

Possible

Is an updater with litenetlib not possible

tcp will be faster for file transfer in any case

If I can encrypt and decrypt correctly, it is possible to do the stuff with litenetlib or I need some other library?

Possible)