Giter Club home page Giter Club logo

aca-final-team1-encrypted-computing's Introduction

ACA-Final-Team1-Encrypted-Computing

Introduction

  • The project is encrypted computing, where the encrpyted data is computed
  • We provide
    1. python client code to do encoding, encryption, decryption, decoding and
    2. server host code and kernel code for receiving data from client and sending it into kernel accelerator to do homomorphic computation
  • The implementation is referenced from BFV-RNS
    • One should read it before getting into this project

Major optimization

  • We optimize individual kernel code used in src/kernel to achieve nearly the same performance as this paper did using HLS
    • Lots of code restructure, array partition, unrolling, refer to the docs/doc.txt for further details
  • We parametrized the code so that it can be easily tested under different settings
  • We did not perform system level optimization and intend to do it as future work

Folder hierarchy

├── LICENSE
├── README.md
├── build
│   └── README.md
├── docs
│   └── doc.txt
├── impl_result
│   ├── K_ntt_csynth.rpt
│   ├── NTT_csynth.rpt
│   ├── README.md
│   ├── add_sub_csynth.rpt
│   ├── butterfly_csynth.rpt
│   └── mul_mod_csynth.rpt
├── src
│   ├── client
│   │   ├── README.md                    // see the README.md to set up
│   │   ├── afterDense100_8192.txt
│   │   ├── afterSquare_8192.txt
│   │   ├── bfv_rns.py                   // BFV_RNS scheme python code
│   │   ├── bias100_8192.txt
│   │   ├── client.py                    // client code using BFV-RNS
│   │   ├── cnn8192.txt.zip
│   │   ├── ct.txt
│   │   ├── data.h
│   │   ├── data.py
│   │   ├── defs.py
│   │   ├── dense100_8192.txt
│   │   ├── dense10_8192.txt
│   │   ├── encrypt8192.txt
│   │   ├── gk.txt.partaa
│   │   ├── gk.txt.partab
│   │   ├── gk.txt.partac
│   │   ├── gk.txt.partad
│   │   ├── gk.txt.partae
│   │   ├── inference.py                  // reference code of how to write encrypted inference
│   │   ├── inference_multiprocess.py     // reference code of how to write encrypted inference
│   │   ├── mask8192.txt
│   │   ├── model8192.txt.zip
│   │   ├── rlk.txt
│   │   ├── test.txt.partaa
│   │   ├── test.txt.partab
│   │   ├── test.txt.partac
│   │   ├── test.txt.partad
│   │   ├── test.txt.partae
│   │   └── util.py
│   ├── host
│   │   ├── global.h
│   │   ├── help_functions.cpp
│   │   ├── help_functions.h
│   │   ├── host.cpp                      // Host code for dealing with networking and kernel interaction
│   │   ├── inference.cpp                 // HE primitives or even higher level code examples
│   │   ├── inference.h
│   │   └── model_weight.h
│   └── kernel                            // Kernel functions
│       ├── K_add.cpp
│       ├── K_apply_galois.cpp
│       ├── K_mov.cpp
│       ├── K_mulConst.cpp
│       ├── K_mulWise.cpp
│       ├── K_ntt.cpp
│       ├── lift.cpp
│       ├── mod.cpp
│       ├── mod.h
│       ├── rns.h
│       └── scale.cpp
└── tests
    └── README.md

Build Setup

  • Follow README.md in src/client/ to recover all files needed
    • Check out client.cpp to see how to send and receive
    • text.txt, rlk.txt, gk.txt, and ct.xt are pickled file, where
      • text.txt: class including encoder and encryptor
      • rlk.txt: relinearization key
      • gk.txt: galois key
      • ct.txt: ciphertext
  • Vitis: include host.cpp and all codes under kernel/ and build kernel codes (Emulation-SW, EMulation-HW and Hardware)

Run test

  1. Server run the built code
  2. run client.py under src/client and wait for the result
  3. Change host/inference.cpp to do different tests

aca-final-team1-encrypted-computing's People

Contributors

ttpssabc avatar strongshih avatar

Watchers

 avatar

Forkers

muxucao0812

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.