← Back to TextSafe

Security Architecture

How TextSafe protects your data, and the limits of that protection.

The Core Principle

TextSafe operates on a zero-knowledge model. The server stores data it cannot read. Your text is encrypted in your browser before transmission, using keys derived from credentials that never leave your device.

If an attacker gained complete access to the database, they would find only encrypted blobs. Without the original passcode and color for each entry, the plaintext cannot be recovered.

Cryptographic Implementation

AES-256-GCM

Symmetric encryption with 256-bit keys. GCM mode provides both confidentiality and authenticity. Tampering with ciphertext is detectable.

PBKDF2-SHA256

Key derivation with 100,000 iterations. Converts your passcode and color into a cryptographic key. The iteration count makes brute-force attacks computationally expensive.

Random Initialization Vectors

Each encryption operation generates a fresh 12-byte IV using crypto.getRandomValues(). The IV is prepended to the ciphertext.

SHA-256 Storage IDs

The encryption key is hashed to create a 64-character hex storage identifier. This hash is one-way. The server cannot derive the key from it.

Data Handling

What the server stores

What the server never receives

Data Deletion

A background process runs every hour and executes DELETE FROM secure_storage WHERE expires_at < NOW(). Expired rows are permanently removed from the database. Rate limiting data (IP addresses) is purged after 24 hours via a similar mechanism.

Threat Model

TextSafe provides protection against:

Known Limitations

TextSafe does not protect against:

TextSafe is designed for temporary, private storage. For long-term secrets or high-value data, use dedicated tools like PGP, hardware security keys, or encrypted local storage.

Questions?

The implementation uses standard Web Crypto APIs with well-documented behavior.

Back to TextSafe