GithubHelp home page GithubHelp logo

tno-mpc / dpaillier Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 53 KB

TNO MPC Lab - Distributed Paillier

License: Apache License 2.0

Go 100.00%
mpc paillier homomorphic-encryption tno paillier-cryptosystem distributed-paillier multi-party-computation mpc-lab

dpaillier's Introduction

TNO MPC Lab - Distributed Paillier

The TNO MPC lab consists of generic software components, procedures, and functionalities developed and maintained on a regular basis to facilitate and aid in the development of MPC solutions. The lab is a cross-project initiative allowing us to integrate and reuse previously developed MPC functionalities to boost the development of new protocols and solutions.

The package dpaillier is part of the TNO Go Toolbox.

Limitations in (end-)use: the content of this repository may solely be used for applications that comply with international export control laws.

Distributed key generation and decryption for the Paillier cryptosystem

This package provides an implementation of a distributed key generation algorithm for the Paillier cryptosystem. It can be used to share a private key among multiple parties, so that a ciphertext can only be decrypted if they work together.

Usage

This key generation algorithm is meant to be used by a set of parties communicating over a network. Therefore, it is expressed as a number of stages, and to get from one stage to the next, the parties have to exchange a message with one another.

To start, agree externally on values for the parameters in KeyGenerationParameters. These can be validated using their Validate method to make sure they are suitable. Note that each participant should be assigned a distinct ParticipantIndex.

The parties can use a validated instance of the key generation parameters to start their protocol using NewKeyGenerationProtocol. This results in a state struct and a set of messages to send to the other parties, or a possible error. The state struct should be saved until all messages have been exchanged, after which each party calls the Advance method on the struct, supplying it with the messages received from the other parties. This results in a new state struct and new outgoing messages.

The distributed Paillier key generation protocol is probabilistic, and has a high chance of failure. Implementations should check for errors and restart the protcol if they occur.

The Advance method on KeyGenerationStage6 results in a PrivateKeyShare if successful. The private key share contains a regular paillier.PublicKey, for which we refer to that package's documentation. To decrypt a ciphertext, owners of the private key shares should call their PartiallyDecrypt method on the ciphertext. This results in a set of partial decryptions. Anyone with a private key share can call its Decrypt method on this set to recover the plaintext.

We refer to Godoc (or the code comments) for detailed documentation.

dpaillier's People

Contributors

thomastno avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

dpaillier's Issues

Questions & Support for floating points

Hello,
First of all thanks for the clean architecture provided code.

Currently, I am working with Distributed Federated Learning and it is required for my project to have Multikey Homomorphic Encryption but as I searched I found your repository and I have two questions.

  1. Does it make sense to use dpaillier for my problem?
  2. How is it possible to add support for floating point numbers (like CKKS schema), Would you guide me to do so?

Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.