diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-04-08 15:45:52 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-04-08 15:45:52 -0400 |
| commit | 0292bc5edfe56b99a23bc79ff168ea2628620929 (patch) | |
| tree | 41367946c372ad8164a62ff8b489cb33aa200359 /docs | |
| parent | ceade7a795b790aef042d800631c8164a6430cc3 (diff) | |
| parent | 37a3954c8bac9ade1cdcc0f86e2c2fb7f1d312fc (diff) | |
| download | passlib-0292bc5edfe56b99a23bc79ff168ea2628620929.tar.gz | |
Merge
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/lib/passlib.context.rst | 6 | ||||
| -rw-r--r-- | docs/lib/passlib.hash.oracle10.rst | 4 | ||||
| -rw-r--r-- | docs/lib/passlib.hash.phpass.rst | 10 | ||||
| -rw-r--r-- | docs/lib/passlib.hash.postgres_md5.rst | 4 | ||||
| -rw-r--r-- | docs/lib/passlib.utils.rst | 5 |
5 files changed, 19 insertions, 10 deletions
diff --git a/docs/lib/passlib.context.rst b/docs/lib/passlib.context.rst index 036af13..769815c 100644 --- a/docs/lib/passlib.context.rst +++ b/docs/lib/passlib.context.rst @@ -52,7 +52,7 @@ To start off with a simple example of how to create and use a CryptContext:: >>> #the scheme may be forced explicitly, >>> #though it must be one of the ones recognized by the context: - >>> hash2 = myctx.encrypt("too many secrets", scheme="des-crypt") + >>> hash2 = myctx.encrypt("too many secrets", scheme="des_crypt") >>> hash2 'm9pvLj4.hWxJU' @@ -75,7 +75,7 @@ To start off with a simple example of how to create and use a CryptContext:: Policy Examination ------------------ If introspection of a :class:`!CryptContext` instance -is needed, all configuration options are stored in a :class:`CryptPolicy` instance accessible through +is needed, all configuration options are stored in a :class:`!CryptPolicy` instance accessible through their ``policy`` attribute:: >>> from passlib.context import CryptContext @@ -89,6 +89,8 @@ their ``policy`` attribute:: >>> myctx.policy.get_handler() <class 'passlib.handlers.md5_crypt.md5_crypt'> +See the :class:`CryptPolicy` class for more details on it's interface. + Full Integration ---------------- The following is an extended example of how PassLib can be integrated into an existing diff --git a/docs/lib/passlib.hash.oracle10.rst b/docs/lib/passlib.hash.oracle10.rst index 88604ec..d5bb113 100644 --- a/docs/lib/passlib.hash.oracle10.rst +++ b/docs/lib/passlib.hash.oracle10.rst @@ -108,7 +108,9 @@ There is only one known issue: References ========== -.. [#enc] The exact encoding used in step 3 of the algorithm is not clear from known references (see below). +.. [#enc] The exact encoding used in step 3 of the algorithm is not clear from known references. + PassLib uses ``utf-16-be``, as this is both compatible with existing test vectors + and supports unicode input. .. [#] Description of Oracle10g and Oracle11g algorithms - `<http://www.notesbit.com/index.php/scripts-oracle/oracle-11g-new-password-algorithm-is-revealed-by-seclistsorg/>`_. diff --git a/docs/lib/passlib.hash.phpass.rst b/docs/lib/passlib.hash.phpass.rst index bde6861..c628005 100644 --- a/docs/lib/passlib.hash.phpass.rst +++ b/docs/lib/passlib.hash.phpass.rst @@ -5,7 +5,7 @@ .. currentmodule:: passlib.hash This algorithm is used primarily by PHP software -which uses the `PHPass <http://www.openwall.com/phpass/>`_ library, +which uses PHPass [#home], a PHP library similar to PassLib. The PHPass Portable Hash is a custom password hash used by PHPass as a fallback when none of it's other hashes are available. @@ -30,8 +30,8 @@ A phpass portable hash string has the format :samp:`$P${rounds}{salt}{checksum}` following the :ref:`modular-crypt-format`. * :samp:`{rounds}` is a single character encoding a 6-bit integer - encoding the number of rounds used. This is logarithmic, - the real number of rounds is ``2**rounds``. (rounds is encoded as ``8``, or 2**13 rounds, in the example). + representing the number of rounds used. This is logarithmic, + the real number of rounds is ``2**rounds``. (in the example, rounds is encoded as ``8``, or 2**13 iterations). * :samp:`{salt}` is eight characters drawn from ``[./0-9A-Za-z]``, providing a 48-bit salt (``ohUJ.1sd`` in the example). @@ -65,11 +65,11 @@ This implementation of phpass differs from the specification in one way: In order to provide support for unicode strings, PassLib will encode unicode passwords using ``utf-8`` - before running them through sha1-crypt. If a different + before running them through phpass. If a different encoding is desired by an application, the password should be encoded before handing it to PassLib. References ========== -.. [#pp] PHPass homepage, which describes the algorithm - +.. [#pp] PHPass homepage, which describes the Portable Hash algorithm - `<http://www.openwall.com/phpass/>`_ diff --git a/docs/lib/passlib.hash.postgres_md5.rst b/docs/lib/passlib.hash.postgres_md5.rst index a04f8b5..2aa1c66 100644 --- a/docs/lib/passlib.hash.postgres_md5.rst +++ b/docs/lib/passlib.hash.postgres_md5.rst @@ -57,8 +57,8 @@ PostgreSQL account passwords, due to the following flaws: (eg ``admin``, ``root``, ``postgres``) will occur more frequently as salts, weakening the effectiveness of the salt in foiling pre-computed tables. -* Since it sends raw ascii into a single MD5 digest, existing MD5 lookup tables - have an increased chance of being able to reverse common hashes. +* Since the keyspace of ``user+password`` is still a subset of ascii characters, + existing MD5 lookup tables have an increased chance of being able to reverse common hashes. * It's simplicity makes high-speed brute force attacks much more feasible. diff --git a/docs/lib/passlib.utils.rst b/docs/lib/passlib.utils.rst index 54ca509..a0ea14c 100644 --- a/docs/lib/passlib.utils.rst +++ b/docs/lib/passlib.utils.rst @@ -38,6 +38,11 @@ Randomness salt strings and other things which don't require a cryptographically strong source of randomness. + If :func:`os.urandom` support is available, + this will be an instance of :class:`!random.SystemRandom`, + otherwise it will use the default python PRNG class, + seeded from various sources at startup. + .. autofunction:: getrandbytes .. autofunction:: getrandstr |
