pysha3
SHA-3 (Keccak) for Python 2.7 - 3.5
What it is and what it does
pysha3 is a wrapper around the optimized Keccak Code Package that brings SHA-3, SHAKE, and legacy Keccak hash algorithms to Python 2.7 and 3.4–3.5. It provides constructors (sha3_256, sha3_512, shake_128, shake_256, and keccak variants) with a PEP 247 compatible interface and automatically monkey-patches hashlib so you can call hashlib.sha3_512() directly.
The package is a backport of Python 3.6's native SHA-3 support. It implements the official NIST standard (delimiter 0x06) as of version 1.0, while also offering pre-finalization Keccak hashes (delimiter 0x01) under the keccak_ prefix. The C extension has been tested on Linux, Windows, and ARM platforms. However, the repository is archived and unmaintained since 2017.
Use it for:
- Compute SHA-3 hashes on Python 2.7 or 3.4–3.5 before native support was added.
- Access SHAKE variable-length hash functions (shake_128, shake_256) on older Python versions.
- Verify or generate Keccak hashes for systems that predate NIST's SHA-3 finalization.
- Integrate SHA-3 hashing into legacy applications locked to Python 2.7 or early Python 3.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides SHA-3, SHAKE, and Keccak hash functions for Python 2.7 through 3.5, with a PEP 247 compatible interface that monkey-patches hashlib.
No. The package is abandoned (last release 05-Feb-2017, repository archived), carries two known vulnerabilities, and is obsolete for Python 3.6+. If you are on Python 2.7 or 3.4–3.5, you may have no alternative, but those Python versions are themselves end-of-life. Use built-in hashlib support on modern Python, or migrate away from unsupported Python versions.
Install
pysha3 on PyPI
pip
pip install pysha3uv
uv add pysha3poetry
poetry add pysha3Installing pysha3
Before you install
Medium install friction due to compiled C extension requiring a build toolchain. Repository is archived and abandoned; no active maintenance since last release on 05-Feb-2017.
License in practice
Dual-licensed under PSFL and CC0 1.0 Universal (Keccak code). Both are permissive; the CC0 dedication places Keccak portions in the public domain. No restrictions on use or redistribution.
Quickstart
import hashlib
import pysha3
s = hashlib.sha3_512()
s.update(b"data")
print(s.hexdigest())
Requires a C compiler and build tools to compile the extension. Python 2.6 and earlier are not supported.
Verify before relying
- Whether the two known vulnerabilities (GHSA-6w4m-2xhg-2658, PYSEC-2026-504) affect current deployments.
- Current compatibility with Python versions beyond 3.5, given the package is abandoned.
- Whether Python 3.6+ users should migrate to built-in hashlib support instead.
Package facts
| License | PSFL (Keccak: CC0 1.0 Universal) (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,477 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 117,786/month — #12,148 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | 2 — GHSA-6w4m-2xhg-2658, PYSEC-2026-504 |
Evidence: pysha3-1.0.2-cp27-cp27m-manylinux1_i686.whl; pysha3-1.0.2-cp27-cp27m-manylinux1_x86_64.whl; pysha3-1.0.2-cp27-cp27mu-manylinux1_i686.whl; pysha3-1.0.2-cp27-cp27mu-manylinux1_x86_64.whl; pysha3-1.0.2-cp27-cp27m-win32.whl; pysha3-1.0.2-cp27-cp27m-win_amd64.whl; pysha3-1.0.2-cp33-cp33m-win32.whl; pysha3-1.0.2-cp33-cp33m-win_amd64.whl; pysha3-1.0.2-cp34-cp34m-manylinux1_i686.whl; pysha3-1.0.2-cp34-cp34m-manylinux1_x86_64.whl; pysha3-1.0.2-cp34-cp34m-win32.whl; pysha3-1.0.2-cp34-cp34m-win_amd64.whl; pysha3-1.0.2-cp35-cp35m-manylinux1_i686.whl; pysha3-1.0.2-cp35-cp35m-manylinux1_x86_64.whl; pysha3-1.0.2-cp35-cp35m-win32.whl; pysha3-1.0.2-cp35-cp35m-win_amd64.whl; pysha3-1.0.2-cp36-cp36m-manylinux1_i686.whl; pysha3-1.0.2-cp36-cp36m-manylinux1_x86_64.whl; pysha3-1.0.2-cp36-cp36m-win32.whl; pysha3-1.0.2-cp36-cp36m-win_amd64.whl
Keywords: sha3, sha-3, keccak, hash
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
eth-hashProvides the keccak256 hashing function used by…
permissive · top 5,000 on PyPI
safe-pysha3Provides SHA-3, SHAKE, and Keccak hash…
permissive · top 15,000 on PyPI
py-multihashEncodes and decodes multihash digests,…
permissive · top 15,000 on PyPI
siphashProvides a Python implementation of SipHash, a…
permissive · top 15,000 on PyPI
dict-hashGenerates consistent hashes for Python…
permissive · top 15,000 on PyPI
siphash24Provides a C-based SipHash-1-3 and SipHash-2-4…
unclear · top 15,000 on PyPI
mmh3mmh3 is a Python binding to MurmurHash3, a fast…
permissive · top 1,000 on PyPI
dirhashComputes a single hash value for an entire…
permissive · top 5,000 on PyPI
uhashringuhashring implements consistent hashing in pure…
permissive · top 15,000 on PyPI
blake3Python bindings for the BLAKE3 cryptographic…
permissive · top 5,000 on PyPI