QODIQA Security and Cryptographic Profile
for Runtime Consent Enforcement

Deterministic Runtime Consent Enforcement for Artificial Intelligence Systems

April 2026

QODIQA-SEC-2026-001  ·  Version 1.0

Mandatory and recommended cryptographic, integrity, and security mechanisms for high-assurance implementations of the QODIQA enforcement infrastructure.

Scroll
Contents
Abstract

This document defines the mandatory and recommended cryptographic, integrity, and security mechanisms required for high-assurance implementations of QODIQA Core v1.0, the 68-Point Enforcement Framework v3.0, and the associated Conformance Test Suite.

This profile is not general security guidance. It is not a cybersecurity best-practices document. It is not a compliance advisory. It is a deterministic security hard profile for runtime consent enforcement infrastructure — specifying precisely which algorithms are permitted, which are forbidden, how consent tokens are signed, how trust anchors are managed, how revocation registries are protected, and how audit integrity is preserved across the full enforcement lifecycle.

All requirements expressed herein use normative language. Implementations claiming conformance with QODIQA Core v1.0 at Hardened Enterprise Profile or above SHALL satisfy all MUST requirements in this document.

#Purpose and Security Scope

QODIQA Core v1.0 defines a deterministic consent enforcement layer for AI runtime systems. This Security and Cryptographic Profile extends that standard by specifying the cryptographic substrate required to make QODIQA's deterministic properties tamper-resistant, verifiable, and auditable under adversarial conditions.

1.1 Scope of This Profile

This profile governs the security requirements applicable to the QODIQA enforcement layer — specifically the runtime components responsible for consent token issuance, artifact production, policy evaluation, registry consultation, and audit ledger maintenance. It applies to all software, hardware, and operational components that implement or host QODIQA enforcement functions.

Boundary Delimitation. This profile governs enforcement layer security. It does not govern the security of AI model weights, training pipelines, inference parameters, or any component internal to the model under enforcement. The System Under Protection (SUP) is the enforcement layer itself.

1.2 Relationship to Core Standard

QODIQA Core v1.0 defines the logical architecture of enforcement: consent gates, frozen evaluation contexts, decision artifacts, replay verification, and fail-closed semantics. This profile defines the cryptographic mechanisms that make those logical properties provably enforceable. Where Core defines what must be enforced, this profile defines how that enforcement must be anchored.

1.3 Relationship to Conformance Test Suite

The Conformance Test Suite references this profile for cryptographic verification test cases. Implementations that pass all Core conformance tests but fail cryptographic profile requirements SHALL be classified as non-conformant at any profile level above Baseline Security.

1.4 System Under Protection

Defined Boundary — System Under Protection (SUP)
SUP.CONSENT-GATE The runtime enforcement gate evaluating consent before AI invocation. Boundary includes token ingestion, policy lookup, and decision production.
SUP.ARTIFACT-STORE The immutable store of Decision Artifacts produced by the enforcement gate. Boundary includes write path, hash chain, and replay verification interface.
SUP.REGISTRY The revocation and policy version registry consulted during enforcement evaluation. Boundary includes read path, integrity verification, and TTL management.
SUP.AUDIT-LEDGER The append-only audit log recording all enforcement decisions. Boundary includes write-before-execute path, hash chain, and archival interface.
SUP.KEY-STORE The secure store of signing keys, trust anchors, and root certificates. Boundary includes HSM or secure enclave where applicable.

Components external to the above SUP definitions — including model weights, inference engines, application-layer logic, and data stores — are out of scope for this profile's cryptographic requirements.

#Threat Model Definition

The following threat categories represent realistic, high-impact adversarial scenarios against the QODIQA enforcement layer. All are grounded in known attack classes against cryptographic infrastructure, distributed systems, and audit mechanisms. Speculative or theoretical threats are excluded.

THR-01
Consent Token Forgery

An adversary constructs a syntactically valid consent token without possessing the issuing authority's private key. Mitigated by mandatory signature verification at every enforcement gate.

THR-02
Key Compromise

An adversary obtains a private signing key, enabling forgery of valid consent tokens. Mitigated by HSM key storage, rotation intervals, revocation propagation, and key compromise response procedures.

THR-03
Registry Tampering

An adversary modifies the revocation registry to remove revocation records or insert false active-key entries. Mitigated by signed snapshots, hash chain integrity, and anti-downgrade sequence number enforcement.

THR-04
Replay Manipulation

An adversary replays a previously valid consent token against a different context or after revocation. Mitigated by nonce binding, timestamp validation, registry consultation, and artifact hash verification.

THR-05
Audit Log Deletion and Modification

An adversary removes or alters audit entries to conceal enforcement decisions. Mitigated by append-only storage, hash chain integrity, and write-before-execute sequencing.

THR-06
Clock Manipulation

An adversary skews system time to extend token lifetime, suppress TTL expiry, or produce false temporal audit records. Mitigated by NTP synchronization requirements, monotonic clock enforcement, and clock drift bounds.

THR-07
Policy Version Substitution

An adversary substitutes an outdated or permissive policy version during evaluation. Mitigated by inclusion of policy version in artifact hash and mandatory registry version verification.

THR-08
Artifact Collision Attempt

An adversary engineers a second execution context that produces the same artifact hash as a legitimately authorized context. Mitigated by SHA-256 minimum, full canonical context inclusion, and collision-resistance requirements.

THR-09
Network Partition Abuse

An adversary induces a network partition to prevent registry consultation, forcing a fallback to a permissive state. Mitigated by fail-closed semantics: enforcement MUST deny when registry is unreachable.

THR-10
Insider Tampering

A privileged internal actor modifies keys, artifacts, or audit records. Mitigated by HSM-based key storage, dual-control key management procedures, append-only audit architecture, and independent log archival.

#Security Invariants

The following invariants are formal properties that MUST hold at all times across all conformant implementations of the QODIQA enforcement layer. An invariant violation is not a configuration error — it is an integrity failure. Any condition that causes an invariant to be false MUST trigger an integrity violation event, a fail-closed enforcement state, and an audit ledger entry recording the breach.

These invariants are not derived from policy preferences. They are derived from the structural requirements of deterministic, verifiable, tamper-resistant consent enforcement. They hold regardless of deployment profile tier.

Formal Security Invariants SEC-INV · v1.0
// INV-01: Artifact Signature Invariant
 artifact ∈ ARTIFACT_STORE:
  artifact.signature IS VALID
   artifact.signing_key ∈ TRUST_REGISTRY
   artifact.signing_key.status = ACTIVE
  → INVARIANT: No unsigned or unverifiable artifact SHALL exist

// INV-02: Write-Before-Execute Invariant
 decision ∈ {PERMIT, DENY}:
  LEDGER.contains(decision.ledger_entry) = TRUE
   LEDGER.committed(decision.ledger_entry) = TRUE
   decision.ledger_entry.timestamp ≤ decision.response_timestampINVARIANT: No PERMIT response SHALL be returned before its ledger entry is committed

// INV-03: Registry Validation Invariant
 token ∈ PRESENTED_TOKENS:
  REGISTRY.consulted(token.kid) = TRUE
   REGISTRY.snapshot_age ≤ CONFIGURED_TTL
  → INVARIANT: No valid token SHALL bypass live registry validation

// INV-04: Revocation Invariant
 key ∈ REVOKED_KEYS:
  ¬∃ token: VERIFY(token.sig, key) = ACCEPTED
  → INVARIANT: No revoked key SHALL produce an accepted signature

// INV-05: Clock Certainty Invariant
 enforcement_decision:
  CLOCK.sync_error ≤ PROFILE.drift_tolerance
   CLOCK.source = AUTHENTICATED_NTP | GPS | PTP
  → INVARIANT: No enforcement decision SHALL execute under clock uncertainty exceeding tolerance

// INV-06: Deterministic Evaluation Invariant
 evaluation_invocation:
  evaluation.external_callouts = ∅
   evaluation.random_in_path = FALSE
   evaluation.context = FROZEN
  → INVARIANT: No enforcement decision SHALL execute without a deterministic evaluation path

// INV-07: Artifact Chain Invariant
 artifact_n ∈ ARTIFACT_STORE:
  artifact_n.prev_artifact_id = SHA256(artifact_{n-1})
   (n = 0  artifact_n.prev_artifact_id = ZERO_BYTES_32)
  → INVARIANT: The artifact hash chain MUST be unbroken from genesis
SEC-INV-01 Invariant Violation Response MUST
Requirement Any runtime condition that causes one or more of the above invariants to evaluate as false MUST trigger: (1) an immediate fail-closed DENY-ALL enforcement state; (2) a signed integrity violation entry written to the audit ledger; (3) an alert to the designated security operations contact. Invariant violations MUST NOT be silently absorbed, corrected without logging, or treated as recoverable operational events without explicit documented escalation.
Verification Conformance Test Suite cases SHALL include invariant violation injection tests. An implementation that does not enter fail-closed state upon induced invariant violation fails High-Assurance and Hardened profile conformance.

#Attack Surface Mapping

Each SUP component defined in Section 1.4 presents a discrete attack surface. The following table maps each component to its primary attack vectors, associated threat class, normative mitigation control, and the enforcement point at which the control is applied. This mapping is structural: it does not add requirements beyond those stated in the corresponding normative sections. It exists to provide a deterministic traceability reference between threat classes and controls.

Table 2.2-A — Enforcement Layer Attack Surface Mapping
ComponentAttack SurfaceThreat ClassMitigation ControlEnforcement Point
SUP.CONSENT-GATE Token ingestion interface; policy evaluation path; decision output channel Token forgery (THR-01); replay manipulation (THR-04); non-deterministic evaluation (INV-06) Signature verification (SEC-ALG-01); deterministic verification sequence (SEC-TOK-VER); anti-replay JTI cache (SEC-TOK-REPLAY-CLUSTER) Runtime enforcement gate on every invocation
SUP.REGISTRY Snapshot read interface; sequence number state; cached state window Registry tampering (THR-03); downgrade substitution; stale-state exploitation Signed snapshots (SEC-REG-01); fail-closed on unreachability (SEC-REG-02); anti-downgrade sequence enforcement (Section 6.1) Registry consultation at each enforcement gate invocation
SUP.AUDIT-LEDGER Ledger write path; hash chain continuity; archival interface Audit log deletion and modification (THR-05); hash chain break; write-before-execute violation (INV-02) Write-before-execute requirement (SEC-AUDIT-01); append-only storage (Section 8.2); tamper detection (Section 8.3) Ledger write before PERMIT response is issued
SUP.ARTIFACT-STORE Artifact write interface; hash chain linkage; artifact read interface for replay verification Artifact collision (THR-08); artifact tampering; hash chain break (INV-07) Artifact immutability (SEC-ART-01); model binary integrity binding (SEC-ART-02); canonical hash construction (Section 7.1) Artifact production at enforcement decision time; replay verification on demand
SUP.KEY-STORE Private key material; key export interface; key activation and rotation path Key compromise (THR-02); insider tampering (THR-10) HSM storage requirement (SEC-KEY-01); prohibited storage patterns (SEC-KEY-02); hardware key protection and dual-control (SEC-KEY-03) Key generation, storage, rotation, and activation procedures

