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.2.tar.gz (119.5 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.2-cp311-abi3-win_amd64.whl (246.6 kB view details)

Uploaded CPython 3.11+Windows x86-64

aegis_verifier-0.1.2-cp311-abi3-musllinux_1_2_x86_64.whl (625.6 kB view details)

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

aegis_verifier-0.1.2-cp311-abi3-manylinux_2_28_x86_64.whl (429.1 kB view details)

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

aegis_verifier-0.1.2-cp311-abi3-manylinux_2_28_aarch64.whl (339.7 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

aegis_verifier-0.1.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (714.8 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.2.tar.gz.

File metadata

  • Download URL: aegis_verifier-0.1.2.tar.gz
  • Upload date:
  • Size: 119.5 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.2.tar.gz
Algorithm Hash digest
SHA256 13c6834ebbc4686055b8f19476dbdefb7f9fb24dbc69322348821943cae0b94c
MD5 ceda19177fee7ecc644cefb425a4bcf3
BLAKE2b-256 226722c17400bab856e947d64afbf2b963a285f3b6a851328ba12133f8e94bde

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.2.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.2-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b2e798b9308a5f125248cc8a29cb3a9c4bae4ae0efc6468b1503e691feb9e209
MD5 16ebf3145c1b92afea30108c47bb0774
BLAKE2b-256 97a529510139b41a4a918a5b8844712e7cc9496c4d0debea197aae237d2b3dee

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.2-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.2-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7d4bf56aa47cfd54f859ecedf44c1b0a186edefe483b90d0acf91c9f058935fe
MD5 384764593d23d228b1ec0f955cba90de
BLAKE2b-256 40bdc843a30879eb2911c7613786a98f40ead8bfbbaf60c725b81860ce8f130c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.2-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.2-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.2-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d43e281bb033a9c5c759423f75ee0dc5991b4de531481fa8abceed408786b8e2
MD5 81dcd279fcc6c1e7492a08a67ba876d2
BLAKE2b-256 401e36fdbd56599478f3ac95d49ff47e8960457f0a0823770d9307f5fd7e7254

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.2-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.2-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aegis_verifier-0.1.2-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6d29bb3c53e3a04b057e02b5904626b08058bc3ee36859ceab9fbfdd66a76449
MD5 1937362f7dc7bdf2a72f8dd1f75723b1
BLAKE2b-256 78a4d8bcd3d28f2221820544959acafc3e62784a0392a6ff5d45b78edde7373a

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.2-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.2-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.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 49e62c82cc564a7f39e1848a0d2e620c520d0cd442afae57e78d15f3660110a3
MD5 1d833ab895538b1cdbad2c7f2b4bc163
BLAKE2b-256 a09839870f61a56e2587c48de5f48e02eddfb2cc4ecb8bc6c4016d91c66165ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_verifier-0.1.2-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