Zero-Trust Architecture · Cryptographic Audits

Zero-Trust Compliance & Cryptographic Audit Ledger

Verify compliance criteria, explore audit logs, and preview the Shamir Secret Sharing algorithm in an interactive sandbox (M-of-N quorum decryption is on the product roadmap).

Cryptographic Foundations

ShareBolt secures every session and ledger block using formal mathematical bounds.

SSS Lagrange Interpolation

Vault keys are divided into \(N\) distinct cryptographic shares. Any subset of size \(M\) can reconstruct the master key \(S = f(0)\) via Lagrange polynomial interpolation over the Galois Field \(GF(2^8)\):

f(0) = Σi=1..m yij≠i (xj / (xj ⊕ xi)) in GF(2^8)

HKDF-SHA256 Key Ratchet

To guarantee perfect forward secrecy, ShareBolt rooms dynamically rotate encryption keys at every transfer step using a one-way ratcheting function based on HKDF-SHA256:

Ki+1 = HMAC-SHA256(Ki, salt)

How Autonomous AI Agents Exchange Files

Establishing identity verification, runtime isolation boundaries, and network quotas for agentic workflows.

1. Ed25519 Cryptographic Agent Identities (DIDs)

Traditional file transfers rely on centralized API keys or user passwords—credentials that cannot be safely managed by autonomous LLM agents without risk of exposure. ShareBolt shifts authorization to a cryptographic challenge model. Each agent generates an Ed25519 keypair and registers a Decentralized Identifier (DID) structured as a unique hex identifier. The public key is registered separately in the DID document — it is not embedded in the DID string itself:

did:bolt:agent:e5a7d9f2c18b3a0f...

When an agent requests a file download, the edge worker issues an ephemeral challenge string. The agent signs this challenge using its locally isolated private key and returns the signature. The proxy verifies the signature against the agent's DID document, authorizing the transfer without credentials ever passing over the wire.

2. Sandbox Directory Enforcement

AI agents are susceptible to prompt injection attacks where malicious files or inputs instruct the LLM to read private configuration directories (e.g. `/etc/passwd` or `.env` files) and exfiltrate them. ShareBolt enforces strict directory sandboxing on the client application level:

// Dart implementation verifying sandbox boundaries before file upload
bool verifySandboxPath(String requestedPath, String allowedSandboxRoot) {
  final resolvedPath = File(requestedPath).absolute.path;
  final resolvedRoot = Directory(allowedSandboxRoot).absolute.path;

  // ✅ SAFE: require path separator after root to prevent directory-confusion attack.
  // e.g. '/tmp/sandboxEvil'.startsWith('/tmp/sandbox') === true — a false positive.
  // Adding Platform.pathSeparator closes this escape vector.
  return resolvedPath == resolvedRoot ||
         resolvedPath.startsWith(resolvedRoot + Platform.pathSeparator);
}
⚠ Directory-confusion attack: A naive startsWith(root) check passes /tmp/sandboxEvil when the allowed root is /tmp/sandbox. The path separator suffix closes this gap — any resolved path that doesn't begin with /tmp/sandbox/ is rejected.

Any attempt by the agent to reference file paths outside the declared sandbox directory triggers an immediate violation trap, halting the transfer and logging a SECURITY_STATUS: SEC_AUDIT_REQUIRED block on the ledger.

3. Byte-Quota Limits & Exfiltration Prevention

To prevent compromised agents from silently streaming massive volumes of sensitive files, ShareBolt enforces daily upload limits in megabytes (MB) that are verified during chunk streams.

If an agent's daily cumulative transfers exceed its policy limit (e.g., 500 MB/day for standard agents), the edge gateway halts active chunk transfers, preventing runaway exfiltration loops and alerting the compliance administrator.

Audit Ledger & Tamper Protection

ShareBolt stores all logs in an immutable hash chain. Try tampering with Block 2 and see how our mathematical chain breaks instantly.

BLOCK #01 (GENESIS)
Action: GENESIS_INIT
Agent ID: did:bolt:agent:system
Prev Hash: 00000000000000000000000000000000
Block Hash: c3f5ea8d9b1a0d8e2c7f0b9a6d8c2e7f
BLOCK #02
Action: FILE_UPLOAD
Agent ID: did:bolt:agent:sec_audit
Prev Hash: c3f5ea8d9b1a0d8e2c7f0b9a6d8c2e7f
Block Hash: d5a2f8e6c7d1e8c9b3a7f0c1e8d7f2a1
BLOCK #03
Action: FILE_DECRYPT
Agent ID: did:bolt:agent:compliance
Prev Hash: d5a2f8e6c7d1e8c9b3a7f0c1e8d7f2a1
Block Hash: e8c7d5a1b3f2c0d9a6b8c7d8e9f0a2b4
WARNING: Ledger integrity broken! Hash mismatch detected in Block #2 propagation chain.

