Skip to main content

maxwells-defense (Python)

Adaptive proof-of-work defense for AI agents. Asymmetric thermodynamic cost: attackers dissipate energy in O(2^d) expected work; defenders verify in O(1).

Reference implementation of T-IB-09 (Adversarial Dissipation Theorem) from the Intelligence Bound corpus — Aristotle-verified 2026-05-10.

Install

pip install git+https://github.com/viridis-security/maxwells-defense.git

Use

from fastapi import FastAPI
from maxwells_defense.middleware import FastAPIMaxwellMiddleware
from maxwells_defense.core import StaticDifficultyOracle
import secrets

app = FastAPI()
app.add_middleware(
    FastAPIMaxwellMiddleware,
    server_secret=secrets.token_bytes(32),
    difficulty_oracle=StaticDifficultyOracle(difficulty=18),
    protect_path_prefix="/api/",
)

@app.get("/api/hello")
def hello():
    return {"ok": True}

Full documentation, theorems, and the JavaScript client live in the parent reference SDK:

https://github.com/viridis-security/maxwells-defense

License

Apache-2.0. See LICENSE in the parent repository.

Metadata

Release files for maxwells-defense 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maxwells-defense 0.1.0
File Size Uploaded Provenance Actions
maxwells_defense-0.1.0.tar.gz 10.4 kB Without provenance Details for maxwells_defense-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maxwells-defense 0.1.0
File Interpreter ABI Platform Actions
maxwells_defense-0.1.0-py3-none-any.whl Python 3 none any Details for maxwells_defense-0.1.0-py3-none-any.whl

Total release size: 19.4 kB

Release files / maxwells_defense-0.1.0.tar.gz

Download URL maxwells_defense-0.1.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e2e27646ceb64ffd1c9105ae7f53cb4a1dfaadd4e8dbb3ead564103c40ba3ba8
BLAKE2b-256 checksum
How to use checksums
459a625c27a177a89cb165f462572fd1d1fd97a132e1e8813c1ba5c42bb70e42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / maxwells_defense-0.1.0-py3-none-any.whl

Download URL maxwells_defense-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d201ca74e3a35e8aef21a09ea2d5dbbc7cfd4b71261a1fdcd6b059aa83c8150d
BLAKE2b-256 checksum
How to use checksums
1b8f9a344ffe56b602e0a764dc624f1a43912d4cd61c0864d0d553275d04c240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for maxwells-defense 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page