summaryrefslogtreecommitdiffstats
path: root/Modules/_sha3
Commit message (Collapse)AuthorAgeFilesLines
* bpo-47098: Replace Keccak Code Package with tiny_sha3 (GH-32060)Christian Heimes2022-03-2622-5632/+335
|
* bpo-46670: Fix #ifdef in sha3module.c (GH-31180)Victor Stinner2022-02-071-1/+3
| | | | | | * Test if HAVE_ALIGNED_REQUIRED is defined, not its value. * Define explicitly NOT_PYTHON macro to 0. Fix "gcc -Wundef" warnings.
* bpo-43974: Move Py_BUILD_CORE_MODULE into module code (GH-29157)Christian Heimes2021-10-221-0/+4
| | | | | | | | | | | | | | setup.py no longer defines Py_BUILD_CORE_MODULE. Instead every module defines the macro before #include "Python.h" unless Py_BUILD_CORE_BUILTIN is already defined. Py_BUILD_CORE_BUILTIN is defined for every module that is built by Modules/Setup. The PR also simplifies Modules/Setup. Makefile and makesetup already define Py_BUILD_CORE_BUILTIN and include Modules/internal for us. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45434: Remove pystrhex.h header file (GH-28923)Victor Stinner2021-10-131-1/+1
| | | | | | | | | | | | | | | Move Include/pystrhex.h to Include/internal/pycore_strhex.h. The header file only contains private functions. The following C extensions are now built with Py_BUILD_CORE_MODULE macro defined to get access to the internal C API: * _blake2 * _hashopenssl * _md5 * _sha1 * _sha3 * _ssl * binascii
* bpo-36515: Disable unaligned memory access in _sha3 on ARM (GH-25927)Gregory P. Smith2021-05-051-0/+5
| | | | | Contributed-By: Matthias Klose Automerge-Triggered-By: GH:tiran
* bpo-43908: Mark ssl, hash, and hmac types as immutable (GH-25792)Christian Heimes2021-05-021-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-43362: Fix invalid free and return check in _sha3 module (GH-25463)Christian Heimes2021-04-181-3/+9
| | | | | | | | | | | Commit 93d50a6a8d0c5d332c11aef267e66573a09765ac / GH-21855 changed the order of variable definitions, which introduced a potential invalid free bug. Py_buffer object is now initialized earlier and the result of Keccak initialize is verified. Co-authored-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Christian Heimes <christian@python.org> Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
* bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)Victor Stinner2020-12-011-1/+1
| | | | | | | | | No longer use deprecated aliases to functions: * Replace PyObject_MALLOC() with PyObject_Malloc() * Replace PyObject_REALLOC() with PyObject_Realloc() * Replace PyObject_FREE() with PyObject_Free() * Replace PyObject_Del() with PyObject_Free() * Replace PyObject_DEL() with PyObject_Free()
* bpo-1635741: Port _sha3 module to multi-phase init (GH-21855)Mohamed Koubaa2020-09-021-136/+193
| | | | Port the _sha3 extension module to multi-phase init (PEP 489). Convert static types to heap types.
* bpo-40302: Replace PY_INT64_T with int64_t (GH-19573)Victor Stinner2020-04-171-3/+3
| | | | | | | | | * Replace PY_INT64_T with int64_t * Replace PY_UINT32_T with uint32_t * Replace PY_UINT64_T with uint64_t sha3module.c no longer checks if PY_UINT64_T is defined since it's always defined and uint64_t is always available on platforms supported by Python.
* bpo-39573: Add Py_SET_TYPE() function (GH-18394)Victor Stinner2020-02-071-1/+1
| | | Add Py_SET_TYPE() function to set the type of an object.
* bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)Christian Heimes2019-09-132-20/+69
| | | | | 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-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-311-2/+2
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* closes bpo-35643: Fix a SyntaxWarning: invalid escape sequence in ↵Mickaël Schoentgen2019-01-021-1/+1
| | | | Modules/_sha3/cleanup.py (GH-11411)
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-251-3/+3
| | | | parameter. (GH-9689)
* bpo-34922: Fix integer overflow in the digest() and hexdigest() methods ↵Serhiy Storchaka2018-10-111-0/+4
| | | | | (GH-9751) for the SHAKE algorithm in the hashlib module.
* Fix misleading mentions of tp_size in comments (GH-9093)Peter Eisentraut2018-09-101-1/+1
| | | | 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-312-80/+51
| | | | | | | | | | | | | | | | | | | | | | | | * 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-32240: Add the const qualifier to declarations of PyObject* array ↵Serhiy Storchaka2017-12-151-3/+3
| | | | arguments. (#4746)
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-14/+0
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)Serhiy Storchaka2017-07-031-3/+3
| | | | | the bare METH_FASTCALL be used for functions with positional-only parameters.
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-2/+1
| | | | possible. Patch is writen with Coccinelle.
* Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-171-1/+1
| | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
* Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner2017-01-171-2/+2
| | | | Issue #29286.
* Don't define PY_WITH_KECCAKChristian Heimes2016-09-211-2/+0
|
* Issue #27810: Regenerate Argument Clinic.Serhiy Storchaka2016-09-111-7/+7
|
* clinic: PY_LONG_LONG -> long longBenjamin Peterson2016-09-081-10/+16
|
* sha3: let's keep it simple and always allocate enough extra space for ↵Christian Heimes2016-09-081-3/+2
| | | | uint64_t[20].
* Issue #16113: SHA3: allocate extra memory for lane extraction and check ↵Christian Heimes2016-09-081-4/+12
| | | | return value of PyModule_Create()
* Issue #16113: one more C90 violation in big endian code.Christian Heimes2016-09-071-1/+1
|
* Issue #16113: take 2 on big endian machines.Christian Heimes2016-09-071-9/+11
|
* Issue #16113: KeccakP-1600-opt64 does not support big endian platforms yet.Christian Heimes2016-09-071-1/+4
|
* Issue #16113: Add SHA-3 and SHAKE support to hashlib module.Christian Heimes2016-09-0720-0/+6299
|
* * Issue #16113: Remove sha3 module again.Martin v. Löwis2014-01-0323-7930/+0
| | | | Patch by Christian Heimes, with modifications.
* Issue #19520: Fix (the last!) compiler warning on 32bit Windows, in _sha3Zachary Ware2013-11-171-1/+1
|
* Issue #18742: Expose the internal hash type object for ABCs.Christian Heimes2013-10-221-1/+9
|
* yet another WITH_THREADS typoChristian Heimes2013-07-311-1/+1
|
* Fix _sha3 module to actually release the GIL around its update function.Christian Heimes2013-07-311-1/+1
| | | | gcov is great.
* Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() inChristian Heimes2013-01-031-0/+2
| | | | | non-pydebug builds. Several extension modules now compile cleanly when assert()s are enabled in standard builds (-DDEBUG flag).
* Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unifiedChristian Heimes2012-10-174-11/+14
| | | | endianess detection and handling.
* Issue #16234: Modify sha3's block_size method to return NotImplemented.Christian Heimes2012-10-141-2/+6
| | | | This makes the sha3 types unusable from the hmac module. HMAC-SHA3 hasn't been specified yet.
* Update comment: SPARC requires proper alignmentChristian Heimes2012-10-141-1/+2
|
* get 64bit platforms without uint64 right againChristian Heimes2012-10-141-3/+5
|
* Force 32bit Keccak implementation on SPARC. It look like the Solaris CC ↵Christian Heimes2012-10-141-8/+14
| | | | compiler doesn't like the address alignment.
* Keccak: fromBytesToWord() and fromWordToBytes() are required on 64bit big ↵Christian Heimes2012-10-131-4/+6
| | | | endian platforms
* brg_endian.h is back againChristian Heimes2012-10-071-1/+0
|
* re-add brg_endian.h to debug issue in big endian SPARC machineChristian Heimes2012-10-075-7/+150
|
* remove #warning from sha3module.cChristian Heimes2012-10-061-1/+0
|
* fix possible memory leak, dealloc newobjChristian Heimes2012-10-061-2/+1
|
* Issue #16113: integrade SHA-3 (Keccak) patch from ↵Christian Heimes2012-10-0622-0/+7762
http://hg.python.org/sandbox/cheimes