[issue16113] Add SHA-3 and SHAKE (Keccak) support

2017-02-28 Thread Michał Górny

Michał Górny added the comment:

Christian, since the code is now integrated in Python 3.6+ (with some bugfixes 
AFAICS), could you consider updating your bitbucket package to match it? It 
would be helpful as a backport package for older Python versions.

--
nosy: +mgorny

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e5871ffe9ac0 by Christian Heimes in branch 'default':
Issue #16113: SHA3: allocate extra memory for lane extraction and check return 
value of PyModule_Create()
https://hg.python.org/cpython/rev/e5871ffe9ac0

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-08 Thread Christian Heimes

Changes by Christian Heimes :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ddc95a9bc2e0 by Christian Heimes in branch 'default':
Issue #16113: one more C90 violation in big endian code.
https://hg.python.org/cpython/rev/ddc95a9bc2e0

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

A buildbot is complaining about strict aliasing:

In file included from 
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/sha3module.c:113:0:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_SetBytesInLaneToZero’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:97:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 low = *((UINT32*)(laneAsBytes+0));
 ^
In file included from 
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/sha3module.c:113:0:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_AddBytesInLane’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:152:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 low = *((UINT32*)(laneAsBytes+0));
 ^
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_ExtractBytesInLane’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:294:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 *((UINT32*)(laneAsBytes+0)) = low;
 ^
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_ExtractAndAddBytesInLane’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:367:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 *((UINT32*)(laneAsBytes+0)) = low;

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68df416e94ba by Christian Heimes in branch 'default':
Issue #16113: take 2 on big endian machines.
https://hg.python.org/cpython/rev/68df416e94ba

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e8884dcace9f by Christian Heimes in branch 'default':
Issue #16113: compile the module on Windows, too.
https://hg.python.org/cpython/rev/e8884dcace9f

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4971ca2960c7 by Christian Heimes in branch 'default':
Issue #16113: KeccakP-1600-opt64 does not support big endian platforms yet.
https://hg.python.org/cpython/rev/4971ca2960c7

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Christian Heimes

Changes by Christian Heimes :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f8700ee4aef0 by Christian Heimes in branch 'default':
Issue #16113: Add SHA-3 and SHAKE support to hashlib module.
https://hg.python.org/cpython/rev/f8700ee4aef0

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-08-22 Thread Christian Heimes

Christian Heimes added the comment:

The maintenance burden is minimal. All six algorithms are just variants of the 
same KeccakP-1600 sponge construction with different initialization parameters 
for rate, capacity, delimiter and output size. SHAKEs have no default output 
len and another delimiter as SHA3s. 
https://github.com/gvanas/KeccakCodePackage/blob/master/Modes/KeccakHash.h#L34

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-08-21 Thread Aaron Gallagher

Aaron Gallagher added the comment:

I'm not sure why one would pick and choose here—SHAKE is part of the NIST
SHA-3 standard.

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-08-21 Thread Donald Stufft

Donald Stufft added the comment:

> I asked a room full of network engineers about SHAKE and not a single one of 
> them had heard of it

Why would a network engineer know about a new variable length hashing 
algorithm? It's not really within their problem domain.

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-08-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> The SHAKEs were low hanging fruits to implement, so I included them.

I don't think this is sufficient motivation.  Each new API is a permanent 
maintenance and documentation burden.  It is also a burden to every new user 
seeing the module and trying to decide which offering to use.  We should 
provide tools that we know people need and error on the side of economy.  I 
asked a room full of network engineers about SHAKE and not a single one of them 
had heard of it, so I think it would be premature to add to the standard 
library.

--
nosy: +rhettinger

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-08-20 Thread Christian Heimes

Christian Heimes added the comment:

Patch 3 addresses GPS' code review.

--
Added file: 
http://bugs.python.org/file44176/SHA3-and-SHAKE-support-for-Python-3.patch

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-06-12 Thread Christian Heimes

Changes by Christian Heimes :


--
assignee: christian.heimes -> 

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-06-02 Thread Gregory P. Smith

Gregory P. Smith added the comment:

comments added to the code review.

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

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.

--
Added file: 
http://bugs.python.org/file43107/SHA3-and-SHAKE-support-for-Python-2.patch

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-09 Thread englabenny

Changes by englabenny :


--
nosy:  -englabenny

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-08 Thread Christian Heimes

Christian Heimes added the comment:

Larry,
I'm with Gregory. There is no good reason to add SHA3 to Python 2.7. The SHA-2 
family is still safe. Besides I'd rather add BLAKE2 to Python 2.7. It's much 
faster and more versatile than SHA3.

Antoine,
SHAKEs are XOF (extensible output function). NIST has standardized the XOFs but 
not yet approved them as replacement for other constructs. They are useful for 
signatures or as a simple stream cipher. The SHAKEs were low hanging fruits to 
implement, so I included them.

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I'd there any good reason 2.7 needs this? They are available via pypi as
extensions. (Read: I vote no)

On Sat, May 7, 2016, 3:15 AM Larry Hastings  wrote:

>
> Larry Hastings added the comment:
>
> Christian: any interest in proposing this for 2.7?  We could ask
> Benjamin.  It could still make 2.7.11--rc1 should be tagged in about a
> month.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-07 Thread Larry Hastings

Larry Hastings added the comment:

Christian: any interest in proposing this for 2.7?  We could ask Benjamin.  It 
could still make 2.7.11--rc1 should be tagged in about a month.

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Is there any guidance or recommendation on how to use the SHAKE variants?

--

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-06 Thread Christian Heimes

Christian Heimes added the comment:

This patch implements SHA-3 and SHAKE for Python 3.6. The algorithm is provided 
by a slightly modified copy of the Keccak Code Package. I had to replace C++ 
comments and perform some minor cleanups.

--
stage: needs patch -> patch review
Added file: 
http://bugs.python.org/file42764/SHA3-and-SHAKE-support-for-Python.patch

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-06 Thread Christian Heimes

Changes by Christian Heimes :


--
hgrepos:  -152

___
Python tracker 

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



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-04-22 Thread Christian Heimes

Christian Heimes added the comment:

The authors of Keccak have released a new version of the Keccak Code Package, 
http://keccak.noekeon.org/reorganized_code.html . The new package makes it much 
easier to integrate Keccak in Python. I'm working on a new patch with SHA3 and 
SHAKE support.

--
stage:  -> needs patch
title: Add SHA-3 (Keccak) support -> Add SHA-3 and SHAKE (Keccak) support

___
Python tracker 

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