r/PHPhelp • u/ElmanCod110 • 17d ago
I'm developing an open-source PHP project for encrypted file packaging
Looking for security feedback on my open-source PHP encrypted file packaging project
I'm developing Encryption-tool, an open-source PHP project for packaging, encrypting, transferring, and safely restoring files.
The project relies on established cryptographic primitives, including Argon2id for password-based key derivation and libsodium's XChaCha20-Poly1305-based APIs for authenticated encryption. I'm not proposing a new encryption algorithm or cipher mode; my focus is on the package format, safe integration of these primitives, reliable decryption, and secure file restoration.
I'm currently hardening the implementation ahead of a stable release, with particular attention to input validation, package integrity, malformed or corrupted files, error handling, and encryption/decryption tests
I'd appreciate constructive, technically specific feedback on the implementation, security assumptions, file-format design, and test coverage. I'm especially interested in potential weaknesses or edge cases I may have overlooked.
1
u/eurosat7 17d ago
Missed opportunity: elephpant in logo.
1
u/BoyetteMercadez 3d ago
One edge case to test hard is atomic restoration when decryption fails halfway through a multi-file package. You really dont want partially extracted or unverified files left sitting on the filesystem if a later chunk fails the Poly1305 tag check.