Client-side AES-256-GCM zero-knowledge encryption library. Browser-native Web Crypto API, no dependencies. Powers FileShot.io.
30
stars
1
commits
HTML
primary language
Jun 3, 2026
updated
Client-side, open-source zero-knowledge encryption used by FileShot.io.
All encryption happens in the browser via the Web Crypto API. The server receives only ciphertext — it never sees the key, the password, or the plaintext file.

FileShot uses two modes of zero-knowledge encryption, both implemented in this library:
#key=...) of the share link.The server is architecturally incapable of decrypting the file even under compulsion.
Users may optionally set a password. The key is derived from the password via Argon2id (memory: 64 MB, iterations: 2, parallelism: 1) — a memory-hard KDF that resists GPU and ASIC brute-force attacks. The password itself is never transmitted. The recipient enters the password in their browser to decrypt.
Files encrypted before this migration used PBKDF2-SHA256 (100,000 iterations) and are still fully decryptable — the format version byte in the binary header selects the correct KDF automatically.
| Parameter | Value |
|---|---|
| Cipher | AES-256-GCM |
| Key derivation (new) | Argon2id — memory: 64 MB, iterations: 2, parallelism: 1 |
| Key derivation (legacy) | PBKDF2-SHA256, 100,000 iterations (backward compat) |
| Salt | 32 bytes, random per-file (legacy: 16 bytes) |
| IV | 12 bytes, random per-encryption |
| Key size | 256 bits |
| Implementation | Pure JS, inline — no WASM, no external dependencies |
| Crypto API | Web Crypto API (AES-GCM only; KDF is pure JS) |
demo.html in any modern browser.No server involved. Works fully offline.
<script src="zero-knowledge.js"></script>
<script>
const file = document.getElementById('fileInput').files[0];
// Encrypt
const { encryptedBlob, metadata } = await window.zeroKnowledgeEncrypt(file, 'strong-password');
// Decrypt
const decryptedBlob = await window.zeroKnowledgeDecrypt(
encryptedBlob,
'strong-password',
metadata.originalName,
metadata.originalType
);
</script>
zeroKnowledgeEncrypt(file, password)Encrypts a File or Blob client-side.
Returns:
{
encryptedBlob: Blob, // AES-256-GCM ciphertext
metadata: {
originalName: string, // Original filename
originalSize: number, // Original size in bytes
originalType: string, // Original MIME type
encryptedSize: number // Encrypted size in bytes
}
}
zeroKnowledgeDecrypt(encryptedBlob, password, originalName, originalType)Decrypts an encrypted Blob client-side.
Returns: A Blob containing the decrypted file, with the original filename and MIME type.
User selects file + password
|
v
Generate random 32-byte salt
Generate random 12-byte IV
|
v
Argon2id(password, salt, m=64MB, t=2, p=1) → 256-bit AES key
|
v
AES-256-GCM encrypt(file bytes, key, IV)
|
v
Output: [0x02][salt32][IV12][ciphertext+auth tag]
|
v
Only ciphertext leaves the browser
Legacy (PBKDF2) format: [salt16][IV12][ciphertext+auth tag]
(auto-detected on decrypt — no version byte present)
fileshot-zke/
├── zero-knowledge.js # Core encryption/decryption library (Argon2id + PBKDF2 fallback)
├── demo.html # Standalone browser demo
├── test-argon2id.html # In-browser test suite
├── README.md
└── LICENSE # MIT
| Browser | Minimum Version |
|---|---|
| Chrome | 37+ |
| Firefox | 34+ |
| Safari | 11+ |
| Edge | 12+ |
| Opera | 24+ |
All modern browsers support the Web Crypto API. No polyfills needed.
crypto.subtle API.This library powers FileShot.io — a zero-knowledge file sharing service.
Plans:
| Plan | File Size Limit | Storage | Price |
|---|---|---|---|
| Free | 10 GB per file | 50 GB total | $0 |
| Lite | 50 GB per file | Unlimited | $2/mo |
| Pro | 100 GB per file | Unlimited | $5/mo |
| Creator | 300 GB per file | Unlimited | $12/mo |
You can audit the encryption running in production at: https://fileshot.io/verify-encryption.html
FileShot also has an open-source Electron desktop app: github.com/FileShot/fileshot-desktop
Features tray integration, drag-and-drop uploads, background transfers, and a virtual FileShot Drive.
Report vulnerabilities privately: fileshot.adm@gmail.com
Open test-argon2id.html in any modern browser and click Run All Tests. The suite covers:
No server required — runs fully offline.
MIT — see LICENSE.
Copyright (c) 2025 FileShot.io
1 commits
HTML
60.8%
JavaScript
39.2%
Client-side AES-256-GCM zero-knowledge encryption library. Browser-native Web Crypto API, no dependencies. Powers FileShot.io.
30
stars
1
commits
HTML
primary language
Jun 3, 2026
updated
Client-side, open-source zero-knowledge encryption used by FileShot.io.
All encryption happens in the browser via the Web Crypto API. The server receives only ciphertext — it never sees the key, the password, or the plaintext file.

