t.p.o.OTPAuthenticator : class documentation

Part of twisted.python.otp View Source View In Hierarchy

Known subclasses: twisted.python.otp.OTP

A One Time Password System

Based on RFC 2289, which is based on a the S/KEY Authentication-scheme. It uses the MD5- and SHA-algorithms for hashing

The variable OTP is at all times a 64bit string.

Instance VariableshashAn object which can be used to compute hashes. This is either md5 or sha1.
Method __init__ Set the hash to either md5 or sha1
Method generateSeed Return a 10 char random seed, with 6 lowercase chars and 4 digits
Method foldDigest Undocumented
Method foldDigest128 Fold a 128 bit digest to 64 bit
Method foldDigest160 Fold a 160 bit digest to 64 bit
Method hashUpdate Run through the hash and fold to 64 bit
Method generateOTP Return a 64 bit OTP based on inputs Run through makeReadable to get a 6 word pass-phrase
Method calculateParity Calculate the parity from a 64bit OTP
Method makeReadable Returns a 6 word pass-phrase from a 64bit OTP
Method challenge Return a challenge in the format otp-<hash> <sequence> <seed>
Method parsePhrase Decode the phrase, and return a 64bit OTP I will raise Unauthorized if the parity is wrong TODO: Add support for hex (MUST) and the '2nd scheme'(SHOULD)
def __init__(self, hash=md5): (source)
Set the hash to either md5 or sha1
def generateSeed(self): (source)
Return a 10 char random seed, with 6 lowercase chars and 4 digits
def foldDigest(self, otp): (source)
Undocumented
def foldDigest128(self, otp128): (source)
Fold a 128 bit digest to 64 bit
def foldDigest160(self, otp160): (source)
Fold a 160 bit digest to 64 bit
def hashUpdate(self, digest): (source)
Run through the hash and fold to 64 bit
def generateOTP(self, seed, passwd, sequence): (source)
Return a 64 bit OTP based on inputs Run through makeReadable to get a 6 word pass-phrase
def calculateParity(self, otp): (source)
Calculate the parity from a 64bit OTP
def makeReadable(self, otp): (source)
Returns a 6 word pass-phrase from a 64bit OTP
def challenge(self, seed, sequence): (source)
Return a challenge in the format otp-<hash> <sequence> <seed>
def parsePhrase(self, phrase): (source)
Decode the phrase, and return a 64bit OTP I will raise Unauthorized if the parity is wrong TODO: Add support for hex (MUST) and the '2nd scheme'(SHOULD)
API Documentation for Twisted, generated by pydoctor at 2012-02-14 18:17:43.