Foil Pics

Your rating: None Average: 4.6 (29 votes)

Foil Pics allows you to encrypt some pictures from the gallery with a password stronger than the lock code. Strictly speaking, each picture is encrypted with a unique random 256-bit AES key which in turn is encrypted with an RSA key which in turn is encrypted with your password. If the bad guys get your encrypted pictures, they would have to crack the AES key (different for each picture) or the RSA key (shared by all pictures but harder to crack) in order to extract the content. If they get the encrypted RSA key as well, then they can brute force your password. So in the end, the encryption is as strong as your password.

The format of the encrypted file is described here.

The RSA key is stored in ~/.local/share/foil/foil.key - you can copy it from one device to another. Using the same RSA key on different devices, protected with different passwords, is actually not such a bad idea. If you forget the password, you can use the backup key to decrypt the images, assuming that it has a different password that you still remember.

Note that you can add your encrypted files and the Foil key to the backup with the help of My Backup app.

Source code:

Application versions: 
File harbour-foilpics-1.0.18-1.armv7hl.rpm253.12 KB08/09/2021 - 04:58
File harbour-foilpics-1.0.18-1.aarch64.rpm278.03 KB08/09/2021 - 04:58
File harbour-foilpics-1.0.18-1.i486.rpm287.11 KB08/09/2021 - 04:58
File harbour-foilpics-1.0.17-1.armv7hl.rpm247.35 KB25/07/2021 - 06:43
File harbour-foilpics-1.0.17-1.aarch64.rpm272.51 KB25/07/2021 - 06:43
File harbour-foilpics-1.0.17-1.i486.rpm281.85 KB25/07/2021 - 06:43
File harbour-foilpics-1.0.16-22.1.armv7hl.rpm224.74 KB27/03/2021 - 22:32
File harbour-foilpics-1.0.16-22.1.aarch64.rpm257.38 KB27/03/2021 - 22:32
File harbour-foilpics-1.0.16-22.1.i486.rpm277.01 KB27/03/2021 - 22:32
File harbour-foilpics-1.0.15-21.1.armv7hl.rpm222 KB19/02/2021 - 14:31
File harbour-foilpics-1.0.15-21.1.i486.rpm274.2 KB19/02/2021 - 14:31
File harbour-foilpics-1.0.14-20.1.armv7hl.rpm224.79 KB21/11/2020 - 22:42
File harbour-foilpics-1.0.14-20.1.i486.rpm277.25 KB21/11/2020 - 22:42
File harbour-foilpics-1.0.13-19.1.armv7hl.rpm220.23 KB05/01/2020 - 04:38
File harbour-foilpics-1.0.13-19.1.i486.rpm272.15 KB05/01/2020 - 04:38
File harbour-foilpics-1.0.12-18.1.armv7hl.rpm220.2 KB04/12/2019 - 05:11
File harbour-foilpics-1.0.12-18.1.i486.rpm272.52 KB04/12/2019 - 05:11
File harbour-foilpics-1.0.11-17.1.armv7hl.rpm219.24 KB04/12/2019 - 02:33
File harbour-foilpics-1.0.11-17.1.i486.rpm271.24 KB04/12/2019 - 02:33
File harbour-foilpics-1.0.10-16.1.armv7hl.rpm218.93 KB09/11/2019 - 19:22
File harbour-foilpics-1.0.10-16.1.i486.rpm270.56 KB09/11/2019 - 19:22
File harbour-foilpics-1.0.8-11.1.armv7hl.rpm201.69 KB11/11/2018 - 23:03
File harbour-foilpics-1.0.8-11.1.i486.rpm250.99 KB11/11/2018 - 23:03
File harbour-foilpics-1.0.7-10.1.armv7hl.rpm198.85 KB25/06/2018 - 12:32
File harbour-foilpics-1.0.7-10.1.i486.rpm248.06 KB25/06/2018 - 12:32
File harbour-foilpics-1.0.6-9.1.armv7hl.rpm196.17 KB04/03/2018 - 13:23
File harbour-foilpics-1.0.6-9.1.i486.rpm242.49 KB04/03/2018 - 13:23
File harbour-foilpics-1.0.5-8.1.armv7hl.rpm190.51 KB16/02/2018 - 23:02
File harbour-foilpics-1.0.5-8.1.i486.rpm237.62 KB16/02/2018 - 23:02
File harbour-foilpics-1.0.4-7.1.armv7hl.rpm188.99 KB15/02/2018 - 02:03
File harbour-foilpics-1.0.4-7.1.i486.rpm234.6 KB15/02/2018 - 02:03
File harbour-foilpics-1.0.2-5.1.armv7hl.rpm147.54 KB11/12/2017 - 20:26
File harbour-foilpics-1.0.2-5.1.i486.rpm181.81 KB11/12/2017 - 20:26
File harbour-foilpics-1.0.1-4.1.armv7hl.rpm144.45 KB10/12/2017 - 14:58
File harbour-foilpics-1.0.1-4.1.i486.rpm178.56 KB10/12/2017 - 14:58
File harbour-foilpics-1.0.0-3.1.armv7hl.rpm132.5 KB02/12/2017 - 19:54
File harbour-foilpics-1.0.0-3.1.i486.rpm165.84 KB02/12/2017 - 19:54
  • 1.0.18 (Sep 8 2021)
    - Link all Qt_5_PRIVATE_API functions dynamically
  • 1.0.17 (Jul 25 2021)
    - Allow to copy image details to clipboard
    - Handle the case when in-app sharing is unavailable
  • 1.0.16 (Mar 27 2021)
    - Added image details item to the context menu
    - Miscellaneous UI tweaks
    - Provided 64-bit package
  • 1.0.15 (Feb 19 2021)
    - Fixed selection of multiple encrypted photos (Juho Hämäläinen)
    - Integration with My Backup
  • 1.0.14 (Nov 21 2020)
    - Adapted to changes in Sailfish OS
    - Polished landscape layouts
    - Fixed EncryptedPage hint behavior
    - Replaced Animators (which suck) back with Animations
  • 1.0.13 (Jan 5 2020)
    - Delay autolock by 15 seconds
    - Tweaked key generation UI
    - Improved Chinese translation
  • 1.0.12 (Dec 4 2019)
    - Updated Chinese translation
  • 1.0.11 (Dec 4 2019)
    - Fixed details view for unecrypted pictures
    - Better check for password being too short
    - Minor UI tweaks
  • 1.0.10 (Nov 9 2019)
    - New selection UI
    - Improved landscape layouts
    - A few fancy bells and whistles here and there
    - Translation fixes
    - Chinese translation
  • 1.0.9 (broken)
  • 1.0.8 (Nov 11 2018)
    - Support for light ambiances in Sailfish 3.0
    - Minor UI and performance improvements
  • 1.0.7 (Jun 23 2018)
    - Freshened up the list of sharing methods
    - Use attached pages in the main view
    - Trying to improve QML performance
    - Avoid unnecessary overwrites of info file
    - No more ContextMenu deprecation warnings
    - Updated French, German and Polish translations
  • 1.0.6 (Mar 4 2018)
    - Fixed compatibility with Sailfish OS 2.0
    - Performance improvements
  • 1.0.5 (Feb 16 2018)
    - Fixed a problem with deleting multiple encrypted pictures
    - Proper support for images larger than maximum texture size
    - Added Hungarian translations
    - Updated French translations
  • 1.0.4 (Feb 14 2018)
    - Support for multiple selection
    - Encrypted images can be grouped
    - Dutch translations
    - Polish translations
    - Spanish translations
  • 1.0.3 (broken)
  • 1.0.2 (Dec 11 2017)
    - Navigation between images in fullscreen mode
    - Swedish translations
    - German translations
  • 1.0.1 (Dec 10 2017)
    - Details page for encrypted and gallery images
    - Title of the encrypted image is editable (via details page)
    - French translations
  • 1.0.0 (Dec 2 2017)
    - Initial version