#Failure Mode Enumeration and Deterministic Response

Failure modes are conditions under which one or more security invariants defined in Section 2.1 cannot be satisfied. For each failure mode, the system response MUST be deterministic and fail-closed. No failure mode permits a PERMIT decision to be issued when the condition rendering the enforcement environment unverifiable remains unresolved. The following table enumerates the primary failure conditions, their detection mechanisms, required system responses, enforcement outcomes, and audit obligations.

Table 2.3-A — Failure Mode and Deterministic Response Matrix
Failure ConditionDetection MechanismRequired System ResponseEnforcement OutcomeAudit RequirementSeverity
Registry unavailable Registry connection timeout or network error on consultation attempt Enforcement gate MUST enter fail-closed state. No cached state may be used if TTL has expired. Operations MUST be suspended until registry is reachable and a valid signed snapshot is confirmed. DENY-ALL until registry restored MUST write registry unavailability event to audit ledger with timestamp and gate identifier CRITICAL
Registry stale snapshot Snapshot age exceeds configured TTL for the applicable profile (Baseline: 300 s; Hardened: 60 s; High-Assurance: 15 s) Cached state MUST NOT be used beyond TTL expiry. Enforcement gate MUST deny all requests until a fresh snapshot is obtained and verified. DENY until fresh signed snapshot obtained MUST write stale-snapshot event to audit ledger HIGH
Key identifier not resolvable Registry lookup of token kid returns null or status REVOKED Enforcement gate MUST immediately produce a DENY decision. No exception path or fallback key resolution is permitted. DENY — immediate MUST write key resolution failure event including presented kid and resolution outcome CRITICAL
Signature verification failure VERIFY(token.sig, canonical_payload, public_key) returns FALSE Enforcement gate MUST produce a DENY decision. The token MUST be treated as potentially forged. No retry or alternative verification path is permitted. DENY — immediate MUST write signature failure event to audit ledger CRITICAL
Clock drift violation Measured clock synchronization error exceeds the configured drift tolerance for the applicable profile Enforcement gate MUST enter fail-closed state for all decisions requiring temporal validation. Gate MUST remain in fail-closed state until clock synchronization is restored and verified within tolerance. DENY-ALL temporal decisions until clock restored MUST write clock drift violation event with measured error and tolerance threshold CRITICAL
Audit ledger write failure Ledger write returns error or acknowledgment timeout before PERMIT response is issued Enforcement gate MUST return DENY. The write-before-execute invariant (INV-02) MUST NOT be relaxed under any operational condition, including high load or storage failure. DENY — ledger write failed MUST attempt to write failure event to secondary log sink; if unavailable, alert security operations CRITICAL
Partial artifact persistence Artifact hash chain verification detects a gap — i.e., a missing or unlinked artifact in the sequence Enforcement gate MUST enter fail-closed state. The artifact store MUST be quarantined pending forensic review. No new artifacts may be written until the chain is validated or restored from a verified backup. DENY-ALL until artifact chain integrity confirmed MUST write integrity violation event recording the last valid artifact identifier and the gap location HIGH
Table 2.3-B — Control Traceability Index
Control IDSection ReferenceThreat CoverageComponent Scope
SEC-ALG-01Section 3.1THR-01 (Token Forgery); algorithm substitutionSUP.CONSENT-GATE
SEC-ALG-AGILITY-01Section 3.4Algorithm obsolescence; PQC transition riskSUP.CONSENT-GATE; SUP.KEY-STORE
SEC-INV-01Section 2.1All invariant violations (INV-01 through INV-07)All SUP components
SEC-TOK-01Section 4.1THR-01 (Token Forgery); signature malleabilitySUP.CONSENT-GATE
SEC-TOK-REPLAY-CLUSTERSection 4.5THR-04 (Replay Manipulation); distributed replaySUP.CONSENT-GATE
SEC-KEY-01Section 5.1THR-02 (Key Compromise); unresolvable trust chainSUP.KEY-STORE; SUP.CONSENT-GATE
SEC-KEY-02Section 5.4THR-02 (Key Compromise); THR-10 (Insider Tampering)SUP.KEY-STORE
SEC-KEY-03Section 5.4THR-02 (Key Compromise); THR-10 (Insider Tampering)SUP.KEY-STORE
SEC-REG-01Section 6THR-03 (Registry Tampering); hash chain breakSUP.REGISTRY
SEC-REG-02Section 6THR-09 (Network Partition Abuse); stale state exploitationSUP.REGISTRY; SUP.CONSENT-GATE
SEC-ART-01Section 7.1THR-08 (Artifact Collision); artifact tampering (INV-07)SUP.ARTIFACT-STORE
SEC-ART-02Section 7.1THR-07 (Policy Version Substitution); silent model substitutionSUP.ARTIFACT-STORE; SUP.CONSENT-GATE
SEC-AUDIT-01Section 8.1THR-05 (Audit Log Modification); write-before-execute violation (INV-02)SUP.AUDIT-LEDGER
SEC-CLK-01Section 9THR-06 (Clock Manipulation); clock drift violation (INV-05)SUP.CONSENT-GATE; SUP.AUDIT-LEDGER
SEC-NET-01Section 10Network interception; plaintext transport exposureAll SUP components (network interfaces)
SEC-NET-PFSSection 10Retrospective decryption; non-PFS cipher suite exploitationAll SUP components (TLS connections)
SEC-DET-01Section 11Non-deterministic evaluation (INV-06); evaluation path contaminationSUP.CONSENT-GATE
SEC-SCOPE-01Section 14Misrepresentation of security boundary; SUP boundary violationsAll SUP components (documentation and claims)

#Cryptographic Algorithm Requirements

3.1 Approved Signature Algorithms

Implementations SHALL use only the following signature algorithms for consent token signing, registry snapshot signing, and audit chain anchoring. Algorithm selection MUST be recorded in the implementation's cryptographic configuration manifest.

Table 3.1 — Approved Signature Algorithms
AlgorithmStandardRequirementNotes
Ed25519RFC 8032MUSTPrimary recommended algorithm. Deterministic signature generation. 128-bit security level.
ECDSA P-256NIST FIPS 186-4SHOULDOptional interoperability profile. MUST use deterministic nonce per RFC 6979. SHA-256 digest required.
ECDSA P-384NIST FIPS 186-4SHOULDHigh-Assurance profile only. SHA-384 digest required. Justified by extended security margin requirement.
RSA-PSS ≥ 3072-bitRFC 8017SHOULDLegacy integration only. SHA-256 or SHA-384 digest required. SHALL NOT be used for new implementations.
SEC-ALG-01 Primary Signature Algorithm Requirement MUST
Requirement All conformant implementations SHALL support Ed25519 as the primary signing algorithm. Non-NIST-approved algorithms, including those not listed in Table 3.1, SHALL NOT be used under any circumstance, including experimental or prototype deployments.
Rationale Ed25519 provides deterministic signature generation, eliminating the nonce reuse vulnerability class inherent to non-deterministic ECDSA. Its compactness and performance characteristics are appropriate for inline enforcement gate use.

3.2 Hashing Algorithms

Table 3.2 — Approved Hashing Algorithms
AlgorithmStandardRequirementUse
SHA-256NIST FIPS 180-4MUSTArtifact hashing, audit chain, token payload digest. Minimum acceptable.
SHA-384NIST FIPS 180-4SHOULDHigh-Assurance profile artifact hashing. Required when ECDSA P-384 is the signing algorithm.
SHA-512NIST FIPS 180-4SHOULDMerkle tree leaf hashing in optional audit ledger variant. Acceptable at all profiles.
BLAKE3IETF DraftSHOULDInternal high-throughput hashing only. MUST NOT be used as the sole artifact hash without SHA-256 co-digest.

3.3 Forbidden Algorithms

The following algorithms are unconditionally forbidden in all QODIQA implementations regardless of deployment context, legacy compatibility claims, or performance justifications. No conformance exception is available for these prohibitions.

Table 3.3 — Forbidden Algorithms
AlgorithmStatusReasonProhibition Scope
MD5FORBIDDENCryptographically broken. Collision attacks demonstrated.MUST NOT be used for any purpose.
SHA-1FORBIDDENCollision resistance compromised. SHAttered attack demonstrated in 2017.MUST NOT be used for any purpose.
RSA < 2048-bitFORBIDDENInsufficient key length. Factorization attacks feasible.MUST NOT be used in any context.
ECDSA non-deterministic nonceFORBIDDENNonce reuse yields private key recovery. Pre-RFC 6979 implementations affected.MUST NOT be deployed.
DES / 3DESFORBIDDENBlock cipher with insufficient security margin.MUST NOT be used for any symmetric operation.
RC4FORBIDDENStream cipher with known statistical biases.MUST NOT be used in any context.
MD4, MD2, RIPEMD-128FORBIDDENBroken hash functions. No collision resistance.MUST NOT be used for any purpose.
Non-standard / proprietary hash functionsFORBIDDENUnaudited algorithms without public cryptanalysis history.MUST NOT be used.

3.4 Cryptographic Agility and Deprecation Model

Cryptographic algorithms are subject to continuous cryptanalytic pressure. A static algorithm selection, however conservative at time of adoption, requires a structured lifecycle to remain valid over time. This section defines the mandatory review, deprecation, and migration framework for all algorithms approved under Section 3.

SEC-ALG-AGILITY-01 Mandatory Cryptographic Review Interval MUST
Requirement All conformant implementations MUST conduct a formal cryptographic algorithm review at an interval not exceeding 12 months. The review SHALL assess each approved algorithm against current NIST guidance, published cryptanalytic literature, and the NIST Post-Quantum Cryptography (PQC) migration roadmap. Review results MUST be documented and retained as part of the implementation's security configuration record.
PQC Readiness All implementations targeting active deployment beyond 2030 MUST include a documented PQC migration readiness plan, identifying candidate post-quantum signature algorithms (CRYSTALS-Dilithium, FALCON, SPHINCS+ per NIST FIPS 204/205/206) and a transition timeline. Migration readiness SHALL be verified as part of High-Assurance profile recertification cycles.

Algorithm Deprecation Lifecycle

Table 3.4.1 — Algorithm Deprecation Lifecycle Stages
StageDesignationOperational EffectDuration LimitMigration Action Required
Stage 1WARNINGAlgorithm remains approved. Advisory notice issued. New deployments SHOULD prefer alternatives.≤ 12 monthsMigration plan MUST be documented.
Stage 2RESTRICTED USEAlgorithm permitted for existing deployments only. MUST NOT be used in new implementations or new key generations.≤ 18 monthsActive migration to replacement MUST begin. Dual-signature required (Section 3.4.2).
Stage 3PROHIBITEDAlgorithm added to Forbidden Algorithms list (Section 3.3). All uses unconditionally cease.PermanentMigration MUST be complete before Stage 3 entry. No exceptions.

