The internet is a dangerous place to leave personal data and documents floating around unprotected; you never know when someone will steal them.
That's why we need an extra layer of protection.
With this app, you can encrypt any type of file using AES-256 encryption, the strongest!
• Encrypt files, photos, videos, music, and any other type of file!
• You can also encrypt entire folders, creating a single package with multiple encrypted items! (Zip the folder, then encrypt the zip file)
PASSWORD ENCRYPTION
To further increase file security, this app also encrypts the password, making it even more difficult to crack.
For this reason, make sure you REMEMBER your passwords, or perhaps you can write them down for later use.
• NOTE: If you forget or lose your password, you will not be able to regain access to your files, and you may LOSE THEM PERMANENTLY!
For this reason, be sure to take good care of your passwords.
• The AES-256 encryption protocol is military-grade, making it nearly impossible to crack.
More information at:
https://cryptoid.com.br/criptografia/aes-padrao-de-criptografia-avancado-o-que-e-e-como-funciona/
Technical Data:
1. Cryptographic Algorithms and Mechanisms
- Key Derivation: PBKDF2 with HmacSHA256, 100,000 iterations, 16-byte salt.
Suitable for secure key derivation from the password.
- Encryption: AES-256 in CBC mode with PKCS5Padding and a 16-byte IV generated by SecureRandom.
AES-CBC is secure when combined with authentication (MAC). The code uses encrypt-then-MAC, correctly.
- Integrity and authenticity: HMAC-SHA256 over salt + IV + ciphertext.
Ensures protection against alterations and tampering.
2. Password and Key Handling
- Password read from the interface, copied to char[], used, and cleared immediately after use.
- Derived key separated into AES and HMAC parts, cleared after use.
- Redundant clearing in the finally section protects against memory leaks.
- Note: Clearing the Editable field in the background thread may not be ideal.
3. Encryption and Storage Flow
- Writes to the file: salt, IV, encrypted data, followed by the HMAC.
- Adjusts file permissions to restrict access.
- Correct use of streams to update HMAC during write.
4. Decryption and Verification Stream
- Reads salt and IV, derives keys, calculates HMAC to verify integrity before decryption.
- Uses LimitedInputStream to limit reading to the correct ciphertext length.
- Decrypts with CipherInputStream, writes to a temporary file.
- Securely deletes temporary file if an error occurs.
- Checks integrity before overwriting the final file.
5. Exception Handling and Cleanup
- Specific exceptions are handled with clear messages.
- Cleanup of sensitive variables and closing of streams performed in the finally section.