summaryrefslogtreecommitdiff
path: root/doc/srp.rst
diff options
context:
space:
mode:
authorTom Cocagne <devnull@localhost>2010-12-31 15:26:43 -0500
committerTom Cocagne <devnull@localhost>2010-12-31 15:26:43 -0500
commitbb9036d6a3452299ba4270a5b6bd47145e016a84 (patch)
treea3f2d0b627a20e0fcdce10002fae0c733bca3a7f /doc/srp.rst
parent8d58dad120a39b7fcb8b012ff584686f3fac5a8e (diff)
renamed gen_sv to create_salted_verification_key
Diffstat (limited to 'doc/srp.rst')
-rw-r--r--doc/srp.rst34
1 files changed, 19 insertions, 15 deletions
diff --git a/doc/srp.rst b/doc/srp.rst
index e6708fe..4a593c4 100644
--- a/doc/srp.rst
+++ b/doc/srp.rst
@@ -46,15 +46,17 @@ Briefly stated, the advantages of SRP are:
Usage
-----
-Use of SRP begins by using the gen_sv() function to create a salted
-verification key from the user's password. The salt and key are stored
-on the server and will be used during the authentication process.
+Use of SRP begins by using the create_salted_verification_key() function to
+create a salted verification key from the user's password. The salt and key
+are stored on the server and will be used during the authentication process.
-TODO: Lay out the steps of the protocol
+The rest of the authentication process occurs as an exchange of
+messages between the clent and the server. The :ref:`example` below provides
+a simple demonstration of the protocol. A comprehensive description of the SRP
+protocol is contained in the :ref:`protocol-description` section.
-
-The User & Verifier construtors, as well as the gen_sv() function,
-take optional hashing algorithm and prime number arguments. Generally
+The User & Verifier construtors, as well as the create_salted_verification_key()
+function, take optional hashing algorithm and prime number arguments. Generally
speaking, more bits means more security but comes at the cost of
increased computation time. The hashing and prime number parameters passed
to the User and Verifier constructors must match those used to create the
@@ -99,7 +101,7 @@ be used with NG_CUSTOM.
Functions
---------
-.. function:: gen_sv ( username, password[, hash_alg=SHA1, ng_type=NG_1024, n_hex=None, g_hex=None] )
+.. function:: create_salted_verification_key ( username, password[, hash_alg=SHA1, ng_type=NG_1024, n_hex=None, g_hex=None] )
Generates a salt and verifier for the given username and password.
Returns (salt_bytes, verifier_bytes)
@@ -120,9 +122,9 @@ user.
*username* Name of the remote user being authenticated.
- *bytes_s* Salt generated by :func:`gen_sv`.
+ *bytes_s* Salt generated by :func:`create_salted_verification_key`.
- *bytes_v* Verifier generated by :func:`gen_sv`.
+ *bytes_v* Verifier generated by :func:`create_salted_verification_key`.
*bytes_A* Challenge from the remote user. Generated by
:meth:`User.start_authentication`
@@ -202,17 +204,18 @@ username/password pair.
process. If the authentication succeded :meth:`authenticated` will
return True
-
-Examples
---------
+.. _example:
+
+Example
+-------
Simple Usage Example::
import srp
- # The salt and verifier returned from srp.gen_sv() should be
+ # The salt and verifier returned from srp.create_salted_verification_key() should be
# stored on the server.
- salt, verifier = srp.gen_sv( 'testuser', 'testpassword' )
+ salt, verifier = srp.create_salted_verification_key( 'testuser', 'testpassword' )
# ~~~ Begin Authentication ~~~
@@ -263,6 +266,7 @@ authentication steps on multi-core systems will yield a substantial
performance increase.
+.. _protocol-description:
SRP 6a Protocol Description
---------------------------