# Oblivious Nucleic-Acid Screening Protocol (v0.3)

**Document ID:** `OP02-BIO-OBLIVIOUS-v0.3`  
**Status:** Open Technical Specification (Working Draft v0.3 · AlignedAccelerationism.com)  
**Cryptographic Lineage:** Modeled on SecureDNA distributed oblivious screening (Baum, Esvelt, Damgård, Yao, Rivest, Vaikuntanathan, Wichs et al., *arXiv:2403.14023*) and IETF RFC 9497 (*Oblivious Pseudorandom Functions Using Prime-Order Groups*).

---

## 1. Purpose, Scope & Core Privacy-Security Invariants

Commercial nucleic-acid synthesis is a narrow, high-leverage physical bottleneck for biological catastrophic risk. Naive centralized screening creates two unacceptable failure modes:

1. **Commercial & Scientific Panopticon:** Requiring biotech researchers, universities, and therapeutics firms to submit plaintext DNA/RNA orders to a central government server leaks proprietary intellectual property and builds an intrusive surveillance log of legitimate biomedical activity.
2. **Centralized Bioweapon Catalog Risk:** Distributing a plaintext list of hazardous pathogen sequences directly to every synthesis provider or benchtop printer puts an actionable catalog of high-consequence biological agents onto thousands of attackable endpoints.

This protocol eliminates both hazards simultaneously through **client-blinded cryptographic screening** over a **split-custody Encrypted Hazard Database (HDB)**.

### Formal Information-Boundary Matrix

| Protocol Party | Cryptographically Learns | Cryptographically Prevented From Learning |
| :--- | :--- | :--- |
| **Synthesis Client / Foundry Gate** | Binary `CLEAR` / `EXEMPT` / `ESCALATE` disposition; decrypted hazard identifier **only** for sequences matching a regulated entry | Contents of the Encrypted Hazard Database (HDB) for any non-matching sequence; global keyserver secret $k$ |
| **Threshold Keyservers ($N$ independent custodians)** | Blinded curve points $B_i = r_i \cdot H_1(w_i)$ (statistically indistinguishable from uniform random elements in $\mathbb{G}$); per-client quota usage | Plaintext customer DNA/RNA sequences, k-mer hashes, whether any query matched a hazard, or identity of end researchers |
| **Encrypted HDB Mirror** | Truncated oblivious lookup indices $\text{idx}_i$ and quota-token validity | Plaintext customer DNA/RNA sequences (for non-matches) or the plaintext hazard metadata encrypted under $K_i$ |
| **Bio-Compliance Review Officer** | Minimal encrypted escalation bundle **only** when a query matches a regulated high-consequence hazard without a valid exemption token | Any benign sequence orders, non-matching flanking regions, or routine biotech synthesis volume |

---

## 2. System Architecture & Split-Custody Roles

The protocol distributes trust across four structurally separated roles so that no single nation, vendor, or database administrator can compromise privacy or suppress hazard screening:

1. **Synthesis Client (`Client`):** Software gate running inside a commercial gene synthesis foundry order-intake pipeline or inside the hardware security module (HSM) of a regulated benchtop nucleic-acid synthesizer.
2. **Threshold Keyserver Quorum ($\mathcal{S}_1, \dots, \mathcal{S}_N$):** $N \ge 5$ geographically and geopolitically independent keyserver operators holding Shamir secret shares $(k_1, \dots, k_N)$ of a master OPRF key $k \in \mathbb{Z}_q^*$ with reconstruction threshold $t > N/2$ (e.g., $t = 3, N = 5$ or $t = 5, N = 9$). Each keyserver publishes verification commitment $Y_j = k_j \cdot G$ in an append-only transparency log.
3. **Split-Custody Hazard Curator Consortium (`HDB-Curators`):** Multilateral biosecurity panel (epidemiologists, national biosafety labs, WHO/international treaty technical officers) that compiles regulated functional hazard motifs (derived from select-agent lists and high-consequence virulence/toxin determinants) inside an audited multi-party encryption ceremony, outputting only the encrypted HDB artifact. No unilateral actor can silently insert arbitrary political or commercial IP sequences into the HDB without multi-party curator signatures.
4. **Authorized Bio-Compliance Review Board (`ReviewBoard`):** Vetted biosafety reviewers who inspect **only** escalated hits lacking valid cryptographic Exemption Tokens.

---

## 3. Five-Step Client-Blinded Screening Workflow

Let $\mathbb{G}$ be the prime-order group `Ristretto255` (cofactor-free group of prime order $q \approx 2^{252} + 27742317777372353535851937790883648493$) with canonical generator $G$, domain-separated hash-to-group $H_1 : \{0,1\}^* \to \mathbb{G}$ (RFC 9380), and cryptographic hash $H_2 : \{0,1\}^* \to \{0,1\}^{256}$.