3.4.1 Emergency Algorithm Withdrawal

In the event of a critical cryptographic break — defined as a publicly demonstrated attack reducing effective security below 80-bit equivalent — the affected algorithm SHALL be withdrawn immediately, bypassing the staged deprecation lifecycle. Emergency withdrawal SHALL: (1) add the algorithm to the forbidden list within 48 hours of NIST or equivalent advisory publication; (2) trigger the Key Compromise Response procedure (Section 13.1) for all keys using the affected algorithm; (3) require immediate dual-signature transition for any artifacts produced under the withdrawn algorithm.

3.4.2 Dual-Signature Transition Model

During algorithm migration from a Stage 2 (Restricted) algorithm to an approved replacement, implementations MUST employ a dual-signature transition period. During this period, consent tokens, registry snapshots, and audit ledger anchors SHALL carry signatures from both the outgoing algorithm and the replacement algorithm. A verifying enforcement gate MUST accept a token as valid only if BOTH signatures verify correctly against their respective keys. This period SHALL terminate when all enforcement gates in the deployment have confirmed support for the replacement algorithm exclusively.

Dual-Signature Migration Flow SEC-ALG-MIGRATION
// Phase 0: Detection — algorithm enters Stage 1 (WARNING)
ADVISORY_ISSUED(algorithm_id)
→ document_migration_plan()
→ identify_replacement_algorithm()  // MUST be from approved list Section 3.1

// Phase 1: Preparation — algorithm enters Stage 2 (RESTRICTED)
generate_replacement_keypair()      // in HSM
publish_replacement_key_to_registry()
configure_dual_sig_mode()

// Phase 2: Dual-Signature Active
for each token | snapshot | anchor:
  sig_legacy    = SIGN(payload, outgoing_key)
  sig_new       = SIGN(payload, replacement_key)
  token.signatures = [sig_legacy, sig_new]

// Phase 2 verification requirement
assert VERIFY(sig_legacy, payload, outgoing_pubkey) = TRUE
assert VERIFY(sig_new,    payload, replacement_pubkey) = TRUE
if either fails → DENY

// Phase 3: Cutover — all gates confirm replacement support
when ALL_GATES.replacement_verified() = TRUE:
  disable_legacy_sig_generation()
  outgoing_key → REVOKE
  algorithm_id → PROHIBITED (Stage 3)

// Phase 4: Post-migration validation
assert ARTIFACT_STORE.no_active_outgoing_sigs() = TRUE
run_full_conformance_suite()

#Consent Token Structure Security

Consent tokens are the primary credential presented to the QODIQA enforcement gate. Their cryptographic integrity is the first line of defense against consent forgery and replay manipulation. The following requirements define the minimum structural and cryptographic properties for all conformant consent tokens.

4.1 Canonical Serialization

Token payloads MUST be canonically serialized prior to signing. Canonical serialization eliminates signature malleability arising from equivalent representations of the same semantic content. Implementations SHALL use JSON Canonicalization Scheme (JCS, RFC 8785) or a formally specified binary serialization format documented in the implementation's cryptographic configuration manifest.

SEC-TOK-01 Token Canonical Serialization MUST
Requirement Token payloads MUST be canonically serialized (RFC 8785 or equivalent formal specification) before signing. The enforcement gate MUST re-canonicalize the received token before signature verification. Signatures over non-canonical representations SHALL NOT be accepted.
Verification Step canonical_payload = JCS(token_claims)verify(signature, canonical_payload, public_key)accept | deny

4.2 Required Token Claims

Mandatory Token Claims — Normative
iss Issuer identifier. MUST be a stable, verifiable URI or DID resolvable to a public key set. MUST be cryptographically bound to the signing key via the key registry.
sub Subject of consent. MUST uniquely identify the data subject or principal. MUST NOT be inferred or defaulted by the enforcement gate.
scope Enumerated consent scope. MUST be an explicit list of permitted operations. Wildcards MUST NOT be accepted unless the enforcement gate's policy explicitly permits wildcard scope resolution.
iat Issued-at time (Unix epoch, integer). MUST be present. MUST be verified against current time within configured clock drift tolerance.
exp Expiration time (Unix epoch, integer). MUST be present. Maximum lifetime: 86400 seconds (24 hours) for Baseline; 3600 seconds (1 hour) for Hardened; 900 seconds (15 minutes) for High-Assurance.
kid Key identifier referencing the signing key in the trust anchor registry. MUST be present. MUST be resolved against the live registry before signature verification.
jti Unique token identifier (UUID v4 or cryptographic random, 128-bit minimum). MUST be present for Hardened and High-Assurance profiles. Used for anti-replay enforcement.
ctx_hash SHA-256 hash of the canonical execution context at the time of consent grant. MUST be verified against the frozen evaluation context presented at enforcement time.

4.3 Deterministic Verification Sequence

The enforcement gate MUST execute token verification in the following deterministic sequence. Deviation from this sequence SHALL be treated as a verification failure, producing a DENY decision.

Token Verification Sequence SEC-TOK-VER
// Step 1: Structural validation
assert token.iss IS PRESENT AND RESOLVES
assert token.sub IS PRESENT
assert token.scope IS PRESENT AND NON-EMPTY
assert token.iat, token.exp, token.kid, token.jti ARE PRESENT

// Step 2: Key resolution
public_key = REGISTRY.resolve_key(token.kid)
if public_key IS NULL OR REVOKED → DENY

// Step 3: Signature verification
canonical = JCS(token.claims)
if not VERIFY(token.sig, canonical, public_key) → DENY

// Step 4: Temporal validation
now = MONOTONIC_CLOCK.now()
if now < token.iat - DRIFT_TOLERANCE → DENY
if now > token.expDENY

// Step 5: Anti-replay (Hardened + High-Assurance)
if JTI_CACHE.contains(token.jti) → DENY
JTI_CACHE.add(token.jti, ttl=token.exp)

// Step 6: Context hash verification
expected_ctx = SHA256(FROZEN_CONTEXT.canonical())
if token.ctx_hash != expected_ctx → DENY

// Step 7: Scope authorization
if not POLICY.permits(token.scope, REQUEST.operation) → DENY

// All checks passedPERMIT

4.4 Maximum Token Lifetime by Profile

Table 4.4 — Token Lifetime Limits
ProfileMaximum exp − iatjti Requiredctx_hash Required
Baseline Security86400 s (24 h)SHOULDSHOULD
Hardened Enterprise3600 s (1 h)MUSTMUST
High-Assurance900 s (15 min)MUSTMUST

4.5 Distributed Replay Protection Model

In deployments where multiple enforcement gate nodes operate concurrently — whether in active-active clusters, federated deployments, or geographically distributed configurations — single-node JTI cache semantics are insufficient. A token accepted by one node and rejected by another creates an inconsistent enforcement posture exploitable for replay. The following requirements define cluster-wide replay protection semantics.

SEC-TOK-REPLAY-CLUSTER Cluster-Wide Replay Protection MUST
Cluster Semantics In any deployment with two or more enforcement gate nodes, the JTI cache MUST be shared across all nodes through a distributed cache with strong consistency guarantees. Eventually consistent caches do not satisfy this requirement. Enforcement nodes MUST NOT make independent PERMIT decisions without confirming JTI uniqueness at the cluster level.
Replay Window The maximum permitted replay window — the interval during which a presented JTI MUST be detectable as previously used — SHALL equal the lesser of: the token's exp minus iat value, or 2× the configured registry TTL for the applicable profile. Replay windows exceeding the profile's registry TTL create an exploitable gap between registry state and replay detection.
Consistency Requirement JTI cache writes MUST achieve linearizable consistency before the PERMIT decision is returned to the caller. Under no circumstance SHALL a PERMIT be returned while the JTI cache write is pending acknowledgment. The JTI write and the ledger write (Section 8.1 SEC-AUDIT-01) MUST both be durably committed before the PERMIT response is issued.
Partition Behavior When the distributed JTI cache is unreachable from an enforcement gate node — due to network partition, cache node failure, or connectivity loss — the affected enforcement gate MUST enter fail-closed DENY-ALL state. No PERMIT decision SHALL be issued by any gate that cannot confirm JTI uniqueness at the cluster level. Cache partition events MUST be recorded in the audit ledger.
Replication Bound JTI replication lag between enforcement nodes MUST be bounded to a value no greater than the configured registry TTL for the applicable profile (Baseline: ≤ 300 s; Hardened: ≤ 60 s; High-Assurance: ≤ 15 s). Any detected replication lag exceeding this bound MUST generate an integrity alert and SHOULD trigger enforcement gate isolation pending replication restoration.
Distributed Replay Check — Cluster Flow SEC-TOK-REPLAY-CLUSTER
// Single-node flow (Baseline only)
if CLUSTER_SIZE = 1:
  if LOCAL_JTI_CACHE.contains(token.jti) → DENY
  LOCAL_JTI_CACHE.add(token.jti, ttl=token.exp)

// Cluster flow (Hardened and High-Assurance — MUST)
if CLUSTER_SIZE > 1:

  // Step 1: Verify cache reachability
  if not CLUSTER_JTI_CACHE.reachable() → DENY + ALERT

  // Step 2: Atomic check-and-set with linearizable consistency
  result = CLUSTER_JTI_CACHE.set_if_absent(
    key   = token.jti,
    value = { gate_id, timestamp: NOW() },
    ttl   = min(token.exp - token.iat, 2 * PROFILE.registry_ttl),
    consistency = LINEARIZABLE
  )
  if result = ALREADY_EXISTS → DENY   // replay detected
  if result = WRITE_FAILED  → DENY   // fail-closed on uncertainty

  // Step 3: Verify replication lag is within bound
  if CLUSTER_JTI_CACHE.replication_lag() > PROFILE.registry_ttl:
    ALERT(severity=HIGH, event="JTI_REPLICATION_LAG_EXCEEDED")
    → DENY   // SHOULD for Hardened; MUST for High-Assurance

  // Step 4: Commit ledger entry (linearizable, before PERMIT)
  LEDGER.write_commit(decision_entry)   // fail-closed if write failsPERMIT   // only after both JTI cache and ledger are committed

#Trust Anchor and Key Management Model

5.1 Root Trust Anchor Model

The QODIQA trust model is anchored in a verifiable public key registry. Each signing key used to issue consent tokens MUST be traceable to a root trust anchor through a verifiable chain. Self-signed tokens with no trust chain are unconditionally rejected.

