twisted.python.otp.html [plain text]
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>twisted.python.otp</title>
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<font size="-1"><b class="breadcrumbs">
<a href="twisted.html">Package twisted</a> ::
<a href="twisted.python.html">Package python</a> ::
Module otp
</b></font></br>
</td>
<td><table cellpadding="0" cellspacing="0">
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="twisted.python.otp.html" target="_top">no frames</a>]</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF MODULE DESCRIPTION =========== -->
<h2 class="module">Module twisted.python.otp</h2>
<p>A One-Time Password System based on RFC 2289</p>
<p>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.</p>
<p>OTP is a password container for an user on a server.</p>
<p>NOTE: Does not take care of transmitting the shared secret
password.</p>
<p>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.</p>
<p>Uses the MD5- and SHA-algorithms for hashing</p>
Todo: RFC2444, SASL (perhaps), parsing hex-responses
<hr/>
<!-- =========== START OF CLASSES =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Classes</th></tr>
<tr><td width="15%">
<b><a href="twisted.python.otp.OTP.html"><code>OTP</code></a></b></td>
<td>An automatic version of the OTP-Authenticator</td></tr>
<tr><td width="15%">
<b><a href="twisted.python.otp.OTPAuthenticator.html"><code>OTPAuthenticator</code></a></b></td>
<td>A One Time Password System</td></tr>
</table><br />
<!-- =========== START OF EXCEPTIONS =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Exceptions</th></tr>
<tr><td width="15%">
<b><a href="twisted.python.otp.Unauthorized.html"><code>Unauthorized</code></a></b></td>
<td>the Unauthorized exception</td></tr>
</table><br />
<!-- =========== START OF FUNCTION SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Function Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="twisted.python.otp.html#longToString" class="summary-sig-name"><code>longToString</code></a>(<span class=summary-sig-arg>l</span>)</span></code>
<br />
Convert long to digest</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="twisted.python.otp.html#stringToDWords" class="summary-sig-name"><code>stringToDWords</code></a>(<span class=summary-sig-arg>s</span>)</span></code>
<br />
Convert digest to a list of four 32-bits words</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="twisted.python.otp.html#stringToLong" class="summary-sig-name"><code>stringToLong</code></a>(<span class=summary-sig-arg>s</span>)</span></code>
<br />
Convert digest to long</td></tr>
</table><br />
<!-- =========== START OF VARIABLE SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Variable Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>list</code></font></td>
<td><b><a href="twisted.python.otp.html#dict"><code>dict</code></a></b> = <span title="['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'AGO', 'AID', 'AIM', 'AIR', 'ALL', 'ALP', 'AM', 'AMY', 'AN', 'ANA', 'AND', 'ANN', 'ANT', 'ANY', 'APE', 'APS', 'APT', 'ARC', 'ARE', 'ARK', 'ARM', 'ART', 'AS', 'ASH', 'ASK', 'AT', 'ATE', 'AUG', 'AUK', 'AVE', 'AWE', 'AWK', 'AWL', 'AWN', 'AX', 'AYE', 'BAD', 'BAG', 'BAH', 'BAM', 'BAN', 'BAR', 'BAT', 'BAY', 'BE', 'BED', 'BEE', 'BEG', 'BEN', 'BET', 'BEY', 'BIB', 'BID', 'BIG', 'BIN', 'BIT', 'BOB', 'BOG', 'BON', 'BOO', 'BOP', 'BOW', 'BOY', 'BUB', 'BUD', 'BUG', 'BUM', 'BUN', 'BUS', 'BUT', 'BUY', 'BY', 'BYE', 'CAB', 'CAL', 'CAM', 'CAN', 'CAP', 'CAR', 'CAT..."><code>['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'A<span class="variable-ellipsis">...</span></code>
</span></td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>dict</code></font></td>
<td><b><a href="twisted.python.otp.html#hashid"><code>hashid</code></a></b> = <span title="{<module 'sha' from '/usr/lib/python2.2/lib-dynload/sha.so'>: 'sha1', <module 'md5' from '/usr/lib/python2.2/lib-dynload/md5.so'>: 'md5'}"><code>{<module 'sha' from '/usr/lib/python2.2/lib-dyn<span class="variable-ellipsis">...</span></code>
</span></td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
<td><b><a href="twisted.python.otp.html#INITIALSEQUENCE"><code>INITIALSEQUENCE</code></a></b> = <span title="1000">1000 </span></td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
<td><b><a href="twisted.python.otp.html#MINIMUMSEQUENCE"><code>MINIMUMSEQUENCE</code></a></b> = <span title="50">50 </span></td></tr>
</table><br />
<!-- =========== START OF FUNCTION DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Function Details</th></tr>
</table>
<a name="longToString"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">longToString</span>(<span class=sig-arg>l</span>)</span>
</h3>
Convert long to digest
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="stringToDWords"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">stringToDWords</span>(<span class=sig-arg>s</span>)</span>
</h3>
Convert digest to a list of four 32-bits words
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="stringToLong"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">stringToLong</span>(<span class=sig-arg>s</span>)</span>
</h3>
Convert digest to long
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<br />
<!-- =========== START OF VARIABLE DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Variable Details</th></tr>
</table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="dict"></a>
<h3>dict</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>list</code>
</dd>
<span title="['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'AGO', 'AID', 'AIM', 'AIR', 'ALL', 'ALP', 'AM', 'AMY', 'AN', 'ANA', 'AND', 'ANN', 'ANT', 'ANY', 'APE', 'APS', 'APT', 'ARC', 'ARE', 'ARK', 'ARM', 'ART', 'AS', 'ASH', 'ASK', 'AT', 'ATE', 'AUG', 'AUK', 'AVE', 'AWE', 'AWK', 'AWL', 'AWN', 'AX', 'AYE', 'BAD', 'BAG', 'BAH', 'BAM', 'BAN', 'BAR', 'BAT', 'BAY', 'BE', 'BED', 'BEE', 'BEG', 'BEN', 'BET', 'BEY', 'BIB', 'BID', 'BIG', 'BIN', 'BIT', 'BOB', 'BOG', 'BON', 'BOO', 'BOP', 'BOW', 'BOY', 'BUB', 'BUD', 'BUG', 'BUM', 'BUN', 'BUS', 'BUT', 'BUY', 'BY', 'BYE', 'CAB', 'CAL', 'CAM', 'CAN', 'CAP', 'CAR', 'CAT..."> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'AGO', 'AID'] </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="hashid"></a>
<h3>hashid</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>dict</code>
</dd>
<span title="{<module 'sha' from '/usr/lib/python2.2/lib-dynload/sha.so'>: 'sha1', <module 'md5' from '/usr/lib/python2.2/lib-dynload/md5.so'>: 'md5'}"> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
{<module 'md5' from '/usr/lib/python2.2/lib-dynload/md5.so'>: 'md5',
<module 'sha' from '/usr/lib/python2.2/lib-dynload/sha.so'>: 'sha1'} </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="INITIALSEQUENCE"></a>
<h3>INITIALSEQUENCE</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>int</code>
</dd>
<span title="1000"> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
1000 </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="MINIMUMSEQUENCE"></a>
<h3>MINIMUMSEQUENCE</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>int</code>
</dd>
<span title="50"> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
50 </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<br />
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font size="-2">Generated by Epydoc 2.0 on Sat May 15 20:08:19 2004</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
</table>
</body>
</html>