### Step 1: Canonical Sequence Normalization & Multi-Scale k-mer Windowing

Before any network transmission, the `Client` processes an ordered nucleic-acid sequence $S \in \{\text{A, C, G, T}\}^L$ (mapping RNA uracil `U` $\to$ `T` and expanding IUPAC ambiguity codes up to bounded ambiguity budgets):

1. **Double-Strand Canonicalization:** For every sliding nucleotide window $w$ of length $k_{\text{nt}}$ (reference baseline: $k_{\text{nt}} = 30\text{ bp}$ for exact short-oligo coverage and $k_{\text{nt}} = 42\text{ bp}$ for longer double-stranded fragments, following SecureDNA multi-window design), compute its reverse complement $\overline{w}$ and emit the lexicographically minimal representative:
   $$w^* = \min_{\text{lex}}(w, \overline{w})$$
2. **Six-Frame Functional Translation (Codon-Recoding Defense):** To prevent evasion via synonymous codon substitution, translate all 6 reading frames (3 forward, 3 reverse-complement) into amino-acid sequences and extract fixed sliding peptide windows of length $k_{\text{aa}}$ (reference baseline: $k_{\text{aa}} = 20\text{ aa}$, plus functionalized reduced-alphabet conservation windows to detect conservative amino-acid substitutions).
3. **Domain-Separated Window Tagging:** Prefix every window with its extraction tier (`"dna30:"`, `"dna42:"`, `"aa20:"`, `"aa20_func:"`) and deduplicate locally to produce window set $\mathcal{W} = \{w_1, \dots, w_m\}$.
4. **Constant-Bucket Traffic Padding:** Pad the query batch $|\mathcal{W}|$ with locally generated random decoy windows up to the next power-of-two bucket size $2^{\lceil \log_2 m \rceil}$ (minimum bucket size $64$) so keyservers cannot infer exact order length or construct structure via packet-size analysis.

### Step 2: Distributed Threshold OPRF (DOPRF) Blinding

For each window $w_i \in \mathcal{W}$ (including decoys):

1. **Client Blinding:** Map $w_i$ onto the curve and apply an ephemeral independent random scalar $r_i \xleftarrow{\$} \mathbb{Z}_q^*$:
   $$P_i = H_1(w_i) \in \mathbb{G}, \qquad B_i = r_i \cdot P_i$$
2. **Threshold Evaluation Request:** The `Client` selects any online subset $Q \subset \{1, \dots, N\}$ with $|Q| = t$, attaches a valid single-use **Blind Quota Token** (Section 5.1), and sends $\{B_i\}_{i=1}^M$ over mutually authenticated TLS 1.3 to each keyserver $\mathcal{S}_j$ ($j \in Q$).
3. **Verifiable Partial Evaluation:** Each keyserver $\mathcal{S}_j$ computes partial evaluation shares:
   $$Z_{i,j} = k_j \cdot B_i$$
   together with a batched Chaum-Pedersen Discrete-Log Equality (DLEQ) proof $\pi_j$ proving $\log_G(Y_j) = \log_{B_i}(Z_{i,j})$ for all $i$ in the batch. Keyserver $\mathcal{S}_j$ discards $\{B_i, Z_{i,j}\}$ immediately from volatile memory after response transmission.
4. **DLEQ Verification, Lagrange Aggregation & Unblinding:** The `Client` verifies every $\pi_j$ against the public transparency-log key $Y_j$. If any proof fails, the client aborts and logs a verifiable misbehavior report. Otherwise, using public Lagrange coefficients $\lambda_{j,Q} = \prod_{l \in Q \setminus \{j\}} \frac{l}{l - j} \pmod q$, the client aggregates and unblinds locally:
   $$Z_i = \sum_{j \in Q} \lambda_{j,Q} \cdot Z_{i,j} = k \cdot B_i, \qquad U_i = r_i^{-1} \cdot Z_i = k \cdot H_1(w_i)$$
   Decoy outputs are immediately discarded. Because $r_i$ is uniform and never leaves the client, even $t - 1$ colluding keyservers learn **zero information** about any $w_i$.

### Step 3: Oblivious Encrypted Hazard Database (HDB) Lookup

During offline HDB compilation, the `HDB-Curators` evaluate the same threshold DOPRF key $k$ (via multi-party ceremony) on every regulated hazard window $w_h$ to obtain $U_h = k \cdot H_1(w_h)$. Each HDB entry is stored as a pair:

