Skip to main content

Aegis: ML-DSA-65 post-quantum agent identity verifier

Project description

aegis-verifier

ML-DSA-65 (FIPS 204) post-quantum agent identity verifier for the Aegis platform.

Verifies Merkle Tree Agent Certificates (MTACs) issued by an Aegis Certificate Authority. Built with PyO3 + maturin from a Rust core.

Requirements

  • Python 3.11 or later
  • No native build dependencies at install time (liboqs is statically bundled)

Installation

pip install aegis-verifier

A pre-built wheel is available for Linux x86_64/aarch64 (glibc and musl), macOS universal2 (Intel + Apple Silicon), and Windows x86_64.

Basic usage

import aegis_verifier

# All inputs are raw bytes in wire-v1 format (see docs/spec/wire-v1.md).
try:
    result = aegis_verifier.verify_inclusion(
        leaf_bytes=leaf_bytes,        # dcbor-encoded MtacLeaf
        proof_bytes=proof_bytes,      # wire-v1 encoded InclusionProof
        sth_bytes=sth_bytes,          # wire-v1 STH envelope (the bytes ML-DSA signed)
        signature=signature,          # 3309-byte ML-DSA-65 signature
        ca_public_key=ca_public_key,  # 1952-byte ML-DSA-65 public key
    )
    print(f"Verified: leaf_index={result.leaf_index}, "
          f"tree_size={result.tree_size}, "
          f"timestamp_ms={result.timestamp_ms}")
except aegis_verifier.AegisInvalidProofError as e:
    print(f"Proof or signature invalid: {e}")
except aegis_verifier.AegisStaleSthError as e:
    print(f"STH is stale: {e}")
except aegis_verifier.AegisVerificationError as e:
    print(f"Verification error: {e}")

Exception hierarchy

Exception
  AegisVerificationError          # base class for all Aegis failures
    AegisInvalidProofError        # signature invalid, proof mismatch, or leaf hash fail
    AegisStaleSthError            # STH older than caller-supplied max_age

verify_inclusion RAISES on all failure paths. It never returns a verified=False sentinel — a successful return always means verification passed.

Wire format

  • leaf_bytes: dcbor canonical encoding of MtacLeaf (RFC 8949 §4.2.1 CDER profile)
  • proof_bytes: CBOR array(3) of [tree_size: uint, leaf_index: uint, path: array<bstr(32)>]
  • sth_bytes: CBOR array(2) of [tstr("AEGIS-STH-v1"), bstr(body)] where body is array(5) of [log_id: bstr(32), tree_size: uint, timestamp: uint, root_hash: bstr(32), extensions: array]
  • signature: 3309-byte raw ML-DSA-65 signature (FIPS 204, Algorithm 3)
  • ca_public_key: 1952-byte raw ML-DSA-65 public key (FIPS 204)

See docs/spec/wire-v1.md in the source repository for the full normative spec.

Cryptographic details

  • Algorithm: ML-DSA-65 (FIPS 204 final), also known as CRYSTALS-Dilithium level 3
  • Tree: RFC 9162-inspired binary Merkle hash tree with SHA-256 leaf and node hashing
  • Domain separation: dual-layer per AD-1.6-02 — envelope context string "AEGIS-STH-v1" in wire bytes (auditor-visible) PLUS FIPS 204 §5.2 ctx parameter b"AEGIS-STH-v1" (cryptographically bound, not in wire bytes)
  • Native library: liboqs 0.11.0 (Open Quantum Safe), statically bundled

License

Apache-2.0. See LICENSE and NOTICE for details.

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

aegis_verifier-0.1.3.tar.gz (124.7 kB view details)

Uploaded Source

Built Distributions

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

aegis_verifier-0.1.3-cp311-abi3-win_amd64.whl (254.1 kB view details)

Uploaded CPython 3.11+Windows x86-64

aegis_verifier-0.1.3-cp311-abi3-musllinux_1_2_x86_64.whl (635.8 kB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_x86_64.whl (438.9 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_aarch64.whl (349.6 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

aegis_verifier-0.1.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (731.4 kB view details)

Uploaded CPython 3.11+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file aegis_verifier-0.1.3.tar.gz.

File metadata

  • Download URL: aegis_verifier-0.1.3.tar.gz
  • Upload date:
  • Size: 124.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aegis_verifier-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2978fdf7763673c78394e6f3328e4ea2cc4b3ca8d8847340cda83b19ac5f0681
MD5 25dcdcf04675ea8a7569aba834f096d8
BLAKE2b-256 e88c35ffad166c7d8c4275c1f22d1ec9a9c08b4093eb95cd2cbe0163685e98c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.3.tar.gz:

Publisher: release.yml on DarkStar616/aegis-alpha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aegis_verifier-0.1.3-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c2509da21e6bf57c6c93000cb86c8331400cf364f2b1d4ef44200f2f9a508e09
MD5 5c2311686e924ddebfd11d1ba1d175e5
BLAKE2b-256 85b1c7a8f0554c5f100e122c1d6206766ea3312a78c1953e4bcb0a2f88298d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.3-cp311-abi3-win_amd64.whl:

Publisher: release.yml on DarkStar616/aegis-alpha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aegis_verifier-0.1.3-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.3-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f8f6b741465bb5097252997b053379fa0ad1ea237f3f6ea9c88bf99e4309bca9
MD5 1f666db31ea2694b4aee642e2c89c81b
BLAKE2b-256 80982050946ff1fa4d807bd6b776bf65033f9167270ae7239e3159e2e8e11b17

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.3-cp311-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on DarkStar616/aegis-alpha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c64dd29362b8aeb9e317236bbe004c4f475d9398d9fc440f269aa2600c9a4122
MD5 62a6f8cac775d46c949343f1b3541bbd
BLAKE2b-256 972f46c88d2dae4985f4270617022d089353f01bd8227916b979d0b6801f26bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on DarkStar616/aegis-alpha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7809a81e579dfe5bcdc24ac234326b2ea2d6762a10a2e2c552ac7e05cbde8690
MD5 505738227e8ffef1afd2dd101fab910c
BLAKE2b-256 c0d7f7a399180fac9c47abdcc91f00f31b301ba66083dfda1338aa2aa168ef76

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.3-cp311-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on DarkStar616/aegis-alpha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aegis_verifier-0.1.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 fd3f11ce3243ebe3122cf76df8feb74d8a92471920af8e0effb11c086c1fdbd7
MD5 32a539be694978babf85640af091d857
BLAKE2b-256 f62fe5a7c126697900a54148f7670c97d0efacde61ae9b40151fe31e62ea3314

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on DarkStar616/aegis-alpha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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