[Python-Dev] cpython: Issue #18582: provide a faster C implementation of pbkdf2_hmac that works with

Antoine Pitrou solipsis at pitrou.net
Sat Oct 19 16:59:47 CEST 2013


On Sat, 19 Oct 2013 15:36:02 +0200
Christian Heimes <christian at python.org> wrote:
> Am 19.10.2013 14:54, schrieb Antoine Pitrou:
> > On Sat, 19 Oct 2013 14:25:28 +0200 (CEST)
> > christian.heimes <python-checkins at python.org> wrote:
> >>  
> >> -   .. note:: A fast implementation of *pbkdf2_hmac* is only available with
> >> -      OpenSSL 1.0 and newer. The Python implementation uses an inline
> >> -      version of :mod:`hmac` and is about three times slower. Contrary to
> >> -      OpenSSL's current code the length of the password has only a minimal
> >> -      impact on the runtime of the Python implementation.
> >> +   .. note:: A fast implementation of *pbkdf2_hmac* is available with OpenSSL.
> >> +      The Python implementation uses an inline version of :mod:`hmac`. It is
> >> +      about three times slower and doesn't release the GIL.
> > 
> > The documentation should stop talking about the Python implementation
> > if the C implementation is always used by default.
> 
> The C implementation is not used if Python is not compiled with OpenSSL
> support.

But that's a fringe situation. Any normal build of Python should be
compiled with OpenSSL support (and any decent binary build is). I think
the mention in the docs is distracting and will create pointless
uncertainty in the reader.

Regards

Antoine.


More information about the Python-Dev mailing list