Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

opthash

Latest version: v0.13.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: aaronang05
19 Stars
1 Forks
4 Versions
2.6K Downloads
Rust Repo language

Scan summary

opthash was last scanned on 29 Nov 2026 at version 0.13.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.13.0.
  • Downloads: 2,638 downloads.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.13.0 LATEST 29 Nov 2026 No rules fired
0.12.1 6 Nov 2026 No rules fired
0.12.0 26 Oct 2026 No rules fired
0.11.1 23 Oct 2026 Not shown

No rules fired in 0.13.0

Findings

Findings for v0.13.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.13.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

opthash

Crates.io PyPI MSRV Python CI CodSpeed License

opthash provides Rust hash maps and sets based on Elastic Hashing and Funnel Hashing, two open-addressing algorithms introduced in Optimal Bounds for Open Addressing Without Reordering. It turns the paper's fixed-table constructions into familiar collection APIs that can be used in real programs.

[!IMPORTANT] opthash is experimental. It is intended for evaluating and improving these algorithms, not as a drop-in performance replacement for std::HashMap or hashbrown. Benchmark and test it against your own workload before adopting it in production.

Features

  • ElasticHashMap, ElasticHashSet, FunnelHashMap, and FunnelHashSet
  • Familiar map, set, entry, iterator, and collection APIs
  • Paper-faithful placement during normal fixed-size operation
  • Configurable spare capacity, hashers, and allocators
  • no_std support with alloc
  • Optional Python bindings with typed map and set APIs

Quick start

Add opthash to a Rust project:

cargo add opthash

Both algorithms expose the same core collection APIs:

use opthash::{ElasticHashMap, FunnelHashSet};

let mut scores = ElasticHashMap::new();
scores.insert("Ada", 42);
scores.entry("Linus").or_insert(37);

assert_eq!(scores.get("Ada"), Some(&42));

let mut visited = FunnelHashSet::new();
visited.insert("Paris");

assert!(visited.contains("Paris"));

The default configuration uses foldhash and keeps one-eighth of the table available as spare capacity. Most users should start with these defaults. Advanced users can tune the reserve with ReserveFraction, provide another BuildHasher, or use a custom allocator.

To use opthash without std, disable default features and provide a hasher:

cargo add opthash --no-default-features

Choosing an algorithm

Elastic and Funnel use different placement strategies but share the same core API. Choose the construction you want to explore; switching between them is straightforward. For current performance results, see the benchmark guide.

Near full load, Funnel answers lookups for absent keys faster than a greedy group-probing table, and the gap widens as the table fills. Greedy probing still wins hits and most inserts. See the high-load sweep.

Compared with the paper

opthash preserves the paper's finite geometry, placement rules, and probe order during normal operation between table rebuilds. A usable dynamic collection also needs behavior outside the paper's model:

Topic Paper opthash
Table lifetime Fixed size Grows and rebuilds as needed
Updates Insertions only Also replaces, deletes, clears, and cleans up tombstones
Placement Uses the prescribed candidates Follows them normally; rare exhaustion can trigger a broader correctness fallback
Randomness Analyzes ideal random choices Uses concrete deterministic mixing
Bounds Analyzes probe complexity in a fixed-size, insertion-only model The paper's bounds do not cover deletion, growth, Elastic misses, or wall-clock performance

These differences preserve normal paper-faithful traces while making the maps usable as general collections. They also mean the paper's theoretical bounds should not be read as guarantees for every library operation. See the paper source used by this project for the exact construction.

Python

Python bindings expose the same four map and set families:

pip install opthash
from opthash import FunnelHashMap

scores = FunnelHashMap({"Ada": 42})
scores["Linus"] = 37

assert scores["Ada"] == 42

Python 3.10 or newer is supported.

Project resources

License

Licensed under the Apache License 2.0.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases opthash

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229