SEC-KEY-01 Trust Chain Requirement MUST
Requirement Every signing key presented for token verification MUST be resolvable through a documented trust chain to a root trust anchor registered in the implementation's key registry. Unresolvable keys SHALL produce an immediate DENY decision. Trust chain validation MUST occur at every enforcement gate invocation, not only at session establishment.
Key Storage Private signing keys MUST NOT be stored in plaintext on disk, in environment variables, in source code, or in configuration files. Hardened and High-Assurance profiles MUST use HSM or OS-provided secure enclave for private key storage.

5.2 Key Rotation Requirements

Table 5.2 — Mandatory Key Rotation Intervals
ProfileSigning Key RotationRoot Anchor RotationEmergency Rotation SLA
Baseline Security≤ 365 days≤ 730 days≤ 72 hours
Hardened Enterprise≤ 90 days≤ 365 days≤ 24 hours
High-Assurance≤ 30 days≤ 180 days≤ 4 hours

5.3 Key Compromise Response

In the event of confirmed or suspected private key compromise, the following actions MUST be executed in order. No deviation from this sequence is permitted.

Table 5.3 — Key Compromise Response Sequence
#ActionRequirement
1Immediate RevocationThe compromised key SHALL be added to the revocation registry within the Emergency Rotation SLA for the applicable profile.
2Registry PropagationRevocation SHALL be propagated to all enforcement gates before any new token issuance with a replacement key.
3Artifact InvalidationAll Decision Artifacts signed with the compromised key SHALL be flagged as potentially invalid and subject to manual review.
4Replacement Key GenerationA replacement key MUST be generated in an HSM or secure enclave. The previous key's metadata MUST NOT be reused for the replacement key entry.
5Certification NotificationIf applicable, the QODIQA certification authority MUST be notified within 24 hours of confirmed compromise.

5.4 Public Key Discovery

Public keys MUST be discoverable through a signed key manifest served over TLS 1.3. The key manifest MUST include each key's kid, algorithm identifier, active status, rotation schedule, and validity period. Key manifests MUST themselves be signed by the root trust anchor.

