GithubHelp home page GithubHelp logo

test-mass-forker-org-1 / ozks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/ozks

0.0 0.0 0.0 204 KB

oZKS (Ordered Zero-Knowledge Set) is a library that provides an implementation of an Ordered (and Append Only) Zero-Knowledge Set.

License: MIT License

Shell 0.05% C++ 40.51% C 50.54% Assembly 3.55% CMake 5.35%

ozks's Introduction

Ordered Zero-Knowledge Set - oZKS

Introduction

oZKS is a library that provides an implementation of an Ordered (and Append Only) Zero Knowledge Set. An Ordered (and Append-Only) Zero-Knowledge Set is a cryptographic primitive with the following properties:

Data Structure: Let S be an Ordered Key-Value Dictionary where each element is of the form (label, value, e), where e is the epoch in which the elements got added to the dictionary. New (label', value', e') pairs can be added to S (such that label' did not already exist). But once a (label, value, epoch) tuple is added, it cannot be modified or removed.

Algorithms: An Ordered (and Append Only) Zero Knowledge Set lets a Prover (P) produce a short cryptographic commitment c for S such that it can later produce succinct proofs of membership and non-membership of a tuple with respect to c. In more detail, the prover can produce proofs of membership of any label lS (and corresponding value) or non-membership of label lS corresponding to a certain epoch t with respect to c. These proofs reveal no extra information beyond the assertion (and some well-defined leakage).

The Prover can also update a commitment c1 to c2 if new elements get added to the underlying set S1 to produce S2 and produce a cryptographic proof that S1S2 with respect to c1, c2. This proof does not leak any extra information beyond the assertion (and some well-defined leakage) either, just like the membership and non-membership proofs.

For more details we refer the readers to Section 5 of the SEEMless paper.

Getting Started

The OZKS class (defined in ozks.h) provides the main API for use of the library. It provides the following functionality:

Insertion

Insert a key and payload, or a batch of keys and payloads.

InsertResult OZKS::insert(const key_type &key, const payload_type &payload);
InsertResultBatch OZKS::insert(const key_payload_batch_type &input);

Querying

Query for the presence/non-presence of a given key.

QueryResult OZKS::query(const key_type &key) const;

Verification

Verify that the QueryResult returned by a query has a correct proof.

bool QueryResult::verify(const key_type &key, const Commitment &commitment) const;

Building and Installing oZKS

oZKS has multiple external dependencies that must be pre-installed. By far the easiest and recommended way to do this is using vcpkg. Each package's name in vcpkg is listed below.

Note: On Windows, the vcpkg triplet x64-windows-static-md should be specified. For example, to install FlatBuffers on Windows, you must use .\vcpkg install flatbuffers:x64-windows-static-md, while on other systems use simply ./vcpkg install flatbuffers.

The CMake build system can then automatically find these pre-installed packages, if the following arguments are passed to CMake configuration:

  • -DCMAKE_TOOLCHAIN_FILE=${vcpkg_root_dir}/scripts/buildsystems/vcpkg.cmake, and
  • -DVCPKG_TARGET_TRIPLET="x64-windows-static-md" on Windows only.
Dependency vcpkg name
FlatBuffers flatbuffers
GSL ms-gsl
Google Test gtest (needed only for building tests)

To build the unit tests, set the CMake option OZKS_BUILD_TESTS to ON.

Contribute

For contributing to oZKS, please see CONTRIBUTING.md.

ozks's People

Contributors

kiromaru avatar kimlaine 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.