Package twisted :: Package python :: Module otp |
[frames | no frames]

## Module twisted.python.otp

A One-Time Password System based on RFC 2289

The class Authenticator contains the hashing-logic, and the parser for the readable output. It also contains challenge which returns a string describing the authentication scheme for a client.

OTP is a password container for an user on a server.

NOTE: Does not take care of transmitting the shared secret password.

At the end there's a dict called dict which is dictionary contain 2048 words for storing pronouncable 11-bit values. Taken from RFC 1760.

Uses the MD5- and SHA-algorithms for hashing

Todo: RFC2444, SASL (perhaps), parsing hex-responses

Classes
`OTP` | An automatic version of the OTP-Authenticator
`OTPAuthenticator` | A One Time Password System

Exceptions
`Unauthorized` | the Unauthorized exception

Function Summary
| ``longToString`(l)` Convert long to digest
| ``stringToDWords`(s)` Convert digest to a list of four 32-bits words
| ``stringToLong`(s)` Convert digest to long

Variable Summary
`list` | `dict` = `['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'A...`
`dict` | `hashid` = `{<module 'sha' from '/usr/lib/python2.2/lib-dyn...`
`int` | `INITIALSEQUENCE` = 1000
`int` | `MINIMUMSEQUENCE` = 50

Function Details

### longToString(l) Convert long to digest

### stringToDWords(s) Convert digest to a list of four 32-bits words

### stringToLong(s) Convert digest to long

Variable Details

    ### dict Type: `list` Value:
        ['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'AGO', 'AID']

    ### hashid Type: `dict` Value:
        {<module 'md5' from '/usr/lib/python2.2/lib-dynload/md5.so'>: 'md5',
         <module 'sha' from '/usr/lib/python2.2/lib-dynload/sha.so'>: 'sha1'}

    ### INITIALSEQUENCE Type: `int` Value:
        1000

    ### MINIMUMSEQUENCE Type: `int` Value:
        50

Generated by Epydoc 2.0 on Sat Oct 25 00:54:50 2003 | http://epydoc.sf.net