{{ mode === 'encrypt' ? 'Encryption Complete' : 'Decryption Complete' }}
{{ file?.name }}
{{ humanSize }} {{ mode === 'encrypt' ? 'Encrypted' : 'Decrypted' }}

Drag & drop or click to browse

{{ mode === 'encrypt' ? 'Encrypting…' : 'Decrypting…' }}

{{ file.name }} loaded

{{ error }}

Introduction:

Symmetric file encryption converts readable data into ciphertext using a shared secret key, ensuring only parties holding the same key can restore the original content. Algorithms such as AES-GCM and ChaCha20-Poly1305 combine confidentiality with built-in integrity checks, shielding documents from casual inspection, tampering, or accidental disclosure in routine storage scenarios.

The tool lets you select an encryption mode, type a memorable passphrase, and drop any local file onto its client-side engine. It derives a cryptographic key, generates a random nonce or vector, then runs the chosen algorithm to transform the payload. Decryption reverses the process when you provide the correct password, restoring an identical binary.

Use it before emailing sensitive research, archiving legal contracts on shared drives, or transporting backups on removable media, so only authorised recipients can read the contents. Always choose a strong, unique passphrase; weak or reused passwords can nullify encryption and expose data. Consider storing the key in a dedicated password manager to avoid loss or unauthorised reuse.

Technical Details:

Concept Overview

Modern authenticated encryption algorithms protect confidentiality and integrity in a single operation. AES-GCM combines the Advanced Encryption Standard block cipher with a Galois/Counter mode authentication tag, while ChaCha20-Poly1305 uses a stream cipher followed by a one-time-universal hash for 128-bit security on mobile or low-power devices. Both accept an initialization vector (IV) and secret key, producing ciphertext whose length equals the plaintext plus a fixed authentication tag under normal operating conditions.

Core Process

  1. Key derivation (K) – apply SHA-256 to the UTF-8 password with optional salt, then keep the first k bytes.
  2. Nonce (IV) – generate a random byte array whose length depends on the chosen algorithm.
  3. Encryption – feed plaintext, K and IV into the algorithm; receive ciphertext plus authentication tag.
  4. Packaging – concatenate IV with ciphertext and tag, then encode as Base 64 or hexadecimal text.

Algorithm Parameters

AlgorithmKey (bytes)IV (bytes)Tag (bytes)
AES-GCM 128-bit161216
AES-GCM 256-bit321216
ChaCha20-Poly1305321216
XChaCha20-Poly1305322416
Legacy CryptoJS Ciphers≤32

Worked Example

Encrypting a 1 MiB PDF with AES-GCM 256:

K=SHA-256("CorrectHorseBatteryStaple 7F3A…") IV=Random 12-byte nonce Cipher=AES-GCM(Plaintext, K, IV) Output=IVCipher

The resulting Base 64 text is 1 350 560 characters long and downloads as report.pdf.enc.

Assumptions & Limitations

  • Time-constant operations are assumed but not guaranteed by every browser.
  • Passwords shorter than 12 characters dramatically reduce brute-force resistance.
  • The tool relies on the host’s cryptographic API; outdated browsers may fall back to less-efficient libraries.
  • Integrity checks will fail if any byte of the ciphertext or IV is altered.

Edge Cases & Error Sources

  • Incorrect algorithm selection during decryption.
  • Hex-encoded inputs with odd lengths.
  • Files larger than available memory.
  • Clipboard interference when copying previews.

Scientific Validity & References

NIST SP 800-38D defines AES-GCM; RFC 8439 standardises ChaCha20-Poly1305; Bernstein’s papers model the security bounds of XChaCha20. Independent analyses confirm 128-bit integrity margins remain sufficient for non-streaming files.

Privacy & Compliance

This process handles cryptographic material entirely in the browser, aligning with GDPR and similar regulations on local-only data processing.

Step-by-Step Guide:

Follow this sequence to secure or unlock a file.

  1. Choose Encrypt or Decrypt.
  2. Drag-and-drop or click to select your local file.
  3. Select an Algorithm that matches your security needs.
  4. Enter a strong Password.
  5. (Optional) Expand Advanced to set IV, salt, or encoding.
  6. Press the action button, then download and safely store the result.

FAQ:

Is my data stored?

No. Every operation occurs in memory; refreshing or closing the tab erases all traces.

Which algorithm is best?

AES-GCM 256 offers industry-standard protection; XChaCha20-Poly1305 may perform better on mobile hardware.

Why add a salt?

Salt deters rainbow-table attacks by ensuring identical passwords produce different keys.

What if decryption fails?

Confirm the algorithm, password, and encoding match the original settings; any mismatch will trigger authentication errors.

Can I work offline?

Yes. Once the page is loaded, all functions continue without network access.

Glossary:

IV (Initialization Vector)
Random bytes ensuring unique ciphertext for identical plaintext.
Salt
Extra value mixed with a password before hashing.
SHA-256
256-bit hashing function used for key derivation.
Ciphertext
Encrypted data unreadable without the correct key.
Authenticated Encryption
Method combining secrecy with integrity verification.

Files are processed locally in your browser; nothing is uploaded. No data is transmitted or stored server-side.