safe-pysha3
SHA-3 (Keccak) for Python 3.9 - 3.13
What it is and what it does
safe-pysha3 is a wrapper around the optimized Keccak Code Package that exposes SHA-3, SHAKE, and legacy Keccak hash functions to Python. It implements the official NIST standard (with delimiter suffix 0x06) and also provides the pre-finalization Keccak hashes for backward compatibility. The module provides constructors for hash objects with a PEP 247 compatible interface including sha3_224(), sha3_256(), sha3_384(), sha3_512(), shake_128(), shake_256(), and keccak variants.
The package is a C extension compiled from optimized Keccak sources and is available as prebuilt wheels for Python 3.9–3.13 on Linux and musl platforms. It has no runtime dependencies and exposes methods like update(), digest(), and hexdigest(). The package is permissively licensed under PSFL and CC0 1.0 Universal, and has seen no reported security vulnerabilities.
Use it for:
- Computing SHA-3 hashes for cryptographic operations when legacy Keccak compatibility is needed.
- Generating SHAKE variable-length digests for applications requiring flexible hash output sizes.
- Accessing pre-finalization Keccak hashes for systems that depend on the old Keccak implementation prior to NIST standardization.
- Integrating SHA-3 hashing into Python 3.9–3.13 codebases via the standard hashlib interface.
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 3.9–3.13 via a PEP 247 compatible interface, with optional monkey-patching of the hashlib module.
Yes, if you need SHA-3 or SHAKE on Python 3.9–3.13 and require legacy Keccak hashes or pre-NIST compatibility. The package is stable and dependency-free, but install friction is medium due to C compilation. The 421-day release gap suggests maintenance is minimal; verify active support for your use case before adopting.
Install
safe-pysha3 on PyPI
pip
pip install safe-pysha3uv
uv add safe-pysha3poetry
poetry add safe-pysha3Installing safe-pysha3
Before you install
Medium install friction due to C extension compilation; prebuilt wheels available for Python 3.9–3.13 on Linux and musl platforms. Package is aging (last release 421 days ago) but repository remains active with no archived status.
License in practice
Dual-licensed under PSFL and CC0 1.0 Universal (Keccak component); permissive treatment allows use in most contexts without restriction.
Quickstart
import hashlib
s = hashlib.sha3_512()
s.update(b"data")
print(s.hexdigest())
Requires C compiler and development headers at install time due to C extension; Python 3.9 or later.
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode given the 421-day gap since last release.
- Performance characteristics compared to Python 3.6+ built-in hashlib SHA-3 support on modern Python versions.
- Whether monkey-patching of hashlib occurs automatically on import and what side effects this may have.
Package facts
| License | PSFL (Keccak: CC0 1.0 Universal) (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 421 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 362,777/month — #7,230 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: safe_pysha3-1.0.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; safe_pysha3-1.0.5-cp310-cp310-musllinux_1_2_x86_64.whl; safe_pysha3-1.0.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; safe_pysha3-1.0.5-cp311-cp311-musllinux_1_2_x86_64.whl; safe_pysha3-1.0.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; safe_pysha3-1.0.5-cp312-cp312-musllinux_1_2_x86_64.whl; safe_pysha3-1.0.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; safe_pysha3-1.0.5-cp313-cp313-musllinux_1_2_x86_64.whl; safe_pysha3-1.0.5-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; safe_pysha3-1.0.5-cp39-cp39-musllinux_1_2_x86_64.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
pysha3Provides SHA-3, SHAKE, and Keccak hash…
permissive · top 15,000 on PyPI
eth-hashProvides the keccak256 hashing function used by…
permissive · top 5,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
filehashCalculates and verifies file checksums and…
permissive · top 15,000 on PyPI