ALX Protocol is not only a type contract — it is also a trust boundary. The protocol minimizes reliance on trusted intermediaries by making identity verification cryptographic and validation rules explicit and deterministic. This page covers the trust model, replay protection mechanisms, content integrity expectations, and the boundaries of what the protocol does and does not protect against. For responsible disclosure, contact security@xandrlabs.ai.Documentation Index
Fetch the complete documentation index at: https://docs.xandrlabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
Trust model
ALX Protocol v1 operates under the following trust assumptions:- Clients trust the server to emit protocol-conformant envelopes. A client must not assume that a response is valid simply because it arrived — it must validate only documented canonical fields.
- Identity verification is cryptographic, not authority-based. Signatures are verified against public keys;
kbHashis derived deterministically from envelope content. - Capability negotiation is informational only. Advertised capabilities are not proof of authorization.
- A protocol-visible proof or receipt is independently verifiable against canonical protocol state. If the protocol presents something as verifiable, you can verify it without trusting the server’s word.
EIP-712 signed requests
ALX Protocol uses EIP-712 typed-data signing for authenticated requests. The@alx/protocol/core subpath provides the signing and verification surface:
| Field | Type | Purpose |
|---|---|---|
kbId | bytes32 | The Knowledge Block being queried. |
query | string | The query string. |
agent | address | The Ethereum address of the signing agent. |
nonce | uint256 | Monotonically increasing per-agent value to prevent replay. |
expiry | uint64 | Unix timestamp after which the request is invalid. |
chainId | uint256 | Target chain identifier to prevent cross-chain replay. |
Replay protection
ALX Protocol defines replay protection at the request level using two mechanisms: Nonce tracking. TheNonceTracker class tracks consumed nonces per agent address. Once a nonce is consumed, the same nonce cannot be reused by the same agent. Servers operating in production should use a NonceTracker (or an equivalent persistent store) when calling verifySignedProtocolRequest.
Expiry fields. All signed payloads must include an expiry field. A request whose expiry timestamp has passed is rejected. Short expiry windows limit the blast radius if a signed request is intercepted.
SignedRequestValidationError is thrown with one of the following codes on failure: MALFORMED_REQUEST, INVALID_SIGNATURE, SIGNER_MISMATCH, EXPIRED_REQUEST, CHAIN_MISMATCH, or NONCE_REUSED.
artifactHash validation
Every published Knowledge Block binds its artifact bytes to the envelope viaartifactHash. When you retrieve artifact content by CID or other address, always validate the retrieved bytes against the published artifactHash before using the content.
Threat model
What the protocol protects against
- Signature forgery. EIP-712 signatures bind the request to the signer’s private key. Forging a valid signature without the key is computationally infeasible.
- Request replay within the nonce window.
NonceTrackerand per-agent nonce tracking prevent reuse of a consumed nonce. - Expired request replay. Requests with a passed
expiryare rejected before signature verification. - Cross-chain replay. The
chainIdfield in the EIP-712 domain and request payload prevents a signature valid on one chain from being accepted on another. - Content tampering.
kbHashis a cryptographic commitment to the canonical envelope. Any change to a hash-scoped field produces a different hash, breaking the binding. - Artifact substitution.
artifactHashbinds the artifact bytes to the envelope. Substituting different bytes for a CID produces a different hash, detectable by validation.
What the protocol does not protect against
- Compromised signer keys. ALX Protocol v1 does not define an on-chain revocation mechanism. All signatures produced by a compromised key remain cryptographically valid at the protocol level. Mitigations include short expiry windows, application-layer blocklists, and the emergency pause on
AlexandrianRegistryV2. - KB retraction. Published Knowledge Blocks are immutable by protocol design. There is no protocol-level mechanism to retract a published KB. A KB may be superseded by a newer KB that declares the old
kbHashin its lineage. - Full replay-resistant economic operations. Replay resistance for credit-consuming routes (execute, recommend, billing webhooks) is tracked as active protocol-hardening work, not a proven guarantee.
- Downgrade abuse beyond documented rules. Fuzz and matrix tests for capability downgrade safety are pending.
Current security status
The following areas are implemented and have executable proof:- Replay and expiry validation
- Malformed-signature rejection
- Tampered signed-payload rejection
- Signer and actor mismatch rejection
- Artifact-receipt verification against expected
kbHashandartifactHash
- Replay-resistant economic operations (double-submit prevention on credit-consuming routes)
- Broader receipt verification for non-happy-path and tampered payloads
- Downgrade/capability abuse resistance