目录

Scalable Zero-knowledge Proofs for Non-linear Functions in Machine Learning

Source code and the implementation of the USENIX Security’24 paper - Scalable Zero-knowledge Proofs for Non-linear Functions in Machine Learning.

Introduction

A novel scalable ZK proof framework for non-linear mathematical functions in machine learning based on LUT techniques. We carefully design several important building blocks, including digital decomposition, comparison, and truncation, such that they can effectively utilize table lookup with a quite small table size while ensuring the soundness of proofs. Based on these building blocks, we implement complex mathematical operations and further construct ZK proofs for current mainstream non-linear functions in ML such as ReLU, sigmoid, and normalization.

Contents

This repository consists of the following parts:

  • src: Implementations for our ZKP protocols.
  • test: Test script for performance evaluation.

Installation

NOTE: Our implementation is built based on emp-zk and a complete compilation process is required. For any issues occurred during step 1, please refer to emp-zk troubleshooting.

  1. Install emp-tool, emp-ot and emp-zk.
python install.py --deps --tool --ot --zk
  1. Update code for zkMath.
cp -rf src/* emp-zk/emp-zk/ && rm -rf src \
&& cp -rf test/* emp-zk/test/ && rm -rf test \
&& mv -f CMakeLists.txt emp-zk/
  1. Recompile the code, then the binary executables can be found at ./bin
cd emp-zk
cmake .
make -j8
sudo make install

Usage

Testing on localhost

./run ./bin/[binary]

Testing on two

  1. Change the IP address in the test code, or use tmux command to initialize another terminal

  2. run ./bin/[binary] 1 [port] on one machine and

    run ./bin/[binary] 2 [port] on the other machine.

Disclaimer

This repository is a proof-of-concept prototype.

关于

USENIX Security'24 - Scalable Zero-knowledge Proofs for Non-linear Functions in Machine Learning

14.5 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号