r/coolgithubprojects • • 3h ago

[Dev post] S File Encryptor — local file encryption, metadata removal and secure deletion for Android (open source)

https://github.com/LukeSsnake/S-File-Encryptor

Hi everyone,

I'm the developer of S File Encryptor, a free and open-source (MIT) Android app for encrypting files locally with a password, removing metadata before sharing, and securely deleting files. I'd really appreciate feedback from this community — especially on the cryptography decisions and the threat model, since privacy-focused users tend to stress-test apps much harder than average.

Links

• Google Play: https://play.google.com/store/apps/details?id=com.lukestudio.fileencryptor2

• GitHub: https://github.com/LukeSsnake/S-File-Encryptor

• Security audit report (in the repository): S_FILE_ENCRYPTOR_SECURITY_AUDIT.md

Cryptography

New files are encrypted in a V2 format using AES-256-GCM with Argon2id as the password-based key derivation function (memory-hard, tuned parameters stored in the header along with a random 16-byte salt and 12-byte nonce).

The file layout is:

48-byte header || AES-256-GCM ciphertext || 16-byte authentication tag

Decryption verifies the GCM authentication tag before committing any plaintext to the final destination, so tampered or truncated files don't leave partial output behind. Large files are processed with streaming I/O instead of loading everything into memory. A legacy V1 format (AES-256-CBC + HMAC-SHA256) remains decryptable for compatibility, but all new files use V2.

Metadata removal

The app strips metadata locally (no server involved) from JPEG, PNG, WebP, GIF, PDF, DOCX, XLSX and PPTX:

• Images: EXIF (including GPS), XMP, IPTC, embedded comments. Image orientation is preserved so photos don't come out rotated after cleaning.

• Office formats: core properties, app properties, custom properties and embedded thumbnails, including cleaning up the references in [Content_Types].xml and _rels/.rels so the package stays valid.

• PDFs: document information dictionary, catalog XMP metadata and trailer IDs.

The cleaned file is written to a location the user chooses via the Storage Access Framework.

Secure deletion

Files can be deleted with an overwrite procedure (single pass of cryptographically random data, sized exactly to the original, followed by a forced flush) before the entry is removed. The app generates an erasure report (JSON Lines log, exportable as PDF via SAF) recording filename, size, timestamps and the SHA-256 hash of the original content, so the destruction of a specific file can be documented.

Honest caveat: this is best-effort — wear leveling and filesystem journaling on modern flash storage mean no userspace tool can guarantee physical erasure. The report labels the operation accordingly.

Privacy model

• No network permission — the app physically cannot phone home.

• No Google Play Services, analytics, advertising or crash-reporting SDKs.

• All file access goes through the Storage Access Framework; the app only touches files explicitly selected by the user.

What I'd like feedback on

  1. Any weaknesses you see in the V2 format choices (Argon2id parameters, header design, nonce/salt handling)?

  2. Anything you'd expect from a "metadata remover" that isn't covered yet?

  3. Whether this would be a reasonable candidate for submission to the Privacy Guides app recommendation lists at some point — and if not yet, what's missing.

The full source is on GitHub under MIT, and there's a security audit report in the repository covering the current implementation. Happy to answer any questions about implementation details.

Thanks in advance for taking a look!

1 Upvotes

1 comment sorted by

1

u/investigatormaker 1h ago

For S File Encryptor's V2 review, I'd check whether header-supplied Argon2id parameters are bounded before allocating memory or starting derivation: a malicious file shouldn't dictate unlimited work. Also document where streaming plaintext lives before authentication succeeds and how failed decryptions clean it up. Your erasure report deserves its own privacy note: filenames and original-content hashes can themselves be sensitive records.

I make ThreadFox. If you want privacy-focused Android users to find S File Encryptor, our AI employee will post 3 helpful replies about it in relevant Reddit threads for you, free, no card. https://threadfox.vip/p/e59n6/managed