Overview
Sigilum implements HTTP message signatures based on RFC 9421 with a specific profile for AI agent authentication. All signed requests use Ed25519 signatures and include required Sigilum headers for identity verification. Profile name:sigilum-rfc9421-v1Signature algorithm: Ed25519
Test vectors:
sdks/test-vectors/http-signatures-rfc9421.json
Signature Headers
Every signed request includes two RFC 9421 headers:Signature-Input
Defines the signature parameters and components:- created: Unix timestamp when signature was created
- nonce: Unique nonce for replay protection (UUID format)
- alg: Signature algorithm (
ed25519only) - keyid: DID URL identifying the signing key
Signature
Contains the base64-encoded signature:Signed Components
The signature covers specific HTTP message components. The exact set depends on whether the request includes a body.Without Body (GET, DELETE)
Required components:@method- HTTP method (lowercase)@target-uri- Full request URI (fragments stripped)sigilum-namespace- Owner namespacesigilum-subject- Requester principalsigilum-agent-key- Agent public keysigilum-agent-cert- Agent certificate
With Body (POST, PUT, PATCH)
Required components:@method- HTTP method (lowercase)@target-uri- Full request URI (fragments stripped)content-digest- SHA-256 hash of request bodysigilum-namespace- Owner namespacesigilum-subject- Requester principalsigilum-agent-key- Agent public keysigilum-agent-cert- Agent certificate
Component Details
@method (Derived Component)
HTTP method in lowercase:@target-uri (Derived Component)
Full request URI with fragments stripped:#fragment) are removed before signing.
Port handling: Non-standard ports are preserved:
content-digest (Header)
SHA-256 hash of the request body in RFC 9530 format:- Take the raw request body bytes
- Compute SHA-256 hash
- Encode in base64
- Wrap in RFC 9530 format:
sha-256=:base64hash:
sigilum-namespace (Header)
The owner namespace:sigilum-subject (Header)
The requester principal identifier:sigilum-agent-key (Header)
The agent’s public key:ed25519:<base64-encoded-public-key>
Validation: Must match the public key in the certificate and be authorized for the namespace.
sigilum-agent-cert (Header)
The agent’s certificate (JSON, base64-encoded):Certificate Proof Format
The certificate includes a self-signature over a canonical text representation.Canonical Certificate Text
Certificate proof signs UTF-8 text with newline-separated fields:expiresAt is null, the line ends after the colon.
Signature Verification
Verifiers MUST validate:- Signature headers present:
Signature-InputandSignatureheaders exist - Headers parseable: Headers conform to RFC 9421 syntax
- Certificate valid: Agent certificate is valid and not expired
- Namespace consistency: Namespace matches across headers, certificate, and DID
- Key consistency: Public key matches between
sigilum-agent-keyand certificate - KeyID consistency:
keyidparameter matches certificatekeyId - Content digest: If body exists,
content-digestmatches computed hash - Signature correctness: Ed25519 signature verifies against the canonical signature base
- Timestamp freshness:
createdtimestamp is recent (implementation-defined window) - Nonce uniqueness: Nonce has not been seen before (replay protection)
SIG_CONTENT_DIGEST_MISMATCH- Content digest doesn’t match bodySIG_INVALID_SIGNATURE- Ed25519 signature verification failedSIG_EXPIRED- Signature timestamp too oldSIG_NONCE_REPLAY- Nonce already usedSIG_NAMESPACE_MISMATCH- Namespace inconsistencySIG_KEY_MISMATCH- Key inconsistency
Test Vectors
Shared conformance vectors insdks/test-vectors/http-signatures-rfc9421.json include:
Positive Vectors
GET request without body:Negative Vectors (Tamper Detection)
Tampered method:Fixed Test Values
Test vectors use fixed values for reproducibility:created: Current Unix timestampnonce: Fresh UUID v4 for each request
SDK Implementation Requirements
All SDKs MUST:- Generate signatures conforming to this profile
- Strip URL fragments before signing
@target-uri - Lowercase HTTP methods in
@methodcomponent - Include content-digest when request has a body
- Omit content-digest when request has no body
- Verify all required components when validating signatures
- Check certificate proof signature
- Enforce namespace/key consistency across headers
- Provide stable error codes for verification failures
- Pass conformance tests using shared test vectors
Example Complete Request
Request:Related Documentation
Protocol Overview
High-level protocol documentation
Security
Security considerations and best practices
TypeScript SDK
Implementation in TypeScript
Test Vectors
Complete test vector suite