基于区块链的毕业设计bls for eth with compiled static library – 编译静态库的eth的bls
本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计bls for eth with compiled static library – 编译静态库的eth的bls 是一篇很好的国外资料
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
- 2021/Jan/28 (change specification) enable VerifySignatureOrder and VerifyPublicKeyOrder by default
- 2021/Jan/28 (change specification) verify returns false for zero public key
- 2021/Jan/02 support arm64 golang on M1 mac
- 2020/Oct/15
add SecretKey::GetSafePublicKey()
, which returns an error if sec is zero - 2020/Oct/08
MultiVerify
returns true only if all signatures are valid. - 2020/Sep/18 static binary for x64 is JIT-less mode, which uses code pre-generated by Xbyak.
- 2020/Jul/03 remove old tests and use the latest hash function defined at draft-07 is set by default.
- 2020/May/22
SignHashWithDomain
,VerifyHashWithDomain
,VerifyAggregateHashWithDomain
are removed. - 2020/May/15
EthModeDraft07
is added for draft-07. - 2020/Apr/20
EthModeDraft06
is default. CallSetETHmode(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.
Init as the followings:
Init(BLS12_381)
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/ninjahome/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)
git clone --recursive https://github.com/ninjahome/bls-eth-go-binary # git submodule update --init --recursive cd bls-eth-go-binary make CXX=clang++ go test ./bls -bench "Pairing|Sign|Verify"
clang generates better binary than gcc.
Android
make android
iOS
make ios
How to cross-compile for armeabi-v7a
Check llc --version
shows to support the target armv7a.
make ../mcl/src/base32.ll env CXX=clang++ BIT=32 ARCH=arm _OS=android _ARCH=armeabi-v7a make MCL_USE_GMP=0 UNIT=4 CFLAGS_USER="-target armv7a-linux-eabi -fPIC"
- Remark : clang++ must support
armv7a-linux-eabi
.
How to build sample.go for armeabi-v7a
env CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARM=7 GOARCH=arm go build examples/sample.go env QEMU_LD_PREFIX=/usr/arm-linux-gnueabi qemu-arm ./sample
How to cross-compile for mipsel
Check llc --version
shows to support the target mips.
make ../mcl/src/base32.ll env CXX=clang++ BIT=32 ARCH=mipsel _OS=linux _ARCH=mipsle make MCL_USE_GMP=0 UNIT=4 CFLAGS_USER="-target mipsel-linux -fPIC"
- Remark : clang++ must support
mipsel-linux
.
How to build sample.go for mipsel
env CC=mipsel-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build examples/sample.go env QEMU_LD_PREFIX=/usr/mipsel-linux-gnu qemu-mipsel ./sample
How to use the static library from C
#define BLS_ETH #include <mcl/bn_c384_256.h> #include <bls/bls.h>
Author
MITSUNARI Shigeo(herumi@nifty.com)
Sponsors welcome
GitHub Sponsor
int
bls for eth with compiled static library
此存储库包含已编译的https://github.com/herumi/blsBLS_ETH=1。
- 秘钥;Fr
- 公钥;G1
- 符号;G2默认情况下启用VerifySignatureOrder和VerifyPublicKeyOrder(更改规范)验证零公钥返回false(更改规范)只有当所有签名都有效时,zero才会返回true。
新闻
- 2020/Sep/18 x64的静态二进制文件是无JIT模式,它使用xbyk预先生成的代码。
- 2020/Jul/03删除旧测试并使用draft-07中定义的最新哈希函数是默认设置的。
- 2020/5/22 SignHashWithDomain、VerifyHashWithDomain、VerifyAggregateHashWithDomain被删除。
- 草案07增加了2020/5/15 EthModeDraft07。
- 默认为2020/Apr/20 EthModeDraft06。调用SetETHmode(EthModeDraft05)以使用旧版本。
- 2020/Mar/26由于将哈希函数中的DST更改为曲线函数,SetETHmode(2)中的签名值已更改。
- 2020/Mar/17此库支持eth2.0函数。但是hash-to-curve函数的规范可能会改变。验证签名顺序;反序列化检查顺序的正确性;检查顺序的正确性;检查所有消息是否彼此不同
- 备注:clang++必须支持armv7a linux eabi。
- 备注:clang++必须支持mipsel linux。
- 2020/Apr/20
EthModeDraft06
is default. CallSetETHmode(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.
初始化如下:
Init(BLS12_381)
然后,可以使用以下函数。
bls-eth-go-binary | eth2.0 spec name |
---|---|
SecretKey::SignByte | Sign |
Verify | Sign::Aggregate |
Aggregate | Sign::AggregateVerifyNoCheck |
AggregateVerify | FastAggregateVerify |
Sign::AggregateVerifyNoCheck | AggregateVerify |
消息大小必须为32字节。
检查函数:
- 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
如何运行示例/示例.go如何构建静态库,Windows(mingw64)
Android
iOS
如何交叉编译armeabi-v7a
如何构建示例.go对于armeabi-v7a
如何交叉编译mipsel
如何构建示例.go对于mipsel
如何使用C的静态库
作者
赞助商欢迎
如果在此存储库中使用已编译的二进制文件,则不需要执行以下步骤。 clang生成的二进制文件比gcc更好。 Check llc–显示支持目标armv7a的版本。 Check llc–显示支持目标mips的版本。 MITSUNARI Shigeo公司(herumi@nifty.com) GitHub赞助商Verify
Sign::Aggregate
Aggregate
Sign::AggregateVerifyNoCheck
AggregateVerify
go get github.com/ninjahome/bls-eth-go-binary/ go run examples/sample.go
Android
iOS
git clone --recursive https://github.com/ninjahome/bls-eth-go-binary # git submodule update --init --recursive cd bls-eth-go-binary make CXX=clang++ go test ./bls -bench "Pairing|Sign|Verify"
如何交叉编译armeabi-v7a
make android
如何构建示例.go对于armeabi-v7a
make ios
如何交叉编译mipsel
make ../mcl/src/base32.ll env CXX=clang++ BIT=32 ARCH=arm _OS=android _ARCH=armeabi-v7a make MCL_USE_GMP=0 UNIT=4 CFLAGS_USER="-target armv7a-linux-eabi -fPIC"
armv7a-linux-eabi
.如何构建示例.go对于mipsel
env CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARM=7 GOARCH=arm go build examples/sample.go env QEMU_LD_PREFIX=/usr/arm-linux-gnueabi qemu-arm ./sample
如何使用C的静态库
make ../mcl/src/base32.ll env CXX=clang++ BIT=32 ARCH=mipsel _OS=linux _ARCH=mipsle make MCL_USE_GMP=0 UNIT=4 CFLAGS_USER="-target mipsel-linux -fPIC"
mipsel-linux
.作者
env CC=mipsel-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build examples/sample.go env QEMU_LD_PREFIX=/usr/mipsel-linux-gnu qemu-mipsel ./sample
赞助商欢迎
#define BLS_ETH #include <mcl/bn_c384_256.h> #include <bls/bls.h>
Author
Sponsors welcome
int
部分转自网络,侵权联系删除区块链源码网
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计bls for eth with compiled static library – 编译静态库的eth的bls