SEC-KEY-02 Prohibited Key Storage Patterns MUST NOT
Forbidden Implementations MUST NOT store private keys in: plaintext files, environment variables, version control systems, application configuration files, database fields without HSM-backed encryption, or memory regions accessible to untrusted processes.
Rationale Any private key accessible outside a hardware security boundary is effectively a compromised key. The enforcement layer's integrity guarantee is void if signing keys are recoverable through software-layer attacks.
SEC-KEY-03 High-Assurance Hardware Key Protection MUST
Certification Requirement For implementations targeting the High-Assurance deployment profile (Section 12), all signing keys used in consent token issuance, registry snapshot signing, and audit ledger anchoring MUST be generated and stored within an HSM achieving FIPS 140-2 Level 3 certification or equivalent (e.g., Common Criteria EAL 4+). Software-only key storage does not satisfy this requirement under any interpretation.
Non-Exportability Private signing keys in High-Assurance deployments MUST be configured as non-exportable within the HSM. Any HSM configuration that permits plaintext key export — including administrative export modes, backup-in-plaintext features, or wrapped export without separate authorization controls — MUST be explicitly disabled and the disabled state MUST be verified as part of deployment validation. This requirement applies permanently for the lifetime of the key.
Key Usage Audit Logging The HSM MUST be configured to produce a tamper-evident audit log of all key usage events. Logged events MUST include: key identifier, requesting process identity, timestamp (synchronized with the implementation's authenticated time source), operation type (sign / verify / wrap / unwrap), and outcome. HSM audit logs MUST be archived externally to the HSM within the retention window specified by Section 8.4 (minimum 7 years) and MUST be protected against deletion and modification using the same hash-chain integrity model specified in Section 8.
Dual-Control Key Activation Root trust anchor keys and key-encryption keys in High-Assurance deployments MUST require dual-control activation — the two-person rule. No single operator SHALL be capable of activating, rotating, or destroying a root or key-encryption key unilaterally. The dual-control mechanism MUST be enforced at the HSM hardware level, not solely by organizational policy or software access controls. Dual-control key activation events MUST be recorded in both the HSM audit log and the implementation's audit ledger.
Tamper-Evident HSM Logging The HSM's internal audit log MUST be tamper-evident through cryptographic means. If the HSM does not natively support tamper-evident log output, the implementation MUST immediately forward HSM events to an external, append-only log sink. The latency between HSM event occurrence and external log commit MUST not exceed 5 seconds in High-Assurance deployments. Any gap in HSM log continuity MUST be treated as a potential tampering event and MUST trigger the incident response procedure defined in Section 13.
Applicability SEC-KEY-03 applies exclusively to the High-Assurance deployment profile. Hardened Enterprise profile implementations SHOULD meet the FIPS 140-2 Level 3 and non-exportability requirements; key usage audit logging MUST be met at the Hardened tier. Dual-control activation MUST at the Hardened tier only when root key operations are performed. Baseline profile implementations are exempt from SEC-KEY-03.

#High-Assurance Key Management Model

At the High-Assurance deployment profile, key management is not a configuration decision — it is a structural requirement. The following subsection defines the mandatory key hierarchy, offline root anchor requirement, quorum activation model, key ceremony obligation, and blast radius containment model that collectively constitute the High-Assurance key management architecture. These requirements extend and make concrete the normative controls established in SEC-KEY-01 through SEC-KEY-03.

5.5.1 Key Hierarchy: Root, Intermediate, and Issuer Separation

The QODIQA High-Assurance key hierarchy MUST be structured as a three-tier chain. The Root Trust Anchor is the ultimate trust source and MUST NOT be used for day-to-day signing operations. The Intermediate Signing Authority is an HSM-resident key used to authorize issuer keys and to sign key manifests. The Consent Token Issuer is the operational signing key whose public key is published in the trust registry and whose private counterpart signs consent tokens at runtime. This tier separation ensures that compromise of any operational key does not transitively compromise the root, and that blast radius is bounded to the scope of the compromised tier.

5.5.2 Offline Root Key Requirement

The Root Trust Anchor private key MUST be stored offline. An offline root key is one that is not connected to any network, is not accessible from any running system, and is only activated through a formal key ceremony procedure under dual-control conditions. The offline root key MUST be used only to: sign the intermediate key at initial deployment, rotate the intermediate key on its scheduled rotation interval, and respond to confirmed intermediate key compromise. All other signing operations MUST use the intermediate or issuer tier keys.

5.5.3 Dual Control and Quorum Requirement

All root key operations — including generation, activation, signing, rotation, and destruction — MUST require a minimum quorum of two authorized personnel, each presenting independent authentication credentials. The quorum MUST be enforced at the HSM hardware level. No software-layer access control satisfies this requirement in substitution for hardware-enforced quorum. The quorum size MUST be documented in the implementation's key management policy and verified as part of conformance assessment.

5.5.4 Key Ceremony Requirement

Initial generation of the Root Trust Anchor key and each new intermediate key MUST be performed as a formal key ceremony. A key ceremony is a documented, witnessed procedure in which: the HSM is in a known-clean state verified before the ceremony begins; all ceremony participants are authenticated and their identities are recorded; the generation procedure is executed according to a pre-approved script; the generated key is verified to be non-exportable; and a signed ceremony record is produced and retained as part of the implementation's security configuration record. The ceremony record MUST be retained for the lifetime of the key plus 7 years.

5.5.5 Blast Radius Containment

The three-tier key hierarchy is designed to contain the operational impact of key compromise. Compromise of an issuer key requires immediate revocation of that key and rotation to a new issuer key, but does not invalidate the intermediate or root tier. Compromise of the intermediate key requires rotation of all issuer keys authorized under it, but does not require root key replacement provided the root key remains uncompromised and offline. Compromise of the root key constitutes a full trust anchor failure requiring a complete key hierarchy rebuild under new ceremonies. Implementations MUST document the blast radius for each tier in their security configuration record.

Table 5.5-A — Key Hierarchy and Control Requirements
Key TypeStorage RequirementAccess Control ModelRotation RequirementCompromise Impact Scope
Root Trust Anchor Offline HSM; air-gapped; activated only during key ceremony Dual-control quorum (minimum 2 authorized personnel); hardware-enforced; ceremony procedure required ≤ 180 days (High-Assurance); rotation via key ceremony only Full trust hierarchy failure; all issuer and intermediate keys invalidated; complete rebuild required
Intermediate Signing Authority Online HSM; FIPS 140-2 Level 3 minimum; non-exportable; not directly accessible from application layer Dual-control for root operations; single authorized operator for scheduled manifest signing under audit ≤ 365 days (High-Assurance); triggered by root rotation or confirmed compromise All issuer keys authorized under this intermediate MUST be rotated; root unaffected if offline root is uncompromised
Consent Token Issuer Online HSM; FIPS 140-2 Level 3 minimum; non-exportable; accessible to enforcement infrastructure under audit Single authorized operator with HSM authentication; key usage audit logging MUST be active ≤ 30 days (High-Assurance); emergency rotation ≤ 4 hours on confirmed compromise All tokens signed under compromised key MUST be flagged; revocation propagated before replacement key is active

#Revocation Registry Security

The revocation registry is a critical component of the QODIQA enforcement layer. Its integrity directly determines whether revoked consents can be re-presented fraudulently. The following requirements govern its protection.

SEC-REG-01 Signed Registry Snapshots MUST
Requirement The revocation registry MUST produce cryptographically signed snapshots at each update. Each snapshot MUST include a monotonically increasing sequence number, a timestamp, the SHA-256 hash of the previous snapshot (forming a hash chain), and a digital signature from the registry's root signing key.
Snapshot Format snapshot_hash = SHA-256(prev_hash || seq_num || timestamp || registry_body)
Signed with registry root key (Ed25519 or ECDSA P-256).
SEC-REG-02 Fail-Closed on Registry Unreachability MUST
Requirement When the revocation registry is unreachable, the enforcement gate MUST deny the request. No cached registry state SHALL be used as a substitute for a live registry response beyond the configured TTL. Fail-open behavior under registry unavailability is a conformance violation at all profile levels.
Cached State TTL Baseline: ≤ 300 s. Hardened: ≤ 60 s. High-Assurance: ≤ 15 s. After TTL expiry, the cached registry state MUST NOT be used and the gate MUST deny.

6.1 Anti-Downgrade Protection

The enforcement gate MUST verify that the registry snapshot sequence number presented is equal to or greater than the highest sequence number previously observed. A snapshot with a lower sequence number than the locally stored high-water mark SHALL be rejected as a potential downgrade attack.

6.2 Registry Authenticity Verification

On each registry read, the enforcement gate MUST: (1) verify the snapshot signature against the registry root public key; (2) verify hash chain continuity from the previous accepted snapshot; (3) verify sequence number monotonicity; (4) verify timestamp recency within configured TTL bounds. Failure of any verification step MUST produce a registry consultation failure, triggering fail-closed behavior.

#Artifact Hashing and Integrity Model

Decision Artifacts are the cryptographically bound records of enforcement decisions produced by the QODIQA consent gate. Their integrity guarantees the verifiability of the Replay Invariant defined in QODIQA Core v1.0. The following specifies the canonical artifact hash model.

7.1 Formal Artifact Hash Model

Canonical Artifact Hash Formula SEC-ART-HASH · v1.0
// Canonical artifact hash construction
artifact_id = SHA-256(
    canonical_context  // JCS-serialized frozen evaluation context
  || decision          // "PERMIT" | "DENY" (UTF-8 encoded)
  || policy_version    // policy document hash at evaluation time
  || consent_ref       // token jti or stable consent identifier
  || timestamp         // enforcement timestamp (monotonic, Unix epoch, 8 bytes)
  || prev_artifact_id  // SHA-256 of preceding artifact (hash chain)
  || model_binary_hash // SHA-256 of model binary at enforcement time
                       // MUST: High-Assurance | SHOULD: Hardened | OPTIONAL: Baseline
                       // When absent in Baseline/Hardened: substitute ZERO_BYTES_32
)

// Policy version component
policy_version = SHA-256(policy_document_canonical)

// Canonical context component
canonical_context = SHA-256(JCS({
  model_id, model_version, operation_id,
  subject_id, scope, data_classification,
  enforcement_gate_id, environment_fingerprint
}))

// Model binary hash component
model_binary_hash = SHA-256(model_binary_content)
// model_binary_content = the exact byte sequence of the model file(s)
// at the time enforcement is invoked. Multi-file models: SHA-256(SHA-256(file_1)
// || SHA-256(file_2) || ... || SHA-256(file_n)) in deterministic sort order.
// Implementations MUST pre-compute and cache this value at model load time.
// model_binary_hash MUST be recomputed upon any model reload or version change.
SEC-ART-01 Artifact Immutability Guarantee MUST
Requirement Once written to the artifact store, a Decision Artifact MUST NOT be modified, deleted, or overwritten under any operational circumstance. The artifact store MUST enforce write-once semantics at the storage layer. Any attempt to modify an artifact MUST produce an integrity violation event in the audit ledger.
Hash Chain Each artifact MUST include the SHA-256 hash of the immediately preceding artifact. The initial artifact in a chain uses a zero-value predecessor hash (32 zero bytes). Any break in the hash chain constitutes a tamper event.
Collision Resistance The artifact hash construction MUST include all listed components without exception. Omission of any component reduces the collision resistance of the hash space against adversarial context engineering (THR-08).
SEC-ART-02 Model Binary Integrity Binding MUST
Profile Applicability The model_binary_hash component of the canonical artifact hash formula MUST be included in High-Assurance profile deployments. It SHOULD be included in Hardened Enterprise profile deployments. It is OPTIONAL in Baseline profile deployments. In profiles where model_binary_hash is not included, the artifact hash construction MUST substitute ZERO_BYTES_32 in the position of model_binary_hash to maintain a fixed-structure hash input and prevent hash construction ambiguity.
Hash Computation The model_binary_hash SHALL be computed as SHA-256 of the model binary content. For models represented as multiple files, the hash SHALL be computed as SHA-256 of the concatenated SHA-256 hashes of each file, taken in a deterministic sort order (e.g., lexicographic by file path relative to the model root). Implementations MUST pre-compute and cache the model_binary_hash at model load time. The cached value MUST be invalidated and recomputed upon any model reload, model version change, or detected modification of model binary content.
Integrity Guarantee The inclusion of model_binary_hash in the artifact hash ensures that enforcement decisions are cryptographically bound to a specific, verifiable model binary state. A Decision Artifact produced under model binary state M is computationally infeasible to reinterpret as having been produced under any model binary state M' where M' ≠ M. This binding prevents silent model substitution (THR-07) from producing artifacts that are indistinguishable from legitimately authorized artifacts.
Model State Change Response When a model binary change is detected at runtime — including modifications to model weights, model configuration files, tokenizer files, or any other file included in the model binary hash computation — the enforcement gate MUST: (1) suspend enforcement operations; (2) recompute the model_binary_hash from the updated binary content; (3) write a model state change event to the audit ledger; (4) resume enforcement only after the new model_binary_hash has been verified against an expected reference value or authorized via an explicit change approval record. Unannounced model binary changes MUST be treated as potential integrity violations.
Non-Coverage Reminder model_binary_hash binds enforcement decisions to model binary state. It does not constitute a guarantee that the model weights are safe, unbiased, or compliant with any behavioral standard. Verification that the bound binary state is the intended and authorized model version remains the responsibility of the operating organization. See Section 14 (Non-Coverage Disclosure).

7.2 Replay Verification via Artifact Hash

To verify that a historical enforcement decision is reproducible under the same conditions, a verifier SHALL: (1) reconstruct the canonical context from available records; (2) recompute the artifact hash using the same formula; (3) compare against the stored artifact ID. A mismatch indicates either context drift, context manipulation, or artifact tampering — all of which constitute enforcement integrity violations.

#Audit Ledger Integrity Requirements

8.1 Hash Chain Format

The audit ledger MUST be maintained as a hash chain. Each ledger entry MUST include the SHA-256 hash of the preceding entry, forming an unbroken sequence from ledger initialization. The ledger chain provides tamper evidence: any modification to a historical entry invalidates all subsequent entry hashes.

Audit Ledger Entry Structure SEC-AUDIT-CHAIN
ledger_entry = {
  seq_num:        uint64,          // monotonically increasing
  timestamp:      unix_epoch_ns,   // nanosecond precision, monotonic clock
  event_type:     "PERMIT" | "DENY" | "REVOCATION" | "KEY_ROTATION" | "INTEGRITY_VIOLATION",
  artifact_id:    bytes32,         // SHA-256 of Decision Artifact
  gate_id:        string,          // enforcement gate identifier
  subject_hash:   bytes32,         // SHA-256 of subject_id (privacy-preserving)
  prev_entry_hash:bytes32,         // SHA-256 of preceding ledger entry
  entry_sig:      bytes            // Ed25519 signature over canonical entry
}

entry_hash = SHA-256(canonical(ledger_entry_without_entry_sig))
SEC-AUDIT-01 Write-Before-Execute Requirement MUST
Requirement The audit ledger entry for an enforcement decision MUST be durably committed before the enforcement gate returns any response to the calling system. A PERMIT decision that is returned before its ledger entry is committed violates the write-before-execute invariant. On ledger write failure, the enforcement gate MUST return DENY.
Durability Durable commitment requires fsync or equivalent at the storage layer, or acknowledgment from a distributed consensus system. In-memory buffering without persistence does not satisfy this requirement.

8.2 Append-Only Storage

The audit ledger storage backend MUST enforce append-only semantics. The storage system MUST prevent modification or deletion of any existing ledger entry through all available interfaces. At the Hardened and High-Assurance profiles, the ledger MUST be replicated to a minimum of two geographically or logically separated storage backends.

8.3 Tamper Detection

A tamper detection procedure MUST be executable on demand and MUST run automatically at a frequency no less than the Ledger Integrity Verification interval for the applicable profile (Baseline: 24h; Hardened: 1h; High-Assurance: 15min). The procedure SHALL verify: hash chain continuity, signature validity for each entry, sequence number monotonicity, and timestamp monotonicity.

8.4 Archival Requirements

Audit ledger entries MUST be retained for a minimum of 7 years. Archived entries MUST retain their hash chain continuity with active entries. Archival storage MUST maintain integrity verification capability equivalent to active storage.

Informative — Merkle Tree Variant. Implementations MAY construct a Merkle tree over ledger entry batches to enable efficient range-proof verification of large audit archives. The Merkle root MUST be anchored to a signed, timestamped manifest. This variant does not reduce the hash chain requirement; it supplements it.

#Time and Clock Security

Temporal integrity is a foundational property of the QODIQA enforcement layer. Token expiry, artifact timestamps, audit ledger ordering, and TTL enforcement all depend on reliable, manipulation-resistant time. The following requirements govern clock security at all profile levels.

Table 9.1 — Clock Security Requirements by Profile
RequirementBaselineHardenedHigh-Assurance
NTP SynchronizationMUSTMUST (authenticated NTP / NTPsec)MUST (authenticated NTP + GPS/PTP secondary)
Maximum Clock Drift Tolerance±30 s±5 s±1 s
Monotonic Clock for ArtifactsMUSTMUSTMUST
Anti-Rollback ProtectionSHOULDMUSTMUST
Fail-Closed on Clock UncertaintyMUSTMUSTMUST
SEC-CLK-01 Monotonic Clock Requirement MUST
Requirement All timestamps recorded in Decision Artifacts and audit ledger entries MUST be sourced from a monotonic clock. Wall-clock adjustments (NTP step corrections, DST transitions, leap seconds) MUST NOT retroactively modify artifact or ledger timestamps. If a monotonic clock source is unavailable, the enforcement gate MUST enter a DENY-ALL fail-closed state until a valid monotonic source is restored.
Anti-Rollback The enforcement gate MUST store the highest previously observed monotonic timestamp. Any new timestamp that is less than this high-water mark MUST be treated as a clock rollback event and SHALL trigger a fail-closed state and an integrity violation audit entry.

When clock synchronization error exceeds the configured drift tolerance for the applicable profile, the enforcement gate MUST enter fail-closed state for all decisions requiring temporal validation. The gate MUST remain in fail-closed state until synchronization is restored and verified.

#Network and Transport Security Requirements

SEC-NET-01 Minimum Transport Layer Security MUST
Minimum Version TLS 1.2. TLS 1.0 and TLS 1.1 MUST NOT be used. Plaintext HTTP transport for any QODIQA enforcement component is unconditionally forbidden at all profile levels.
Preferred Version TLS 1.3. All Hardened and High-Assurance implementations MUST use TLS 1.3 exclusively. TLS 1.2 support may be retained for legacy registry compatibility at Baseline only.
Cipher Suites TLS 1.3: TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256. TLS 1.2 (Baseline only): TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384. All RC4, 3DES, and export cipher suites MUST NOT be negotiated.

10.1 Certificate Validation

All TLS connections to registry, audit log, and key management endpoints MUST perform full certificate chain validation including revocation checking (OCSP or CRL). Certificate pinning SHOULD be implemented for registry and key management endpoints at Hardened and High-Assurance profiles. Self-signed certificates MUST NOT be trusted in production enforcement environments.

10.2 Mutual TLS

Mutual TLS (mTLS) authentication SHOULD be implemented for all inter-component communications within the QODIQA enforcement layer at Hardened profile, and MUST be implemented at High-Assurance profile. Client certificate validation MUST follow the same chain validation and revocation checking requirements as server certificate validation.

SEC-NET-02 Plaintext Transport Prohibition MUST NOT
Prohibition No QODIQA enforcement component SHALL transmit consent tokens, decision artifacts, revocation data, key material, or audit records over plaintext (unencrypted) transport. This prohibition applies to all network interfaces including loopback, container-internal, and service-mesh communications at Hardened and High-Assurance profiles.
SEC-NET-PFS Perfect Forward Secrecy Requirement MUST
PFS Mandate All TLS connections used by QODIQA enforcement components MUST provide Perfect Forward Secrecy (PFS). PFS ensures that compromise of long-term server private keys does not enable retrospective decryption of captured session traffic. This requirement applies to all profiles, including Baseline.
TLS 1.2 Key Exchange Restriction Where TLS 1.2 is permitted (Baseline profile only, per SEC-NET-01), ONLY ephemeral Elliptic Curve Diffie-Hellman (ECDHE) key exchange cipher suites SHALL be used. TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 and TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 are approved. Static RSA key exchange (cipher suites of the form TLS_RSA_WITH_*) MUST NOT be negotiated under any circumstances. DHE with finite-field groups SHOULD NOT be used; if used, the minimum Diffie-Hellman group size MUST be 2048-bit.
Static RSA Prohibition Static RSA key exchange cipher suites MUST NOT be configured, negotiated, or accepted on any QODIQA enforcement component in any profile. This prohibition is unconditional. The use of RSA certificates for server authentication is permitted; only the use of RSA for key encipherment (as in TLS_RSA_WITH_* suites) is prohibited. TLS server configurations MUST explicitly remove all TLS_RSA_WITH_* cipher suite entries from the server's cipher suite list.
Non-PFS Cipher Suite Prohibition The following cipher suite categories MUST NOT be configured or negotiated: (1) Static RSA key exchange (TLS_RSA_WITH_*); (2) Anonymous key exchange (TLS_DH_anon_*, TLS_ECDH_anon_*); (3) NULL encryption or NULL authentication suites; (4) Export-grade cipher suites (EXP_*); (5) Fixed Diffie-Hellman with server key reuse (TLS_DH_DSS_*, TLS_DH_RSA_*). Cipher suites MUST be configured using an explicit allowlist — default cipher suite sets provided by TLS libraries SHALL NOT be accepted without review against this prohibition list.
TLS 1.3 Inherent PFS TLS 1.3 provides PFS for all cipher suites defined in its specification. Implementations using TLS 1.3 exclusively (Hardened and High-Assurance profiles) satisfy the key exchange requirements of this normative block inherently. However, the cipher suite allowlist and non-PFS prohibition requirements MUST still be enforced to prevent downgrade negotiation on connections that may accept TLS 1.2 as a fallback.
Verification Deployment validation MUST include a TLS cipher suite scan of all enforcement component endpoints. Any discovered endpoint negotiating a non-PFS cipher suite under any TLS version SHALL be treated as a configuration violation requiring immediate remediation. Cipher suite scans MUST be repeated after any TLS library upgrade or TLS configuration change.

#Performance and Latency Constraints

The enforcement operations defined in this profile introduce measurable latency at each stage of the consent evaluation path. This section enumerates the primary latency contributors at each SUP component. It does not provide optimization guidance and does not authorize any weakening of normative requirements on the basis of performance considerations. Performance constraints are enumerated here to ensure that implementations plan for and account for the operational cost of enforcement, not to create grounds for bypassing enforcement controls.

Every operation listed in the table below is a normative requirement of this profile or of QODIQA Core v1.0. The latency it introduces is an inherent property of verifiable enforcement. No conformant implementation may eliminate any listed operation in the name of performance without simultaneously creating a conformance failure.

Table 10.3-A — Enforcement Latency Contributors
ComponentOperationLatency SensitivityScaling ConsiderationFail-Closed Impact
SUP.CONSENT-GATE Ed25519 signature verification of consent token (SEC-ALG-01) Low absolute latency (sub-millisecond on modern hardware); high sensitivity to HSM round-trip if verification is HSM-delegated Verification is stateless and parallelizable per gate instance; not a horizontal scaling bottleneck under normal load Verification failure produces immediate DENY; no retry path; failure adds zero marginal latency to the enforcement decision
SUP.REGISTRY Registry snapshot consultation and signature verification (SEC-REG-01, SEC-REG-02) High sensitivity; network round-trip to registry on each invocation when TTL is expired; TTL cache reduces frequency at cost of staleness risk Registry response latency is bounded by the configured TTL; lower TTL increases consultation frequency and latency exposure; TTL MUST NOT be increased beyond profile limits to reduce latency Registry unreachability MUST trigger fail-closed DENY-ALL; enforcement gate blocked until registry restored; no fallback to stale cache beyond TTL
SUP.AUDIT-LEDGER Durably committed audit ledger write before PERMIT response (SEC-AUDIT-01) Highest latency contributor; blocking write to persistent storage with fsync or distributed consensus acknowledgment is on the critical path of every PERMIT decision Ledger write throughput bounds enforcement gate PERMIT throughput; distributed consensus adds latency proportional to quorum round-trip; replication required at Hardened and High-Assurance profiles Ledger write failure MUST produce DENY; enforcement gate cannot issue PERMIT until write is confirmed; storage degradation directly degrades enforcement throughput
SUP.ARTIFACT-STORE Artifact hash chain computation and write at enforcement decision time (SEC-ART-01) Moderate latency; SHA-256 computation is fast; serialization of artifact and storage write add bounded overhead; hash chain linkage requires reading the previous artifact hash before writing Sequential artifact write with hash chain linkage serializes artifact production per gate; parallel gate deployments require coordination to maintain chain integrity across nodes Artifact write failure MUST trigger fail-closed state; enforcement gate cannot proceed until artifact chain integrity is confirmed
SUP.KEY-STORE HSM-delegated signing operation for issuer key operations (SEC-KEY-03) Moderate-to-high latency when signing is HSM-delegated; HSM round-trip adds 1–50 ms depending on HSM model and interface; applies to token issuance, not to per-invocation verification Token issuance latency is not on the per-request critical path; verification uses public key and does not require HSM; HSM latency affects token issuance throughput, not enforcement gate throughput HSM unavailability blocks new token issuance; does not directly block enforcement gate verification of existing tokens within their validity period

This profile defines deterministic enforcement constraints that SHALL NOT be bypassed, relaxed, or conditionally disabled for performance optimization under any deployment scenario.

#Side-Channel and Non-Deterministic Risk Mitigation

The QODIQA enforcement gate is a deterministic decision function. Its determinism is a specification requirement, not an implementation preference. The following requirements protect this property from erosion through side-channels, non-deterministic dependencies, and evaluation contamination.

SEC-DET-01 Prohibition of Randomness in Decision Path MUST
Requirement The enforcement gate's decision function MUST be fully deterministic. No random number generation, probabilistic sampling, stochastic policy resolution, or AI-model inference SHALL occur within the evaluation path. Randomness is permissible only in key generation, nonce generation for anti-replay, and JTI generation — all outside the decision path.
Secure Random Where random bytes are required (key generation, nonce generation), implementations MUST use a cryptographically secure pseudorandom number generator (CSPRNG) seeded from the operating system entropy source (e.g., /dev/urandom, getrandom(), or platform HSM). Userspace PRNGs without OS entropy seeding MUST NOT be used.

11.1 Evaluation Function Isolation

The enforcement gate's policy evaluation function MUST be isolated from external network callouts, file system reads, database queries, and inter-process communication during the evaluation window. Any external dependency required for evaluation (policy document, registry state) MUST be resolved before the evaluation window opens and frozen in the evaluation context.

11.2 Dependency Isolation Rules

  • No outbound network calls during the enforcement evaluation window.
  • No reads from mutable file system paths during the evaluation window.
  • No shared mutable state between concurrent evaluation invocations.
  • No JIT compilation or dynamic code loading within the evaluation function.
  • No access to environment variables within the evaluation function.
  • Evaluation function dependencies MUST be resolved, validated, and immutably bound before evaluation begins.

11.3 Constant-Time Comparison

All cryptographic comparisons within the enforcement gate — including signature verification results, hash comparisons, and token claim validation — MUST use constant-time comparison functions where the compared values could reveal information through timing side-channels. Variable-time string comparison functions (e.g., strcmp, operator == on byte arrays) MUST NOT be used for security-sensitive comparisons.

#Secure Deployment Profiles

Three tiered security deployment profiles are defined. Each tier inherits all requirements of the preceding tier and adds incremental cryptographic and operational constraints. Profile selection MUST be documented in the implementation's security configuration manifest and verified by conformance testing.

Profile I
Baseline Security
Minimum conformant deployment for internal or low-risk AI systems. Satisfies all MUST requirements in this profile. TLS 1.2+, SHA-256, Ed25519 or ECDSA P-256, software key storage acceptable, 24h token lifetime, 5-minute registry TTL.
Profile II
Hardened Enterprise
Required for externally exposed or regulated deployments. TLS 1.3 mandatory, HSM key storage required, mTLS SHOULD, 1-hour token lifetime, 60s registry TTL, authenticated NTP, anti-replay JTI cache required, 1-hour ledger integrity scan.
Profile III
High-Assurance
Required for safety-critical, high-sensitivity, or regulatory-classified AI deployments. TLS 1.3 exclusive, HSM mandatory, mTLS MUST, 15-minute token lifetime, 15s registry TTL, GPS/PTP time source, geographically replicated audit ledger, 15-minute integrity scan, formal key management procedures.
Table 12.1 — Security Profile Comparison Matrix
ControlBaselineHardenedHigh-Assurance
Signing AlgorithmEd25519 or ECDSA P-256Ed25519 — MUSTEd25519 — MUST
Hash AlgorithmSHA-256SHA-256 or SHA-384SHA-384 — MUST
TLS Version≥ 1.21.3 exclusive1.3 exclusive
Key StorageSoftware acceptableHSM requiredHSM + dual-control
mTLSOPTIONALSHOULDMUST
Token Lifetime Max24 hours1 hour15 minutes
JTI Anti-ReplaySHOULDMUSTMUST
Registry TTL300 s60 s15 s
Ledger ReplicationSingleDualDual + geographic
Key Rotation≤ 365 days≤ 90 days≤ 30 days
Integrity Scan Interval24 hours1 hour15 minutes

#Compromise and Incident Response Model

The following response procedures are mandatory for the categories of security events most likely to affect QODIQA enforcement layer integrity. These procedures are procedural requirements, not legal guidance.

13.1 Key Compromise Response

  • Immediately revoke the compromised key in the registry within the Emergency Rotation SLA for the applicable profile.
  • Propagate revocation to all enforcement gates before issuing replacement key. Verify propagation through active monitoring.
  • Flag all Decision Artifacts produced under the compromised key as requiring manual integrity review.
  • Generate replacement key in HSM or secure enclave. Assign a new, distinct key identifier. Do not reuse any attribute of the compromised key entry.
  • Notify QODIQA certification authority within 24 hours if the implementation holds a QODIQA certification.
  • Produce a Post-Incident Report (PIR) within 72 hours identifying root cause, timeline, and remediation actions.

13.2 Registry Compromise Response

  • Immediately suspend enforcement gate operations. Enter fail-closed DENY-ALL state.
  • Restore registry from the most recent verified signed snapshot. Validate hash chain continuity from restoration point.
  • Verify snapshot signature authenticity before restoration. Do not restore from an unsigned or unverifiable snapshot.
  • Audit all enforcement decisions made between the last verified snapshot and the compromise detection point. Flag as requiring manual review.
  • Rotate registry signing keys as per the Key Compromise Response procedure above.

13.3 Artifact Mismatch Detection Response

When replay verification produces a hash mismatch — i.e., the recomputed artifact hash does not match the stored artifact ID — the following response SHALL be initiated: (1) the mismatched artifact is quarantined and flagged for investigation; (2) an integrity violation event is written to the audit ledger; (3) any active enforcement session associated with the artifact is terminated; (4) the incident is escalated for forensic review. Mismatches SHALL NOT be silently discarded or treated as benign data drift.

13.4 Audit Chain Corruption Procedure

If tamper detection identifies a broken audit chain (hash discontinuity), the following procedure applies: (1) isolate the enforcement gate to prevent further audit writes; (2) preserve a forensic copy of the current ledger state; (3) identify the last valid hash chain segment; (4) restore from the last verified archive checkpoint; (5) recover entries between the checkpoint and compromise point from secondary replicas if available; (6) document the corrupted segment in the restoration metadata. Under no circumstances SHALL a repaired audit chain suppress evidence of the tampering event itself.

#Non-Coverage Disclosure

This profile explicitly delimits its scope. The following classes of security concern are outside the boundary of this document. Transparency on these exclusions is essential to prevent misrepresentation of QODIQA's security posture.

This profile does NOT: secure AI model weights or training data; prevent model bias, adversarial prompt injection, or inference-time manipulation; replace an organization's enterprise security architecture or information security management system; eliminate insider risk beyond the enforcement layer boundary defined in Section 1.4; provide guidance on data encryption at rest beyond the enforcement layer; govern application-layer authentication or authorization of end users; secure the network infrastructure underlying the enforcement layer beyond TLS transport requirements; guarantee the correctness of consent records entered by human operators; or provide legal compliance certification of any kind.

Organizations deploying QODIQA enforcement infrastructure MUST treat this profile as one component of a broader security architecture. The enforcement layer's cryptographic guarantees apply only within the System Under Protection boundary defined in Section 1.4. Security properties outside that boundary require independent architectural controls.

SEC-SCOPE-01 Boundary Acknowledgment Requirement MUST
Requirement Implementations claiming conformance with this Security Profile MUST include a documented acknowledgment that the profile's guarantees are bounded to the SUP definitions in Section 1.4. Marketing materials, certification claims, or technical documentation MUST NOT represent QODIQA security profile conformance as providing guarantees outside the defined SUP boundary.

14.1 Additional AI-Specific Exclusions

The following classes of concern are explicitly outside the scope of this Security and Cryptographic Profile. They are enumerated separately because they arise specifically in the context of AI systems and may be incorrectly attributed to this profile's scope in architectural or compliance contexts. No requirement in this document addresses, mitigates, or characterizes any of the following.

Explicit Out-of-Scope — AI System Behavior
Exclusion CategoryScope Statement
Model hallucination behavior. This profile does not govern, detect, or mitigate outputs produced by an AI model that are factually incorrect, fabricated, or internally inconsistent. The enforcement layer operates on consent and authorization, not on output semantic correctness.
Prompt injection attacks. This profile does not govern adversarial inputs designed to override model behavior, hijack instruction following, or exfiltrate context through model output. Prompt injection operates within the model's inference path, which is outside the SUP boundary defined in Section 1.4.
Training data governance. This profile does not govern the composition, provenance, licensing, or safety properties of training data used to produce AI model weights. Training data governance is upstream of the enforcement layer boundary.
Model alignment and safety tuning. This profile does not govern whether a model has been trained to follow safety guidelines, refuse harmful requests, or exhibit aligned behavior. RLHF, constitutional AI approaches, or other alignment methods are not within the scope of runtime consent enforcement.
Output semantic correctness. This profile does not guarantee, verify, or audit whether AI model outputs are accurate, appropriate, safe, or compliant with any content policy. The enforcement layer determines whether an invocation was authorized under a valid consent token — not whether the resulting output is correct or acceptable.

These exclusions are permanent and apply at all deployment profile tiers. Conformance with this profile does not imply any guarantee regarding the above properties.

#Institutional Closing Statement

Deterministic consent enforcement is not a statement of policy. It is a runtime guarantee. A guarantee is only as strong as the cryptographic substrate that anchors it. Without signature binding, hash-chained audit integrity, revocation registry protection, and clock security, the QODIQA enforcement model remains logically sound but operationally falsifiable.

This profile does not introduce new enforcement semantics. It specifies the minimum cryptographic conditions under which QODIQA Core v1.0's enforcement semantics — determinism, fail-closed behavior, replay verifiability, audit immutability — hold in adversarial conditions. An implementation that satisfies QODIQA Core's logical requirements but omits the cryptographic requirements herein provides a weaker guarantee than its certification level implies.

The threat categories in Section 2 are not hypothetical. They are operational attack classes observed against deployed runtime enforcement infrastructure. Each maps to a specific cryptographic control defined in this profile. Omission of any required control creates a specific exploitable gap, not a theoretical weakness.

Where enforcement must be more than intent —

determinism must be cryptographically anchored, fail-closed behavior requires integrity guarantees, and runtime consent enforcement without strong cryptography is structurally incomplete.

QODIQA — Security and Cryptographic Profile for Runtime Consent Enforcement — Version 1.0  ·  QODIQA-SEC-2026-001  ·  High-Assurance Security Specification

The algorithms defined as approved in this profile reflect current NIST guidance and cryptographic best practice as of the document date. Implementations MUST maintain an active cryptographic configuration review process and update algorithm selections as NIST guidance evolves. This profile will be versioned in parallel with QODIQA Core Standard revisions.

All normative requirements in this document use RFC 2119 / RFC 8174 language: MUST, SHALL, SHOULD, MAY, MUST NOT, SHALL NOT, SHOULD NOT. Lowercase usage denotes non-normative text.
This profile is classified as a companion specification within the QODIQA standard corpus. It does not supersede the Core Standard but supplements its security requirements.
Algorithm approval status is current as of March 2026. Organizations MUST monitor NIST Post-Quantum Cryptography (PQC) standardization developments and prepare migration plans for quantum-resistant signature algorithms for deployments extending beyond 2030.

#Cryptographic Trust Model

This annex specifies the hierarchical trust structure that underpins all cryptographic operations in a conformant QODIQA enforcement deployment. The trust model is not a policy construct — it is a structural requirement. Every cryptographic verification operation performed at a QODIQA enforcement gate traces to this chain. The chain MUST be complete, verifiable, and non-circular at every point during enforcement operation.

X.1 Hierarchical Trust Chain

The QODIQA trust hierarchy follows a three-tier model in which each tier signs the public key material of the tier below it. A verification at any tier is valid only if the complete chain from that tier to the Root Trust Anchor can be constructed and each link in the chain passes signature verification against the tier above it. There are no lateral trust relationships in this model. Trust flows strictly downward from root to enforcement gate.

QODIQA Cryptographic Trust Chain TRUST-CHAIN · v1.0
  ROOT TRUST ANCHOR
  (offline HSM; dual-control; air-gapped)
  │
  │  Signs: Intermediate Signing Authority public key
  │  Verified by: enforcement gate on manifest load
  ↓
  INTERMEDIATE SIGNING AUTHORITY
  (online HSM; FIPS 140-2 Level 3; non-exportable)
  │
  │  Signs: Consent Token Issuer public key; key manifest
  │  Verified by: enforcement gate on key manifest fetch
  ↓
  CONSENT TOKEN ISSUER
  (online HSM; operational signing key; rotated per Section 5.2)
  │
  │  Signs: consent tokens presented to enforcement gate
  │  Verified by: enforcement gate on every token verification
  ↓
  ENFORCEMENT GATE VERIFICATION
  (runtime; stateless per token; deterministic; fail-closed)
  │
  │  Produces: Decision Artifact (PERMIT | DENY)
  │  Writes: audit ledger entry before response
  ↓
  DECISION ARTIFACT + AUDIT LEDGER ENTRY
  (immutable; hash-chained; cryptographically anchored)

X.2 Deterministic Validation Chain

At runtime, the enforcement gate executes the following trust chain validation sequence for every presented consent token. This sequence MUST be completed in the order specified. No step may be skipped or reordered. Failure at any step produces an immediate DENY decision and an audit ledger entry recording the step at which validation failed.

Table X.2-A — Deterministic Validation Chain Steps
StepValidation OperationRequirement
1 Root manifest verification. The enforcement gate verifies that the loaded key manifest is signed by the Root Trust Anchor public key held in the gate's trust store. This step is performed at manifest load time and on each manifest refresh.
2 Intermediate key binding verification. The enforcement gate verifies that the Intermediate Signing Authority key listed in the manifest is signed by the Root Trust Anchor. A manifest that does not carry a valid root signature for the intermediate key MUST NOT be trusted.
3 Issuer key binding verification. The enforcement gate verifies that the Consent Token Issuer key referenced by the token's kid claim is signed by the Intermediate Signing Authority. An issuer key not bound through a valid intermediate signature MUST NOT be used for token verification.
4 Token signature verification. The enforcement gate verifies the consent token signature against the resolved Consent Token Issuer public key using the algorithm specified by the key manifest. The canonical payload is reconstructed before verification per SEC-TOK-01.
5 Revocation status verification. The enforcement gate confirms that the issuer key is not listed in the revocation registry. This step occurs after signature verification to avoid unnecessary registry calls on structurally invalid tokens.

This five-step chain constitutes the complete trust validation path. An enforcement gate that short-circuits any step — including by caching intermediate verification results across invocations without re-verifying the chain on manifest refresh — is non-conformant. The deterministic validation chain is not optional at any deployment profile tier.

#Informative Cryptographic Reference Mapping

Informative — Non-Normative This annex does not introduce compliance claims. It provides reference mapping between QODIQA cryptographic requirements and corresponding NIST and FIPS standards. No additional requirements are created herein.

The normative requirements in Sections 3–12 of this document are derived from, and consistent with, a body of published cryptographic standards. This annex provides an informative mapping to those standards for implementers, auditors, and reviewers who wish to cross-reference QODIQA requirements against established standards bodies. Mapping to a standard does not constitute a claim of certification or compliance under that standard's audit regime.

A.1 FIPS 180-4 — Secure Hash Standard

FIPS 180-4 (Secure Hash Standard, SHS) — published by NIST — specifies the SHA family of hash functions including SHA-256, SHA-384, and SHA-512. All hash algorithm requirements in Section 3.2 and Section 7 of this document are consistent with FIPS 180-4 approved algorithms. SHA-256 is the minimum approved hash for artifact construction in Section 7. SHA-384 is required at the High-Assurance profile in certain contexts. SHA-512 is approved for use. MD5 and SHA-1 prohibitions in Section 3.3 align with NIST's withdrawal of these algorithms from approved use.

Table A.1 — FIPS 180-4 Algorithm Mapping
QODIQA SectionRequirementFIPS 180-4 BasisStatus in Standard
Section 3.2SHA-256 minimum for hashingFIPS 180-4 Section 6.2Approved
Section 3.2SHA-384 for High-AssuranceFIPS 180-4 Section 6.3Approved
Section 3.2SHA-512 approvedFIPS 180-4 Section 6.4Approved
Section 3.3MD5 prohibitedNot in FIPS 180-4Withdrawn / Not Approved
Section 3.3SHA-1 prohibitedFIPS 180-4 (deprecated)Deprecated per NIST SP 800-131A Rev.2
Section 7Artifact hash: SHA-256FIPS 180-4 Section 6.2Approved
Section 7model_binary_hash: SHA-256FIPS 180-4 Section 6.2Approved

A.2 FIPS 186-4 / FIPS 186-5 — Digital Signature Standard

FIPS 186-4 (Digital Signature Standard) and the updated FIPS 186-5 specify the approved digital signature algorithms for federal use. ECDSA P-256 and ECDSA P-384 approved in Section 3.1 are directly specified in FIPS 186-4 Section 6.1 (curves P-256 and P-384). The RSA-PSS algorithm approved in Section 3.1 is specified in FIPS 186-4 Section 5.5. The prohibition on RSA < 2048-bit keys in Section 3.3 aligns with FIPS 186-4 Section 5.1 minimum key size guidance. The deterministic nonce requirement for ECDSA (RFC 6979) supplements FIPS 186-4 Section 6.3, which does not require deterministic nonce generation but permits it. Ed25519 is specified in FIPS 186-5 Section 5.1 as an approved signature algorithm.

Table A.2 — FIPS 186-4/186-5 Algorithm Mapping
QODIQA SectionAlgorithmFIPS ReferenceApproval Status
Section 3.1 (MUST)Ed25519FIPS 186-5 Section 5.1Approved
Section 3.1 (SHOULD)ECDSA P-256FIPS 186-4 Section 6.1 / FIPS 186-5 Section 6.1Approved
Section 3.1 (SHOULD)ECDSA P-384FIPS 186-4 Section 6.1 / FIPS 186-5 Section 6.1Approved
Section 3.3RSA < 2048-bit (prohibited)FIPS 186-4 Section 5.1Non-compliant (key size)
Section 3.3Non-deterministic ECDSA (prohibited)RFC 6979 / FIPS 186-5 Section 6.3Not recommended
Section 10 SEC-NET-PFSECDHE only for TLS 1.2FIPS 186-4 Section 6.1Approved key agreement

A.3 NIST SP 800-57 — Key Management

NIST SP 800-57 (Recommendation for Key Management, Parts 1–3) provides comprehensive guidance on cryptographic key management including key generation, distribution, storage, use, and destruction. The QODIQA key management requirements in Section 5 — including key rotation intervals, HSM storage requirements, key compromise response, and prohibited storage patterns — are consistent with and informed by NIST SP 800-57 Part 1 (General) and Part 2 (Best Practices for Key Management Organizations). The dual-control key activation requirement in SEC-KEY-03 corresponds to NIST SP 800-57 Part 2 guidance on separation of duties for sensitive key operations. Key rotation intervals in Section 5.2 are consistent with NIST SP 800-57 Part 1 Section 5.6 recommendations for cryptoperiods.

Table A.3 — NIST SP 800-57 Key Management Mapping
QODIQA SectionRequirementSP 800-57 Reference
Section 5.1 SEC-KEY-01HSM storage for Hardened / High-AssurancePart 1 Section 8.2.1, Part 2 Section 3.3
Section 5.1 SEC-KEY-02Prohibited key storage patternsPart 1 Section 8.2.3
Section 5.1 SEC-KEY-03FIPS 140-2 Level 3, dual-controlPart 2 Section 2.3 (Separation of Duties)
Section 5.2Key rotation intervals (365d / 90d / 30d)Part 1 Section 5.6 (Cryptoperiods)
Section 13.1Key compromise responsePart 1 Section 8.3 (Key Compromise)
Section 3.4 SEC-ALG-AGILITY-0112-month algorithm reviewPart 1 Section 5.2 (Transition)

A.4 NIST SP 800-63 — Identity and Authentication

NIST SP 800-63 (Digital Identity Guidelines) provides the federal standard for digital identity assurance, authentication, and federation. QODIQA's consent enforcement layer operates at the boundary between identity verification and authorization. While QODIQA does not implement identity proofing or authentication (those are upstream of the SUP boundary), the consent token structure defined in Section 4 draws from principles consistent with SP 800-63B (Authentication and Lifecycle Management) regarding token lifetime limits, session management, and revocation requirements. The registry consultation requirement (Section 6) is structurally consistent with SP 800-63C guidance on federation assertion validity and revocation. Implementers integrating QODIQA within a broader digital identity infrastructure SHOULD refer to SP 800-63 for identity and authentication controls upstream of the SUP enforcement boundary.

A.5 NIST Post-Quantum Cryptography Standardization

The NIST Post-Quantum Cryptography (PQC) standardization process has yielded initial standards in 2024. The primary PQC signature algorithms now standardized are:

Table A.5 — NIST PQC Standardized Signature Algorithms
AlgorithmNIST StandardBasisSignature SizeRelevance to QODIQA Section 3.4
CRYSTALS-Dilithium (ML-DSA)FIPS 204Module lattice2.4 KB – 4.6 KBPrimary PQC candidate for Ed25519 migration path
FALCON (FN-DSA)FIPS 206NTRU lattice0.6 KB – 1.3 KBCompact signatures; constrained environments
SPHINCS+ (SLH-DSA)FIPS 205Hash-based stateless7.8 KB – 49.8 KBHash-based; no algebraic assumptions

The cryptographic agility requirements in Section 3.4 (SEC-ALG-AGILITY-01) directly address the PQC transition. Implementations targeting active deployment beyond 2030 MUST include a documented PQC migration readiness plan, as required by SEC-ALG-AGILITY-01. The NIST PQC migration guidance documents (NIST IR 8413, NIST SP 800-131A Rev.2, and NIST PQC Migration FAQ) provide additional implementation guidance beyond the scope of this document.

The dual-signature transition model defined in Section 3.4.2 is directly applicable to the PQC migration scenario: an implementation may produce artifacts signed under both Ed25519 and ML-DSA (Dilithium) during the transition period, satisfying both classical and post-quantum verifiers simultaneously until the deployment is fully migrated.

A.6 FIPS 140-2 / FIPS 140-3 — Security Requirements for Cryptographic Modules

FIPS 140-2 (Security Requirements for Cryptographic Modules) and its successor FIPS 140-3 (aligned with ISO/IEC 19790:2012) define four levels of cryptographic module security. QODIQA SEC-KEY-03 requires FIPS 140-2 Level 3 or equivalent for High-Assurance profile HSMs. The levels are summarized for reference:

Table A.6 — FIPS 140-2 Security Level Summary (Informative)
LevelPhysical SecurityKey ExportAuthenticationQODIQA Applicability
Level 1No physical requirementsNot controlledNot requiredNot sufficient for any QODIQA profile requiring HSM
Level 2Tamper-evident coatingsControlledRole-basedMinimum for Hardened profile HSM use
Level 3Tamper-detection/response; zeroization on tamperEncrypted only; private key non-exportableIdentity-based; multi-factorRequired for High-Assurance profile (SEC-KEY-03)
Level 4Complete physical protection envelope; environmental failure protectionEncrypted only; private key non-exportableIdentity-based; multi-factorExceeds minimum; acceptable for High-Assurance

FIPS 140-3 replaces FIPS 140-2 for new certifications initiated after September 22, 2021. FIPS 140-2 certificates remain valid until their expiration. Implementations procuring new HSM hardware SHOULD prefer FIPS 140-3 certified modules at the equivalent security level. FIPS 140-3 Level 3 satisfies the FIPS 140-2 Level 3 requirement in SEC-KEY-03.

Annex A Non-Normative Confirmation. Nothing in this annex supersedes, modifies, weakens, or extends the normative requirements of Sections 1–14 of this document. The mappings provided are informative and for cross-reference purposes only. Conformance to this Security and Cryptographic Profile is defined exclusively by the normative blocks in Sections 1–14. Reference to a NIST or FIPS standard in this annex does not constitute a claim that an implementation of this document achieves certification, validation, or compliance status under any external audit regime without separate independent evaluation.

#Document Status and Classification

This document defines the mandatory cryptographic, key management, and integrity requirements for high-assurance implementations of QODIQA — a runtime consent enforcement framework for artificial intelligence systems. The Security and Cryptographic Profile is not presented as a general security advisory, but as a deterministic, implementable security hard profile specifying precisely which algorithms are permitted, how consent tokens are secured, how trust anchors are managed, and how audit integrity is preserved across the full enforcement lifecycle.

The material contained herein is intended for:

  • Systems architects and cryptographic infrastructure engineers
  • Enterprise AI platform designers
  • Security and governance officers
  • Regulatory and compliance stakeholders
  • Organizations building or operating high-assurance AI enforcement systems

This document should be read together with the following related specifications:

  • QODIQA — Consent as Infrastructure for Artificial Intelligence Technical Whitepaper — Version 1.0
  • QODIQA — Core Standard for Deterministic Runtime Consent Enforcement — Version 1.0
  • QODIQA — 68-Point Enforcement Framework for Deterministic Runtime Consent Enforcement — Version 1.0
  • QODIQA — Certification Framework for Deterministic Runtime Consent Enforcement — Version 1.0
  • QODIQA — Conformance Test Suite Specification for Deterministic Runtime Consent Enforcement — Version 1.0
  • QODIQA — Threat Model and Abuse Case Specification — Version 1.0
  • QODIQA — Implementation Playbook for Deterministic Runtime Consent Enforcement — Version 1.0
  • QODIQA — Governance Charter for the QODIQA Standard Corpus — Version 1.0

Version 1.0 represents the initial formal release of this document as part of the QODIQA standard corpus.


For strategic inquiries, architectural discussions, or partnership exploration:

Bogdan Duțescu

bddutescu@gmail.com

0040.724.218.572

Document Identifier QODIQA-SEC-2026-001
Title Security and Cryptographic Profile for Runtime Consent Enforcement
Subtitle Cryptographic, Key Management, and Integrity Requirements for Deterministic Runtime Consent Enforcement
Publication Date April 2026
Version 1.0
Document Type High-Assurance Security Specification
Document Status Normative — High-Assurance Security Specification
Governing Authority QODIQA Governance Charter
Integrity Notice Document integrity may be verified using the official SHA-256 checksum distributed with the QODIQA specification corpus.