Status: Draft
Version: 1.0.0
Date: 2025-12-20
Extends: QWED-SPEC v1.0
Table of Contents
- Introduction
- Attestation Model
- Attestation Format
- Cryptographic Operations
- Verification Chain
- Trust Anchors
- Transport & Storage
- Implementation Guidelines
1. Introduction
1.1 Purpose
QWED-Attestation defines a standard format for cryptographic proofs of verification. An attestation is a signed statement that a specific verification was performed by a trusted verifier at a specific time.1.2 Use Cases
| Use Case | Description |
|---|---|
| Audit Trail | Prove that verification occurred for compliance |
| Trust Transfer | Third party can verify without re-running |
| Offline Verification | Validate attestation without network |
| Chain of Custody | Track verification through system handoffs |
| Non-Repudiation | Verifier cannot deny issuing attestation |
1.3 Terminology
| Term | Definition |
|---|---|
| Attestation | Signed proof of verification result |
| Issuer | QWED verifier that creates the attestation |
| Subject | The content that was verified |
| Holder | Entity that possesses the attestation |
| Verifier | Party validating the attestation |
| Claim | Statement within the attestation |
2. Attestation Model
2.1 Conceptual Model
2.2 Trust Flow
2.3 Attestation Lifecycle
| State | Description |
|---|---|
issued | Attestation created and signed |
valid | Within validity period, signature valid |
expired | Past expiration time |
revoked | Explicitly invalidated by issuer |
3. Attestation Format
3.1 Structure (JWT)
QWED Attestations use JSON Web Token (JWT) format per RFC 7519.3.2 Header Schema
| Field | Required | Description |
|---|---|---|
alg | REQUIRED | Signature algorithm (ES256, EdDSA) |
typ | REQUIRED | Token type (MUST be qwed-attestation+jwt) |
kid | REQUIRED | Key identifier (DID-based) |
3.3 Payload Schema
3.4 Example Attestation (Decoded)
Header:4. Cryptographic Operations
4.1 Algorithms
| Algorithm | Usage | Requirement |
|---|---|---|
| ES256 | Attestation signing | REQUIRED |
| EdDSA | Attestation signing | RECOMMENDED |
| SHA-256 | Content hashing | REQUIRED |
| SHA-384 | Content hashing | OPTIONAL |
4.2 Key Types
Issuer Keys:4.3 Signing Process
4.4 Verification Process
5. Verification Chain
5.1 Chained Attestations
For complex verifications, multiple attestations can be chained:5.2 Chain Reference
5.3 Multi-Engine Attestation
When multiple engines verify the same query:6. Trust Anchors
6.1 Issuer Registry
QWED maintains a registry of trusted issuers:6.2 Decentralized Identifiers (DIDs)
QWED uses DIDs for issuer identification:6.3 Key Rotation
Issuers SHOULD rotate keys annually. Old keys remain valid for attestation verification until their designated expiry.7. Transport & Storage
7.1 HTTP Header
Attestations can be returned in HTTP headers:7.2 Response Body
Attestations can be included in the response:7.3 Standalone Document
Attestations can be stored as standalone files:7.4 Blockchain Anchoring (Optional)
Attestation hashes can be anchored to public blockchains:8. Implementation Guidelines
8.1 Request Attestation
Request attestation in verification request:8.2 SDK Example (Python)
8.3 Storage Recommendations
| Use Case | Recommended Storage |
|---|---|
| Short-term audit | In-memory / Redis |
| Long-term compliance | Database with indexing |
| Immutable record | Blockchain anchor |
| Offline verification | File system |
8.4 Security Recommendations
- Protect Private Keys - Use HSM or secure key management
- Validate Issuers - Only trust registered issuers
- Check Expiration - Reject expired attestations
- Verify Chains - Validate all attestations in a chain
- Monitor Revocations - Check revocation status
Appendix A: Error Codes
| Code | Description |
|---|---|
ATT-001 | Invalid attestation format |
ATT-002 | Untrusted issuer |
ATT-003 | Invalid signature |
ATT-004 | Attestation expired |
ATT-005 | Attestation not yet valid |
ATT-006 | Attestation revoked |
ATT-007 | Missing required claim |
ATT-008 | Chain validation failed |
Appendix B: MIME Types
| Type | Usage |
|---|---|
application/qwed-attestation+jwt | Attestation JWT |
application/qwed-attestation+json | Decoded attestation |
Appendix C: DID Method
Thedid:qwed method specification will be published separately.
© 2025 QWED-AI. This specification is released under Apache 2.0 License.