All Projects → emp-toolkit → emp-tool

emp-toolkit / emp-tool

Licence: other
No description or website provided.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to emp-tool

MOTION
An efficient, user-friendly, modular, and extensible framework for mixed-protocol secure multi-party computation with two or more parties
Stars: ✭ 59 (-61.94%)
Mutual labels:  mpc, secure-computation, garbled-circuits
awesome-secure-computation
Awesome list for cryptographic secure computation paper. This repo includes *Lattice*, *DifferentialPrivacy*, *MPC* and also a comprehensive summary for top conferences.
Stars: ✭ 125 (-19.35%)
Mutual labels:  mpc, secure-computation
garbled-circuit
A two-party secure function evaluation using Yao's garbled circuit protocol
Stars: ✭ 41 (-73.55%)
Mutual labels:  secure-computation, garbled-circuits
PPML-Resource
Materials about Privacy-Preserving Machine Learning
Stars: ✭ 93 (-40%)
Mutual labels:  mpc, secure-computation
conclave
Query compiler for secure multi-party computation.
Stars: ✭ 86 (-44.52%)
Mutual labels:  mpc, secure-computation
tokucore
A Simple, Powerful, Modular Library for Bitcoin Blockchain As a Service(BAAS)
Stars: ✭ 61 (-60.65%)
Mutual labels:  mpc
WeDPR-Lab-iOS-SDK
iOS SDK of WeDPR-Lab-Core; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件iOS SDK
Stars: ✭ 13 (-91.61%)
Mutual labels:  mpc
Model-Predictive-Control
This project is to use Model Predictive Control (MPC) to drive a car in a game simulator. The server provides reference waypoints (yellow line in the demo video) via websocket, and we use MPC to compute steering and throttle commands to drive the car. The solution must be robust to 100ms latency, since it might encounter in real-world application.
Stars: ✭ 93 (-40%)
Mutual labels:  mpc
ocs2
Optimal Control for Switched Systems
Stars: ✭ 263 (+69.68%)
Mutual labels:  mpc
high mpc
Policy Search for Model Predictive Control with Application to Agile Drone Flight
Stars: ✭ 299 (+92.9%)
Mutual labels:  mpc
mpc
Autonomous control of an USV using Model Predictive Control
Stars: ✭ 102 (-34.19%)
Mutual labels:  mpc
verifiable mpc
A scheme that produces a zero-knowledge proof of correctness for an MPC computation. The scheme allows anyone, particularly someone external to the secure computation, to check the correctness of the output, while preserving the privacy properties of the MPC protocol.
Stars: ✭ 15 (-90.32%)
Mutual labels:  mpc
TinyGarble
TinyGarble: Logic Synthesis and Sequential Descriptions for Yao's Garbled Circuits
Stars: ✭ 108 (-30.32%)
Mutual labels:  garbled-circuits
WeDPR-Lab-Android-SDK
Android SDK of WeDPR-Lab-Core; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件Android SDK
Stars: ✭ 14 (-90.97%)
Mutual labels:  mpc
Mpc Hc
MPC-HC's main repository. For support use our Trac: https://trac.mpc-hc.org/
Stars: ✭ 3,567 (+2201.29%)
Mutual labels:  mpc
WeDPR-Lab-Core
Core libraries of WeDPR instant scenario-focused solutions for privacy-inspired business; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件
Stars: ✭ 147 (-5.16%)
Mutual labels:  mpc
mpc
Secure Multi-Party Computation (MPC) with Go. This project implements secure two-party computation with Garbled circuit protocol.
Stars: ✭ 41 (-73.55%)
Mutual labels:  mpc
WeDPR-Lab-Java-SDK
Java SDK of WeDPR-Lab-Core; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件通用Java SDK
Stars: ✭ 18 (-88.39%)
Mutual labels:  mpc
rofi-mpd
shell script for mpd that uses rofi to add songs, albums, playlist, jump to a song in the current playlist etc.
Stars: ✭ 19 (-87.74%)
Mutual labels:  mpc
Model-Predictive-Control
C++ implementation of Model Predictive Control(MPC)
Stars: ✭ 51 (-67.1%)
Mutual labels:  mpc

emp-tool

arm x86 Total alerts Language grade: C/C++

Installation

  1. wget https://raw.githubusercontent.com/emp-toolkit/emp-readme/master/scripts/install.py
  2. python install.py --deps --tool
    1. You can use --ot=[release] to install a particular branch or release
    2. By default it will build for Release. -DCMAKE_BUILD_TYPE=[Release|Debug] option is also available.
    3. No sudo? Change CMAKE_INSTALL_PREFIX.

Usage

Basic Primitives

Pseudorandom generator

PRG is implemented as AES-NI in the CTR mode. Usage is presented as the following code sample.

#include<emp-tool/emp-tool.h>
using namespace emp;
PRG prg;//using a secure random seed

int rand_int, rand_ints[100];
block rand_block[3];

prg.random_data(&rand_int, sizeof(rand_int)); //fill rand_int with 32 random bits
prg.random_block(rand_block, 3);	      //fill rand_block with 128*3 random bits

prg.reseed(&rand_block[1]);                   //reset the seed and counter in prg
prg.random_data_unaligned(rand_ints+2, sizeof(int)*98);  //when the array is not 128-bit-aligned

Pseudorandom permutation

PRP is implemented based on AES-NI. Code sample:

block key;
PRG().random_block(&key,1)
PRP prp(key); //if no parameter is provided, a public, fixed key will be used

block rand_block[3], b3[3];
int rand_ints[100];

prp.permute_block(rand_block, 3);//applying pi on each block of data
prp.permute_data(rand_ints, sizeof(int)*100);

block b2 = prp.H(rand_block[1], 1); //b2 = pi(r)\xor r, where r = doubling(random_block)\xor 1

prp.H<3>(b3, rand_block, 0);// apply the above H on three blocks using counter 0, 1, and 2 resp.

Hash function

Essentially a wrapper of <openssl/sha.h>

Hash hash;

char * data = new char[1024*1024], dig[Hash::DIGEST_SIZE];

hash.put(data, 1024*1024);
hash.digest(dig);

Commitment

Commitment c;

char * data = new char[1024*1024];
Com com;
Decom decom;

c.commit(decom, com, data, 1024*1024); // commit, will fill values decom and com
assert(c.open(decom, com, data, 1024*1024)); // open, return if the decommitment is valid or not

On-the-fly Circuit Compiler

Acknowledgement, Reference, and Questions

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].