Coder Social home page Coder Social logo

valerini / bls_sigs_ref Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kwantam/bls_sigs_ref-archive

0.0 1.0 0.0 1.23 MB

unofficial ref impls of the BLS signatures standard

Home Page: https://github.com/pairingwg/bls_standard

License: Apache License 2.0

Python 36.22% Makefile 0.13% CMake 2.03% C 39.27% C++ 0.13% Shell 0.10% Rust 22.13%

bls_sigs_ref's Introduction

BLS signatures draft standard, reference implementations

This repository contains reference implementations of the BLS signatures draft standard.

Note: this code is WIP. It has not been audited for security, should not be assumed to be constant-time or otherwise secure, and the details may change at any time as the BLS standard evolves.

This code started as a fork of bls12-381_hash. The main differences are:

  1. This implementation hashes to base field elements using hash_to_field specified in the BLS standards WG v1 spec

  2. This implementation includes only indifferentiable hashes to G1 and G2 based on Constructions #2 and #5 of WB19.

  3. This implementation chooses the sign of the output points differently than in WB19, with the goal of easing interoperability by relaxing constraints on sqrt implementations.

    In particular, WB19 Section 4 defines maps Map1: Fp -> Ell1 and Map2: Fp^2 -> Ell2. Taking Map1 as an example (Map2 is analogous), the process is

    1. map from Fp to Ell1', a curve isogenous to Ell1
    2. evaluate the isogeny map to get a point on Ell1

    The change is in step 1: the sign of the y-coordinate of the point on Ell1' should match the sign of u, the argument to Map1. Here, a number x is regarded as "negative" if x is lexically greater than -1 * x, otherwise it is positive.

implementation status

Please see the READMEs in each subdirectory for information on particular implementations. In brief,

  • The C implementation only implements hash-to-curve, and not signing, verification, serialization, or deserialization.

  • The Python, Rust, and Sage implementations include all functionality currently specified in the standard, plus serialization and deserialization based on my proposal.

  • The Python implementation uses the Python finite field implementation from Chia's BLS library.

  • The Rust implementation is based on the Rust pairing library.

License

This software is (C) 2019 Riad S. Wahby

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

bls_sigs_ref's People

Contributors

kwantam avatar

Watchers

 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.