Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09e5ac97b9 | |||
| cfeb092957 | |||
| e1b3e68983 |
@ -97,6 +97,7 @@ type DSSArgs = struct {
|
|||||||
Random DistKeyShare
|
Random DistKeyShare
|
||||||
Msg *big.Int
|
Msg *big.Int
|
||||||
T int
|
T int
|
||||||
|
Qualified []int
|
||||||
}
|
}
|
||||||
|
|
||||||
// PartialSig is partial representation of the final distributed signature. It
|
// PartialSig is partial representation of the final distributed signature. It
|
||||||
@ -213,6 +214,17 @@ func (d *DSS) ProcessPartialSig(ps *PartialSig) error {
|
|||||||
if err := ethschnorr.Verify(public, ps.Hash(), ps.Signature); err != nil {
|
if err := ethschnorr.Verify(public, ps.Hash(), ps.Signature); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// qualified := false
|
||||||
|
// for _, idx := range d.Qualified {
|
||||||
|
// if ps.Partial.I == idx {
|
||||||
|
// qualified = true
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if !qualified {
|
||||||
|
// return errors.New("dss: partial signature from non-qualifying participant")
|
||||||
|
// }
|
||||||
if _, ok := d.partialsIdx[ps.Partial.I]; ok {
|
if _, ok := d.partialsIdx[ps.Partial.I]; ok {
|
||||||
return errors.New("dss: partial signature already received from peer")
|
return errors.New("dss: partial signature already received from peer")
|
||||||
}
|
}
|
||||||
|
|||||||
3
go.mod
3
go.mod
@ -22,4 +22,5 @@ require (
|
|||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace go.dedis.ch/kyber/v3 => github.com/cerc-io/kyber/v3 v3.0.0-20250728035006-f80208a7f291 // branch dev-3.x
|
replace go.dedis.ch/kyber/v3 => ../kyber
|
||||||
|
// replace go.dedis.ch/kyber/v3 => github.com/cerc-io/kyber/v3 v3.0.0-20250728035006-f80208a7f291 // branch dev-3.x
|
||||||
|
|||||||
@ -77,8 +77,8 @@ func (s *SuiteSecp256k1) New(t reflect.Type) interface{} {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RandomStream returns a cipher.Stream that returns a key stream
|
// RandomStream returns the cipher.Stream with which the suite was initialized with, or a new key
|
||||||
// from crypto/rand.
|
// stream from crypto/rand if one is not set.
|
||||||
func (s *SuiteSecp256k1) RandomStream() cipher.Stream {
|
func (s *SuiteSecp256k1) RandomStream() cipher.Stream {
|
||||||
if s.r != nil {
|
if s.r != nil {
|
||||||
return s.r
|
return s.r
|
||||||
@ -92,3 +92,9 @@ func (s *SuiteSecp256k1) RandomStream() cipher.Stream {
|
|||||||
func NewBlakeKeccackSecp256k1() *SuiteSecp256k1 {
|
func NewBlakeKeccackSecp256k1() *SuiteSecp256k1 {
|
||||||
return new(SuiteSecp256k1)
|
return new(SuiteSecp256k1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewBlakeKeccackSecp256k1 returns a cipher suite based on package
|
||||||
|
// go.dedis.ch/kyber/xof/blake2xb, SHA-256, and the secp256k1 curve.
|
||||||
|
func NewBlakeKeccackSecp256k1WithKeyStream(stream cipher.Stream) *SuiteSecp256k1 {
|
||||||
|
return &SuiteSecp256k1{r: stream}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user