lidgren / lidgren-network-gen3

Lidgren Network Library
https://groups.google.com/forum/#!forum/lidgren-network-gen3
MIT License
1.19k stars 331 forks source link

What is the status of SRP??? #86

Open Spol-RafaSoftware opened 7 years ago

Spol-RafaSoftware commented 7 years ago

I have been tinkering around with lidgren for a couple of days now. Congrats on the great work!

I have a question though.

How would I go about creating user authentication? I came across SRP in this repo https://github.com/SleeplessByte/lidgren-srp6a which is based on a single argument ctor of NetXTEA class and as such not compatible.

I can see the NetSRP class in the latest lidgren repo though but no samples?

Thank you in advance :)

willthiswork89 commented 7 years ago

The way i have done it is to send my client credentials in the connection request. So Enable the connection request message on the server, and when the client connected send the client credentials (that have been encrypted with a private key) to the server.

The other thing you could do is allow anybody to connect and then upon connectionstatus changed to connected, send a new message with the username and password. If its wrong disconnect the user (this is obviously less secure)