Skip to main content

Crate aitp_core

Crate aitp_core 

Source
Expand description

Core types and primitives for the Agent Identity & Trust Protocol (AITP).

This crate is pure — no I/O, no crypto, no transport. It defines:

  • The Aid newtype: a validated AITP Agent Identifier.
  • The AitpEnvelope message wrapper.
  • JSON canonicalization per RFC 8785 (jcs).
  • Strict unpadded base64url codec (base64url).
  • The Timestamp newtype for Unix-second timestamps.
  • The ExtensionsMap type for forward-compatible extensions.
  • The AitpError and ErrorCode taxonomy from RFC-AITP-0001.

Higher-level protocol crates (aitp-manifest, aitp-tct, aitp-handshake, aitp-delegation) build on these primitives.

Re-exports§

pub use aid::Aid;
pub use aid::AidAlgorithm;
pub use aid::AidParseError;
pub use envelope::envelope_signing_digest;
pub use envelope::envelope_signing_input;
pub use envelope::AitpEnvelope;
pub use envelope::MessageType;
pub use envelope::Sender;
pub use error::AitpError;
pub use error::ErrorCode;
pub use extensions::ExtensionsMap;
pub use raw_url::RawUrl;
pub use time::Timestamp;

Modules§

aid
AITP Agent Identifier (AID).
base64url
Strict unpadded base64url codec (RFC 4648 §5).
envelope
AITP message envelope (RFC-AITP-0001 §5).
error
AITP error codes from the registry.
extensions
Forward-compatible extension fields.
jcs
RFC 8785 JSON Canonicalization Scheme (JCS).
raw_url
RawUrl — a URL that preserves its on-the-wire byte form.
time
Unix-second timestamps with freshness checks.

Constants§

AID_PUBKEY_IDENTIFIER_LEN
Length of an AID identifier component when method = pubkey (Ed25519 raw public key encoded as unpadded base64url).
DEFAULT_TIMESTAMP_TOLERANCE_SECS
Default timestamp tolerance for replay protection (300 seconds, ±).
ED25519_SIGNATURE_BASE64URL_LEN
Length of an Ed25519 signature encoded as unpadded base64url.
PROTOCOL_VERSION
Protocol version this crate implements. Carried as the version field on JCS-profile artifacts and as the ver private claim on compact-JWS portable trust artifacts (RFC-AITP-0001 §5.4.5).