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
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.
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.
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.
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.
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.
An adversary removes or alters audit entries to conceal enforcement decisions. Mitigated by append-only storage, hash chain integrity, and write-before-execute sequencing.
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.
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.
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.
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.
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.
// 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_timestamp → INVARIANT: 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
#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.
| Component | Attack Surface | Threat Class | Mitigation Control | Enforcement 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.
| Failure Condition | Detection Mechanism | Required System Response | Enforcement Outcome | Audit Requirement | Severity |
|---|---|---|---|---|---|
| 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 |
| Control ID | Section Reference | Threat Coverage | Component Scope |
|---|---|---|---|
| SEC-ALG-01 | Section 3.1 | THR-01 (Token Forgery); algorithm substitution | SUP.CONSENT-GATE |
| SEC-ALG-AGILITY-01 | Section 3.4 | Algorithm obsolescence; PQC transition risk | SUP.CONSENT-GATE; SUP.KEY-STORE |
| SEC-INV-01 | Section 2.1 | All invariant violations (INV-01 through INV-07) | All SUP components |
| SEC-TOK-01 | Section 4.1 | THR-01 (Token Forgery); signature malleability | SUP.CONSENT-GATE |
| SEC-TOK-REPLAY-CLUSTER | Section 4.5 | THR-04 (Replay Manipulation); distributed replay | SUP.CONSENT-GATE |
| SEC-KEY-01 | Section 5.1 | THR-02 (Key Compromise); unresolvable trust chain | SUP.KEY-STORE; SUP.CONSENT-GATE |
| SEC-KEY-02 | Section 5.4 | THR-02 (Key Compromise); THR-10 (Insider Tampering) | SUP.KEY-STORE |
| SEC-KEY-03 | Section 5.4 | THR-02 (Key Compromise); THR-10 (Insider Tampering) | SUP.KEY-STORE |
| SEC-REG-01 | Section 6 | THR-03 (Registry Tampering); hash chain break | SUP.REGISTRY |
| SEC-REG-02 | Section 6 | THR-09 (Network Partition Abuse); stale state exploitation | SUP.REGISTRY; SUP.CONSENT-GATE |
| SEC-ART-01 | Section 7.1 | THR-08 (Artifact Collision); artifact tampering (INV-07) | SUP.ARTIFACT-STORE |
| SEC-ART-02 | Section 7.1 | THR-07 (Policy Version Substitution); silent model substitution | SUP.ARTIFACT-STORE; SUP.CONSENT-GATE |
| SEC-AUDIT-01 | Section 8.1 | THR-05 (Audit Log Modification); write-before-execute violation (INV-02) | SUP.AUDIT-LEDGER |
| SEC-CLK-01 | Section 9 | THR-06 (Clock Manipulation); clock drift violation (INV-05) | SUP.CONSENT-GATE; SUP.AUDIT-LEDGER |
| SEC-NET-01 | Section 10 | Network interception; plaintext transport exposure | All SUP components (network interfaces) |
| SEC-NET-PFS | Section 10 | Retrospective decryption; non-PFS cipher suite exploitation | All SUP components (TLS connections) |
| SEC-DET-01 | Section 11 | Non-deterministic evaluation (INV-06); evaluation path contamination | SUP.CONSENT-GATE |
| SEC-SCOPE-01 | Section 14 | Misrepresentation of security boundary; SUP boundary violations | All 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.
| Algorithm | Standard | Requirement | Notes |
|---|---|---|---|
| Ed25519 | RFC 8032 | MUST | Primary recommended algorithm. Deterministic signature generation. 128-bit security level. |
| ECDSA P-256 | NIST FIPS 186-4 | SHOULD | Optional interoperability profile. MUST use deterministic nonce per RFC 6979. SHA-256 digest required. |
| ECDSA P-384 | NIST FIPS 186-4 | SHOULD | High-Assurance profile only. SHA-384 digest required. Justified by extended security margin requirement. |
| RSA-PSS ≥ 3072-bit | RFC 8017 | SHOULD | Legacy integration only. SHA-256 or SHA-384 digest required. SHALL NOT be used for new implementations. |
3.2 Hashing Algorithms
| Algorithm | Standard | Requirement | Use |
|---|---|---|---|
| SHA-256 | NIST FIPS 180-4 | MUST | Artifact hashing, audit chain, token payload digest. Minimum acceptable. |
| SHA-384 | NIST FIPS 180-4 | SHOULD | High-Assurance profile artifact hashing. Required when ECDSA P-384 is the signing algorithm. |
| SHA-512 | NIST FIPS 180-4 | SHOULD | Merkle tree leaf hashing in optional audit ledger variant. Acceptable at all profiles. |
| BLAKE3 | IETF Draft | SHOULD | Internal 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.
| Algorithm | Status | Reason | Prohibition Scope |
|---|---|---|---|
| MD5 | FORBIDDEN | Cryptographically broken. Collision attacks demonstrated. | MUST NOT be used for any purpose. |
| SHA-1 | FORBIDDEN | Collision resistance compromised. SHAttered attack demonstrated in 2017. | MUST NOT be used for any purpose. |
| RSA < 2048-bit | FORBIDDEN | Insufficient key length. Factorization attacks feasible. | MUST NOT be used in any context. |
| ECDSA non-deterministic nonce | FORBIDDEN | Nonce reuse yields private key recovery. Pre-RFC 6979 implementations affected. | MUST NOT be deployed. |
| DES / 3DES | FORBIDDEN | Block cipher with insufficient security margin. | MUST NOT be used for any symmetric operation. |
| RC4 | FORBIDDEN | Stream cipher with known statistical biases. | MUST NOT be used in any context. |
| MD4, MD2, RIPEMD-128 | FORBIDDEN | Broken hash functions. No collision resistance. | MUST NOT be used for any purpose. |
| Non-standard / proprietary hash functions | FORBIDDEN | Unaudited 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.
Algorithm Deprecation Lifecycle
| Stage | Designation | Operational Effect | Duration Limit | Migration Action Required |
|---|---|---|---|---|
| Stage 1 | WARNING | Algorithm remains approved. Advisory notice issued. New deployments SHOULD prefer alternatives. | ≤ 12 months | Migration plan MUST be documented. |
| Stage 2 | RESTRICTED USE | Algorithm permitted for existing deployments only. MUST NOT be used in new implementations or new key generations. | ≤ 18 months | Active migration to replacement MUST begin. Dual-signature required (Section 3.4.2). |
| Stage 3 | PROHIBITED | Algorithm added to Forbidden Algorithms list (Section 3.3). All uses unconditionally cease. | Permanent | Migration 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.
// 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.
canonical_payload = JCS(token_claims) → verify(signature, canonical_payload, public_key) → accept | deny
4.2 Required Token Claims
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.
// 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.exp → DENY // 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 passed → PERMIT
4.4 Maximum Token Lifetime by Profile
| Profile | Maximum exp − iat | jti Required | ctx_hash Required |
|---|---|---|---|
| Baseline Security | 86400 s (24 h) | SHOULD | SHOULD |
| Hardened Enterprise | 3600 s (1 h) | MUST | MUST |
| High-Assurance | 900 s (15 min) | MUST | MUST |
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.
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.
// 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 fails → PERMIT // 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.
5.2 Key Rotation Requirements
| Profile | Signing Key Rotation | Root Anchor Rotation | Emergency 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.
| # | Action | Requirement |
|---|---|---|
| 1 | Immediate Revocation | The compromised key SHALL be added to the revocation registry within the Emergency Rotation SLA for the applicable profile. |
| 2 | Registry Propagation | Revocation SHALL be propagated to all enforcement gates before any new token issuance with a replacement key. |
| 3 | Artifact Invalidation | All Decision Artifacts signed with the compromised key SHALL be flagged as potentially invalid and subject to manual review. |
| 4 | Replacement Key Generation | A 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. |
| 5 | Certification Notification | If 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.
#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.
| Key Type | Storage Requirement | Access Control Model | Rotation Requirement | Compromise 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.
snapshot_hash = SHA-256(prev_hash || seq_num || timestamp || registry_body)Signed with registry root key (Ed25519 or ECDSA P-256).
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 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.
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.
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.
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_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.
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.
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))
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.
| Requirement | Baseline | Hardened | High-Assurance |
|---|---|---|---|
| NTP Synchronization | MUST | MUST (authenticated NTP / NTPsec) | MUST (authenticated NTP + GPS/PTP secondary) |
| Maximum Clock Drift Tolerance | ±30 s | ±5 s | ±1 s |
| Monotonic Clock for Artifacts | MUST | MUST | MUST |
| Anti-Rollback Protection | SHOULD | MUST | MUST |
| Fail-Closed on Clock Uncertainty | MUST | MUST | MUST |
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
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.
#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.
| Component | Operation | Latency Sensitivity | Scaling Consideration | Fail-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.
/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.
| Control | Baseline | Hardened | High-Assurance |
|---|---|---|---|
| Signing Algorithm | Ed25519 or ECDSA P-256 | Ed25519 — MUST | Ed25519 — MUST |
| Hash Algorithm | SHA-256 | SHA-256 or SHA-384 | SHA-384 — MUST |
| TLS Version | ≥ 1.2 | 1.3 exclusive | 1.3 exclusive |
| Key Storage | Software acceptable | HSM required | HSM + dual-control |
| mTLS | OPTIONAL | SHOULD | MUST |
| Token Lifetime Max | 24 hours | 1 hour | 15 minutes |
| JTI Anti-Replay | SHOULD | MUST | MUST |
| Registry TTL | 300 s | 60 s | 15 s |
| Ledger Replication | Single | Dual | Dual + geographic |
| Key Rotation | ≤ 365 days | ≤ 90 days | ≤ 30 days |
| Integrity Scan Interval | 24 hours | 1 hour | 15 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.
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.
| Exclusion Category | Scope 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.
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 SpecificationThe 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.
#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.
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.
| Step | Validation Operation | Requirement |
|---|---|---|
| 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
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.
| QODIQA Section | Requirement | FIPS 180-4 Basis | Status in Standard |
|---|---|---|---|
| Section 3.2 | SHA-256 minimum for hashing | FIPS 180-4 Section 6.2 | Approved |
| Section 3.2 | SHA-384 for High-Assurance | FIPS 180-4 Section 6.3 | Approved |
| Section 3.2 | SHA-512 approved | FIPS 180-4 Section 6.4 | Approved |
| Section 3.3 | MD5 prohibited | Not in FIPS 180-4 | Withdrawn / Not Approved |
| Section 3.3 | SHA-1 prohibited | FIPS 180-4 (deprecated) | Deprecated per NIST SP 800-131A Rev.2 |
| Section 7 | Artifact hash: SHA-256 | FIPS 180-4 Section 6.2 | Approved |
| Section 7 | model_binary_hash: SHA-256 | FIPS 180-4 Section 6.2 | Approved |
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.
| QODIQA Section | Algorithm | FIPS Reference | Approval Status |
|---|---|---|---|
| Section 3.1 (MUST) | Ed25519 | FIPS 186-5 Section 5.1 | Approved |
| Section 3.1 (SHOULD) | ECDSA P-256 | FIPS 186-4 Section 6.1 / FIPS 186-5 Section 6.1 | Approved |
| Section 3.1 (SHOULD) | ECDSA P-384 | FIPS 186-4 Section 6.1 / FIPS 186-5 Section 6.1 | Approved |
| Section 3.3 | RSA < 2048-bit (prohibited) | FIPS 186-4 Section 5.1 | Non-compliant (key size) |
| Section 3.3 | Non-deterministic ECDSA (prohibited) | RFC 6979 / FIPS 186-5 Section 6.3 | Not recommended |
| Section 10 SEC-NET-PFS | ECDHE only for TLS 1.2 | FIPS 186-4 Section 6.1 | Approved 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.
| QODIQA Section | Requirement | SP 800-57 Reference |
|---|---|---|
| Section 5.1 SEC-KEY-01 | HSM storage for Hardened / High-Assurance | Part 1 Section 8.2.1, Part 2 Section 3.3 |
| Section 5.1 SEC-KEY-02 | Prohibited key storage patterns | Part 1 Section 8.2.3 |
| Section 5.1 SEC-KEY-03 | FIPS 140-2 Level 3, dual-control | Part 2 Section 2.3 (Separation of Duties) |
| Section 5.2 | Key rotation intervals (365d / 90d / 30d) | Part 1 Section 5.6 (Cryptoperiods) |
| Section 13.1 | Key compromise response | Part 1 Section 8.3 (Key Compromise) |
| Section 3.4 SEC-ALG-AGILITY-01 | 12-month algorithm review | Part 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:
| Algorithm | NIST Standard | Basis | Signature Size | Relevance to QODIQA Section 3.4 |
|---|---|---|---|---|
| CRYSTALS-Dilithium (ML-DSA) | FIPS 204 | Module lattice | 2.4 KB – 4.6 KB | Primary PQC candidate for Ed25519 migration path |
| FALCON (FN-DSA) | FIPS 206 | NTRU lattice | 0.6 KB – 1.3 KB | Compact signatures; constrained environments |
| SPHINCS+ (SLH-DSA) | FIPS 205 | Hash-based stateless | 7.8 KB – 49.8 KB | Hash-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:
| Level | Physical Security | Key Export | Authentication | QODIQA Applicability |
|---|---|---|---|---|
| Level 1 | No physical requirements | Not controlled | Not required | Not sufficient for any QODIQA profile requiring HSM |
| Level 2 | Tamper-evident coatings | Controlled | Role-based | Minimum for Hardened profile HSM use |
| Level 3 | Tamper-detection/response; zeroization on tamper | Encrypted only; private key non-exportable | Identity-based; multi-factor | Required for High-Assurance profile (SEC-KEY-03) |
| Level 4 | Complete physical protection envelope; environmental failure protection | Encrypted only; private key non-exportable | Identity-based; multi-factor | Exceeds 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
0040.724.218.572