Documentation
¶
Index ¶
- Constants
- Variables
- func BaseStart(p DNode) error
- func BaseUpdate(p DNode, msg Message) (ok bool, err error)
- func DECDSASignCalcv(keytype string, r, deltaGammaGy, pkx, pky, R, S *big.Int, hashBytes []byte, ...) int
- func GetRandomInt(length int) *big.Int
- func IsInfinityPoint(x *big.Int, y *big.Int) bool
- func ReadBits(bigint *big.Int, buf []byte)
- func Verify2(keytype string, r *big.Int, s *big.Int, v int32, message string, pkx *big.Int, ...) bool
- type BaseDNode
- type DNode
- type Message
- type Round
- type SortableIDSSlice
Constants ¶
View Source
const EC256K1 string = "EC256K1"
View Source
const EC256STARK string = "EC256STARK"
View Source
const ED25519 string = "ED25519"
View Source
const SR25519 string = "SR25519"
Variables ¶
View Source
var VALID_SIG_TYPES = []string{EC256K1, ED25519, EC256STARK, SR25519}
Functions ¶
func BaseUpdate ¶
BaseUpdate an implementation of Update that is shared across the different types of parties (keygen, signing, dynamic groups)
func DECDSASignCalcv ¶
func DECDSASignCalcv(keytype string, r, deltaGammaGy, pkx, pky, R, S *big.Int, hashBytes []byte, invert bool) int
DECDSASignCalcv calc v of (r,s,v)
Types ¶
type BaseDNode ¶
type BaseDNode struct { ID string DNodeCountInGroup int ThresHold int PaillierKeyLength int KeyType string // contains filtered or unexported fields }
BaseDNode the base type of LocalDNode
type DNode ¶
type DNode interface { Start() error Update(msg Message) (ok bool, err error) FirstRound() Round DNodeID() string StoreMessage(msg Message) (bool, error) DulMessage(msg Message) bool SetDNodeID(id string) Finalize() bool FinalizeRound() Round Round() Round // contains filtered or unexported methods }
DNode base interface of local dnode
type Message ¶
type Message interface { GetFromID() string // x,fi(x) ---> id,skui GetFromIndex() int GetToID() []string IsBroadcast() bool OutMap() map[string]string GetMsgType() string }
Message P2P message for MPC calculation
type Round ¶
type Round interface { Start() error CanAccept(msg Message) bool Update() (bool, error) NextRound() Round RoundNumber() int CanProceed() bool GetIDs() (SortableIDSSlice, error) GetDNodeIDIndex(id string) (int, error) ResetOK() }
Round Calculation rounds of MPC algorithm
type SortableIDSSlice ¶
SortableIDSSlice type define []*big.Int
func (SortableIDSSlice) Len ¶
func (s SortableIDSSlice) Len() int
func (SortableIDSSlice) Less ¶
func (s SortableIDSSlice) Less(i, j int) bool
func (SortableIDSSlice) Swap ¶
func (s SortableIDSSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.