-
Notifications
You must be signed in to change notification settings - Fork 2
New Login System (NLS)
David edited this page Oct 5, 2018
·
1 revision
-
NLS_Client
- the client implementation of NLS- Processes the server challenge and verifies the server's proof.
-
NLS_Client(username, password, [version], [private key])
- 'version' specifies the NLS version - default is version 2, but version 1 is used for the WarCraft 3 DEMO.
- 'private key' can be set to use a known value for the client's private key, otherwise one will be randomly generated.
-
process_challenge(salt, server public key)
- processes the challenge presented by the server and returns the client's proof- salt and the public key (B) should be bytes objects as returned by the server
-
verify(server proof)
- verifies the server's password proof (this should be done to confirm that the server actually knows your password) -
get_client_key()
- returns the client's public key (A) as a 32-byte array used to start the NLS login process -
authenticated()
- returns TRUE if the client has fully authenticated with the server and verified it's proof
-
NLS_Server
- the server implementation of NLS- Challenges the client and verifies its password proof.
-
NLS_Server(username, salt, verifier, client public key, [version], [private key])
- 'version' specifies the NLS version (see NLS_Client)
- 'salt' and 'verifier' are the stored values associated with the account, as bytes objects
- 'client public key' is the key used by the client to initiate the login process (A)
- 'private key' can be set to use a known value for the server's private key, otherwise one will be randomly generated
-
get_challenge()
- returns the salt and server key (B) used to challenge the client -
verify(client proof)
- verifies that the client knows the password -
authenticated()
- returns TRUE if the client has passed the challenge
https://github.com/Davnit/bncs.py/blob/master/bncs/hashing/nls.py