summaryrefslogtreecommitdiffstats
path: root/Modules/_blake2
Commit message (Collapse)AuthorAgeFilesLines
* bpo-1635741: Port _blake2 module to multi-phase init (GH-21856)Mohamed Koubaa2020-09-023-118/+118
| | | | Port the _blake2 extension module to the multi-phase initialization API (PEP 489).
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-262-52/+2
| | | | Only __index__ should be used to make integer conversions lossless.
* bpo-40268: Remove explicit pythread.h includes (#19529)Victor Stinner2020-04-152-2/+0
| | | | Remove explicit pythread.h includes: it is always included by Python.h.
* bpo-40024: Update C extension modules to use PyModule_AddType() (GH-19119)Dong-hee Na2020-03-241-8/+2
| | | | | | Update _asyncio, _bz2, _csv, _curses, _datetime, _io, _operator, _pickle, _queue, blake2, multibytecodec and overlapped C extension modules to use PyModule_AddType().
* bpo-39573: Add Py_SET_TYPE() function (GH-18394)Victor Stinner2020-02-071-2/+2
| | | Add Py_SET_TYPE() function to set the type of an object.
* bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)Christian Heimes2019-09-134-20/+44
| | | | | The usedforsecurity keyword only argument added to the hash constructors is useful for FIPS builds and similar restrictive environment with non-technical requirements that legacy algorithms be forbidden by their implementations without being explicitly annotated as not being used for any security related purposes. Linux distros with FIPS support benefit from this being standard rather than making up their own way(s) to do it. Contributed and Signed-off-by: Christian Heimes christian@python.org
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-292-8/+8
| | | | Argument Clinic. (GH-13593)
* bpo-37055: fix warnings in _blake2 module (GH-14646)Inada Naoki2019-08-263-19/+0
| | | | | | | https://bugs.python.org/issue37055 Automerge-Triggered-By: @tiran
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-312-4/+4
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-33164: blake2 fix for HP-UX (GH-13633)David Carlier2019-05-291-0/+3
|
* bpo-33164: update blake2 implementation (GH-6286)David Carlier2019-05-2322-675/+18361
|
* bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵Serhiy Storchaka2019-03-142-8/+288
| | | | (GH-12058)
* Fix misleading mentions of tp_size in comments (GH-9093)Peter Eisentraut2018-09-102-2/+2
| | | | Many type object initializations labeled a field "tp_size" in the comment, but the name of that field is tp_basicsize.
* bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346)Serhiy Storchaka2018-07-314-120/+120
| | | | | | | | | | | | | | | | | | | | | | | | * help(hashlib) didn't work because of incorrect module name in blake2b and blake2s classes. * Constructors blake2*(), sha3_*(), shake_*() and keccak_*() incorrectly accepted keyword argument "string" for binary data, but documented as accepting the "data" keyword argument. Now this parameter is positional-only. * Keyword-only parameters in blake2b() and blake2s() were not documented as keyword-only. * Default value for some parameters of blake2b() and blake2s() was None, which is not acceptable value. * The length argument for shake_*.digest() was wrapped out to 32 bits. * The argument for shake_128.digest() and shake_128.hexdigest() was not positional-only as intended. * TypeError messages for incorrect arguments in all constructors sha3_*(), shake_*() and keccak_*() incorrectly referred to sha3_224. Also made the following enhancements: * More accurately specified input and result types for strings, bytes and bytes-like objects. * Unified positional parameter names for update() and constructors. * Improved formatting.
* bpo-20260: Implement non-bitwise unsigned int converters for Argument ↵Serhiy Storchaka2018-07-264-64/+34
| | | | Clinic. (GH-8434)
* bpo-31933: fix blake2 multi-byte params on big endian platforms (#4250)Jack O'Connor2017-11-032-4/+8
| | | | | | | | | | | | All Blake2 params have to be encoded in little-endian byte order. For the two multi-byte integer params, leaf_length and node_offset, that means that assigning a native-endian integer to them appears to work on little-endian platforms, but gives the wrong result on big-endian. The current libb2 API doesn't make that very clear, and @sneves is working on new API functions in the GH issue above. In the meantime, we can work around the problem by explicitly assigning little-endian values to the parameter block. See https://github.com/BLAKE2/libb2/issues/12.
* Remove nested comments in blake2 (#4173)Lars Viklund2017-11-011-2/+4
| | | | | | | | | | | Replace occurence of nested comments in blake2 reference implementation with preprocessor directive for disabling unused code. `blake2s-load-xop.h` is conditionally pulled in only on chips with XOP support, among others the AMD Bulldozer. The malformed comments in the source file breaks the build of `hashlib`'s `_blake2` on GCC 6.3.0. Official reference code on github uses `#if` so this change should be uncontroversial.
* fixes bpo-31834: Use optimized code for BLAKE2 only with SSSE3+ (#4066)Michał Górny2017-10-242-2/+6
| | | | | | | | | | | | | | | | Rework the code choosing BLAKE2 code paths from using the optimized variant on all x86_64 machines to using it when SSSE3 or better supported instructions sets are available. Firstly, this solves the problem of using pure SSE2 code path on x86_64 machines. As reported in the bug, this code is slower than the reference code on all tested x86_64 machines. Furthermore, on Athlon64 that lacks SSSE3, it is even 2.5 times slower than the reference code! Checking for SSSE3 therefore ensures that the optimized implementation will only be used when it has a chance of performing better. Secondly, this makes it possible to use SSSE3+ optimizations on 32-bit x86 systems. This allows for even 2 times speed gain on modern 32-bit x86 systems (tested in a 32-bit chroot).
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-072-24/+0
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-232-4/+2
| | | | possible. Patch is writen with Coccinelle.
* more PY_LONG_LONG to long longBenjamin Peterson2016-09-082-4/+4
|
* Issue #26798: Coverity complains about potential memcpy() of overlapped ↵Christian Heimes2016-09-084-4/+4
| | | | regions. It doesn't hurt to use memmove() here. CID 1372514 / CID 1372515. Upstream https://github.com/BLAKE2/BLAKE2/issues/32
* blake2: silence two more warnings on platforms with size_t < uint64_t. Don't ↵Christian Heimes2016-09-072-4/+4
| | | | use SSE2 when cross-compiling
* Silence two warnings in blake2. key_length is between 0 and 64 (block size).Christian Heimes2016-09-072-2/+2
|
* Issue #26798: for loop initial declarations, take 3Christian Heimes2016-09-061-0/+1
|
* Issue #26798: for loop initial declarations, take 2Christian Heimes2016-09-064-17/+23
|
* Issue #26798: for loop initial declarations are only allowed in C99 or C11 modeChristian Heimes2016-09-064-9/+18
|
* Issue #26798: Add BLAKE2 (blake2b and blake2s) to hashlib.Christian Heimes2016-09-0621-0/+4639