MCPcopy Create free account
hub / github.com/Derious/cuMPC

github.com/Derious/cuMPC @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
16,730 symbols 42,564 edges 1,440 files 1,096 documented · 7% updated 15mo ago★ 172

Browse by type

Functions 12,562 Types & classes 4,168
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

High-efficiency Secure Two Party Computation on GPU

Specifications

  • OS: Linux x64
  • Language: C++, CUDA
  • Requires: OpenSSL, emp-tools, emp-ot, Eigen-3.4.0, cuda-12.4

Overview

This project focuses on the GPU implementation and optimization of non-linear functions in privacy-preserving machine learning (PPML), aiming to prevent semi-honest adversary attacks under the (2+1)-PC setting. The project has implemented GPU-based solutions for distributed point function (DPF ), most significant bit (MSB) extraction function, comparison function, ToPK function, 8-bit privacy LUT function and Matrix Multiplication. This project includes three main subdirectories: 1. mpc_cuda: Implementation of secure two-party computation on GPU. 2. mpc_keys: Key definition for FSS and MSB on GPU. 3. test_cuda: Test cases for GPU.

Example Testing

Prepare

To prepare the environment, into the root dir and do the following:

  $ cd dependencie/emp-tool
  $ mkdir build && cd build
  $ cmake ../
  $ make 
  $ sudo make install
  $ cd dependencie/emp-ot
  $ mkdir build && cd build
  $ cmake ../
  $ make 
  $ sudo make install
  $ cd dependencie/eigen-3.4.0
  $ mkdir build && cd build
  $ cmake ../
  $ sudo make install

Compile

To compile and test the msb extraction protocol, into the root dir and do the following:

  $ mkdir build && cd build
  $ cmake ../
  $ make test_test_msb

Running

If you want to test the code in local machine, into the build dir and type

  $../run ./bin/test_test_msb //when nP=2 which means it involves 2 parties

If you want to test the code over two machine, into the build dir and type

./bin/[binaries] 1 12345  //on one machine and

./bin/[binaries] 2 12345  //on the other.

You can modify the IP in the MPABY_util/util_cmpc_config.h to communicate with multiple machines

To do

Add the two-party compution for LLM

Core symbols most depended-on inside this repo

Shape

Function 6,347
Method 6,215
Class 4,102
Enum 66

Languages

C++97%
TypeScript3%
Python1%
C1%

Modules by API surface

dependence/eigen-3.4.0/Eigen/src/Core/arch/NEON/PacketMath.h773 symbols
dependence/eigen-3.4.0/bench/perf_monitoring/resources/s1.js389 symbols
dependence/eigen-3.4.0/Eigen/src/Core/arch/NEON/TypeCasting.h283 symbols
dependence/eigen-3.4.0/Eigen/src/Core/arch/AltiVec/PacketMath.h281 symbols
dependence/eigen-3.4.0/Eigen/src/Core/arch/AVX512/PacketMath.h210 symbols
dependence/eigen-3.4.0/Eigen/src/Core/MathFunctions.h193 symbols
dependence/eigen-3.4.0/Eigen/src/Core/arch/AVX/PacketMath.h192 symbols
dependence/eigen-3.4.0/Eigen/src/Core/functors/UnaryFunctors.h191 symbols
dependence/eigen-3.4.0/Eigen/src/Core/arch/SSE/PacketMath.h190 symbols
dependence/eigen-3.4.0/Eigen/src/Core/util/Meta.h184 symbols
dependence/eigen-3.4.0/Eigen/src/Core/util/ForwardDeclarations.h173 symbols
dependence/eigen-3.4.0/Eigen/src/Core/arch/GPU/PacketMath.h166 symbols

For agents

$ claude mcp add cuMPC \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page