[issue26798] add BLAKE2 to hashlib

2016-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa89fff0b52c by Christian Heimes in branch 'default': Issue #26798: Coverity complains about potential memcpy() of overlapped regions. It doesn't hurt to use memmove() here. CID 1372514 / CID 1372515. Upstream

[issue26798] add BLAKE2 to hashlib

2016-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26798] add BLAKE2 to hashlib

2016-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 46b34706eb41 by Christian Heimes in branch 'default': Issue 26798: fetch OSError and HTTPException like other tests that use open_urlresource. https://hg.python.org/cpython/rev/46b34706eb41 -- ___

[issue26798] add BLAKE2 to hashlib

2016-09-08 Thread Christian Heimes
Christian Heimes added the comment: Other tests catch OSError and HTTPError. I have changed read_vectors() to do the same for now. -- ___ Python tracker

[issue26798] add BLAKE2 to hashlib

2016-09-08 Thread Martin Panter
Martin Panter added the comment: . Looks like Issue 28001 is open about the same problem. But I presume other tests use open_urlresource(), so why don’t they also fail? -- ___ Python tracker

[issue26798] add BLAKE2 to hashlib

2016-09-07 Thread Martin Panter
Martin Panter added the comment: Seems the test fails if the installed Python tree is not writable: http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/1005/steps/test/logs/stdio == ERROR:

[issue26798] add BLAKE2 to hashlib

2016-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset afa5a16456ed by Christian Heimes in branch 'default': Issue #26798: Hello Winndows, my old friend. I've come to fix blake2 for you again. https://hg.python.org/cpython/rev/afa5a16456ed -- ___ Python

[issue26798] add BLAKE2 to hashlib

2016-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset a1e032dbcf86 by Christian Heimes in branch 'default': Issue #26798: for loop initial declarations, take 3 https://hg.python.org/cpython/rev/a1e032dbcf86 -- ___ Python tracker

[issue26798] add BLAKE2 to hashlib

2016-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c31599de76a by Christian Heimes in branch 'default': Issue #26798: for loop initial declarations, take 2 https://hg.python.org/cpython/rev/5c31599de76a -- ___ Python tracker

[issue26798] add BLAKE2 to hashlib

2016-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset be6f3449ac13 by Christian Heimes in branch 'default': Issue #26798: for loop initial declarations are only allowed in C99 or C11 mode https://hg.python.org/cpython/rev/be6f3449ac13 -- ___ Python tracker

[issue26798] add BLAKE2 to hashlib

2016-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4969f6d343b1 by Christian Heimes in branch 'default': Issue #26798: Add BLAKE2 (blake2b and blake2s) to hashlib. https://hg.python.org/cpython/rev/4969f6d343b1 -- nosy: +python-dev ___ Python tracker

[issue26798] add BLAKE2 to hashlib

2016-09-04 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your review. I have addressed your points and updated/fixed/renamed documentation and comments. -- Added file: http://bugs.python.org/file44358/BLAKE2-hash-algorithm-for-CPython-5.patch ___ Python

[issue26798] add BLAKE2 to hashlib

2016-09-04 Thread Martin Panter
Martin Panter added the comment: Maybe call the RST file hashlib-blake2.rst (hyphen, not dot), otherwise it looks like it is a separate submodule under the hashlib package. Also there seems to be a versionadded tag missing in the documentation. In setup.py, the os.uname().machine check seems

[issue26798] add BLAKE2 to hashlib

2016-08-20 Thread Christian Heimes
Christian Heimes added the comment: Patch 4 uses the latest revision of the reference implementation. -- Added file: http://bugs.python.org/file44175/BLAKE2-hash-algorithm-for-CPython-4.patch ___ Python tracker

[issue26798] add BLAKE2 to hashlib

2016-06-12 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: christian.heimes -> ___ Python tracker ___ ___

[issue26798] add BLAKE2 to hashlib

