This year researchers expect the world to snap 1.35 trillion photographs, or about 3.7 billion per day. All those pixels take up a lot of room if they are stored on personal computers or phones, which is one reason why many people stash their images in the cloud. But unlike a hard drive, which can be encrypted to protect its data, cloud storage users have to trust that a tech platform will keep their private pictures safe. Now a team of Columbia University computer scientists has developed a tool to encrypt images stored on many popular cloud services while allowing authorized users to browse and display their photographs as usual.

Malicious attempts to access or leak cloud-based photographs, as well as accidental breaches, can expose personal information. In November 2019, for example, a bug in the popular photograph storage app Google Photos mistakenly shared some users’ private videos with strangers. Security experts also worry about employees at cloud storage companies deliberately accessing users’ images.

So the Columbia researchers came up with a system called Easy Secure Photos (ESP), which they presented at a recent conference. “We wanted to see if we could make it possible to encrypt data while using existing services,” says computer scientist Jason Nieh, one of the developers of ESP. “Everyone wants to stay with Google Photos and not have to register on a new encrypted-image cloud storage service.” Previous attempts to encrypt photographs while still storing them on existing cloud-based services have failed because most cloud platforms only work with image standard image files such as JPEGs, and the encrypted versions of images were saved as a different file type. In some cases, the services rejected the encrypted files as nonimages. In others, the platform tried to compress the encrypted files to reduce their size. Such image-processing techniques inadvertently corrupted the images so that they would no longer be viewable after decryption.

To overcome these challenges, the developers relied on the insight that image-processing techniques work on blocks of pixels. They created a tool that preserves these blocks but moves them around to effectively obscure the photograph. First, ESP’s algorithm splits a photograph into three separate files, each one containing the image’s red, green or blue color data. Then the system scrambles the pixel blocks around among these three files (allowing a block from the red file, for instance, to hide out in the green or blue ones). But the program does nothing within the pixel blocks, where all the image processing happens. As a result, the files remain valid images but end up looking like grainy black-and-white static to anyone who accesses them without the decryption key. This means they can still be compressed, which makes them compatible with many cloud storage platforms. And when an authorized user accesses the cloud from a device equipped with a decryption key, the photographs appear in their original forms.

To test ESP, the researchers implemented it in Simple Gallery, a popular image-gallery app for Android. Within this app, they used their system to encrypt photographs and then stored the hidden images on a cloud service—in the study, they worked with Google Photos, Flickr and Imgur—where the platform compressed the images. Subsequently, the researchers downloaded the compressed files and successfully decrypted them, showing their method could withstand the image processing. A minor downside to this technique, the ESP team claims, was a minor increase in download and upload time. The researchers have not finalized their future plans for ESP but say they may license the program to cloud storage companies or make it available to anyone on an open-access basis.

The tool’s ability to work on multiple tech platforms is key to its usefulness. “We’re living in a time where almost everything that we do is monitored intensely by a handful of companies,” says Charles Wright, a security and privacy expert at Portland State University and founder of Kombucha Digital Privacy Systems, who was not involved with the Columbia study. “There’s a lot of value in figuring out how we can keep all the benefits of the technology that we have, without also giving up all of our privacy.”

ESP also allows users to access their photographs from multiple devices. This has long been a challenge for researchers because the digital code used to encrypt a photograph has to be the same one used to decrypt it. The researchers have devised a system in which each device has its own unique key pair (a different approach from usual encryption systems, where a single key pair is copied across multiple devices). When a user authenticates a new device, this signals an already authorized device to share one of its keys with that new device in the form of a QR code. After that, both devices can decrypt the images, allowing the user to view files as normal color photographs.

Still, ESP’s encryption is not foolproof. Because the pixel values within the blocks are themselves not encrypted, Wright explains, extremely determined adversaries could start to identify the blocks and unscramble them to reconstruct part or all of an image (although this would be a difficult and time-consuming task). In addition to contending with hackers, privacy-minded ESP users may also face pushback from the cloud-based platform they use to store their photographs. Some of these platforms provide features, such as identifying objects within a photograph or grouping related pictures together in virtual albums, that rely on the ability to view unencrypted images. If any encryption tool were to become really popular, it would prevent the use of these features, and as a result, providers might start to crack down on it in various ways, Wright suggests. The Columbia team thinks users could find a middle ground in which they would use ESP to conceal particularly sensitive photographs while leaving the bulk of their images unencrypted.

Despite these difficulties, Wright thinks tools such as ESP are worthwhile. “Trying to protect users’ privacy and security is an exciting research problem precisely because it is so challenging,” he says. “It’s always going to be a fundamentally hard problem and a constant uphill battle.”