From 5ab1cd07268b45422bdad96da5b848c4163b8fec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 02:02:08 +0000 Subject: [PATCH 1/9] Bump golang.org/x/crypto from 0.0.0-20190123085648-057139ce5d2b to 0.1.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20190123085648-057139ce5d2b to 0.1.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](https://github.com/golang/crypto/commits/v0.1.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 7ab3cdeba..31c7e690b 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ require ( github.com/stretchr/testify v1.3.0 go.dedis.ch/fixbuf v1.0.3 go.dedis.ch/protobuf v1.0.11 - golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b - golang.org/x/sys v0.0.0-20190124100055-b90733256f2e + golang.org/x/crypto v0.1.0 + golang.org/x/sys v0.1.0 ) go 1.13 diff --git a/go.sum b/go.sum index c9ea88086..d42c3ae81 100644 --- a/go.sum +++ b/go.sum @@ -5,6 +5,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -13,7 +14,34 @@ go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRL go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= -golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b h1:Elez2XeF2p9uyVj0yEUDqQ56NFcDtcBNkYP7yv8YbUE= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/sys v0.0.0-20190124100055-b90733256f2e h1:3GIlrlVLfkoipSReOMNAgApI0ajnalyLa/EZHHca/XI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 8b0265a822cac0f192f2599895b89c2752c2657d Mon Sep 17 00:00:00 2001 From: Yang Hau Date: Tue, 27 Jun 2023 11:40:41 -0700 Subject: [PATCH 2/9] refactor: Improve codebase --- share/dkg/pedersen/dkg.go | 5 ++++- share/dkg/pedersen/dkg_test.go | 11 ++++------- share/dkg/rabin/dkg_test.go | 2 +- share/vss/pedersen/vss.go | 2 +- share/vss/pedersen/vss_test.go | 1 + share/vss/rabin/vss.go | 36 ++++++++++++++++++---------------- share/vss/rabin/vss_test.go | 2 ++ 7 files changed, 32 insertions(+), 27 deletions(-) diff --git a/share/dkg/pedersen/dkg.go b/share/dkg/pedersen/dkg.go index 08683a4fd..a381d4f77 100644 --- a/share/dkg/pedersen/dkg.go +++ b/share/dkg/pedersen/dkg.go @@ -341,7 +341,10 @@ func (d *DistKeyGenerator) ProcessDeal(dd *Deal) (*Response, error) { return nil, err } - ver, _ := d.verifiers[dd.Index] + ver, ok := d.verifiers[dd.Index] + if !ok { + return nil, fmt.Errorf("missing verifiers") + } resp, err := ver.ProcessEncryptedDeal(dd.Deal) if err != nil { diff --git a/share/dkg/pedersen/dkg_test.go b/share/dkg/pedersen/dkg_test.go index ba8d875b9..a3572de67 100644 --- a/share/dkg/pedersen/dkg_test.go +++ b/share/dkg/pedersen/dkg_test.go @@ -202,6 +202,7 @@ func TestDKGProcessResponse(t *testing.T) { require.Nil(t, err) resp12, err := rec.ProcessDeal(deals2[idxRec]) + require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, vss.StatusComplaint, resp12.Response.Status) require.Equal(t, deals2[idxRec].Index, uint32(dkg2.nidx)) @@ -797,7 +798,7 @@ func TestDKGResharingNewNodesThreshold(t *testing.T) { require.Equal(t, newDkgs[i].nidx, i) } - //alive := oldT - 1 + // alive := oldT - 1 alive := oldT oldSelected := make([]*DistKeyGenerator, 0, alive) selected := make(map[string]bool) @@ -1130,12 +1131,8 @@ func TestDKGResharingPartialNewNodes(t *testing.T) { newPrivs := make([]kyber.Scalar, 0, newN) newPubs := make([]kyber.Point, 0, newN) - for _, priv := range oldPrivs[1:] { - newPrivs = append(newPrivs, priv) - } - for _, pub := range oldPubs[1:] { - newPubs = append(newPubs, pub) - } + newPrivs = append(newPrivs, oldPrivs[1:]...) + newPubs = append(newPubs, oldPubs[1:]...) // add two new nodes priv1, pub1 := genPair() priv2, pub2 := genPair() diff --git a/share/dkg/rabin/dkg_test.go b/share/dkg/rabin/dkg_test.go index 2d4a29b9c..5a5ecb976 100644 --- a/share/dkg/rabin/dkg_test.go +++ b/share/dkg/rabin/dkg_test.go @@ -643,7 +643,7 @@ func genPair() (kyber.Scalar, kyber.Point) { func randomBytes(n int) []byte { var buff = make([]byte, n) - _, _ = rand.Read(buff[:]) + _, _ = rand.Read(buff) return buff } func checkDks(dks1, dks2 *DistKeyShare) bool { diff --git a/share/vss/pedersen/vss.go b/share/vss/pedersen/vss.go index fd30dc101..3f19b017c 100644 --- a/share/vss/pedersen/vss.go +++ b/share/vss/pedersen/vss.go @@ -378,7 +378,7 @@ func (v *Verifier) ProcessEncryptedDeal(e *EncryptedDeal) (*Response, error) { r.Status = StatusComplaint } - if err == errDealAlreadyProcessed { + if errors.Is(err, errDealAlreadyProcessed) { return nil, err } diff --git a/share/vss/pedersen/vss_test.go b/share/vss/pedersen/vss_test.go index e97efdd51..9876c293c 100644 --- a/share/vss/pedersen/vss_test.go +++ b/share/vss/pedersen/vss_test.go @@ -383,6 +383,7 @@ func TestVSSAggregatorVerifyResponse(t *testing.T) { // wrong index resp.Index = uint32(len(verifiersPub)) sig, err := schnorr.Sign(suite, v.longterm, resp.Hash(suite)) + assert.NoError(t, err) resp.Signature = sig assert.Error(t, aggr.verifyResponse(resp)) resp.Index = 0 diff --git a/share/vss/rabin/vss.go b/share/vss/rabin/vss.go index d9e8f06e9..2884e9984 100644 --- a/share/vss/rabin/vss.go +++ b/share/vss/rabin/vss.go @@ -8,24 +8,26 @@ // verifier can check the validity of the received share. The protocol has the // following steps: // -// 1) The dealer send a Deal to every verifiers using `Deals()`. Each deal must -// be sent securely to one verifier whose public key is at the same index than -// the index of the Deal. +// 1. The dealer send a Deal to every verifiers using `Deals()`. Each deal must +// be sent securely to one verifier whose public key is at the same index than +// the index of the Deal. // -// 2) Each verifier processes the Deal with `ProcessDeal`. -// This function returns a Response which can be twofold: -// - an approval, to confirm a correct deal -// - a complaint to announce an incorrect deal notifying others that the +// 2. Each verifier processes the Deal with `ProcessDeal`. +// This function returns a Response which can be twofold: +// - an approval, to confirm a correct deal +// - a complaint to announce an incorrect deal notifying others that the // dealer might be malicious. -// All Responses must be broadcasted to every verifiers and the dealer. -// 3) The dealer can respond to each complaint by a justification revealing the -// share he originally sent out to the accusing verifier. This is done by -// calling `ProcessResponse` on the `Dealer`. -// 4) The verifiers refuse the shared secret and abort the protocol if there -// are at least t complaints OR if a Justification is wrong. The verifiers -// accept the shared secret if there are at least t approvals at which point -// any t out of n verifiers can reveal their shares to reconstruct the shared -// secret. +// All Responses must be broadcasted to every verifiers and the dealer. +// +// 3. The dealer can respond to each complaint by a justification revealing the +// share he originally sent out to the accusing verifier. This is done by +// calling `ProcessResponse` on the `Dealer`. +// +// 4. The verifiers refuse the shared secret and abort the protocol if there +// are at least t complaints OR if a Justification is wrong. The verifiers +// accept the shared secret if there are at least t approvals at which point +// any t out of n verifiers can reveal their shares to reconstruct the shared +// secret. package vss import ( @@ -400,7 +402,7 @@ func (v *Verifier) ProcessEncryptedDeal(e *EncryptedDeal) (*Response, error) { r.Approved = false } - if err == errDealAlreadyProcessed { + if errors.Is(err, errDealAlreadyProcessed) { return nil, err } diff --git a/share/vss/rabin/vss_test.go b/share/vss/rabin/vss_test.go index 87c4c5fc3..1f33cb7f1 100644 --- a/share/vss/rabin/vss_test.go +++ b/share/vss/rabin/vss_test.go @@ -303,6 +303,7 @@ func TestVSSAggregatorVerifyJustification(t *testing.T) { d.SecShare.V = goodV j, err := dealer.ProcessResponse(resp) + assert.NoError(t, err) // invalid deal justified goodV = j.Deal.SecShare.V @@ -388,6 +389,7 @@ func TestVSSAggregatorVerifyResponse(t *testing.T) { // wrong index resp.Index = uint32(len(verifiersPub)) sig, err := schnorr.Sign(suite, v.longterm, resp.Hash(suite)) + assert.NoError(t, err) resp.Signature = sig assert.Error(t, aggr.verifyResponse(resp)) resp.Index = 0 From 252c46bcbce8a58c62a6fe855aa64ffb1ff6406f Mon Sep 17 00:00:00 2001 From: seratym <94256358+seratym@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:47:53 +0200 Subject: [PATCH 3/9] Update vss.go Changed the description of MinimumT and NewDealer. --- share/vss/rabin/vss.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/vss/rabin/vss.go b/share/vss/rabin/vss.go index 2884e9984..62f000c01 100644 --- a/share/vss/rabin/vss.go +++ b/share/vss/rabin/vss.go @@ -131,10 +131,10 @@ type Justification struct { // NewDealer returns a Dealer capable of leading the secret sharing scheme. It // does not have to be trusted by other Verifiers. The security parameter t is -// the number of shares required to reconstruct the secret. It is HIGHLY -// RECOMMENDED to use a threshold higher or equal than what the method -// MinimumT() returns, otherwise it breaks the security assumptions of the whole -// scheme. It returns an error if the t is inferior or equal to 2. +// the number of shares required to reconstruct the secret. MinimumT() provides +// a middleground between robustness and secrecy. Increasing t will increase +// the secrecy at the cost of the decreased robustness and vice versa. It +// returns an error if the t is inferior or equal to 2. func NewDealer(suite Suite, longterm, secret kyber.Scalar, verifiers []kyber.Point, t int) (*Dealer, error) { d := &Dealer{ suite: suite, @@ -690,11 +690,11 @@ func (a *aggregator) UnsafeSetResponseDKG(idx uint32, approval bool) { a.addResponse(r) } -// MinimumT returns the minimum safe T that is proven to be secure with this -// protocol. It expects n, the total number of participants. -// WARNING: Setting a lower T could make -// the whole protocol insecure. Setting a higher T only makes it harder to -// reconstruct the secret. +// MinimumT returns the a safe value of T that balances secrecy and robustness. +// It expects n, the total number of participants. +// T should be adjusted to your threat model. Setting a lower T decreases the +// difficulty for an adversary to break secrecy. However, a too large T makes +// it possible for an adversary to prevent recovery (robustness). func MinimumT(n int) int { return (n + 1) / 2 } From d6f6d869ef053153c278a40325a6864d9d621713 Mon Sep 17 00:00:00 2001 From: seratym <94256358+seratym@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:54:06 +0200 Subject: [PATCH 4/9] Update vss.go Fixed typo --- share/vss/rabin/vss.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vss/rabin/vss.go b/share/vss/rabin/vss.go index 62f000c01..5d598d316 100644 --- a/share/vss/rabin/vss.go +++ b/share/vss/rabin/vss.go @@ -132,7 +132,7 @@ type Justification struct { // NewDealer returns a Dealer capable of leading the secret sharing scheme. It // does not have to be trusted by other Verifiers. The security parameter t is // the number of shares required to reconstruct the secret. MinimumT() provides -// a middleground between robustness and secrecy. Increasing t will increase +// a middle ground between robustness and secrecy. Increasing t will increase // the secrecy at the cost of the decreased robustness and vice versa. It // returns an error if the t is inferior or equal to 2. func NewDealer(suite Suite, longterm, secret kyber.Scalar, verifiers []kyber.Point, t int) (*Dealer, error) { From 0d1d8b5d2925efe6fd21c379f0f11c7121c4d165 Mon Sep 17 00:00:00 2001 From: seratym <94256358+seratym@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:54:33 +0200 Subject: [PATCH 5/9] Update vss.go Reworded pedersen MinimumT and NewDealer --- share/vss/pedersen/vss.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/vss/pedersen/vss.go b/share/vss/pedersen/vss.go index 3f19b017c..a00c6e6df 100644 --- a/share/vss/pedersen/vss.go +++ b/share/vss/pedersen/vss.go @@ -113,10 +113,10 @@ type Justification struct { // NewDealer returns a Dealer capable of leading the secret sharing scheme. It // does not have to be trusted by other Verifiers. The security parameter t is -// the number of shares required to reconstruct the secret. It is HIGHLY -// RECOMMENDED to use a threshold higher or equal than what the method -// MinimumT() returns, otherwise it breaks the security assumptions of the whole -// scheme. It returns an error if the t is less than or equal to 2. +// the number of shares required to reconstruct the secret. MinimumT() provides +// a middle ground between robustness and secrecy. Increasing t will increase +// the secrecy at the cost of the decreased robustness and vice versa. It +// returns an error if the t is inferior or equal to 2. func NewDealer(suite Suite, longterm, secret kyber.Scalar, verifiers []kyber.Point, t int) (*Dealer, error) { d := &Dealer{ suite: suite, @@ -714,11 +714,11 @@ func (a *Aggregator) MissingResponses() []int { return absents } -// MinimumT returns the minimum safe T that is proven to be secure with this -// protocol. It expects n, the total number of participants. -// WARNING: Setting a lower T could make -// the whole protocol insecure. Setting a higher T only makes it harder to -// reconstruct the secret. +// MinimumT returns the a safe value of T that balances secrecy and robustness. +// It expects n, the total number of participants. +// T should be adjusted to your threat model. Setting a lower T decreases the +// difficulty for an adversary to break secrecy. However, a too large T makes +// it possible for an adversary to prevent recovery (robustness). func MinimumT(n int) int { return (n + 1) / 2 } From 72058e308c7f86fa9e95054cf228f1a7abac8182 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Wed, 8 Nov 2023 16:04:24 +0100 Subject: [PATCH 6/9] Update share/vss/pedersen/vss.go Co-authored-by: pierluca --- share/vss/pedersen/vss.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vss/pedersen/vss.go b/share/vss/pedersen/vss.go index a00c6e6df..f6c0931ca 100644 --- a/share/vss/pedersen/vss.go +++ b/share/vss/pedersen/vss.go @@ -714,7 +714,7 @@ func (a *Aggregator) MissingResponses() []int { return absents } -// MinimumT returns the a safe value of T that balances secrecy and robustness. +// MinimumT returns a safe value of T that balances secrecy and robustness. // It expects n, the total number of participants. // T should be adjusted to your threat model. Setting a lower T decreases the // difficulty for an adversary to break secrecy. However, a too large T makes From c94c832aa7fba7539f4b09737fdd683b2afbc495 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Wed, 8 Nov 2023 16:04:33 +0100 Subject: [PATCH 7/9] Update share/vss/rabin/vss.go Co-authored-by: pierluca --- share/vss/rabin/vss.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vss/rabin/vss.go b/share/vss/rabin/vss.go index 5d598d316..f09a353c0 100644 --- a/share/vss/rabin/vss.go +++ b/share/vss/rabin/vss.go @@ -133,7 +133,7 @@ type Justification struct { // does not have to be trusted by other Verifiers. The security parameter t is // the number of shares required to reconstruct the secret. MinimumT() provides // a middle ground between robustness and secrecy. Increasing t will increase -// the secrecy at the cost of the decreased robustness and vice versa. It +// the secrecy at the cost of the decreased robustness and vice versa. It // returns an error if the t is inferior or equal to 2. func NewDealer(suite Suite, longterm, secret kyber.Scalar, verifiers []kyber.Point, t int) (*Dealer, error) { d := &Dealer{ From 59bee311fc405af350b091b5c3059e29013f3d41 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Wed, 8 Nov 2023 16:04:41 +0100 Subject: [PATCH 8/9] Update share/vss/rabin/vss.go Co-authored-by: pierluca --- share/vss/rabin/vss.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vss/rabin/vss.go b/share/vss/rabin/vss.go index f09a353c0..9de4b3980 100644 --- a/share/vss/rabin/vss.go +++ b/share/vss/rabin/vss.go @@ -690,7 +690,7 @@ func (a *aggregator) UnsafeSetResponseDKG(idx uint32, approval bool) { a.addResponse(r) } -// MinimumT returns the a safe value of T that balances secrecy and robustness. +// MinimumT returns a safe value of T that balances secrecy and robustness. // It expects n, the total number of participants. // T should be adjusted to your threat model. Setting a lower T decreases the // difficulty for an adversary to break secrecy. However, a too large T makes From d9f4b47e2d8d35d899b7d0c6722639d47ef2f74b Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Wed, 8 Nov 2023 16:04:48 +0100 Subject: [PATCH 9/9] Update share/vss/pedersen/vss.go Co-authored-by: pierluca --- share/vss/pedersen/vss.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vss/pedersen/vss.go b/share/vss/pedersen/vss.go index f6c0931ca..611c8c756 100644 --- a/share/vss/pedersen/vss.go +++ b/share/vss/pedersen/vss.go @@ -115,7 +115,7 @@ type Justification struct { // does not have to be trusted by other Verifiers. The security parameter t is // the number of shares required to reconstruct the secret. MinimumT() provides // a middle ground between robustness and secrecy. Increasing t will increase -// the secrecy at the cost of the decreased robustness and vice versa. It +// the secrecy at the cost of the decreased robustness and vice versa. It // returns an error if the t is inferior or equal to 2. func NewDealer(suite Suite, longterm, secret kyber.Scalar, verifiers []kyber.Point, t int) (*Dealer, error) { d := &Dealer{