-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpss.go
45 lines (35 loc) · 886 Bytes
/
pss.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package pss
import (
"context"
"go.dedis.ch/kyber/v3/suites"
"github.com/sourcenetwork/orbis-go/pkg/crypto"
"github.com/sourcenetwork/orbis-go/pkg/types"
)
type Message interface{}
type PSS interface {
// Initialze a new PSS
Init(types.RingID, int32, int32, []types.Node) error
// Name of the PSS Algorithm
Name() string
// Cryptographic suite
Suite() suites.Suite
// Start the service
Start()
// Shutdown the service
Shutdown() error
// Process incoming messages relating to the
// operations or maintenence of the PSS/DKG
// algorithm
ProcessMessage(context.Context, Message)
// Aggregate public key of the PSS/DKG
PublicKey() crypto.PublicKey
// Public polynomial
// might not need on interface
PublicPoly() crypto.PubPoly
// Private share of this node
Share() crypto.DistKeyShare
// State of the PSS
State() string
Num() int
Threshold() int
}