2016-06-02 Thread Christian Heimes
Christian Heimes added the comment: New patch: - I moved the test vectors out of the repos. They are currently hosted on github. I'll move them to pythontest infra later. - I dropped special case for systems w/o uint64. Python 3.6+ requires 64 bit int types to compile. -- Added

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Dmitry Chestnykh
Dmitry Chestnykh added the comment: > I have replaced verify() with compare_digest(). +>>> compare_digesty(cookie, '0102030405060708090a0b0c0d0e0f00') Typo here. Also, this doesn't look like it compares the digest. Maybe you can keep the verify() function, but make it use compare_digest()

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your review, Dmitry. I have replaced verify() with compare_digest(). Python requires a C89 compatible compiler and 32bit architecture. C89 doesn't mandate 64bit integers. As far as I remember there is (or was) one buildbot with a compiler, that

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Dmitry Chestnykh
Dmitry Chestnykh added the comment: Christian: yes, and I'm also happy that you kept the drawing of hash tree, as it helps a lot with understanding of terminology. I had a quick look at the patch and it looks good to me. Some comments, which you can ignore: In keyed hashing example there's:

[issue26798] add BLAKE2 to hashlib

2016-05-08 Thread Christian Heimes
Christian Heimes added the comment: Here is my first patch. I have tested it on X86_64 (m64 and m32) and ARMv7. It should compile on Windows but I don't have a working Windows box on my box. Dmitry, I have copied your documentation. Are you fine with that? TODO: - set BLAKE2_USE_SSE on

[issue26798] add BLAKE2 to hashlib

2016-04-20 Thread Christian Heimes
Christian Heimes added the comment: First experimental version of blake2b and blake2s for Python 3.6: https://github.com/tiran/cpython/commits/feature/blake2 The code is based on Dmitry Chestnykh's pyblake2 but modified to support argument clinic. I had to replace the macro magic with plain C

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: Confirm that the CC license is valid/acceptable with Van L. first. That's why I pointed at the Apache 2 code, already a known good license. :) On Mon, Apr 18, 2016, 2:51 PM Christian Heimes wrote: > > Christian Heimes added the

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Christian Heimes
Christian Heimes added the comment: BLAKE2 is under CC0 1.0 Universal, https://github.com/BLAKE2/libb2 OpenSSL 1.1.0 has no API to set salt, personal, digest length and key length (for keyed BLAKE2). I have asked Richard Salz and MJC if they'd accept a patch. Or I could ask Dmitry Chestnykh

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: CPython should not attempt make a judgement about the safety of a particular function. We can only document if something has known issues. We should only include things in the stdlib which are either (a) standard or (b) widely used regardless of being

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Christian Heimes
Christian Heimes added the comment: I have SHA-3, SHAKE and BLAKE2s / BLAKE2b on my radar. PEP 247 and the current API definition of the hashlib module is too limited for the new hashing algorithms. It lacks variable output for SHAKE as well as salt and personalization for BLAKE. I started to

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Ned Deily
Changes by Ned Deily : -- nosy: +christian.heimes, gregory.p.smith ___ Python tracker ___

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Donald Stufft
Donald Stufft added the comment: > Right now all the hashlib algorithms are backed by OpenSSL. As far as I know, hashlib ships it's own implementations of anything that is a guaranteed algorithms (currently md5, sha1, and sha2, presumably sha3 too once that gets added). So I guess one

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Alex Gaynor
Alex Gaynor added the comment: Right now all the hashlib algorithms are backed by OpenSSL. OpenSSL 1.1.0 will have blake2, so perhaps the right move is just to wait for that to drop in a few weeks? Sadly many users with old OpenSSL's still won't have blake2, but pretty quickly Windows and OS

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Zooko Wilcox-O'Hearn
Zooko Wilcox-O'Hearn added the comment: Oh, just to be clear, I didn't mean to imply that BLAKE2 is _less_ safe than SHA-3. My best estimate is that BLAKE2 and SHA-3 are equivalently safe, and that either of them is safer than SHA-2, SHA-1, or MD5. --

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Zooko Wilcox-O'Hearn
New submission from Zooko Wilcox-O'Hearn: (Disclosure: I'm one of the authors of BLAKE2.) Please include BLAKE2 in hashlib. It well-suited for hashing long inputs (e.g. files), because it is substantially faster than SHA-3, SHA-2, SHA-1, or MD5 while also being safer than SHA-2, SHA-1, or