5-Layer Hybrid Encryption Protocol for Client-Side File Encryption
Zero-Knowledge Β· Client-Side Only Β· No Server Β· Military-Grade
- β 5-Layer Security - Argon2id β AES-256 β ChaCha20 β HMAC β Binary
- β Double Encryption - AES-256-CBC + ChaCha20 (Defense in Depth)
- β Military-Grade KDF - Argon2id (64 MB, 3 iterations)
- β Zero-Knowledge - 100% client-side, no server
- β Dual Auth - Password OR Keyfile (.gkey)
- β Simple Implementation - Single JS file, plug & play
- β File Support - Up to 1 GB (hardware & browser dependent)
<script src="ghostcrypt-v1/ghostcrypt-v1-bundle.min.js"></script><script src="ghostcrypt-dependencies/argon2.min.js"></script>
<script src="ghostcrypt-dependencies/crypto-js.min.js"></script>
<script src="ghostcrypt-dependencies/chacha20.min.js"></script>
<script src="ghostcrypt-v1/ghostcrypt-v1.min.js"></script>const file = await ghost('upload');
await ghost({
action: 'encrypt',
file: file,
keyMethod: 'password',
password: 'YourSecurePassword123!'
});
ghost('download');const file = await ghost('upload');
await ghost({
action: 'encrypt',
file: file,
keyMethod: 'keyfile'
});
ghost('download', 'ghost');
ghost('download', 'keyfile');const ghostFile = await ghost('upload');
const keyfile = await ghost('upload', 'keyfile');
await ghost({
action: 'decrypt',
file: ghostFile,
keyMethod: 'keyfile',
keyfile: keyfile.content
});
ghost('download');π Full API: GHOST_API.md
| Layer | Algorithm | Purpose |
|---|---|---|
| 0 | Argon2id | Key derivation (64 MB, 3 iter) |
| 1 | AES-256-CBC | Primary encryption |
| 2 | ChaCha20 | Secondary encryption |
| 3 | HMAC-SHA512 | Authentication & integrity |
| 4 | Binary Format | .ghost container (130B overhead) |
[0-4] Magic "GHOST" (5 bytes)
[5] Version (1 byte)
[6-37] Salt (32 bytes)
[38-53] AES IV (16 bytes)
[54-65] ChaCha Nonce (12 bytes)
[66-N] Encrypted Data (N bytes)
[N+1-END] HMAC Tag (64 bytes)
Total Overhead: 130 bytes
[0-4] Magic "GKEY!" (5 bytes)
[5] Version (1 byte)
[6-69] Key Material (64 bytes)
[70-101] Fingerprint (32 bytes)
Total: 102 bytes | Entropy: 512 bits
| File Size | Encryption | RAM Usage |
|---|---|---|
| 1 MB | ~0.5s | ~5 MB |
| 10 MB | ~2s | ~20 MB |
| 100 MB | ~15s | ~200 MB |
| 1 GB | ~2m 20s | ~2 GB |
Browser Support: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
- Brute-force resistance (Argon2id: ~500ms/attempt)
- Rainbow table resistance (unique salt)
- Padding oracle resistance (HMAC-first)
- Timing attack resistance (constant-time)
- File tampering detection (HMAC-SHA512)
- Quantum resistance (128-bit until ~2040)
- Requires strong passwords (12+ chars)
- Cannot protect against keyloggers
- Lost keyfiles = unrecoverable data
- Requires modern browser with Web Crypto API
π Technical Details: CODE_STRUCTURE.md
Q: Is my data sent to a server?
A: No! 100% client-side, nothing leaves your device.
Q: Can you recover my files if I lose my password?
A: No! Zero-knowledge encryption means we cannot access your files.
Q: How secure against quantum computers?
A: 128-bit post-quantum security (secure until ~2040-2050).
Q: Why double encryption?
A: Defense in Depth. If one algorithm breaks, the other remains secure.
GhostCrypt v1.0 Β© 2025 WebByte Studio Open Source & Free to Use
This software is free and open source. You are free to:
- β Use it for personal or commercial projects
- β Modify and adapt the code
- β Distribute and share it
- β Build upon it for your own projects
No warranty provided. Use at your own risk.
