skillfed

safe-pysha3

SHA-3 (Keccak) for Python 3.9 - 3.13

safe-pysha3 v1.0.5 362.8K downloads/30d#7,230 on PyPI7
Permissive license PSFL (Keccak: CC0 1.0 Universal) AGING released

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-pysha3

uv

uv add safe-pysha3

poetry

poetry add safe-pysha3

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: CC0 1.0 Universal (CC0 1.0) Public Domain DedicationLicense :: OSI Approved :: Python Software Foundation LicenseNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: POSIX :: BSDOperating System :: POSIX :: LinuxProgramming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Security :: Cryptography

Tags

sha3 hash pythonkeccak hashingshake256 shake128cryptographic hash functionsnist sha-3 implementation
cryptographyhashing

More Cryptography packages