FileShot uses two modes of zero-knowledge encryption, both implemented in this library:
#key=...) of the share link.The server is architecturally incapable of decrypting the file even under compulsion.
Users may optionally set a password. The key is derived from the password via Argon2id (memory: 64 MB, iterations: 2, parallelism: 1) — a memory-hard KDF that resists GPU and ASIC brute-force attacks. The password itself is never transmitted. The recipient enters the password in their browser to decrypt.
Files encrypted before this migration used PBKDF2-SHA256 (100,000 iterations) and are still fully decryptable — the format version byte in the binary header selects the correct KDF automatically.
| Parameter | Value |
|---|---|
| Cipher | AES-256-GCM |
| Key derivation (new) | Argon2id — memory: 64 MB, iterations: 2, parallelism: 1 |
| Key derivation (legacy) | PBKDF2-SHA256, 100,000 iterations (backward compat) |
| Salt | 32 bytes, random per-file (legacy: 16 bytes) |
| IV | 12 bytes, random per-encryption |
| Key size | 256 bits |
| Implementation | Pure JS, inline — no WASM, no external dependencies |
| Crypto API | Web Crypto API (AES-GCM only; KDF is pure JS) |
demo.html in any modern browser.No server involved. Works fully offline.
<script src="zero-knowledge.js"></script>
<script>
const file = document.getElementById('fileInput').files[0];
// Encrypt
const { encryptedBlob, metadata } = await window.zeroKnowledgeEncrypt(file, 'strong-password');
// Decrypt
const decryptedBlob = await window.zeroKnowledgeDecrypt(
encryptedBlob,
'strong-password',
metadata.originalName,
metadata.originalType
);
</script>
zeroKnowledgeEncrypt(file, password)Encrypts a File or Blob client-side.
Returns:
{
encryptedBlob: Blob, // AES-256-GCM ciphertext
metadata: {
originalName: string, // Original filename
originalSize: number, // Original size in bytes
originalType: string, // Original MIME type
encryptedSize: number // Encrypted size in bytes
}
}
zeroKnowledgeDecrypt(encryptedBlob, password, originalName, originalType)Decrypts an encrypted Blob client-side.
Returns: A Blob containing the decrypted file, with the original filename and MIME type.
User selects file + password
|
v
Generate random 32-byte salt
Generate random 12-byte IV
|
v
Argon2id(password, salt, m=64MB, t=2, p=1) → 256-bit AES key
|
v
AES-256-GCM encrypt(file bytes, key, IV)
|
v
Output: [0x02][salt32][IV12][ciphertext+auth tag]
|
v
Only ciphertext leaves the browser
Legacy (PBKDF2) format: [salt16][IV12][ciphertext+auth tag]
(auto-detected on decrypt — no version byte present)
fileshot-zke/
├── zero-knowledge.js # Core encryption/decryption library (Argon2id + PBKDF2 fallback)
├── demo.html # Standalone browser demo
├── test-argon2id.html # In-browser test suite
├── README.md
└── LICENSE # MIT
| Browser | Minimum Version |
|---|---|
| Chrome | 37+ |
| Firefox | 34+ |
| Safari | 11+ |
| Edge | 12+ |
| Opera | 24+ |
All modern browsers support the Web Crypto API. No polyfills needed.
crypto.subtle API.This library powers FileShot.io — a zero-knowledge file sharing service.
Plans:
| Plan | File Size Limit | Storage | Price |
|---|---|---|---|
| Free | 10 GB per file | 50 GB total | $0 |
| Lite | 50 GB per file | Unlimited | $2/mo |
| Pro | 100 GB per file | Unlimited | $5/mo |
| Creator | 300 GB per file | Unlimited | $12/mo |
You can audit the encryption running in production at: https://fileshot.io/verify-encryption.html
FileShot also has an open-source Electron desktop app: github.com/FileShot/fileshot-desktop
Features tray integration, drag-and-drop uploads, background transfers, and a virtual FileShot Drive.
Report vulnerabilities privately: fileshot.adm@gmail.com
Open test-argon2id.html in any modern browser and click Run All Tests. The suite covers:
No server required — runs fully offline.
MIT — see LICENSE.
Copyright (c) 2025 FileShot.io
1 commits
HTML
60.8%
JavaScript
39.2%