Git Product home page Git Product logo

libaad-ccs2019's Introduction

libaad

Step 1: Build on Linux

Step zero is to be in the right directory:

cd <wherever-you-cloned-libaad>

First, install dependencies (e.g., clang, cmake) using:

scripts/linux/install-deps.sh

Second, install pairing (ate-pairing), finite field (libff) and FFT libraries (libfqfft):

scripts/linux/install-libs.sh

Then, go back to the libaad repo directory and set up the environment.

cd <wherever-libaad-was-cloned>
source scripts/linux/set-env.sh release

...you can also use debug, relwithdebug or trace as an argument for set-env.sh.

To build:

make.sh

(This will store the built code in ~/builds/aad/)

Alternatively, you could build manually in your own build/ directory:

mkdir -p build/
cd build/
cmake -DCMAKE_BUILD_TYPE=Release <path-to-libaad-repository>
make

Step 2: Tests

To run all tests, you can just invoke:

test.sh

Tests, benchmarks and any other binaries are automatically added to PATH but can also be found in:

cd ~/builds/aad/master/release/libaad/bin/

To run all test, you can also just do:

cd ~/builds/aad/master/release
ctest

(or replace release with debug or whatever you used in set-env.sh)

Step 3: Install

You can install easily by just running:

scripts/linux/install.sh

Alternatively, you can install manually:

cd ~/builds/aad/master/<build-type>/
sudo make install

Git submodules

This is just for reference purposes. No need to execute these. To fetch the submodules, just do:

git submodule init
git submodule update

For historical purposes, (i.e., don't execute these), when I set up the submodules, I did:

cd depends/
git submodule add git://github.com/herumi/ate-pairing.git
git submodule add git://github.com/herumi/xbyak.git
git submodule add git://github.com/scipr-lab/libff.git
git submodule add https://github.com/scipr-lab/libfqfft.git

To update your submodules with changes from their upstream github repos, do:

git submodule foreach git pull origin master

Some documentation notes

See:

cat depends/libff/libff/common/default_types/ec_pp.hpp

To see the interface for libff's finite field type (i.e., libaad's Fr type) go to:

cd depends/libff
cat libff/algebra/fields/fp.hpp

For group elements, see:

cd depends/libff
cat libff/algebra/curves/public_params.hpp
cat libff/algebra/curves/bn128/bn128_pp.hpp

For FFT polynomial operations, see:

cd depends/libfqfft/
cat libfqfft/polynomial_arithmetic/basic_operations.hpp
cat libfqfft/polynomial_arithmetic/basic_operations.tcc

We use -DCURVE_BN128. What is the ALT_BN128 curve?

-DBN_SUPPORT_SNARK in libff and ate-pairing enables (what I think is) a curve with an $n$th root of unity for some $n = 2^i$. They say: "BN curve over a 254-bit prime p such that n := p + 1 - t has high 2-adicity." (However the pairing on this curve is slower.)

WARNING: Looking at libff/algebra/curves/bn128/bn128_init.cpp BN128 initialization code and the ate-pairing README, it seems that libff ONLY supports the SNARK curve as a fast curve!

libaad-ccs2019's People

Contributors

alinush avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

libaad-ccs2019's Issues

Problems about public parameters

I am trying to re-run the microbenchmark for append and uses the public parameters in "libaad-ccs2019/public-params/8192/".
But it says there are no enough public parameters.
I was wondering how to reproduce the result in "libaad-ccs2019/experiments/2019-02-02-aad-append-time-n-8192-b-*".
Here are the command I was using and the error message:
issue

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.