Skip to main content
Status: Draft
Version: 1.0.0
Date: 2025-12-20
Extends: QWED-SPEC v1.0

Table of contents

  1. Introduction
  2. Attestation model
  3. Attestation format
  4. Cryptographic operations
  5. Verification chain
  6. Trust anchors
  7. Transport & storage
  8. 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

1.3 Terminology


2. Attestation model

2.1 Conceptual model

2.2 Trust flow

2.3 Attestation lifecycle


3. Attestation format

3.1 Structure (JWT)

QWED Attestations use JSON Web Token (JWT) format per RFC 7519.

3.2 Header schema

3.3 Payload schema

3.4 Example attestation (decoded)

Header:
Payload:
Encoded JWT:

4. Cryptographic operations

4.1 Algorithms

4.2 Key types

Issuer Keys:

4.3 Signing process

The signing process accepts an optional timestamp parameter. When provided, it overrides the default iat value (which is current_timestamp()). This is useful for deterministic testing and replaying attestations.

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

8.4 Security recommendations

  1. Protect Private Keys - Use HSM or secure key management
  2. Provide a Valid Secret - The core AttestationGuard requires a secret_key or the QWED_ATTESTATION_SECRET environment variable. Insecure fallback secrets are no longer supported; initialization raises a ValueError if no secret is provided
  3. Validate Issuers - Only trust registered issuers
  4. Check Expiration - Reject expired attestations
  5. Verify Chains - Validate all attestations in a chain
  6. Monitor Revocations - Check revocation status

Appendix A: Error codes

Appendix B: MIME types

Appendix C: DID method

The did:qwed method specification will be published separately.
© 2025 QWED-AI. This specification is released under Apache 2.0 License.