Dev.to Security ๐Ÿ” Cybersecurity ๐Ÿ‘ 0 ๐Ÿ“– 4 min read

Building a Zero-Database Ephemeral Messenger: WebRTC E2EE, Audio DSP Scrambler, and RAM Wipe

Building a Zero-Database Ephemeral Messenger: WebRTC E2EE, Real-Time Audio DSP Scrambling, and RAM-Only Wipe Every modern secure messaging app makes the same promise: "Your messages are encrypted end-to-end." Yet, nea

Building a Zero-Database Ephemeral Messenger: WebRTC E2EE, Real-Time Audio DSP Scrambling, and RAM-Only Wipe

Every modern secure messaging app makes the same promise: "Your messages are encrypted end-to-end."

Yet, nearly all of them ask you for the most identifying piece of information tied to your physical identity: your mobile phone number. They sync your contact address book to central servers, register metadata timestamps, and persist conversation databases onto device storage. If a device is physically confiscated, seized, or subjected to forensic inspection, SQLite databases and cached media tokens tell the entire story.

I wanted something different. An off-grid, truly sovereign protocol that operates on zero-knowledge principles:

  • No phone numbers.
  • No accounts or email.
  • No central databases.
  • No permanent disk storage.
  • Real-time anti-biometric audio scrambling (165.2 Hz DSP).
  • 100% in-memory RAM execution (0x00 wipe on exit).

This project is called BOOFF. In this article, I will break down the engineering choices, WebRTC pipeline, Web Audio DSP tricks, and cryptographic design behind it.

๐Ÿ›ก๏ธ 1. The Architectural Premise: Volatile Memory Only

The foundational rule of BOOFF is simple:

If data touches persistent storage, it will eventually be leaked or decrypted.

Rather than encrypting a local database file, BOOFF runs entirely in browser memory (RAM) or inside a sandboxed lightweight standalone APK.

       [ OPERATOR A ]                                     [ OPERATOR B ]
   +--------------------+                             +--------------------+
   | Ephemeral RAM Only |                             | Ephemeral RAM Only |
   |   (Keys & State)   |                             |   (Keys & State)   |
   +---------+----------+                             +---------+----------+
             |                                                  ^
             |   1. Blind Ephemeral Handshake (WebRTC / MQTT)   |
             +--------------------------------------------------+
             |                                                  |
             |   2. E2EE AES-256-GCM / Web Audio DSP Stream     |
             +-------------------------------------------------->

The Atomic Panic Trigger (0x00 Sanitization)

When a user closes the browser tab, locks the app, or taps the [๐Ÿ’ฅ BOOM 0x00] tactical button:

  1. Buffers holding encryption keys are overwritten with zeros (0x00) via crypto.getRandomValues() followed by zero-fill.
  2. The active DOM tree containing chat text is unmounted and garbage-collected.
  3. The WebRTC RTCPeerConnection and data channels are forcefully closed.
  4. history.replaceState purges any URL parameters or session state.

Forensic recovery from memory dumps or disk carving yields absolutely nothing.

๐ŸŽ™๏ธ 2. Anti-Biometric Voice Protection: Real-Time 165.2 Hz DSP Scrambling

Traditional E2EE protects voice traffic from network eavesdropping, but it delivers pristine, biometric-grade voice audio to the other end. Modern automated transcription and voice recognition systems can analyze frequency spectra and match speakers against audio databases.

BOOFF integrates a live Hardware-like DSP Voice Scrambler directly in the browser via the Web Audio API:

// Web Audio API DSP Scrambler Pipeline
const audioCtx = new (window.AudioContext || window.webkitAudioContext)({ latencyHint: 'interactive' });
const source = audioCtx.createMediaStreamSource(micMediaStream);

// Carrier oscillator at tactical harmonic frequency
const carrierOsc = audioCtx.createOscillator();
carrierOsc.type = 'sawtooth';
carrierOsc.frequency.setValueAtTime(165.2, audioCtx.currentTime); // Sub-carrier scrambler

