Password Protect Sensitive Dropbox/Google Drive/iCloud/OneDrive Files

…And still have access to them on your phone.

Ikeda
Ikeda
Feb 5, 2018 · 4 min read

The year is 2020 —Dropbox finds evidence that some of their core infrastructure has been compromised. Unauthorized persons have gotten access to millions of user’s files.

You get a collection letter in the mail from a crypto exchange you’ve never heard of claiming margin trading has put you in the red for $300,000. You get a phone call from the FTC and they inform you that they suspect your identity has been stolen. Your life suddenly spirals out of control as your identity has been commoditized and sold on the dark web.

Rewind. What could you have done to prevent this?

Having access to tax returns, credit reports, ID scans etc. anywhere is undeniably convenient. Dropbox has saved me countless trips back home just to retrieve my passport, for instance, when working with official matters. It also serves as backup storage. On the other hand, it can be dangerous — considering if someone gained access to your device, they have a nicely bundled treasure trove of your personal data to work with.

If you have certain extra-sensitive files on your cloud storage or just in plain local storage, you might want to add an extra layer of security to just those certain files.

Encrypting the files on your end ensures your cloud provider can’t peep in your files even if they wanted to.

Best of all, you can still have convenient access to the documents and photos on mobile with the setup described below.

The hard way: use symmetric PGP encryption.

OpenPGP is a widely accepted standard and fits the bill for generic file encryption.

Unfortunately, PGP decryption is not something built into our phones. Which means to do the decrypt files on our phone later, we would need to install specialized apps.

I won’t go into gross detail on how to use PGP encryption and instead we’ll dive into an alternative simpler approach that most likely wont require installing anything additional.

A better way: PDF encryption.

A method that will work more universally without specialized apps, is password-protected PDFs.

A PDF can hold anything you like: documents, pictures, scans whatever — and it’s a format that both Androids and iPhones handle natively, even in encrypted form with a password.

Once you convert your most sensitive documents to PDF and password protect them, you will be prompted on your phone for the password to open them.

Voilà.

This is how it will look when you access a password protected PDF in Dropbox on iOS (on Android the experience parallels).

A healthy dose of peace of mind, in exchange for a sliver less of convenience!

Via Command Line (Mac/Linux)

Mac pre-requisites

$ brew install qpdf imagemagick

Linux pre-requisites

(make sure qpdf and ImageMagickare installed)

Linux/Mac instructions

  1. To convert an image (using ImageMagick)
$ convert in.jpg out.pdf

2. To encrypt (user-password is the important one for viewing/opening the PDF, owner-password can be left blank)

$ cat encrypt_params
--encrypt
user-password
owner-password
256
--

(qpdf > v7)

$ qpdf @encrypt_params in.pdf out.pdf

(qpdf < v7, not recommended)

$ qpdf --encrypt user-password owner-password 256 -- in.pdf out.pdf

Note: To do both things a heap of images (zsh syntax)

$ for x in *.jpg; do no_ext=${x:r}; convert $x $no_ext-tmp.pdf && qpdf @encrypt_params $no_ext-tmp.pdf $no_ext.pdf && rm $x $no_ext-tmp.pdf ; done

Via GUI (Windows/Mac)

It’s possible to convert images to PDFs using PowerShell with gm.exe (graphicsmagick), but it’s pretty hard to password encrypt PDFs using PowerShell. So here are instructions using Microsoft Office.

Windows

1. Open in Microsoft Office then File > Create PDF/XPS Document

Image for post
Image for post

2. Check Encrypt the document with a password

Image for post
Image for post

3. Confirm the password in the dialog box

Image for post
Image for post

Mac

  1. Open in Preview and press File > Export as PDF…

2. Check Encrypt, fill out the password fields, then Save

P.S. Your password should definitely consist of more than four characters.

Now go forth and encrypt! And help your less computer-savvy friends and family encrypt too!

HackerNoon.com

#BlackLivesMatter

Sign up for Get Better Tech Emails via HackerNoon.com

By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Ikeda

Written by

Ikeda

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Ikeda

Written by

Ikeda

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store