$$\text{idx}_h = \text{Trunc}_{128}\!\big(\text{HKDF-Expand}(U_h, \text{"op02-hdb-index-v0.3"})\big)$$
$$C_h = \text{AEAD-Enc}\!\big(K_h,\; \text{aad}=\text{idx}_h,\; \text{plaintext}=\text{HazardRecord}_h\big)$$

where $K_h = \text{HKDF-Expand}(U_h, \text{"op02-hdb-key-v0.3"})$.

At query time:

1. For each real unblinded output $U_i$, the `Client` derives $\text{idx}_i$ and $K_i$ locally.
2. The `Client` queries the HDB mirror (or an offline encrypted snapshot refreshed per epoch) with $\{\text{idx}_i\}$ padded to the same constant bucket cardinality.
3. For every benign window, no entry exists for $\text{idx}_i$ (false-positive collision probability $< 2^{-128}$ per entry). The HDB mirror cannot invert $\text{idx}_i$ back to a DNA sequence without knowing $k$ and breaking the discrete logarithm problem on `Ristretto255`.
4. If $\text{idx}_i$ matches a stored record $C_h$, the `Client` decrypts $\text{HazardRecord}_h = \text{AEAD-Dec}(K_i, \text{idx}_i, C_h)$, recovering only the matched pathogen/toxin hazard class, organism group, exemption policy tag, and minimum escalation threshold.

### Step 4: Hazard-Only Human-Review Escalation & Cryptographic Exemptions

Screening dispositions follow strict minimal-disclosure branching:

- **Case A — Zero Hazard Matches (Expected $>99.9\%$ of Benign Orders):**  
  The `Client` emits a locally signed `SCREENING_CLEAR` receipt containing only the epoch ID, HDB version root hash, timestamp, and order hash commitment. **Zero sequence data leaves the client.** Synthesis proceeds automatically with sub-second latency.
- **Case B — Matched Hazard Covered by Valid Institutional Exemption Token:**  
  Vetted BSL-3/4 laboratories, national public-health reference centers, and authorized vaccine researchers hold cryptographically signed **Exemption Tokens** scoped to specific organism/hazard IDs, validity dates, and institutional public keys (issued by national biosafety authorities). If every decrypted $\text{HazardRecord}_h$ is satisfied by a valid, non-revoked Exemption Token, the `Client` logs a signed exemption verification record and permits synthesis without disclosing the full construct externally.
- **Case C — Unexempted High-Consequence Hazard Match:**  
  Synthesis halts automatically. **Only** in this narrow branch does the `Client` assemble an end-to-end encrypted escalation packet encrypted under the `ReviewBoard` public key containing:
  1. The decrypted $\text{HazardRecord}_h$ identifiers and hit coordinates;
  2. Minimal local sequence context strictly bounded to the matched hazard region(s) (non-matching proprietary flanking vectors remain redacted unless explicitly requested during legal compliance review);
  3. Customer KYC / institutional verification metadata held by the synthesis provider.  
  A human Bio-Compliance Review Officer adjudicates whether the hit represents a legitimate research construct (issuing a one-time scoped clearance) or an unauthorized hazardous order (denying synthesis and triggering statutory biosafety reporting).

### Step 5: Zero-Retention Audit Logs & Epoch Key Rotation

1. **Zero-Retention Mandate for Benign Traffic:** Keyservers are prohibited by protocol and auditable memory-scrubbing requirements from persisting blinded points $B_i$, partial outputs $Z_{i,j}$, client IP-to-query correlations, or timestamps finer than coarse billing/quota intervals.
2. **Tamper-Evident Compliance Ledger:** Only two event classes are recorded in the append-only Merkle audit log:
   - `EXEMPTION_EXERCISED` (commitment to institutional Exemption Token ID, hazard category ID, epoch, and foundry signature — zero raw DNA sequence);
   - `ESCALATION_DISPOSITION` (cryptographic digest of Case C review outcome — cleared vs. denied — proving the provider did not silently bypass screening).
