NGLCHAIN Technical Architecture & Protocol Specification
NGLChain is an uncompromising Zero-Knowledge (ZK), End-to-End Encrypted (E2EE) decentralized collaboration protocol built on a hybrid "Blockchain-Lite" cryptographic ledger and WebRTC multi-peer mesh. The host infrastructure operates strictly as a zero-knowledge dumb relay — possessing zero mathematical capability to read message payloads, inspect voice streams, reconstruct private keys, or trace participant identities.
1. Multi-Layered Architecture Blueprint
The NGLChain system is designed across 5 decoupled, fault-tolerant architectural layers to guarantee resilience against both passive network eavesdropping and active server compromise:
Single-Page Web Application running in isolated browser memory. Implements hardware-accelerated fluid responsive UI, micro-animations, touch-friendly floating action toolbars (React, Reply, Forward), and zero persistent plaintext storage.
Self-destructing countdown engine (Peek & Burn with refresh lock), Decoy Traffic Obfuscation generator, Panic Lock emergency memory-wipe, and LSB Image Steganography carrier encoding.
PBKDF2-SHA256 (100k rounds), AES-GCM-256 with 96-bit unique IVs, BIP-39 mnemonic seed recovery, Shamir's Secret Sharing (3-of-5 threshold shards), and SHA-256 Merkle block hash chaining with client-side PoW mining.
Dual-plane transport: Supabase Realtime WebSockets for persistent blockchain block synchronization alongside a full WebRTC P2P mesh (Perfect Negotiation) for Voice Calls, Selective Screen Sharing, and Canvas drawing.
Segmented Cyber Suite with in-field tactical modules (OPSEC, MESH, MEDIA), real-time high-resolution execution profiler (performance.now()), automated cryptographic suite benchmarks, and Global Planetary Geo-Mesh radar with out-of-range azimuth beacons (>50,000 km).
2. Cryptographic Architecture & Key Management
Passphrases undergo 100,000 rounds of PBKDF2 with SHA-256, salted with the room UUID. Payloads are encrypted with AES-GCM-256 using a cryptographically randomized 96-bit IV per message.
Implements 3-of-5 Shamir's Secret Sharing (SSS) over GF(256) finite fields. Splits master recovery passphrases into 5 shards (.txt) — any 3 shards reconstruct the key, while 2 shards reveal zero mathematical entropy.
Optical key exchange via animated high-density ECC-Q QR codes. Devices exchange encrypted session tokens offline using their camera without sending any key material over network cables or radio waves.
3. WebRTC Multi-Peer Mesh & Live Media Protocol
Perfect Negotiation Pattern
Solves WebRTC signaling collisions and race conditions during simultaneous renegotiation using deterministic polite/impolite peer roles, rollback on collision, and auto-recovery of dead transceiver streams.
P2P Voice Mesh & VAD
Fully decentralized audio conference mesh with Voice Activity Detection (VAD) visualizer, automatic session persistence across browser refresh, and mobile touch unlock for iOS/Safari AudioContext restrictions.
Selective Peer Screen Sharing
Target live screen broadcast to specific peers in the room. Includes Ultra HD / 60 FPS quality profiles, a persistent floating watch banner, and a floating cinema modal player with multi-stream switching.
4. OpSec Suite, Cyber Tools Hub & Tactical Telemetry
Selectable self-destruct timers (15s / 30s / 45s). Once revealed, the timer runs in browser memory with anti-refresh persistent lock, auto-purging the ciphertext and DOM node on expiration.
Background random decoy noise packets transmitted over P2P DataChannels to defeat deep packet inspection (DPI), packet timing analysis, and ISP metadata profiling.
Instant red button to purge sessionStorage, destroy in-memory WebCrypto keys, and redirect to Wikipedia. Under coercion, entering a duress key opens a fake decoy chatroom.
Injects AES-256 ciphertext into the Least Significant Bits of pixel channels in PNG/JPG photos with NGLSTEG1 magic headers, rendering secret messages indistinguishable from innocent photos.
Real-time collaborative canvas with Pen, Rect, Line, Arrow, Eraser, 6 neon palettes, 20-step Undo History, PNG export, and 1-click broadcast to room chat.
Zero-Knowledge location telemetry with dynamic Planetary scaling (1km to 100,000km & AUTO), Great-Circle Haversine spherical math, Geographic Region & Hemisphere resolver, and Out-of-Range Rim Azimuth Beacons.
High-precision execution profiler measuring sub-millisecond execution times (performance.now()), live cryptographic benchmarks, memory analytics, and JSON export.
Modular action hub categorized into OPSEC (Stego, SSS, QR, Noise, TTL), MESH (Voice, Topology, Whiteboard, Radar), and MEDIA (Encrypted Photos, Audio, 50MB Direct P2P File transfers).
5. Blockchain-Lite Ledger & Consensus Engine
Merkle Block Hash Chaining
Every message block is linked to its predecessor:
Block_n = SHA-256(PrevHash + Ciphertext + Nonce + Timestamp)
Modifying or injecting historical messages breaks the cryptographic chain, instantly triggering the automated client freeze and alert system.
Proof-of-Work (PoW) Anti-Spam
Prevents network spam and DoS attacks by forcing clients to compute a SHA-256 Proof-of-Work puzzle in background Web Workers prior to broadcast. Mining times dynamically balance around ~3,000ms.
6. Ephemeral TTL & Automated Database Purge
Granular Message TTL (1m - 24h)
Room creators can configure auto-burn TTL timers (1 minute, 5 minutes, 1 hour, or 24 hours). Expired blocks are automatically pruned from client views and purged from storage.
Automated pg_cron Inactivity Purge
PostgreSQL stored procedure purge_inactive_chains(7) executes daily via pg_cron to wipe abandoned chains, poll records, and all cryptographic ledger events permanently.
7. System Diagnostics & Cache Reset
If experiencing outdated cache or network desynchronization after a major version upgrade, use the force update tool below to purge Service Workers and reload fresh client assets.
NGLChain Bug Bounty & Vulnerability Disclosure Policy Safe Harbor
Official security research and vulnerability disclosure program. Report NGLChain vulnerabilities to earn bounty rewards and receive Hall of Fame recognition.
NGLChain Protocol Specification • App v2.6.79 • Script v2.6.79 • SW Cache v2.10.61