All Projects → lubux → ecelgamal

lubux / ecelgamal

Licence: MIT License
Additive homomorphic EC-ElGamal

Programming Languages

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

Projects that are alternatives of or similar to ecelgamal

rust-paillier
A pure-Rust implementation of the Paillier encryption scheme
Stars: ✭ 78 (+310.53%)
Mutual labels:  homomorphic-encryption, secure-computation
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 (+557.89%)
Mutual labels:  homomorphic-encryption, secure-computation
emp-tool
No description or website provided.
Stars: ✭ 155 (+715.79%)
Mutual labels:  secure-computation
rust-threshold-secret-sharing
A pure-Rust implementation of various threshold secret sharing schemes
Stars: ✭ 129 (+578.95%)
Mutual labels:  secure-computation
WeDPR-Lab-Android-SDK
Android SDK of WeDPR-Lab-Core; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件Android SDK
Stars: ✭ 14 (-26.32%)
Mutual labels:  homomorphic-encryption
haal
Hääl - Anonymous Electronic Voting System on Public Blockchains
Stars: ✭ 96 (+405.26%)
Mutual labels:  homomorphic-encryption
PPML-Resource
Materials about Privacy-Preserving Machine Learning
Stars: ✭ 93 (+389.47%)
Mutual labels:  secure-computation
gomorph
Implementing Homomorphic Encryption in Golang 🌱
Stars: ✭ 76 (+300%)
Mutual labels:  homomorphic-encryption
elgamalext
Extension for the .NET Framework cryptography subsystem, which introduces the ElGamal public key cryptosystem with support for homomorphic multiplication.
Stars: ✭ 14 (-26.32%)
Mutual labels:  homomorphic-encryption
WeDPR-Lab-Core
Core libraries of WeDPR instant scenario-focused solutions for privacy-inspired business; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件
Stars: ✭ 147 (+673.68%)
Mutual labels:  homomorphic-encryption
javallier
A Java library for Paillier partially homomorphic encryption.
Stars: ✭ 67 (+252.63%)
Mutual labels:  homomorphic-encryption
fully-homomorphic-encryption
Libraries and tools to perform fully homomorphic encryption operations on an encrypted data set.
Stars: ✭ 2,737 (+14305.26%)
Mutual labels:  homomorphic-encryption
jessica
Jessica - Jessie (secure distributed Javascript) Compiler Architecture
Stars: ✭ 27 (+42.11%)
Mutual labels:  secure-computation
concrete-numpy
Concrete Numpy is a python package that contains the tools data scientists need to compile various numpy functions into their Fully Homomorphic Encryption (FHE) equivalents. Concrete Numpy goes on top of the Concrete Library and its Compiler.
Stars: ✭ 111 (+484.21%)
Mutual labels:  homomorphic-encryption
minionn
Privacy -preserving Neural Networks
Stars: ✭ 58 (+205.26%)
Mutual labels:  homomorphic-encryption
concrete
Concrete ecosystem is a set of crates that implements Zama's variant of TFHE. In a nutshell, fully homomorphic encryption (FHE), allows you to perform computations over encrypted data, allowing you to implement Zero Trust services.
Stars: ✭ 575 (+2926.32%)
Mutual labels:  homomorphic-encryption
garbled-circuit
A two-party secure function evaluation using Yao's garbled circuit protocol
Stars: ✭ 41 (+115.79%)
Mutual labels:  secure-computation
threshold-signatures
Threshold Signature Scheme for ECDSA
Stars: ✭ 79 (+315.79%)
Mutual labels:  homomorphic-encryption
encrypted-geofence
testing out homomorphic encryption
Stars: ✭ 33 (+73.68%)
Mutual labels:  homomorphic-encryption
federated-learning-poc
Proof of Concept of a Federated Learning framework that maintains the privacy of the participants involved.
Stars: ✭ 13 (-31.58%)
Mutual labels:  homomorphic-encryption

EC-ElGamal

Build status

This repository contains a C implementation of the additive homomorphic elliptic curve based EL-Gamal cryptographic scheme and a corresponding Java JNI wrapper. The elliptic curve operations of OpenSSL are used for the implementation. Ciphertexts can be added toghether such that the decrypted result corresponds to the sum of the plaintexts (i.e. p1 + p2 = Dec(Enc(p1) ++ Enc(p2)))) similar to the Paillier-cryptosystem.

Content

The native folder contains the C implementation of the scheme and the src folder contains the Java wrapper library.

Prerequisites

Make sure you have the following installed:

C Library

The C library contains two versions of EC-Elgamal, a basic version and a Chinese Remainder Thereom (CRT) based optimized version, as introduced by Pilatus. The library builds with cmake. To compile the library and run the benchmark run:

cd native
cmake .
make
./out/ecelgamal

Java Wrapper

The Java library wraps the CRT based EC-ElGamal scheme implemented in C in a Java class with the JNI. The Java wrapper contains a prebuilt version of the library for linux64 and darwin64 (src/main/resources). To build the jar package, maven is required. The following command builds the library:

mvn package

Here an example on how to use the library.

ECElGamal.CRTParams params32 = ECElGamal.getDefault32BitParams();
ECElGamal.ECElGamalKey key32 = ECElGamal.generateNewKey(params32)
ECElGamal.ECElGamalCiphertext cipher1,cipher2;
int val1 = 2, val2 = -3;
cipher1 = ECElGamal.encrypt(BigInteger.valueOf(val1), key32);
cipher2 = ECElGamal.encrypt(BigInteger.valueOf(val2), key32);
cipher1 = ECElGamal.add(cipher1, cipher2);
int decriptedVal = ECElGamal.decrypt32(cipher1, key32);
assertEquals(val1 + val2, decriptedVal);

Performance

On a 256-bit curve and with an AWS EC2 micro instance in ms. (OpenSSL 1.0.2g)

Plain EC-ElGamal 32-bit integers
Avg ENC Time 0.238853ms Avg DEC Time 275.811 ms

CRT optimized EC-ElGamal 32-bit integers
Avg ENC Time 0.61461ms Avg DEC Time 0.339739ms 

CRT optimized EC-ElGamal 64-bit integers
Avg ENC Time 1.00067ms Avg DEC Time 0.560923ms 

Security

This library is for academic purposes, gives no security guarantees and may contain implementation vulnerabilities.

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].