[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e4da3ba9dcac by Benjamin Peterson in branch '2.7':
backport hashlib.pbkdf2_hmac per PEP 466 (closes #21304)
http://hg.python.org/cpython/rev/e4da3ba9dcac

--
nosy: +python-dev
resolution:  - fixed
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Looks like there's a debugging turd in the test.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-26 Thread Alex Gaynor

Alex Gaynor added the comment:

New patch removes the pdb nonsense in the test.

--
Added file: http://bugs.python.org/file35375/pbkdf2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-21 Thread Alex Gaynor

Alex Gaynor added the comment:

Updated patch applies all of MAL's suggestions. Except the buffer() one, the 
purpose of the buffer() call is to make it an error to pass a list (or random 
other types) since you can call bytes() on any object.

--
Added file: http://bugs.python.org/file35309/pbkdf2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-21 Thread Alex Gaynor

Alex Gaynor added the comment:

As a note, the current code is basically identical to the code in Christain's 
backport, without the py3k compat.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Some comments:

 * Python 2.7 ships with OpenSSL 0.9.8 on Windows, so the Python version will 
always get used on that platform, so it needs to be fast.

 * The iterations loop should use xrange instead of range

 * The .encode('ascii') in _long_to_bin() is not necessary in Python 2

 * Given that _long_to_bin() and _bin_to_long() are only used once in the 
function, it's better to inline the code directly.

 * bytes(buffer()) should not be necessary in Python 2, since objects with a 
buffer interface will usually also implement the tp_str slot used by bytes().

--
nosy: +lemburg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-19 Thread Christian Heimes

Christian Heimes added the comment:

Sorry that I join the party rather late.

How about you take my back port from 
https://bitbucket.org/tiran/backports.pbkdf2/ and remove all Python 3.x related 
code? :) I spent a lot of time to make the code as fast as possible.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 19.05.2014 12:24, Christian Heimes wrote:
 
 How about you take my back port from 
 https://bitbucket.org/tiran/backports.pbkdf2/ and remove all Python 3.x 
 related code? :) I spent a lot of time to make the code as fast as possible.

Could you perhaps compare this to the proposed patch ?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Alex Gaynor

Alex Gaynor added the comment:

New patch includes the documentation as well.

--
keywords: +needs review
Added file: http://bugs.python.org/file35242/pbkdf2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Alex Gaynor

Alex Gaynor added the comment:

I'm still concerned about the unicode issue, but I'm not sure what the right 
way to fix it is.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Donald Stufft

Donald Stufft added the comment:

The attached patch looks pretty good to me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Donald Stufft

Donald Stufft added the comment:

I don't think there's any way around it, nor do I think that it actually leaks 
any meaningful timing.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Donald Stufft

Donald Stufft added the comment:

Oh, gotcha.

Yea I agree, but it's Python 2.x that's par for the course.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Alex Gaynor

Alex Gaynor added the comment:

Sorry, I wasn't concerned from a timing attack perspective here, I was 
concerned from an oh my god implicit coercion is terrible perspective :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
title: PEP 446: Backport hashlib.pbkdf2_hmac to Python 2.7 - PEP 466: Backport 
hashlib.pbkdf2_hmac to Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

See also http://bugs.python.org/issue21288 to consider one 
fix/oversite/addition to the existing API as part of this process. (discuss 
that there)

by default: use the exact same API as 3.4 if it is suitable for PEP 466 and 
2.7.7's needs. the above issue is about fixing a possible oversight; so if it 
happens in 3.4 it should happen in 2.7.7.

--
nosy: +gregory.p.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Alex Gaynor

Alex Gaynor added the comment:

Yup, I've got my eyes on it, if anything lands there I'll include it in this in 
the 2.7 code, whether it's before or after this patch lands :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com