Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-06-12 Thread Christian Heimes
On 2016-05-25 12:29, Christian Heimes wrote: > Hi everybody, > > I have three hashing-related patches for Python 3.6 that are waiting for > review. Altogether the three patches add ten new hash algorithms to the > hashlib module: SHA3 (224, 256, 384, 512), SHAKE (SHA3 XOF 128, 256), > BLAKE2

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-29 Thread Christian Heimes
On 2016-05-28 23:51, Victor Stinner wrote: > Python 3.5 requires a 64 bit signed integer to build. Search for _PyTime > type in pytime.h ;-) Awesome! Thanks :) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-29 Thread M.-A. Lemburg
On 28.05.2016 23:13, Christian Heimes wrote: > On 2016-05-27 14:41, M.-A. Lemburg wrote: >> On 27.05.2016 22:58, Ryan Gonzalez wrote: >>> On May 27, 2016 3:04 PM, "Victor Stinner" wrote: Le vendredi 27 mai 2016, M.-A. Lemburg a écrit : >

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-29 Thread Victor Stinner
Python 3.5 requires a 64 bit signed integer to build. Search for _PyTime type in pytime.h ;-) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 15:52, Nathaniel Smith wrote: > On Fri, May 27, 2016 at 3:08 PM, M.-A. Lemburg wrote: >> On 27.05.2016 23:46, Donald Stufft wrote: >>> On May 27, 2016, at 5:41 PM, M.-A. Lemburg wrote: If we add this now, there should at least be an

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-28 14:06, Brett Cannon wrote: > We can always make the test vector file an external download like we do > for some of the codec tests. That is actually a great idea! :) Thanks Brett ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-28 14:06, Guido van Rossum wrote: > But you could choose which implementation to use at compile time based > on the autoconf output, right? We compile all modules and then let hashlib decide which implementation is used. hashlib prefers OpenSSL but falls back to our builtin modules.

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Donald Stufft
> On May 28, 2016, at 5:06 PM, Guido van Rossum wrote: > > But you could choose which implementation to use at compile time based > on the autoconf output, right? I think we should follow what hashlib already does. If we want to change the way it works that's fine but these

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 14:41, M.-A. Lemburg wrote: > On 27.05.2016 22:58, Ryan Gonzalez wrote: >> On May 27, 2016 3:04 PM, "Victor Stinner" wrote: >>> >>> Le vendredi 27 mai 2016, M.-A. Lemburg a écrit : The current patch is 1.2MB for SHA-3 - that's

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Guido van Rossum
But you could choose which implementation to use at compile time based on the autoconf output, right? On Sat, May 28, 2016 at 2:01 PM, Christian Heimes wrote: > On 2016-05-27 09:41, Chris Barker wrote: >> I'm probably showing my ignorance here, but couldn't we swap in the

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Brett Cannon
On Sat, May 28, 2016, 13:58 Christian Heimes wrote: > On 2016-05-27 03:54, M.-A. Lemburg wrote: > > On 27.05.2016 06:54, Raymond Hettinger wrote: > >> > >>> On May 25, 2016, at 3:29 AM, Christian Heimes > wrote: > >>> > >>> I have three

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Donald Stufft
> On May 28, 2016, at 5:01 PM, Christian Heimes wrote: > > No, not any time soon. As soon as we guarantee SHA3 support we have to > keep our own implementation for a couple of additional releases. We can > drop our own SHA3 code as soon as all supported OpenSSL versions

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 09:41, Chris Barker wrote: > I'm probably showing my ignorance here, but couldn't we swap in the > OpenSSL implementation when that becomes available? No, not any time soon. As soon as we guarantee SHA3 support we have to keep our own implementation for a couple of additional

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 03:54, M.-A. Lemburg wrote: > On 27.05.2016 06:54, Raymond Hettinger wrote: >> >>> On May 25, 2016, at 3:29 AM, Christian Heimes wrote: >>> >>> I have three hashing-related patches for Python 3.6 that are waiting for >>> review. Altogether the three patches add

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 03:44, Victor Stinner wrote: > Le 27 mai 2016 12:05 PM, "Donald Stufft" > a écrit : >> BLAKE2 is an interesting one, because while SHA3 is a NIST standard > (so it’s going to gain adoption because of that), BLAKE2 is at least as > strong

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Bernardo Sulzbach
On 05/27/2016 07:52 PM, Nathaniel Smith wrote: If we demote them to second-class support (by making them only > available in some builds, or using a slow pure Python implementation), > then we'll be encouraging users to use inferior hashes. We shouldn't > do this without a very good reason. I

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Nathaniel Smith
On Fri, May 27, 2016 at 3:08 PM, M.-A. Lemburg wrote: > On 27.05.2016 23:46, Donald Stufft wrote: >> >>> On May 27, 2016, at 5:41 PM, M.-A. Lemburg wrote: >>> >>> If we add this now, there should at least be an exit strategy >>> to remove the code again, when

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread M.-A. Lemburg
On 27.05.2016 23:46, Donald Stufft wrote: > >> On May 27, 2016, at 5:41 PM, M.-A. Lemburg wrote: >> >> If we add this now, there should at least be an exit strategy >> to remove the code again, when OpenSSL ships with the same >> code, IMO. > > I think it is a clear win to have

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Donald Stufft
> On May 27, 2016, at 5:41 PM, M.-A. Lemburg wrote: > > If we add this now, there should at least be an exit strategy > to remove the code again, when OpenSSL ships with the same > code, IMO. I think it is a clear win to have the fallback implementations in cases where

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread M.-A. Lemburg
On 27.05.2016 22:58, Ryan Gonzalez wrote: > On May 27, 2016 3:04 PM, "Victor Stinner" wrote: >> >> Le vendredi 27 mai 2016, M.-A. Lemburg a écrit : >>> >>> The current patch is 1.2MB for SHA-3 - that's pretty heavy for just >>> a few hash functions,

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Ryan Gonzalez
On May 27, 2016 3:04 PM, "Victor Stinner" wrote: > > Le vendredi 27 mai 2016, M.-A. Lemburg a écrit : >> >> The curent patch is 1.2MB for SHA-3 - that's pretty heavy for just >> >> a few hash functions, which aren't in any wide spread use yet and >>

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Victor Stinner
Le vendredi 27 mai 2016, M.-A. Lemburg a écrit : > > The curent patch is 1.2MB for SHA-3 - that's pretty heavy for just > a few hash functions, which aren't in any wide spread use yet and > probably won't be for quite a few years ahead. Oh wow, it's so fat? Why is it so big?

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread M.-A. Lemburg
On 27.05.2016 18:41, Chris Barker wrote: > On Fri, May 27, 2016 at 9:35 AM, M.-A. Lemburg wrote: > >>> So if ( and that's a big if) it's possible to anticipate what will be >>> in widespread use in a couple years, getting it in now would be a good >>> thing. >> >> You cut away

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Chris Barker
On Fri, May 27, 2016 at 9:35 AM, M.-A. Lemburg wrote: > > So if ( and that's a big if) it's possible to anticipate what will be > > in widespread use in a couple years, getting it in now would be a good > > thing. > > You cut away the important part of what I said: > "The

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread M.-A. Lemburg
On 27.05.2016 17:44, Chris Barker - NOAA Federal wrote: >>> , which aren't in any wide spread use yet and >> probably won't be for quite a few years ahead. > > Anything added to the stdlib now will be in py3.6+, yes? > > Which won't be in widespread use for quite a few years yet, either. > >

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Chris Barker - NOAA Federal
>> , which aren't in any wide spread use yet and > probably won't be for quite a few years ahead. Anything added to the stdlib now will be in py3.6+, yes? Which won't be in widespread use for quite a few years yet, either. So if ( and that's a big if) it's possible to anticipate what will be in

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Bernardo Sulzbach
On 05/27/2016 11:31 AM, Daniel Holth wrote: > BLAKE2 is important, since it removes the last objection to replacing MD5 - speed - that has made it hard for cryptography fans to convince MD5 users to upgrade. I have had to stick to MD5 for performance reasons (2 seconds in MD5 or 9.6 seconds

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Daniel Holth
OpenSSL sucks. Python would only have to bundle a reference implementation of the new hash algorithm(s), and unlike TLS suites they tend to just work. BLAKE2 is important, since it removes the last objection to replacing MD5 - speed - that has made it hard for cryptography fans to convince MD5

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread M.-A. Lemburg
On 27.05.2016 13:03, Donald Stufft wrote: > >> On May 27, 2016, at 6:54 AM, M.-A. Lemburg wrote: >> >> IMO, relying on OpenSSL is a better strategy than providing >> (and maintaining) our own compatibility versions. Until OpenSSL >> has them, people can use Björn's package: > >

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Donald Stufft
> On May 27, 2016, at 6:54 AM, M.-A. Lemburg wrote: > > IMO, relying on OpenSSL is a better strategy than providing > (and maintaining) our own compatibility versions. Until OpenSSL > has them, people can use Björn's package: Even now, hashlib doesn’t rely on OpenSSL if I

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread M.-A. Lemburg
On 27.05.2016 06:54, Raymond Hettinger wrote: > >> On May 25, 2016, at 3:29 AM, Christian Heimes wrote: >> >> I have three hashing-related patches for Python 3.6 that are waiting for >> review. Altogether the three patches add ten new hash algorithms to the >> hashlib

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Victor Stinner
Le 27 mai 2016 12:05 PM, "Donald Stufft" a écrit : > BLAKE2 is an interesting one, because while SHA3 is a NIST standard (so it’s going to gain adoption because of that), BLAKE2 is at least as strong as SHA3 but is better in many ways, particularly in speed— it’s actually faster

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Donald Stufft
> On May 27, 2016, at 12:54 AM, Raymond Hettinger > wrote: > > >> On May 25, 2016, at 3:29 AM, Christian Heimes wrote: >> >> I have three hashing-related patches for Python 3.6 that are waiting for >> review. Altogether the three patches

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-26 Thread Raymond Hettinger
> On May 25, 2016, at 3:29 AM, Christian Heimes wrote: > > I have three hashing-related patches for Python 3.6 that are waiting for > review. Altogether the three patches add ten new hash algorithms to the > hashlib module: SHA3 (224, 256, 384, 512), SHAKE (SHA3 XOF 128,

[Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-25 Thread Christian Heimes
Hi everybody, I have three hashing-related patches for Python 3.6 that are waiting for review. Altogether the three patches add ten new hash algorithms to the hashlib module: SHA3 (224, 256, 384, 512), SHAKE (SHA3 XOF 128, 256), BLAKE2 (blake2b, blake2s) and truncated SHA512 (224, 256). SHA-3 /