GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — gh-94199: Remove hashlib.pbkdf2_hmac() Python implementation by vstinner · Pull Request #94200 · python/cpython Conversation
|
|
@tiran: I'm not sure about what I wrote: "the C implementation is safer". I don't know the rationale for removing the pure Python implementation. The docstring says that the Python implement is faster for long passwords. The deprecation message seems to say that the OpenSSL implementation is faster. So the removal is about performance, not safety? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I replaced it with: "is faster" :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
In this case faster is safer! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Please update documentation, too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I updated the doc and I included your test change. Please review again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
PR rebased to fix a conflict on Doc/whatsnew/3.12.rst. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tiran: Would you mind to review the completed PR? (updated doc) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
PEP 399 says that we should have a pure python version when possible. That said if there is bona fide security risk, then it should be removed. Also, do you know if PyPy relies on the pure python version or does it too build with OpenSSL? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Remove the pure Python implementation of hashlib.pbkdf2_hmac(), deprecated in Python 3.10. Python 3.10 and newer requires OpenSSL 1.1.1 or newer (PEP 644), this OpenSSL version provides a C implementation of pbkdf2_hmac() which is faster.
PyPy gets the C implementation of pbkdf2_hmac() from OpenSSL: https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.9/lib_pypy/_hashlib/__init__.py#L205 It has the same Python fallack implementation if the C implementation is missing: https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.9/lib-python/3/hashlib.py#L192 But I guess that the C implementaiton is always available on OpenSSL 1.1.1 and newer. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ythonGH-94200) Remove the pure Python implementation of hashlib.pbkdf2_hmac(), deprecated in Python 3.10. Python 3.10 and newer requires OpenSSL 1.1.1 or newer (PEP 644), this OpenSSL version provides a C implementation of pbkdf2_hmac() which is faster.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.