skillfed

pysha3

SHA-3 (Keccak) for Python 2.7 - 3.5

pysha3 v1.0.2 117.8K downloads/30d#12,148 on PyPI29
Permissive license PSFL (Keccak: CC0 1.0 Universal) Abandoned released

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 pysha3

uv

uv add pysha3

poetry

poetry add pysha3

Installing 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

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 :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Security :: Cryptography

Tags

sha3 hash pythonkeccak hashing libraryshake256 shake128cryptographic hash functionsnist sha-3 implementation
abandonedlegacy-pythoncryptographic-hash

More Cryptography packages