Overview
Vestauth’s security model is built on cryptographic signatures, public key discovery, and defense-in-depth principles. This page explains how Vestauth protects against common attack vectors while maintaining simplicity and developer ergonomics.Cryptographic Foundation
Vestauth uses Ed25519 elliptic curve cryptography for all signing operations:- Algorithm: EdDSA (Edwards-curve Digital Signature Algorithm)
- Curve: Curve25519
- Key size: 256 bits (32 bytes)
- Signature size: 512 bits (64 bytes)
Why Ed25519?
Strong Security
Strong Security
Ed25519 provides approximately 128 bits of security, equivalent to 3072-bit RSA keys, but with much smaller key and signature sizes.
Performance
Performance
Ed25519 is extremely fast:
- Signing: ~15,000 signatures/second on modern hardware
- Verification: ~40,000 verifications/second
No Parameter Choices
No Parameter Choices
Unlike RSA or ECDSA, Ed25519 has no parameter choices that could weaken security. There’s only one secure way to use it.
Side-Channel Resistance
Side-Channel Resistance
Ed25519 is designed to be resistant to timing attacks and other side-channel vulnerabilities.
HTTP Message Signatures (RFC 9421)
Vestauth implements RFC 9421 for signing HTTP requests.Signature Components
Each signed request includes three headers: 1. Signature The base64-encoded cryptographic signature:created- Unix timestamp when signature was createdexpires- Unix timestamp when signature expires (typically 5 minutes)nonce- Unique 64-byte random valuekeyid- Public key identifier (JWK thumbprint)alg- Signature algorithm (ed25519)tag- Implementation tag (web-bot-auth)
What Gets Signed?
Vestauth signs the HTTP@authority component (host + port):
- Host header attacks - Signature is bound to the destination hostname
- Port confusion - Different ports produce different signatures
- Man-in-the-middle - Attacker can’t redirect to different hosts
Future expansionVestauth currently signs
@authority only. Future versions may support signing additional components like request body, specific headers, or query parameters for enhanced security.Replay Attack Prevention
Vestauth prevents replay attacks using three complementary mechanisms:1. Expiration Timestamps
Every signature includes anexpires parameter:
2. Creation Timestamps
Thecreated parameter prevents backdating attacks:
3. Unique Nonces
Each request includes a cryptographically random 64-byte nonce:- Uniqueness: 64 bytes of randomness = 2^512 possible values
- One-time use: Each nonce should only be accepted once
- Collision resistance: Probability of collision is effectively zero
Nonce Tracking (Optional)
Tools can optionally track used nonces to provide absolute replay protection:SSRF Protection
Server-Side Request Forgery (SSRF) is a critical vulnerability during public key discovery. Vestauth prevents SSRF through domain allowlisting.Default Trusted Domains
By default, Vestauth only fetches public keys from:agent-abc123.api.vestauth.com✅agent-xyz789.agents.vestauth.com✅
localhost❌192.168.1.1❌internal.company.local❌attacker.com❌
Trusted Domain Verification
ThetrustedFqdn() function enforces this policy:
Custom Trusted Domains
For self-hosted or federated deployments, configure additional trusted domains:agent-123.agents.vestauth.com✅agent-456.agents.example.internal✅agent-789.agents.evil.com❌ (not in allowlist)
Public Key Discovery
Vestauth uses.well-known URLs for public key discovery:
Discovery Flow
1
Extract agent identity
Parse the Extract:
Signature-Agent header:agent-4b94ccd425e939fac5016b6b.api.vestauth.com2
Verify trusted domain
Check that the domain matches
TRUSTED_FQDN_REGEX:3
Construct discovery URL
Build the
.well-known URL:4
Fetch public keys
Make HTTPS request to discovery endpoint:
5
Select matching key
Find key matching
keyid from Signature-Input:Why Not Embed Keys?
Vestauth uses discovery instead of embedding public keys in requests for several reasons:Smaller Requests
Smaller Requests
Public keys are 32+ bytes. Discovery keeps request headers small and allows caching.
Key Rotation
Key Rotation
Agents can rotate keys without changing how they sign requests. Tools simply fetch updated keys from the discovery endpoint.
Multi-Key Support
Multi-Key Support
Discovery endpoints can publish multiple active keys during rotation periods:
Standards Alignment
Standards Alignment
.well-known discovery is used by OAuth, OpenID Connect, and other web identity systems.Defense in Depth
Vestauth employs multiple security layers:Threat Model
What Vestauth Protects Against
✅ Impersonation attacks - Only the private key owner can create valid signatures ✅ Man-in-the-middle - Signatures are bound to the destination hostname ✅ Replay attacks - Timestamps and nonces prevent reuse ✅ SSRF attacks - Domain allowlisting prevents malicious key fetches ✅ API key leaks - No shared secrets to leak ✅ Credential stuffing - No passwords to guess or brute forceWhat Vestauth Does NOT Protect Against
⚠️ Private key compromise - If an attacker obtainsAGENT_PRIVATE_JWK, they can impersonate the agent until keys are rotated
⚠️ Eavesdropping - Use HTTPS to protect request/response content
⚠️ DDoS attacks - Signature verification requires CPU; rate limiting is recommended
⚠️ Compromised discovery endpoint - If an attacker controls the .well-known URL, they could serve malicious keys (mitigated by domain allowlisting)
Private key security is criticalVestauth’s security depends on keeping
AGENT_PRIVATE_JWK secret:- Never commit to version control
- Never log or display in plaintext
- Never send over unencrypted channels
- Rotate immediately if exposed
- Store in encrypted secret management systems
Security Best Practices
For Tool Developers
1
Always use HTTPS in production
2
Implement rate limiting
Prevent abuse from compromised agents:
3
Cache public keys
Reduce latency and protect against discovery endpoint outages:
4
Log verification failures
Monitor for attack attempts:
5
Consider nonce tracking
For high-security tools, implement nonce deduplication.
For Agent Operators
1
Protect private keys
- Use
.envfiles (never commit) - Use encrypted secret storage
- Restrict file permissions:
chmod 600 .env
2
Rotate keys regularly
3
Monitor agent activity
Review tool audit logs for unexpected usage.
4
Use separate agents for different purposes
Don’t share agent identities across projects or environments.
Security Audits
Vestauth follows these standards:- RFC 9421 - HTTP Message Signatures
- Web-Bot-Auth Draft - Agent Authentication Architecture
- RFC 8032 - Ed25519 Signatures
Next Steps
Building Tools
Implement secure tool authentication
Key Rotation
Learn rotation best practices