Engineering Blog

Engineering: Cryptographic Sinks in LocalStorage

Defusing XSS extraction vectors by encrypting browser storage with the native Web Crypto API in zero-trust environments.

The Threat of XSS

If an application saves API keys inside raw localStorage, any successful XSS injection will immediately siphon those tokens to a bad actor.

Symmetric Enveloping

We apply AES-GCM encryption utilizing CryptoKey primitives derived during the initial user session. While the encrypted blob exists in localStorage, extracting it requires the session-state decryption key held strictly in volatile JS memory.