Giter VIP home page Giter VIP logo

hhego's Introduction

hhego

hhego is a monorepo for all Go-based tools used as part of the HHE (Hybrid Homomorphic Encryption) Proof of Concept.

Components

  • bfv: lattigo wrapper, designed to create hybrid homomorphic encryption schemes.
  • pasta: contains PASTA symmetric cipher.
  • js: A script for generating votes in the fhBallot project.
  • jni: Java bindings to integrate it with rskj.
  • workspace: a place for small tests.

The goal of hhego is to integrate these components with rskj, enabling support for hybrid homomorphic encryption on Rootstock.

Installation and Usage

JNI

The JNI component enables the use of bfv in Java applications, in this PoC we use it to integrate it with rskj and use it as a precompiled contract.

To build this library, use the following command:

make macos

The output should be libbfv_jni.dylib, a dynamic library for mac.

Bash Script

There's also a bash script that builds and copies the output to rskj.

./build_jni_mac.sh

JS

The JS component includes a Go script designed to generate encrypted votes for the fhBallot project. To execute this script, run:

go run votes.go

This script produces a JSON output with the following structure:

{
    "votes": [[1, 0, 0, 0], [0, 1, 0, 0]], // Generated votes
    "votesPasta": [[30447, 62405, 62714, 38763], [30446, 62406, 62714, 38763]], // Encrypted votes using PASTA
    "pastaSK": [1, 1, 1, 1, 1], // BFV-encrypted PASTA secret key
	"rk": [1, 1, 1, 1, 1], // Relinearization key (for converting PASTA votes to BFV votes)
	"bfvSK": [1, 1, 1, 1, 1] // BFV secret key (used for encrypting PASTA SK)
}
Bash Script

There's also a bash script that builds and copies the output to rskj.

./generate_votes.sh

hhego's People

Contributors

fedejinich avatar

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.