Open GoogleCodeExporter opened 8 years ago
[deleted comment]
[deleted comment]
Ok. Here is a first version of SRP into Lidgren. It will work plug and play
with existing code. You can call normal Connect or the new ConnectSRP.
- You will need a uniform keysize, receiving part needs an ILogonManager
derived class
- Set the keysize in the configuration (1024 by default) or at connection
- Set the logonManager in the configuration (easiest way).
- ILogonManager.Lookup needs to return the verifier and salt
- Register new users using something equivalent to NetPeer (static)
.PasswordVerifier
Handshakes will give you information on succession and/or error and/or denied
- When Handshake fails/denied you will get an HandshakeMessage
- When Handshake succeeded you will get NetConnection (instance) .IsUsingSRP as
true and receive an HandshakeMessage.
HandshakeMessages carry 1 byte of HandshakeMessageReason (this is a public
enum, flags) and the rest will be string reason/message OR 32 byte key (on
succes)
You can also upgrade existing connection to SRP using
NetConnection (instance).UpgradeToSRP(args*). However, no resends are
automated, so hook an timer of expiration until someone, I or you upgrade this,
that will restart upgrading - this is still little bit buggy, havn't tested it.
Examples are provided in the UnitTest.
Original comment by dj.gaym...@gmail.com
on 8 May 2011 at 10:45
Attachments:
Before you can apply the patch, you have to make the following changes:
1. Create a branch from revision 159
2. Move NetSRP.cs to the Lidgren.Network/Authentication folder
3. Apply the patches
Now you should be able to merge the trunk to the srp branch (after fixing some
conflicts for NetSRP.cs and some others).
Original comment by mark.jun...@gmail.com
on 23 Jan 2012 at 8:55
I attached two patches containing the SRP patches but they can be applied to
the revision 209.
The first patch is just a simple "port" of the original patch. The second one
fixes some spelling mistakes. The second patch breaks existing code that uses
the old SRP patch because the second patch renames some enum values. These
patches were created with Mercurial but they should be applicable by SVN too.
Original comment by mark.jun...@gmail.com
on 23 Jan 2012 at 9:11
Attachments:
I will re-patch the srp later next week. I rewrote it a bit. Only issue i
have is that Lidgren sometimes fails to establish srp, because the
connecting state is reset when the status becomes: reconnecting.
Original comment by dj.gaym...@gmail.com
on 1 Feb 2012 at 8:16
Just looked at your spelling patch code. It doesn't break anything because
that enumeration is not exposed to the user.
Op 1 feb. 2012 09:16 schreef "Derk-Jan Karrenbeld" <dj.gaymail@gmail.com>
het volgende:
Original comment by dj.gaym...@gmail.com
on 1 Feb 2012 at 8:20
https://github.com/Derkje-J/lidgren-srp6a
There.
Original comment by dj.gaym...@gmail.com
on 3 Dec 2012 at 2:00
Updated to https://github.com/SleeplessByte/lidgren-srp6a
Original comment by dj.gaym...@gmail.com
on 3 Nov 2013 at 1:54
Original issue reported on code.google.com by
dj.gaym...@gmail.com
on 15 Apr 2011 at 6:23