Skip to content

yamanalab/HE-lutEval-CKKS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HE-lutEval-CKKS

Contents

Introduction

This repository provides a demo of the experimental code used to evaluate functions using CKKS-based lookup tables (LUTs) for the paper:
H. Zhu, T. Suzuki, H. Yamana, "Private Multivariate Function Evaluation using CKKS-based Homomorphic Encrypted LookUp Tables", In Proceedings of 12th International Conference on Information Systems Security and Privacy (ICISSP 2026).
For testing, you have to change the parameters by yourself. I'm sorry for the inconvenience.

Prerequisites

Building on Linux

cd HE-lutEval-CKKS
mkdir build
cd build
cmake .. 
make -j

How to us

  1. Change the maximum and minimum of tables in util.cpp
double Lutxmax=d;
double Lutxmin=e; // please change d and e to change the maximum and minimum of input table
  1. To run the demo code, run the commands like below.
    Please change d to change the number of data points in each row of LUTs, ($l_{used}=2^d$). Please change testNum to change the number of test number.

    Step1: Generate tables and store in the Key file

    ./bin/gen_keys -N 65536 -L 23 --q0 50 --qi 40 --ql 60 --type oneInput  --bitNum b 
    

    Step2: Generate keys and store in the Table file

    ./bin/gen_tables --type oneInput --bitNum b 
    

    Step3: LUT evaluation (single-thread execution)

    OMP_NUM_THREAD=1 ./bin/main_oneinput --n 4 --d 4 --test {testNum} --bitNum {b}
    

Code construciton

HE_LUT_CKKS/
├── bin/                  # Generated executable files
│
├── data/             # Store genrated keys and tables
│   ├── Key/
│   └── Table/
│
├── include/              # Library header files
│   ├── proposedMethod/
│   │   ├── comparision.h 
│   │   ├── generateLut.h 
│   │   ├── utils.h 
│   ├── cmdline.h
│   ├── common.h
│   ├── picojson.h
│   ├── cmdline.h
│   ├── types.hpp
└──src/                  # Codes for LUT Evaluation 
│   ├── propsed method/
│   │   ├── comparision.h 
│   │   ├── generateLut.h 
│   │   ├── utils.h 
│   ├── gen_keys.cpp
│   ├── gen_tables.cpp
│   ├── main_Li.cpp
│   ├── main_oneinput.cpp
│   ├── main_twoinput.cpp
│   └── main_threeinput.cpp
│
└── CMakeLists.txt/          

Test Examples

One-input function

./bin/gen_keys -N 65536 -L 23 --q0 50 --qi 40 --ql 60 --type oneInput  --bitNum 3
./bin/gen_tables --type oneInput --bitNum 3
OMP_NUM_THREAD=1 ./bin/main_oneinput --n 4 --d 4 --test 6 --bitNum 3

Two-input function

./bin/gen_keys -N 65536 -L 24 --q0 50 --qi 40 --ql 60 --type twoInput  --bitNum 3
./bin/gen_tables --type twoInput --bitNum 3 
OMP_NUM_THREAD=1 ./bin/main_twoinput --n 4 --d 4 --test 6 --bitNum 3

Related work

./bin/gen_keys -N 65536 -L 25 --q0 50 --qi 40 --ql 60 --type baseline  --bitNum 3
./bin/gen_tables --type baseline --bitNum 3 
OMP_NUM_THREAD=1 ./bin/main_Li --n 4 --d 4 --test 6 --bitNum 3

Three-input function

./bin/gen_keys -N 65536 -L 25 --q0 50 --qi 40 --ql 60 --type threeInput  --bitNum 3
./bin/gen_tables --type threeInput --bitNum 3 
OMP_NUM_THREAD=1 ./bin/main_threeinput --n 4 --d 4 --test 6 --bitNum 3

License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors