Git Product home page Git Product logo

homomorphic-knn's Introduction

Secure KNN computation on cloud

Implemenation of KNN computation between 3 parties: user, data owner and cloud service provider. None of the parties share unencrypted data with each other.

Instructions to run

  • Install python3
  • Create a virtual environment using venv python3 -m venv {{venv_name}}
  • Activate the virtual environment source {{venv_name}}/bin/activate
  • Install dependencies pip install -r requirements.txt
  • Run the demo script to see the working bash demo.sh

Implementation Details

All the parties are assumed to be connected to network. The data owner and cloud service provider expose REST APIs for the user to interact with. The user can query the data owner for encryption of the query and then send the encrypted query to the cloud service provider. The cloud service provider then computes the KNN on the encrypted data and returns the encrypted results to the user. The user can then decrypt the results using api exposed by data owner. All the REST APIs are implemented using Flask.

  • Data owner exposes REST API for following operations:

    • Encrypt data and upload to cloud service provider
    • Query encryption
    • Data decryption
  • Cloud service provider exposes REST API for following operations:

    • Store encrypted data
    • Storage of temporary data for encrypted queries
    • Compute KNN on encrypted data
    • Return encrypted KNN results
  • User provides following operations:

    • Query encryption
    • Decrypt KNN results

Features

  • Secure KNN computation on encrypted data
  • Computation of temporary data on cloud is done using off path threads to reduce latency
  • Reduction in memory usage as temporary data is deleted after some time

Results

  • Verified correctness of the implementation by comparing the results with unencrypted KNN computation on the same data for different values of K

homomorphic-knn's People

Contributors

sam990 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.