Security Architecture

A transparent look at how we implement end-to-end encryption using native web APIs.

Overview

SecureShare utilizes a hybrid encryption system. We use symmetric encryption (AES-256-GCM) for fast file encryption, and asymmetric encryption (RSA-OAEP) for secure key exchange. All cryptographic operations are performed on the client side using the standard Web Crypto API.

Client-Side Only

Keys are generated in the browser. Unencrypted data never touches the network.

Native APIs

Relying on standard Web Crypto API rather than custom cryptography.

File Encryption (AES-GCM)

Every time a file is uploaded, a unique AES-256 key is generated. The file is encrypted using AES-GCM (Galois/Counter Mode).

  • • Key Length: 256 bits
  • • IV: 96-bit random nonce
  • • Authentication: Built-in GCM auth tag prevents tampering

Key Exchange (RSA-OAEP)

To securely share the AES key with the server or a recipient, we wrap it using RSA-OAEP.

  • • Key Size: 2048 bits
  • • Hash Algorithm: SHA-256
  • • Private Key Storage: IndexedDB (non-extractable)

Key Management & Recovery

Upon registration, an RSA key pair is generated in your browser.

  1. The Public Key is sent to the server. Anyone can use this to encrypt files meant for you.
  2. The Private Key is saved locally in IndexedDB marked as extractable: false.
  3. For backup, the user is provided a 12-word mnemonic phrase.
  4. This phrase is used to derive a strong AES key (using PBKDF2). The private key is encrypted with this derived key and the encrypted blob is sent to the server.

If you log in from a new device, you input the 12-word phrase. The browser derives the AES key, pulls the encrypted private key from the server, decrypts it locally, and saves it to the new device's IndexedDB. The server never sees the unencrypted private key or the mnemonic phrase.