msunkim / CSVE

A C++ implementation of Camenisch-Shoup verifiable encryption

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Camenisch-Shoup Verifiable Encryption Implementation


Authors and contacts

The implementation is developed by Myungsun Kim and is released under the MIT License (see the LICENSE file).


[TOC]


Overview

This package implements Camenisch-Shoup Verifiable Encryption scheme [CS03], which is a cryptographic primitive for supporting a setting where there are two parties who are in a position to prove some property to another party about an encrypted message and the party who holds the secret key. A protocol in which the encryptor is the prover is a verifiable encryption protocol, while a protocol in which the decryptor is the prover is a verifiable decryption protocol. This implementation only focuses on the former case, namely, verifiable encryption.

In particular, this implementation realizes a verifiable encryption introduced by Camenisch and Shoup [CS03] at Crypto 2003. This work clearly has a better performance than some other works such as [ASW98], [Sta96], and [YY98].

This code is a C++ implementation together with NTL 11.4.3 and openssl (LibreSSL 2.8.3) and includes a simple test code. For simplicity I provide a Makefile rather than using cmake.


Build instructions

Dependencies

The libsnark library relies on the following:

  • C++ build environment
  • MakeFile
  • NTL library for group operations in the same setting as the Paillier cryptosystem
  • openssl for simulating a random oracle

So far I have tested these only on Machintosh, specifically iMac 3.7 GHz 6 cores Intel i5 with 32GB RAM, though I believe this implementation has little portability issues because NTL and openssl can be well installed on Linux and Windows via Cygwin.

Building

After cloning this code from their GitHub repos, then, to build the implementation and run the binary:

$ make
$ ./csve

Remarks

This code originally developed to estimate the running times during encrypting a plaintext along with generating a proof of a correct encryption and verifing the corresponding proof, in the IITP project: (2018-0-00251, Privacy-Preserving and Vulnerability Analysis for Smart Contract). However, for completeness this code implements the decryption algorithm without verifiable decryption property. If necessary, you may remove the run-time estimation modules.


References

[CS03] Practical Verifiable Encryption and Decryption of Discrete Logarithms, Jan Camenisch and Victor Shoup, Crypto 2003

[ASW98] Optimistic Fair Exchange of Digital Signatures, N. Asokan, Victor Shoup and Michael Waidner, Eurocrypt 1998

[Sta96] Publicly Verifiable Secret Sharing, Markus Stadler, Eurocrypt 1996

[YY98] Auto-Recoverable Auto-Certifiable Cryptosystems, Adam L. Young and Moti Yung, Eurocrypt 1998

About

A C++ implementation of Camenisch-Shoup verifiable encryption

License:Other


Languages

Language:C++ 97.2%Language:Makefile 2.8%