Skip to main content

AgDR-Mantle: Sovereign post-quantum fortification for AgDR-Phoenix output (ML-DSA-65, Sparse Merkle, Brotli)

Project description

AgDR-Mantle v1.0.1

Sovereign post-quantum fortification for AgDR records.

Architecture

AgDR-Mantle is the Fortification tier of the AgDR standard. It operates within a three-tier lineage:

  • AKI is the Core. Atomic Kernel Inference is the architectural principle defined in the AgDR specification. It is captured at the moment of decision and carries the PPP triplet (Provenance, Place, Purpose).
  • AgDR-Phoenix is the Implementation. The reference Rust engine that realizes the AKI Core in running code at sub-microsecond latency, with kernel monotonic timestamps, Byzantine fault tolerance, and the critic pre-filter.
  • AgDR-Mantle is the Fortification. It wraps AgDR-Phoenix output with an optional ML-DSA-65 post-quantum envelope, a sovereign sparse Merkle tree witness, and Brotli-compressed forensic archives for Commonwealth and bandwidth-constrained deployments.
+---------------------------------------------------+
|  AgDR-Mantle : FORTIFICATION                      |
|  - ML-DSA-65 (FIPS 204) post-quantum envelope     |
|  - Sovereign Sparse Merkle Tree witness           |
|  - Brotli-compressed forensic archive             |
+---------------------------------------------------+
|  AgDR-Phoenix : IMPLEMENTATION                    |
|  - Rust AKI engine, sub-microsecond latency       |
|  - BFT, critic, PPP capture, kernel timestamps    |
+---------------------------------------------------+
|  AKI : CORE                                       |
|  The architectural invariant. Defined in the      |
|  AgDR specification. Captured at decision time.   |
+---------------------------------------------------+

The Phoenix hot path remains classical Ed25519 and is not modified by Mantle. Mantle runs after Phoenix completes. Its operations therefore do not affect AKI latency.

Features

  • Optional ML-DSA-65 (FIPS 204) quantum-resistant signature envelope via the pqcrypto library. Opt-in, disabled by default.
  • Sovereign forensic archive using a 256-bit sparse Merkle tree with Brotli compression.
  • Self-learning coherence weighting via exponential moving average (feature-gated).
  • Designed for Commonwealth, Northern, and other bandwidth-constrained jurisdictions requiring quantum-resistant evidentiary signatures today.

Install

pip install agdr-mantle

# With the post-quantum fortification enabled
pip install agdr-mantle[post-quantum]

# With all optional features
pip install agdr-mantle[post-quantum,self-learning,sovereign]

Quick Start

from agdr_mantle import AgDRMantle

# Classical AKI only (fastest configuration)
engine = AgDRMantle(fo_i="Accountability (Toronto)")

# With ML-DSA-65 post-quantum fortification enabled
engine = AgDRMantle(
    fo_i="Accountability (Toronto)",
    enable_pq=True,
    enable_self_learning=True,
    enable_sovereign=True,
)

ppp = {"provenance": "...", "place": "Toronto, ON", "purpose": "Accountability review"}
sealed_record = engine.seal(ppp)

# Verify the post-quantum fortification envelope
if sealed_record["pq_applied"]:
    envelope = bytes.fromhex(sealed_record["aki_seal"])
    assert engine.pq.verify(envelope)

Post-Quantum Fortification Notes

  • Algorithm: ML-DSA-65 (NIST FIPS 204, Security Level 3, 192-bit classical equivalent strength).
  • Signature size: 3,309 bytes per envelope.
  • Public key size: 1,952 bytes. Private key size: 4,032 bytes.
  • Library: pqcrypto v0.4.0 or later. The pqcrypto package wraps the pqclean reference C implementations and ships pre-compiled wheels for common platforms.
  • Envelope format: [seal_length][classical_seal][MAGIC][pubkey_length][pubkey][sig_length][signature].
  • Keys: ephemeral per-instance by default. Production deployments should inject long-term keys through the pq_keypair constructor parameter.

Performance

Measured on commodity hardware:

Operation Latency
ML-DSA-65 keygen around 0.3 ms
Sign and wrap around 1 ms
Verify around 0.2 ms

The fortification layer runs downstream of AgDR-Phoenix. The Phoenix hot path latency is unaffected.

Related Artifacts

  • AgDR Specification
  • AgDR-Phoenix (the AKI Implementation)
  • Eternal Witness v3.0 (forensic permanence layer)

License

Dual-licensed under your choice of:

  • Creative Commons Zero v1.0 Universal (CC0 1.0)
  • Apache License 2.0

See the LICENSE file for full terms.

About

AgDR-Mantle is published by the Genesis Glass Foundation (Fondation Genese Cristal), a federally incorporated Canadian not-for-profit stewarding the AgDR open standard through accountability.ai.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agdr_mantle-1.0.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agdr_mantle-1.0.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file agdr_mantle-1.0.2.tar.gz.

File metadata

  • Download URL: agdr_mantle-1.0.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for agdr_mantle-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4700118acc0b7173e3892491b1e0af64cc20a3677c6ea4016d63b7be599bd710
MD5 b2563339ddbe11f41e915e55dcdbfac7
BLAKE2b-256 5aabbc94d47e20b8a0cb786d3e8783def63c94ecb0d01e822ca241257d5db67a

See more details on using hashes here.

File details

Details for the file agdr_mantle-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: agdr_mantle-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for agdr_mantle-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 471cfda3af4a934a5b137c84e69711505f330d49c4bf313ec1e40a9076a505b9
MD5 5d232298f743bf4ebbfc52b309f30dce
BLAKE2b-256 095edcb56bb84f6333237f8c0eb572f21a769f6b80d2815e1ee003d21f08fc53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page