classification
Title: PBKDF2 support
Type: enhancement Stage: resolved
Components: Extension Modules Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, dstufft, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2013-07-28 15:11 by christian.heimes, last changed 2013-11-06 16:25 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
pbkdf2_3.patch christian.heimes, 2013-10-12 22:14 review
Messages (12)
msg193832 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-28 15:11
The patch is a proof of concept for PBKDF2 support for the OpenSSL variant of hashlib. It's a thin wrapper around PKCS5_PBKDF2_HMAC() and is deliberately designed as low level API with bytes and input and output types. High level wrappers can do the conversation and choose sensible values for salt, iterations and key length.
msg193835 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-07-28 17:44
Please use the "y*" format, not "y#".
Also, I would lower-case "pbkdf2", just as we already lower-case "md5", "sha1", etc.
msg199601 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-12 17:00
Done
msg199626 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-12 21:46
The patch looks good at first sight. It still needs docs and tests :)

Just one thing: are we sure PKCS5_PBKDF2_HMAC is defined on old OpenSSL versions, or does it need a #ifdef?
msg199628 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-12 22:05
Here is a new patch with tests, documentation and some minor improvements. The last argument is now called dklen. If dklen is omitted or None than dklen is set to digest size of the hash algorithm.
msg199630 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-12 22:14
Fixed copy n' paste bug in docs.
msg199636 - (view) Author: Roundup Robot (python-dev) Date: 2013-10-12 22:52
New changeset 5fd56d6d3fce by Christian Heimes in branch 'default':
Issue #18582: Add 'pbkdf2_hmac' to the hashlib module.
http://hg.python.org/cpython/rev/5fd56d6d3fce
msg199641 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-12 23:16
Thanks Antoine!
msg200410 - (view) Author: Roundup Robot (python-dev) Date: 2013-10-19 12:25
New changeset 0a26ef834a49 by Christian Heimes in branch 'default':
Issue #18582: provide a faster C implementation of pbkdf2_hmac that works with OpenSSL < 1.0
http://hg.python.org/cpython/rev/0a26ef834a49
msg200429 - (view) Author: Roundup Robot (python-dev) Date: 2013-10-19 16:00
New changeset 88fac1574049 by Christian Heimes in branch 'default':
Issue #18582: HMAC_CTX_copy() is not available on OpenSSL < 1.0
http://hg.python.org/cpython/rev/88fac1574049
msg200451 - (view) Author: Roundup Robot (python-dev) Date: 2013-10-19 17:41
New changeset a15fcb847515 by Christian Heimes in branch 'default':
Issue #18582: skip test of _hashlib.pbkdf2_hmac if OpenSSL is not available or too old
http://hg.python.org/cpython/rev/a15fcb847515
msg202272 - (view) Author: Roundup Robot (python-dev) Date: 2013-11-06 16:25
New changeset 07fa1ed0d551 by Christian Heimes in branch 'default':
Issue #18582: fix memory leak in pbkdf2 code
http://hg.python.org/cpython/rev/07fa1ed0d551
History
Date User Action Args
2013-11-06 16:25:33python-devsetmessages: + msg202272
2013-10-19 17:41:19python-devsetmessages: + msg200451
2013-10-19 16:00:17python-devsetmessages: + msg200429
2013-10-19 12:25:47python-devsetmessages: + msg200410
2013-10-12 23:16:20christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg199641

stage: patch review -> resolved
2013-10-12 22:52:53python-devsetnosy: + python-dev
messages: + msg199636
2013-10-12 22:14:17christian.heimessetfiles: - pbkdf2_2.patch
2013-10-12 22:14:10christian.heimessetfiles: - pbkdf2_3.patch
2013-10-12 22:14:05christian.heimessetfiles: + pbkdf2_3.patch

messages: + msg199630
2013-10-12 22:05:09christian.heimessetfiles: + pbkdf2_3.patch

messages: + msg199628
2013-10-12 22:03:50christian.heimessetfiles: - pbkdf2.patch
2013-10-12 21:46:02pitrousetmessages: + msg199626
2013-10-12 17:00:51christian.heimessetfiles: + pbkdf2_2.patch

messages: + msg199601
stage: patch review
2013-08-24 22:25:22dstufftsetnosy: + dstufft
2013-07-28 17:44:07pitrousetnosy: + pitrou
messages: + msg193835
2013-07-28 15:14:40christian.heimessetfiles: + pbkdf2.patch
2013-07-28 15:14:22christian.heimessetfiles: - pbkdf2.patch
2013-07-28 15:11:19christian.heimescreate