skillfed

siphash

siphash - python siphash implementation

siphash v0.0.1 74.5K downloads/30d#14,823 on PyPI46
Permissive license MIT Abandoned released

What it is and what it does

Siphash is a keyed hash function designed for speed and security on short inputs, commonly used for network authentication and defense against hash-flooding denial-of-service attacks. This package provides a pure-Python implementation following the hashlib API, allowing you to create SipHash instances with a key, update them with data, and extract the hash as a numeric value, raw bytes, or hex string.

The package is unmaintained since 2013 and offers no performance advantages over native implementations in modern languages. It is suitable primarily for legacy code that depends on it or for educational exploration of the SipHash algorithm itself. Performance is inherently limited by the pure-Python approach.

Use it for:

  • Integrate SipHash hashing into legacy Python applications that already depend on this package.
  • Educational study of the SipHash algorithm and its implementation in Python.
  • Hash table operations where hash-flooding defense is needed in environments without access to faster native implementations.
  • Network traffic authentication in low-throughput scenarios where pure-Python performance is acceptable.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python implementation of SipHash, a keyed hash function optimized for speed on short messages, following the hashlib API.

No, unless you are maintaining legacy code that already depends on it. The package is abandoned (last update 2013), offers no performance advantage over native implementations, and has unspecified Python version support. For new projects, use a maintained cryptographic library or a faster SipHash binding instead.

Install

siphash on PyPI

pip

pip install siphash

uv

uv add siphash

poetry

poetry add siphash

Installing siphash

Before you install

High install friction due to source distribution only. Package is abandoned—last release and commit were in 2013, with no maintenance for several years. Suitable only for legacy integration or educational purposes.

License in practice

MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

import siphash
key = '0123456789ABCDEF'
sip = siphash.SipHash_2_4(key, 'a')
print(sip.hexdigest())  # '864c339cb0dc0fac'

Pure Python implementation; performance is inherently limited compared to compiled alternatives.

Verify before relying

  • Whether this implementation remains cryptographically sound against modern attacks or has known weaknesses.
  • Compatibility with Python versions beyond 3.2 (last tested version listed); modern Python support is unspecified.
  • Whether the pure-Python performance characteristics meet actual application requirements.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 4,952 days since the last release
Last repo commit
First released
Downloads 74,511/month — #14,823 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: siphash-0.0.1.tar.gz

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.2Topic :: Software Development :: Libraries :: Python Modules

Tags

siphash hash functionkeyed hash pythonshort message authenticationhash-flooding dos defensepseudorandom functioncryptographic hashnetwork traffic authentication
abandonedpure-pythonlegacy

More Python Modules packages