.github
go.mod,ci: update to Go 1.21.gitignore
remove yaml dep, pull test vectors, update to json test vector parsinggo.mod
go.mod,ci: update to Go 1.21go.sum
go.mod,ci: update to Go 1.21LICENSE
start of bls utils packageMakefile
test updates + defer-bls: aggregate bls calls and check at the endREADME.md
update readmesigagg_test.go
test updates + defer-bls: aggregate bls calls and check at the endsigagg.go
test updates + defer-bls: aggregate bls calls and check at the endsignatures_test.go
test updates + defer-bls: aggregate bls calls and check at the endsignatures.go
test updates + defer-bls: aggregate bls calls and check at the endsigset_bench_test.go
signature set supportsigset_test.go
test updates + defer-bls: aggregate bls calls and check at the endsigset.go
test updates + defer-bls: aggregate bls calls and check at the endBLS 12-381 util
BLS 12-381 util (BLSU, "bless you") is a collection of utils to work with BLS 12-381 in Go.
Warning: these wrapper utils have not been audited.
This package wraps github.com/kilic/bls12-381,
a pure Go implementation of BLS, no CGO involved, no special dependencies.
Instead, this BLS implementation uses Go-assembly to optimize the lower level computations.
audit info.
This package implements the BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_ ciphersuite.
TODO: not safe for 32 bit usage: kilic BLS Fr.FromBytes->Fr.fromBytes->Fr.fromBig assumes word size is 64 bits.
Utils
- Eth2 Typing
- Pubkeys:
PointG1wrapper - Signatures:
PointG2wrapper - Secret keys:
Frwrapper - Signatures sets: see below
- Pubkeys:
- Draft 4 for signatures
- Hash to curve, from
kilic/bls12-381:BLS12381G2_XMD:SHA-256_SSWU_RO_ - Schemes:
- Core operations:
KeyGen(TODO)SkToPk, implemented as part of Pubkey deserialization, except identity-pubkey check (checked in verify functions instead).KeyValidateCoreSignCoreVerifyAggregateCoreAggregateVerify
Basic scheme, not supportedMessage Augmentation scheme, not supportedPOP, Proof of Possession scheme (used in Eth2):PopProve, not supported, assumed through application-specific implementationPopVerify, not supported, assumed through application-specific implementationFastAggregateVerify
- Core operations:
- Hash to curve, from
- Eth2 additions
eth2_aggregate_pubkeys:AggregatePubkeyseth2_fast_aggregate_verify:Eth2FastAggregateVerify
- Signature sets: verify non-singular set of signatures and its respective pubkeys and messages
Testing
- Unit tests
-
SecretKeydeserialization/serialization -
Pubkeydeserialization/serialization (with KeyValidate routine, except identity-pubkey check) -
Signaturedeserialization/serialization -
SkToPk(TODO: expand) -
SignatureSetVerify
-
- Eth2 BLS tests
-
Sign -
Aggregate -
Verify -
AggregateVerify -
FastAggregateVerify -
AggregatePubkeys -
Eth2FastAggregateVerify
-
- Eth2 spec tests
- Integrate into ZRNT, run full eth2 test-suite
- standard tests (if any)
- TODO, need standard signature-scheme test vectors (Work in progress)
- Run Hash-to-curve test-vectors on
kilic/bls12-381internals
License
MIT, see LICENSE file.