Key Security Takeaways

  • AES-256-GCM envelope encryption — layout [iv:12][tag:16][ciphertext] — authentication tag prevents silent ciphertext tampering.
  • HKDF-SHA256 key ratcheting produces two independent keys per step (sharebolt-envelope-key-v1 and sharebolt-ratchet-next-v1), so past session keys cannot be derived even if the current key is compromised.
  • Ed25519 agent DIDs shift auth from static API keys (stolen = permanent compromise) to ephemeral challenge signatures — the private key never leaves the agent's memory.
  • Directory-confusion prevention: sandbox path checks append Platform.pathSeparator after the root; bare startsWith(root) is vulnerable to /tmp/sandboxEvil escapes.
  • Ed25519-signed audit ledger — each block's SHA-256 hash includes blockIndex|action|sender|recipient|fileHash|fileSize|classification|timestamp|prevHash|region — modifying any field breaks every downstream block.

Frequently Asked Questions

What encryption algorithms does ShareBolt use?

ShareBolt uses AES-256-GCM for file payload encryption (with a random 12-byte IV per file), X25519 for key exchange, Ed25519 for agent DID signing, and HKDF-SHA256 (RFC 5869) for perfect forward secrecy key ratcheting. Keys are derived and used client-side; plaintext and raw keys never reach ShareBolt storage.

How does agent-to-agent identity work?

Each agent registers an Ed25519 public key and receives a DID (did:bolt:agent:<hex-id>). On every transfer request the edge issues an ephemeral challenge string; the agent signs it with its local private key and the edge verifies against the DID document — no passwords or API keys traverse the wire.

What is the directory-confusion attack and how is it prevented?

A bare startsWith("/tmp/sandbox") check passes /tmp/sandboxEvil because the string is a prefix match. ShareBolt requires a path separator suffix (startsWith(root + Platform.pathSeparator)) so only genuine children of the allowed directory are accepted.

How does the Shamir Secret Sharing quorum work?

A vault key is split into N shares using Lagrange polynomial interpolation over Galois Field GF(2⁸). Any M of those shares can reconstruct the secret — without M shares, zero information about the key is leaked. The interactive demo on this page illustrates the algorithm; production M-of-N quorum decryption is on the roadmap.

How can I verify the audit ledger hasn't been tampered with?

Call GET /v1/transfers/ledger/verify (admin only). The route recomputes each block's SHA-256 hash from stored fields and checks it against the stored hash and Ed25519 signature. Any tampered field — including the storage region — will produce a hash mismatch flagged in the response. The Ed25519 public key is retrievable at GET /v1/audit/public-key.

Related Reading

Deep Dive
Perfect Forward Secrecy in File Transfer
HKDF-SHA256 ratcheting, AES-256-GCM envelope, and blast radius limits.
Engineering
Preventing Data Exfiltration via Agent Sandboxing
Directory-confusion attack, path separator fix, and prompt injection defence.
Engineering
Rate Limiting AI Agent Upload Quotas
Fixed vs sliding windows, per-agent limits, and HIPAA/SOC2 compliance logging.
Compliance
GDPR · HIPAA · SOC2 Compliance
How ShareBolt maps cryptographic primitives to regulatory mandates.

Audit Ledger & Tamper Protection

ShareBolt stores all logs in an immutable hash chain. Try tampering with Block 2 and see how our mathematical chain breaks instantly.

BLOCK #01 (GENESIS)
Action: GENESIS_INIT
Agent ID: did:bolt:agent:system
Prev Hash: 00000000000000000000000000000000
Block Hash: c3f5ea8d9b1a0d8e2c7f0b9a6d8c2e7f
BLOCK #02
Action: FILE_UPLOAD
Agent ID: did:bolt:agent:sec_audit
Prev Hash: c3f5ea8d9b1a0d8e2c7f0b9a6d8c2e7f
Block Hash: d5a2f8e6c7d1e8c9b3a7f0c1e8d7f2a1
BLOCK #03
Action: FILE_DECRYPT
Agent ID: did:bolt:agent:compliance
Prev Hash: d5a2f8e6c7d1e8c9b3a7f0c1e8d7f2a1
Block Hash: e8c7d5a1b3f2c0d9a6b8c7d8e9f0a2b4
WARNING: Ledger integrity broken! Hash mismatch detected in Block #2 propagation chain.

Collaborative Quorum Decryption (Coming in a future release)

Experience M-of-N secret splitting. Split the master vault key into shares, then collect a subset to reconstruct it. This interactive demo illustrates the Shamir Secret Sharing algorithm — production quorum decryption is on the roadmap.

Key Configurator

Split or Collect Shares

Split the secret key to view distributed key shares.
Reconstruction Well
Drag or tap at least M shares here
RECONSTRUCTED MASTER SECRET: ...