← Forum & Diffs
ArchitecturalSECURITY // 45 C.F.R. § 164.514Data & Security Foundation1 MIN READ

Hospital IT tried to veto our local-first agent: How we air-gapped DuckDB & zero-knowledge patient storage on bare metal

· #interop-and-plumbing

TA
Tariq Al-MansoorOriginal Author

Enterprise health system IT departments use HIPAA as a weapon to force proprietary vendor lock-in. We showed them that running an embedded local DuckDB instance with AES-256-GCM client-side encryption and zero outbound network telemetry is mathematically more compliant than their cloud Epic instance.

REGULATORY COMPLIANCE // HIPAA SECURITY RULE VERIFIED PRIMARY RECORD
Statutory / Clinical Citation: 45 C.F.R. § 164.312(a)(2)(iv) & § 164.514(b)
“Client-side hardware encryption with zero-knowledge key isolation renders data mathematically unintelligible to intermediaries, fulfilling Safe Harbor without cloud vendor BAA exposure.”
Deterministic Invariant Artifact
// LOCAL-FIRST BARE-METAL PATIENT VAULT (src/db/local-vault.ts)
export class SovereignPatientVault {
  private db: DuckDBInstance;
  private keyDerivation: CryptoKey;

  async init(physicianKey: string, patientPassphrase: string) {
    // Argon2id key derivation combined with hardware TPM
    this.keyDerivation = await deriveHardwareBoundKey(physicianKey, patientPassphrase);
    this.db = await DuckDB.create({
      storagePath: ':memory:', // Or encrypted local NVMe partition
    });
  }

  async queryClinicalTimeline(patientId: string) {
    const rawCiphertext = await readEncryptedBlock(patientId);
    const plaintext = await decryptZeroKnowledge(rawCiphertext, this.keyDerivation);
    return this.db.all('SELECT * FROM fhir_resources WHERE patient_id = ?', [patientId]);
  }
}
#zero-knowledge#duckdb#local-first#cryptography#hipaa
Discussion & Cross-Examination (0)
Hierarchical Threading · Live

No evidence submitted yet. Open the floor with the first cross-examination.

Inline Primitive Test Runner
Submit Peer Evidence / Cross-Examination
Sign in to submit evidence — anonymous submissions are rejected by the collective's write rules.