3. **Proactive Epoch Key Refresh:** Periodically (e.g., semi-annually) or upon custodian membership change, keyservers execute proactive secret sharing (resharing $k$ without changing $k$, or rotating to $k'$ alongside an updated encrypted HDB epoch) to bound the exposure window of compromised individual shares.

---

## 4. Strict Supply-Chain Hardware Boundaries

To uphold OP-02's anti-panopticon invariant, mandatory oblivious screening applies **exclusively** to nucleic-acid *writing* bottlenecks — never to civilian *reading* (diagnostic sequencing) or routine biological laboratory glassware.

| Equipment / Facility Class | Screening Boundary | Technical Enforcement Mechanism |
| :--- | :--- | :--- |
| **Commercial Gene & Oligo Synthesis Foundries** | **IN SCOPE (Mandatory)** | Software screening gate integrated into order intake; signed `SCREENING_CLEAR` or `EXEMPT` receipt required before synthesizer print-queue release. |
| **Benchtop Nucleic-Acid Printers (Desktop DNA/RNA Synthesizers)** | **IN SCOPE (Mandatory)** | Hardware-rooted HSM inside the printer requires a fresh online/offline cryptographic `SCREENING_CLEAR` token bound to the print cartridge job hash before dispensing phosphoramidite/enzymatic reagents. |
| **Clinical & Hospital Diagnostic Sequencers (DNA/RNA Readers)** | **OUT OF SCOPE (Explicitly Excluded)** | Never subject to synthesis screening; protects patient genomic privacy and rapid clinical pathogen diagnostics (which feed opt-in OP-06 defense). |
| **General Lab PCR Thermocyclers, Microscopes & Civilian Medical Devices** | **OUT OF SCOPE (Explicitly Excluded)** | Zero attestation or telemetry requirements; preserves open academic biology and individual medical liberty. |

---

## 5. Threat Model, Oracle-Probing Defenses & Honest Residual Risks

### 5.1 Defending Against Query-Oracle Probing
An adversary attempting to map the hidden hazard database (or test single-nucleotide mutations to find an unflagged virulent variant) faces three layered cryptographic and operational barriers:

1. **Blind Quota Tokens (Rate Bounding):** Every client receives cryptographically blind, periodically replenished k-mer query quotas scaled to legitimate synthesis throughput (e.g., verified foundry volume or benchtop cartridge reagent capacity). Because tokens are blind-signed (or issued via Privacy Pass–style anonymous credentials), keyservers enforce hard query budgets **without** tracking individual research topics.
2. **Functional & Multi-Window Redundancy:** Overlapping DNA windows ($30\text{ bp}$, $42\text{ bp}$) combined with 6-frame translated amino-acid and conserved-residue functional windows ensure that naive single-base or synonymous codon edits still trigger overlapping conserved hazard motifs, exponentially raising the number of probes needed to find an unflagged functional sequence.
3. **Anomaly Escalation Without Sequence Exposure:** While keyservers never see DNA, a sudden spike in unexempted Case C hits from a single unverified account inside a foundry gate automatically triggers KYC freeze and human biosecurity review at the provider boundary.

### 5.2 Honest Residual Risks
Cryptographic screening is a high-leverage defense layer, **not** an absolute guarantee:

- **Novel *de novo* Functional Protein Design:** AI-designed toxins or viral entry proteins with zero sequence or motif homology to known regulated agents can evade k-mer databases. Mitigating this requires pairing OP-02's upstream oblivious screening with OP-01 frontier bio-capability evals and OP-06 downstream wastewater/metagenomic early-warning networks.
- **Unscreened Legacy Synthesizers & Custom Chemistry:** Pre-protocol oligo synthesizers or illicit manual phosphoramidite assembly sit outside HSM print locks; addressing them relies on reagent-precursor KYC and international treaty verification (OP-04).
- **Threshold Collusion Risk:** If $\ge t$ keyserver custodians simultaneously collude and log blinded traffic while obtaining raw HDB ciphertexts, they could mount offline dictionary attacks against guessed sequences. Selecting geographically, legally, and politically non-aligned custodians with hardware-enforced ephemeral RAM processing minimizes (though cannot mathematically eliminate) global collusion risk.

---

## 6. Normative & Academic References

1. Baum, C., Esvelt, K. M., Damgård, I., Yao, A. C., Rivest, R., Vaikuntanathan, V., Wichs, D., et al. (2024). *A system capable of verifiably and privately screening global DNA synthesis*. arXiv:2403.14023 (`https://arxiv.org/abs/2403.14023`).
2. Davidson, A., Faz-Hernandez, A., Sullivan, N., & Wood, C. A. (2023). *Oblivious Pseudorandom Functions (OPRFs) Using Prime-Order Groups*. IETF RFC 9497 (`https://www.rfc-editor.org/rfc/rfc9497.html`).
3. U.S. Department of Health and Human Services (HHS) (2023). *Screening Framework Guidance for Providers and Users of Synthetic Nucleic Acids* (`https://aspr.hhs.gov/legal/syndna/Pages/default.aspx`).
4. Bostrom, N. (2019). *The Vulnerable World Hypothesis*. Global Policy, 10(4), 455–476 (`https://doi.org/10.1111/1758-5899.12718`).
