Code Monkey home page Code Monkey logo

bls-eth-rust's Introduction

Build Status

bls-eth for Rust

This is a wrapper library of bls with BLS_ETH=1.

How to build libbls384_256.a

copy from bls-eth-go-binary/bls/lib or build it at yourself according to readme.md.

News

bls-eth-rust old eth2.0 spec name
SecretKey::sign Sign
PublicKey::verify Verify
Signature::aggregate Aggregate
Signature::fast_aggregate_verify FastAggregateVerify
Signature::aggregate_verify_no_check AggregateVerify

Check functions:

  • verify_signature_order ; make deserialize check the correctness of the order
  • Signature::is_valid_order ; check the correctness of the order
  • verify_publickey_order ; make deserialize check the correctness of the order
  • PublicKey::is_valid_order ; check the correctness of the order
  • are_all_msg_different ; check that all messages are different each other

How to test

env RUSTFLAGS="-L<directory of libbls384_256.a>" cargo test

For example, on Linux,

mkdir work
cd work
git clone https://github.com/herumi/bls-eth-go-binary
git clone https://github.com/herumi/bls-eth-rust
cd bls-eth-rust
env RUSTFLAGS="-L../bls-eth-go-binary/bls/lib/linux/amd64/" cargo test -- --test-threads 1

For windows,

msvc

mkdir work
git clone https://github.com/herumi/bls
git clone https://github.com/herumi/bls-eth-rust
cd bls
mklib eth
cd ../bls-eth-rust
set RUSTLFAGS=-L../bls/lib
cargo test --target=x86_64-pc-windows-msvc

gnu

set RUSTFLAGS=-L../bls-eth-go-binary/bls/lib/windows/amd64
cargo test --target=x86_64-pc-windows-gnu

How to run benchs

env RUSTFLAGS="-L../bls-eth-go-binary/bls/lib/linux/amd64/" cargo bench

License

modified new BSD License http://opensource.org/licenses/BSD-3-Clause

Author

MITSUNARI Shigeo([email protected])

Sponsors welcome

GitHub Sponsor

bls-eth-rust's People

Contributors

herumi avatar kirk-baird avatar siburu avatar peamaeq 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.