Code Monkey home page Code Monkey logo

pisces's Introduction

Pisces

This is a prototype of the private and compliable cryptocurrency exchange scheme in Java. The scheme is described in the NDSS'24 paper "Pisces: Private and Compliable Cryptocurrency Exchange".

Description

Pisces is a secure design of the private and compliable cryptocurrency exchange system. The system includes two entities: the user and the platform. It achieves four main functions to enable the user to join the system, deposit coins to the platform, exchange coins with the platform and withdraw coins from the platform to the blockchain.

The artifact implements all four procedures. For each procedure, the user sub-procedure interacts with the platform sub-procedure locally via memory communication, so that we can test the efficiency and practality by focusing on testing the computation time cost and communication size, and excluding communication time cost. The source code of Pisce is /src directory. We also provide the jar package for test purposes. The shown results in testlog.log are produced by running the jar package on MacBook Air (1.6GHz Dual-Core Intel Core i5, 16GB memory). The provided instructions in the following should work for both MacOS and Linux, but the results may vary a bit depending on the computation powder.

Installation

Download the full repository.

Requirements

  • MacOS or Linux (not necessary, instructions only apply to the two systems)
  • JDK 17 or later
  • Maven 3.8.1 or later (not necessary for the test)
  • GMP library and MCL library

Install GMP library on Linux and MacOS

We recommend you follow the gmp installment methods according to your os.

Install mcl library and wrap for our use

There are good instructions for compiling mcl library and wrapping it to Java on Linux or MacOS. The details are as follows:

  • Download the file install_fast_mcljava_linux_mac.sh
  • Execute the command to compile mcl. I assume your current directory is where the file was downloaded. Please install JDK first and get your Java installment directory.
./install_fast_mcljava_linux_mac.sh $JAVA_HOME/include  # $JAVA\_HOME is the Java installment directory

If you do not have execution permission, please give yourself permission first via

chmod 777 ./install_fast_mcljava_linux_mac.sh

With JDK, GMP, and MCL installed, I'm sure you are ready to test.

Test

  • Run Pisces to test the computation cost and communication size.

Pisces source code has been packaged to Pisces-1.0-jar-with-dependencies.jar in the repository. So, you need to download the file, go to the download directory, and run:

java -jar Pisces-1.0-jar-with-dependencies.jar

If your experiment is similar to MacBook Air (1.6GHz Dual-Core Intel Core i5, 16GB memory), the results should be similar to those in testlog.log, which is also shown in the paper.

  • Run UACS implementation to compare with our implementation.

We follow their design logic and adjust according to our needed zero-knowledge proofs. Both Pisces and uacs can be seen as applications of anonymous credentials. This is UACS's original implementation. We package it into the file uacs-1.0-SNAPSHOT-jar-with-dependencies.jar in the repository. You can download it and run it to test the computation cost in your system with the command:

java -jar uacs-1.0-SNAPSHOT-jar-with-dependencies.jar

Our test results of uacs are shown in uacstestlog.log under the same environment as the Pisces test.

Acknowledgement

Portions of the project have been copied from the project acs-incentive-system and are copyrighted by Jan Bobolz and feidens under the terms of the Apache-2.0 license.

pisces's People

Contributors

yananli117 avatar

Stargazers

Quanhao Chen avatar Tianjian Liu avatar

Watchers

 avatar

Forkers

izumi1217

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.