slava's picture

Version 1.0.1 is identical to the Jolla store version (as is 1.0.0).

slava's picture

So is 1.0.2 and all upcoming versions until it's explicitely stated that OpenRepos and Jolla store versions have diverged.

jfebrer's picture

It would be great also for simple text files.

slava's picture

Foil Notes :) Hmm... why not?

cvp's picture

Thank you for the nice app!!

Are you planning to add support for videos as well?

slava's picture

Videos are significantly larger than images meaning that a) they don't fit entirely into RAM and b) decrypting the entire video would take considerable time. So they have to be somehow decrypted on the fly and fed into the video player, to avoid creating temporary files (readable by other processes). It's doable (e.g. by emulating some sort of a network stream) but it doesn't look like an easy task.

slava's picture

or alternatively, a decrypted video could be exposed via fuse filesystem, as a file available only to the current process. It's worth noting that in either case (fuse or network source emulation) decrypted data would have to pass through kernel, making it available for stracing by a sufficiently privileged process. That may not be acceptable to real paranoics :)

slava's picture

(continuing to talk to myself) Even though decrypted images never leave the app's address space, a real paranoic would still say that a sufficiently privileged process could read the app's memory and extract images from there. Oh well, there's no safe place in the world for real paranoics. This app is more about securing files in the internal storage than protecting against realtime hacking. If you have a rogue provileged process running on your phone, you are screwed anyway. So I guess either network emulation or a fuse file would be ok for the purposes of this app.

DarkTuring's picture


ferlanero's picture

An absolute must to to protect your privacy! Thanks!

TMavica's picture

Nice apps!

Kelmi's picture

Awesome, thank you! I really like this app for my xperia x. ;)

Caballlero's picture

Nice; thanks for this.

Bocephus's picture

Yes! This is an essential feature that was missing from SfOS. Thank you!

t0t3u's picture

Great job!

minitreintje's picture

Great idea! Installing as we speak :)

Erdrandbewohner's picture

Great! Works perfect. Thank you! :)

slava's picture

With a few hacks I managed to make it compatible with Jolla Store, so it should appear there too at some point.

slava's picture

Yep, it's there.

lkdhf's picture

Brilliant, thanks!