Giter VIP home page Giter VIP logo

committed_encryption's Introduction

Multi-recipient encryption with shortened ciphertext and accountability for a privileged party

A new multi-recipient encryption scheme for the CS294-144 Blockchain project, in which the first party can check whether the ciphertext is generated by a honest encryption.

Technical details are here.

Components

  • keygen: generate the public/private key pairs for all three parties.
  • encrypt: generate a ciphertext for the three parties.
  • decrypt: for any one of the three parties, decrypt the ciphertext.
  • check: the first party checks whether the three parties can decrypt into the same result.
  • encrypt_malicious: an example of malicious encryption where the randomness is not generated correctly.

Example usage

We can use doc/main.tex as the test file:

cmake . -DUSE_RANDOM_DEVICE=1
cd bin
cp ../doc/main.tex ./

We can use the honest encryption to encrypt the file, and use any one of the three parties to decrypt.

./encrypt main.tex main_encrypted
./decrypt 1 main_encrypted main_decrypted.tex
./decrypt 2 main_encrypted main_decrypted.tex
./decrypt 3 main_encrypted main_decrypted.tex

We can let the first party check whether the ciphertext is generated honestly.

./check main_encrypted

A malicious encryption will be detected.

./encrypt_malicious main.tex main_encrypted
./check main_encrypted

which outputs:

the party 3's first part is not from a honest encryption.

Dependency and Acknowledgement

This project has a depedency of emp-toolkit/emp-tool. We use the key derivation function (KDF) with CPU-instruction SHA1. emp-tool also provides good interfaces for 128-bit block data structures.

We use relic toolkit for ECC. The code on using relic toolkit is from emp-toolkit/emp-ot.

We use AES-GCM based on libgcrypt.

We use the Findgcrypt script for cmake from libssh.

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.