Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goshimmer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iota-imt
goshimmer
Commits
2d701864
Commit
2d701864
authored
5 years ago
by
lunfardo314
Browse files
Options
Downloads
Patches
Plain Diff
BLS signatures: bug fix in test, removed unnecessary function, added new test
parent
6face25f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/binary/valuetransfer/address/signaturescheme/bls.go
+7
-8
7 additions, 8 deletions
packages/binary/valuetransfer/address/signaturescheme/bls.go
with
7 additions
and
8 deletions
packages/binary/valuetransfer/address/signaturescheme/bls.go
+
7
−
8
View file @
2d701864
...
...
@@ -14,13 +14,13 @@ import (
"github.com/iotaledger/goshimmer/packages/binary/valuetransfer/address"
)
//
BLS
implements BLS signature scheme which is robust against rogue public key attacks,
or BDN
//
it uses go.dedis/kyber library
//
m
ore info https://github.com/dedis/kyber/blob/master/sign/bdn/bdn.go
//
usually
BLS signatures are used as threshold signatures.
//
bls.go
implements BLS signature scheme which is robust against rogue public key attacks,
//
called "Boneh-Drijvers-Neven" or BDN
//
It uses go.dedis/kyber library. M
ore info https://github.com/dedis/kyber/blob/master/sign/bdn/bdn.go
//
Often
BLS signatures are used as threshold signatures.
// This package doesn't implement any threshold signature related primitives.
// it only contains what is needed for the node to check validity of the BLS signatures against addresses
//
and also
minimum signing required for testing
// it only contains what is needed for the node to check validity of the BLS signatures against addresses
,
//
signature aggregation function and
minimum signing required for testing
var
suite
=
bn256
.
NewSuite
()
const
(
...
...
@@ -41,7 +41,6 @@ type blsSignatureScheme struct {
var
rnd
=
random
.
New
(
rand
.
New
(
rand
.
NewSource
(
42
)))
// RandBLS creates a RANDOM instance of a signature scheme, that is used to sign the corresponding address.
// mostly intended for testing.
// only for testing: each time same sequence!
func
RandBLS
()
SignatureScheme
{
ret
:=
&
blsSignatureScheme
{}
...
...
@@ -49,7 +48,7 @@ func RandBLS() SignatureScheme {
return
ret
}
// BLS creates an instance of BLS signature scheme
// BLS
(,)
creates an instance of BLS signature scheme
// from given private and public keys in marshaled binary form
func
BLS
(
priKey
,
pubKey
[]
byte
)
(
SignatureScheme
,
error
)
{
if
len
(
priKey
)
!=
BLS_PRIVATE_KEY_SIZE
||
len
(
pubKey
)
!=
BLS_PUBLIC_KEY_SIZE
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment