From 2d7018645094529690e04a996efa848d5fa956f8 Mon Sep 17 00:00:00 2001
From: lunfardo314 <evaldas.drasutis@iota.org>
Date: Sun, 29 Mar 2020 12:42:52 +0300
Subject: [PATCH] BLS signatures: bug fix in test, removed unnecessary
 function, added new test

---
 .../valuetransfer/address/signaturescheme/bls.go  | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/packages/binary/valuetransfer/address/signaturescheme/bls.go b/packages/binary/valuetransfer/address/signaturescheme/bls.go
index d6aeec56..ca2b0134 100644
--- a/packages/binary/valuetransfer/address/signaturescheme/bls.go
+++ b/packages/binary/valuetransfer/address/signaturescheme/bls.go
@@ -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
-// more 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. More 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 {
-- 
GitLab