KYA Cryptographic Middleware Development
Budget: $750 – $1,500 CAD
# Technical Specification: KYA (Know Your Agent) Cryptographic Middleware
## Objective
We require a mid-to-senior backend developer to construct a secure "Know Your Agent" (KYA) verification middleware layer. The goal is to ensure our autonomous AI agents can execute API actions only after verifying their identity cryptographically against an anchored decentralized web3 domain (.u / .wif).
## Core Deliverables
1. **Verification Middleware:** Intercept incoming agent requests. Parse custom routing headers: `X-Agent-Domain` and `X-Agent-Signature`.
2. **Domain Resolution Adapter:** Integrate with Web3/DNS libraries to resolve the public key assigned to the agent's domain identity records.
3. **Cryptographic Validation:** Implement Ed25519 signature validation verifying the request body and an active Unix timestamp (60-second expiry window to prevent replay attacks).
4. **Data Sanitization Enforcer:** Integrate strict Pydantic (Python) or Zod (TypeScript) parsing schemas on the endpoint to reject unsanitized LLM string variations.
## Acceptance Criteria
- Zero external libraries outside of native crypto/Web3 resolution libraries and the core framework (FastAPI or Express).
- Clean separation of the validation logic from the actual route execution.
- Automated unit test suite showing a successful verification path, an invalid signature failure, and an expired timestamp failure.
## Objective
We require a mid-to-senior backend developer to construct a secure "Know Your Agent" (KYA) verification middleware layer. The goal is to ensure our autonomous AI agents can execute API actions only after verifying their identity cryptographically against an anchored decentralized web3 domain (.u / .wif).
## Core Deliverables
1. **Verification Middleware:** Intercept incoming agent requests. Parse custom routing headers: `X-Agent-Domain` and `X-Agent-Signature`.
2. **Domain Resolution Adapter:** Integrate with Web3/DNS libraries to resolve the public key assigned to the agent's domain identity records.
3. **Cryptographic Validation:** Implement Ed25519 signature validation verifying the request body and an active Unix timestamp (60-second expiry window to prevent replay attacks).
4. **Data Sanitization Enforcer:** Integrate strict Pydantic (Python) or Zod (TypeScript) parsing schemas on the endpoint to reject unsanitized LLM string variations.
## Acceptance Criteria
- Zero external libraries outside of native crypto/Web3 resolution libraries and the core framework (FastAPI or Express).
- Clean separation of the validation logic from the actual route execution.
- Automated unit test suite showing a successful verification path, an invalid signature failure, and an expired timestamp failure.