summaryrefslogtreecommitdiff
path: root/docs/lib/passlib.totp-tutorial.rst
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2016-11-07 19:15:49 -0500
committerEli Collins <elic@assurancetechnologies.com>2016-11-07 19:15:49 -0500
commit63f952a7c9b0e306a8116e21cab9d8da6b811d6a (patch)
tree9e3a662648dc4e9f70d9c112857d0b73a866b14f /docs/lib/passlib.totp-tutorial.rst
parent4a8c04e2f2a232dbd021e094ef718066f5d63268 (diff)
downloadpasslib-63f952a7c9b0e306a8116e21cab9d8da6b811d6a.tar.gz
totp: stripping out HOTP support -- not generally used/useful in the real world
to justify the contortions it requires in the shared BaseOTP api.
Diffstat (limited to 'docs/lib/passlib.totp-tutorial.rst')
-rw-r--r--docs/lib/passlib.totp-tutorial.rst14
1 files changed, 2 insertions, 12 deletions
diff --git a/docs/lib/passlib.totp-tutorial.rst b/docs/lib/passlib.totp-tutorial.rst
index 39a8382..4a56088 100644
--- a/docs/lib/passlib.totp-tutorial.rst
+++ b/docs/lib/passlib.totp-tutorial.rst
@@ -12,7 +12,7 @@ Overview
========
The :mod:`passlib.totp` module provides a set of classes for adding
two-factor authentication (2FA) support into your application,
-using the widely supported TOTP / HOTP specifications.
+using the widely supported TOTP specification.
This module is designed to support a variety of use cases, including:
@@ -32,11 +32,6 @@ to the more complex highlevel ones.
.. seealso:: The :mod:`passlib.totp` api reference,
which lists all details of all the classes and methods mentioned here.
-.. todo::
-
- This tutorial is currently focused on TOTP usage,
- and needs to be expanded to include HOTP.
-
.. rst-class:: emphasize-children
Basic Usage
@@ -110,7 +105,7 @@ parameters of the :meth:`~passlib.totp.BaseOTP.to_uri` method:
On the client side, passlib offers a helper method for loading from a provisioning
URI. This can be useful for testing URI encoding & output:
- >>> # create new TOTP/HOTP instance from a provisioning uri:
+ >>> # create new TOTP instance from a provisioning uri:
>>> from passlib import totp
>>> otp = totp.from_uri('otpauth://totp/demo-user?secret=GVDOQ7NP6XPJWE4CWCLFFSXZH6DTAZWM&issuer=myapp.example.org')
>>> otp.base32_key
@@ -383,11 +378,6 @@ guarantees an attacker will be able to guess any given token.
The Gory Details
----------------
-For HOTP, the formula is ``odds = guesses * (1 + window) / 10**digits``;
-where ``guesses`` is the number of attempts an attacker can make before being
-locked out, ``window`` is the :meth:`HOTP.verify` window (as measured in counter steps),
-and ``digits`` is the number of digits in the HTOP token.
-
For TOTP, the formula is ``odds = guesses * (1 + 2 * window / period) / 10**digits``;
where ``window`` in this case is the :meth:`TOTP.verify` window (measured in seconds),
and ``period`` is the number of seconds before the token is rotated.