// Ring modulation / wave-shaping stage
const modulatorGain = audioCtx.createGain();
modulatorGain.gain.setValueAtTime(0.5, audioCtx.currentTime);

// Dual Biquad bandpass filter (voice spectrum isolation: 300Hz - 3100Hz)
const bandpass = audioCtx.createBiquadFilter();
bandpass.type = 'bandpass';
bandpass.frequency.setValueAtTime(1700, audioCtx.currentTime);
bandpass.Q.setValueAtTime(1.4, audioCtx.currentTime);

// Graph connection
source.connect(bandpass);
carrierOsc.connect(modulatorGain.gain);
bandpass.connect(modulatorGain);

// Destined for WebRTC PeerConnection Audio Track
const scrambledDest = audioCtx.createMediaStreamDestination();
modulatorGain.connect(scrambledDest);
peerConnection.addTrack(scrambledDest.stream.getAudioTracks()[0], micMediaStream);
carrierOsc.start();

What this accomplishes:

  • Disrupts machine learning speech-to-text models and voiceprint extraction algorithms.
  • Maintains human intelligibility for the designated conversation partner without needing cloud processing.
  • Zero server-side audio latency: audio transformation takes under 5 milliseconds directly on the client's audio hardware thread.

๐Ÿ“ฌ 3. The Blind Mailbox: 1-to-1 Offline Delivery Without a Central Database

A classic problem with serverless P2P messengers is: How do you send a message to a contact who is currently offline without storing it on a server?

BOOFF solves this using an Ephemeral Blind Mailbox over zero-retain MQTT brokers:

  1. Deterministic Channel Derivation: Each contact relationship derives a transient, pseudorandom blind mailbox topic derived from HKDF: $$\text{Topic} = \text{SHA256}(\text{SharedSecret} \parallel \text{DailyEpoch})$$
  2. Double Encryption: The message payload is encrypted with AES-256-GCM. The topic is anonymous and cannot be correlated to any IP or username.
  3. Immediate Auto-Sterilization (0x00): As soon as the recipient reconnects, the message is ingested directly into RAM. The client immediately dispatches an MQTT purge packet (retain: true, payload: ""), permanently deleting the packet from the relay.

๐Ÿ‘ฅ 4. Mutual Contact Sovereign Vault

Rather than scanning your phone's address book, BOOFF uses a Mutual Sovereign Vault (โญ):

[ Alice ]                                             [ Bob ]
     |                                                    |
     | 1. Ephemeral Request ("Add to Vault")              |
     +--------------------------------------------------->|
     |                                                    |
     | 2. Bob reviews tactical interest & accepts         |
     |<---------------------------------------------------+
     |                                                    |
     | 3. Automated IO-XXXX-YYYY Private Channel Setup    |
     |    AES-256 Encrypted in local protected Vault      |
  • Contacts are exchanged exclusively via reciprocal consent.
  • The address book is saved in an encrypted vault locked with the operator's private tactical PIN.
  • No central registry ever records who is friends with whom.

๐ŸŒ 5. Try It Live (Zero Download)

BOOFF is completely free, open-source, and requires no installation to test:

Test it in 30 seconds:

  1. Open the Web App on two different browser tabs (or on your phone and PC).
  2. Scan the dynamic QR code or share your instant ephemeral room code.
  3. Exchange an encrypted self-destructing text or photo.
  4. Tap [BOOM] to watch everything evaporate from memory.

๐Ÿš€ 6. What's Next: The Sovereign Community Channel (ยซOFFWEBยป)

We are currently architecting OFFWEB: an open, anonymous community space anchored right inside the application. It features a decentralized Idea Blackboard where users can post and upvote protocol improvements using cryptographic seals, bridging public discussions directly into private E2EE vaults.

If you care about sovereign computing, post-cloud architecture, and anti-surveillance protocols, check out the project, star the repo on Codeberg, and share your feedback!

Created by @aton-fux โ€” Sovereign Cyberpunk & Tactical Privacy Engineering.

๐Ÿ“ฐ Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.