Giter Site home page Giter Site logo

go-bls's Introduction

Spacemesh go-bls lib POC

This is an experimental early POC. Be warned, dragons ahead...

Building

Native requirements: gcc, libgmp-dev libssl-dev

git clone https://github.com/spacemeshos/go-bls
cd go-bls
git submodule init
git submodule update
cd external/mcl
make test
make test_go
cd ../bls
make test
make test_go
cd ..
go build

Testing

go test ./tests/. -v

Running

cd examples
export DYLD_LIBRARY_PATH=$GOPATH/src/github.com/spacemeshos/go-bls/external/bls/lib
go run main.go

go-bls's People

Contributors

avive avatar gavraz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-bls's Issues

Aggregated verification security review

We'd like to review the security of the aggregated signature creation and verification use case implemented in main.go::timeAggregation() - basically, one aggregated signature, n message hashes and n public keys required for verification instead of n signatures by each of the n public keys.

The verification logic is implemented here:
https://github.com/herumi/bls/blob/5fcee19422f96902a5fdf9f29db427dd6fe9f16b/src/bls_c_impl.hpp#L384

The signature aggregation logic is implemented here:
https://github.com/herumi/bls/blob/5fcee19422f96902a5fdf9f29db427dd6fe9f16b/src/bls_c_impl.hpp#L339

@zalmen @iddo333 @gavraz

go build error

github.com/go-bls

/usr/bin/ld: warning: libmcl.so, needed by ./external/bls/lib/libbls384.so, not found (try using -rpath or -rpath-link)
./external/bls/lib/libbls384.so:对‘mcl::fp::Op::init(__gmp_expr<__mpz_struct [1], __mpz_struct [1]> const&, unsigned long, int, mcl::fp::Mode, unsigned long)’未定义的引用
./external/bls/lib/libbls384.so:对‘mcl::fp::Op::destroyFpGenerator(mcl::fp::FpGenerator*)’未定义的引用
./external/bls/lib/libbls384.so:对‘mcl::fp::copyAndMask(unsigned long*, void const*, unsigned long, mcl::fp::Op const&, mcl::fp::MaskMode)’未定义的引用
collect2: error: ld returned 1 exit status

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.