GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Pr0gm4n/bls-eth-go-binary

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

131 Commits
131 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
android
android
 
 
bls
bls
 
 
examples
examples
 
 
obj
obj
 
 
patch
patch
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Makefile
Makefile
 
 
go.mod
go.mod
 
 
readme.md
readme.md
 
 

Repository files navigation

Build Status

bls for eth with compiled static library

This repository contains compiled static library of https://github.com/herumi/bls with BLS_ETH=1.

  • SecretKey; Fr
  • PublicKey; G1
  • Sign; G2

News

  • 2020/May/22 SignHashWithDomain, VerifyHashWithDomain, VerifyAggregateHashWithDomain are removed.
  • 2020/May/15 EthModeDraft07 is added for draft-07.
  • 2020/Apr/20 EthModeDraft06 is default. Call SetETHmode(EthModeDraft05) to use older evrsion.
  • 2020/Mar/26 The signature value in SetETHmode(2) has changed because of changing DST in hash-to-curve function.
  • 2020/Mar/17 This library supports eth2.0 functions. But the spec of hash-to-curve function may be changed.
  • SetETHmode(EthModeDraft05) supports draft-irtf-cfrg-hash-to-curve-05, which will be removed in the near future.
  • SetETHmode(EthModeFraft06) supports draft-irtf-cfrg-hash-to-curve-06 at March 2020. But it has not yet fully tested.

Init as the followings:

Init(BLS12_381)
SetETHmode(1) // or SetETHmode(2)

then, you can use the following functions.

bls-eth-go-binary eth2.0 spec name
SecretKey::SignByte Sign
PublicKey::VerifyByte Verify
Sign::Aggregate Aggregate
Sign::FastAggregateVerify FastAggregateVerify
Sign::AggregateVerifyNoCheck AggregateVerify

The size of message must be 32 byte.

Check functions:

  • VerifySignatureOrder ; make deserialize check the correctness of the order
  • Sign::IsValidOrder ; check the correctness of the order
  • VerifyPublicKeyOrder ; make deserialize check the correctness of the order
  • PublicKey::IsValidOrder ; check the correctness of the order
  • AreAllMsgDifferent ; check that all messages are different each other

How to run examples/sample.go

go get github.com/herumi/bls-eth-go-binary/
go run examples/sample.go

How to build the static library

The following steps are not necessary if you use compiled binary in this repository.

Linux, Mac, Windows(mingw64)

mkdir work
cd work
git clone https://github.com/herumi/mcl
git clone https://github.com/herumi/bls
git clone https://github.com/herumi/bls-eth-go-binary
cd bls-eth-go-binary
make CXX=clang++

clang generates better binary than gcc.

Android

make android

iOS

make ios

How to use the static library from C

#define BLS_ETH
#include <mcl/bn_c384_256.h>
#include <bls/bls.h>

Author

MITSUNARI Shigeo([email protected])

Sponsors welcome

GitHub Sponsor

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.