In this post we will see how homomorphic encryption can be used to perform a mean filter over an encrypted image [1][2]. Why would anyone do that? Well, as long as you do the processing locally, encryption doesn’t make sense, but if you want to use an online service, are you sure you want to give your personal images to a remote web server? If your answer is no, keep reading this post.

Why mean filter?

A mean filter is used to create a blur effect. In some situations, this effect helps eliminate the noise from an image. There are many web services that allow you to apply a mean filter over an image [3][4]. All of these services work according to the following steps:

  1. You upload the image on the web server
  2. The image is process on the server (the mean filter is applied)
  3. You download the processed image returned by the server

The main problem of this approach is privacy: you give your personal image to a remote server you know nothing about! To solve this problem we add two more steps to the above procedure:

  1. You encrypt the image using your public key
  2. You upload the encrypted image on the web server
  3. The server processes the encrypted image
  4. You download the encrypted result returned by the server
  5. Decrypt what you downloaded

All the time the image is on the server it is encrypted using your public key. In order for the server to be able to decrypt it, it needs your private key, which only you know 😎

#machine-learning #crypto #deep-learning

When crypto meets ML
1.45 GEEK