/gopaillier

Simple homomorphic encryption based on Paillier cryptosystem implementation in Go. Supports floating point numbers, addition, subtraction, multiplication and division.

Primary LanguageGoMIT LicenseMIT

GoDoc Go Report Card test license

GoPaillier

Extended version of a Paillier cryptosystem implementation in Go.

Features

  • Extended Paillier cryptosystem implementation with negative number support (read more here).
  • Uses Standard Form notation to encode numbers allowing to use Paillier encryption scheme over integer and floating points numbers (read more about number package here).
  • Allows four different operations:
    • Addition between encrypted and plain numbers: A' + B.
    • subtraction between encrypted and plain numbers: A' + (-B).
    • Multiplication between encrypted and plain numbers: A' * B.
    • Division between encrypted and plain numbers: A' * 1/B.

Installation

go get github.com/lucasmenendez/gopaillier@latest

Examples

There are three basic examples ready to help starting with the library: