File Encryption and Decryption
Cryptology Monster supports AES-256-GCM encryption for files, including binary files. Unlike Text Encryption, File Encryption operates directly on the uploaded file's bytes.
Supported Input
The file encryption tool accepts files through the browser's file picker.
Examples include:
- Text documents
- Images
- PDFs
- Archives
- Source code
- Other binary files
Processing is subject to browser memory and file-size limitations.
Encrypting a File
- Select File Crypto.
- Choose a file under Encrypt File (AES-GCM).
- Select either password mode or random-key mode.
- Provide a password if required.
- Click Encrypt & Download.
- Save the generated files.
Random-Key Encryption
When password mode is disabled, the application generates a random AES-256 key.
Downloads
For a file named:
document.pdfthe downloaded files are:
document.pdf.enc
key.binEncryption Parameters
| Parameter | Value |
|---|---|
| Algorithm | AES-256-GCM |
| Key length | 256 bits |
| IV length | 12 bytes |
| Authentication tag | Included in encrypted output |
| Key output | Raw 32-byte file |
File Structure
[12-byte IV][Ciphertext and authentication tag]Decryption
- Select File Crypto.
- Choose the encrypted
.encfile. - Leave Password mode disabled.
- Select the matching
key.bin. - Click Decrypt.
- Save the recovered file.
The original filename is restored by removing the .enc suffix.
Password-Based File Encryption
When password mode is enabled, the application derives the AES key using PBKDF2.
Parameters
| Parameter | Value |
|---|---|
| Encryption | AES-256-GCM |
| Key derivation | PBKDF2-HMAC-SHA-256 |
| Iterations | 200,000 |
| Salt | Random 16 bytes |
| IV | Random 12 bytes |
| Key length | 256 bits |
Output
document.pdf.encNo separate key file is generated.
File Structure
[16-byte salt][12-byte IV][Ciphertext and authentication tag]Decryption
- Select File Crypto.
- Choose the
.encfile. - Enable Password mode in the decryption section.
- Enter the original password.
- Click Decrypt.
- Save the recovered file.
Text Encryption vs. File Encryption
The application has two AES-GCM workflows with different characteristics.
| Property | Text Encryption | File Encryption |
|---|---|---|
| Input | Text | File bytes |
| Password iterations | 100,000 | 200,000 |
| Random-key AES | 256-bit GCM | 256-bit GCM |
| Random-key IV | 12 bytes | 12 bytes |
| Password salt | 16 bytes | 16 bytes |
| Encrypted filename | encrypted.bin | Original name + .enc |
| Decryption output | Text area | Downloaded file |
Password-encrypted text files and password-encrypted file attachments are not directly interchangeable, because their PBKDF2 iteration counts differ.
Use the matching decryption tool.
Decryption Failures
Decryption may fail due to:
- Incorrect password
- Incorrect key file
- Corrupted ciphertext
- Missing authentication tag
- Incorrect encryption mode
- Incompatible encrypted file format
A failed authentication check means the application cannot establish the integrity of the ciphertext under the supplied key.
File Size and Performance
The tool reads the complete input file into browser memory.
Large files may consume significant memory during encryption and decryption.
The implementation is not a streaming encryption system.
Important Security Considerations
Protect the Key
Possession of both key.bin and the corresponding encrypted file is sufficient to decrypt random-key encrypted content.
Store keys securely.
Use Strong Passwords
Password-based encryption depends on the unpredictability of the chosen password.
PBKDF2 slows password guessing but does not make weak passwords strong.
Preserve the Output
If the encrypted file, key, or password is lost, recovery may be impossible.
Test Before Deleting
Always confirm that decryption succeeds before deleting an original file.
Recommended Workflow
- Keep an original backup.
- Encrypt a copy.
- Preserve the encrypted file and its required key material.
- Decrypt the result as a test.
- Verify that the recovered file opens correctly.
- Only then decide how to handle the original.
Warning: The File Crypto tool does not implement key recovery, password resetting, or cryptographic file repair.
Updated 9 days ago
