Documentation ¶
Overview ¶
Package signing ED MPC implementation of signing
Index ¶
- func CalKValue(keyType string, message, pkFinal, RFinal []byte) ([32]byte, error)
- func CheckFull(msg []smpc.Message) bool
- func EdVerify(input InputVerify, sigtype string) bool
- func NewLocalDNode(out chan<- smpc.Message, end chan<- EdSignData, ...) smpc.DNode
- type EdSignData
- type InputVerify
- type LocalDNode
- func (p *LocalDNode) DNodeID() string
- func (p *LocalDNode) DulMessage(msg smpc.Message) bool
- func (p *LocalDNode) Finalize() bool
- func (p *LocalDNode) FinalizeRound() smpc.Round
- func (p *LocalDNode) FirstRound() smpc.Round
- func (p *LocalDNode) SetDNodeID(id string)
- func (p *LocalDNode) Start() error
- func (p *LocalDNode) StoreMessage(msg smpc.Message) (bool, error)
- func (p *LocalDNode) Update(msg smpc.Message) (ok bool, err error)
- type PrePubData
- type SignRound1Message
- func (srm *SignRound1Message) GetFromID() string
- func (srm *SignRound1Message) GetFromIndex() int
- func (srm *SignRound1Message) GetMsgType() string
- func (srm *SignRound1Message) GetToID() []string
- func (srm *SignRound1Message) IsBroadcast() bool
- func (srm *SignRound1Message) OutMap() map[string]string
- type SignRound2Message
- func (srm *SignRound2Message) GetFromID() string
- func (srm *SignRound2Message) GetFromIndex() int
- func (srm *SignRound2Message) GetMsgType() string
- func (srm *SignRound2Message) GetToID() []string
- func (srm *SignRound2Message) IsBroadcast() bool
- func (srm *SignRound2Message) OutMap() map[string]string
- type SignRound3Message
- func (srm *SignRound3Message) GetFromID() string
- func (srm *SignRound3Message) GetFromIndex() int
- func (srm *SignRound3Message) GetMsgType() string
- func (srm *SignRound3Message) GetToID() []string
- func (srm *SignRound3Message) IsBroadcast() bool
- func (srm *SignRound3Message) OutMap() map[string]string
- type SignRound4Message
- func (srm *SignRound4Message) GetFromID() string
- func (srm *SignRound4Message) GetFromIndex() int
- func (srm *SignRound4Message) GetMsgType() string
- func (srm *SignRound4Message) GetToID() []string
- func (srm *SignRound4Message) IsBroadcast() bool
- func (srm *SignRound4Message) OutMap() map[string]string
- type SignRound5Message
- func (srm *SignRound5Message) GetFromID() string
- func (srm *SignRound5Message) GetFromIndex() int
- func (srm *SignRound5Message) GetMsgType() string
- func (srm *SignRound5Message) GetToID() []string
- func (srm *SignRound5Message) IsBroadcast() bool
- func (srm *SignRound5Message) OutMap() map[string]string
- type SignRound6Message
- func (srm *SignRound6Message) GetFromID() string
- func (srm *SignRound6Message) GetFromIndex() int
- func (srm *SignRound6Message) GetMsgType() string
- func (srm *SignRound6Message) GetToID() []string
- func (srm *SignRound6Message) IsBroadcast() bool
- func (srm *SignRound6Message) OutMap() map[string]string
- type SignRoundMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLocalDNode ¶
func NewLocalDNode( out chan<- smpc.Message, end chan<- EdSignData, save *keygen.LocalDNodeSaveData, idsign smpc.SortableIDSSlice, kgid *big.Int, threshold int, paillierkeylength int, finalize bool, predata *PrePubData, txhash *big.Int, cointype string, finalizeend chan<- *big.Int, ) smpc.DNode
NewLocalDNode new a DNode data struct for current node
Types ¶
type EdSignData ¶
EdSignData ed sign result (r,s)
type InputVerify ¶
type InputVerify struct { KeyType string FinalR [32]byte FinalS [32]byte Message []byte FinalPk [32]byte }
InputVerify Ed algorithm validation data
type LocalDNode ¶
LocalDNode current local node
func (*LocalDNode) DNodeID ¶
func (p *LocalDNode) DNodeID() string
DNodeID get the ID of current DNode
func (*LocalDNode) DulMessage ¶
func (p *LocalDNode) DulMessage(msg smpc.Message) bool
DulMessage check whether the msg already exists in the list.
func (*LocalDNode) FinalizeRound ¶
func (p *LocalDNode) FinalizeRound() smpc.Round
FinalizeRound get finalize round
func (*LocalDNode) SetDNodeID ¶
func (p *LocalDNode) SetDNodeID(id string)
SetDNodeID set the ID of current DNode p.ID : enode --> DoubleHash --> index+1 --> Sprintf(index+1) --> []byte( Sprintf(index+1) ) --> EncodeToString *big.Int format: index+1 string format: EncodeToString
func (*LocalDNode) StoreMessage ¶
func (p *LocalDNode) StoreMessage(msg smpc.Message) (bool, error)
StoreMessage Collect data from other nodes
type PrePubData ¶
PrePubData pre-sign data
type SignRound1Message ¶
type SignRound1Message struct { *SignRoundMessage CR [32]byte }
SignRound1Message Round 1 sending message
func (*SignRound1Message) GetFromID ¶
func (srm *SignRound1Message) GetFromID() string
GetFromID get the ID of sending nodes in the group
func (*SignRound1Message) GetFromIndex ¶
func (srm *SignRound1Message) GetFromIndex() int
GetFromIndex get the Serial number of sending nodes in the group
func (*SignRound1Message) GetMsgType ¶
func (srm *SignRound1Message) GetMsgType() string
GetMsgType get msg type
func (*SignRound1Message) GetToID ¶
func (srm *SignRound1Message) GetToID() []string
GetToID get the ID of the node that broacasting message to
func (*SignRound1Message) IsBroadcast ¶
func (srm *SignRound1Message) IsBroadcast() bool
IsBroadcast weather broacast the message
func (*SignRound1Message) OutMap ¶
func (srm *SignRound1Message) OutMap() map[string]string
OutMap transfer *SignRound1Message to map
type SignRound2Message ¶
type SignRound2Message struct { *SignRoundMessage ZkR [64]byte }
SignRound2Message Round 2 sending message
func (*SignRound2Message) GetFromID ¶
func (srm *SignRound2Message) GetFromID() string
GetFromID get the ID of sending nodes in the group
func (*SignRound2Message) GetFromIndex ¶
func (srm *SignRound2Message) GetFromIndex() int
GetFromIndex get the Serial number of sending nodes in the group
func (*SignRound2Message) GetMsgType ¶
func (srm *SignRound2Message) GetMsgType() string
GetMsgType get msg type
func (*SignRound2Message) GetToID ¶
func (srm *SignRound2Message) GetToID() []string
GetToID get the ID of the node that broacasting message to
func (*SignRound2Message) IsBroadcast ¶
func (srm *SignRound2Message) IsBroadcast() bool
IsBroadcast weather broacast the message
func (*SignRound2Message) OutMap ¶
func (srm *SignRound2Message) OutMap() map[string]string
OutMap transfer *SignRound2Message to map
type SignRound3Message ¶
type SignRound3Message struct { *SignRoundMessage DR [64]byte }
SignRound3Message Round 3 sending message
func (*SignRound3Message) GetFromID ¶
func (srm *SignRound3Message) GetFromID() string
GetFromID get the ID of sending nodes in the group
func (*SignRound3Message) GetFromIndex ¶
func (srm *SignRound3Message) GetFromIndex() int
GetFromIndex get the Serial number of sending nodes in the group
func (*SignRound3Message) GetMsgType ¶
func (srm *SignRound3Message) GetMsgType() string
GetMsgType get msg type
func (*SignRound3Message) GetToID ¶
func (srm *SignRound3Message) GetToID() []string
GetToID get the ID of the node that broacasting message to
func (*SignRound3Message) IsBroadcast ¶
func (srm *SignRound3Message) IsBroadcast() bool
IsBroadcast weather broacast the message
func (*SignRound3Message) OutMap ¶
func (srm *SignRound3Message) OutMap() map[string]string
OutMap transfer *SignRound3Message to map
type SignRound4Message ¶
type SignRound4Message struct { *SignRoundMessage CSB [32]byte }
SignRound4Message Round 4 sending message
func (*SignRound4Message) GetFromID ¶
func (srm *SignRound4Message) GetFromID() string
GetFromID get the ID of sending nodes in the group
func (*SignRound4Message) GetFromIndex ¶
func (srm *SignRound4Message) GetFromIndex() int
GetFromIndex get the Serial number of sending nodes in the group
func (*SignRound4Message) GetMsgType ¶
func (srm *SignRound4Message) GetMsgType() string
GetMsgType get msg type
func (*SignRound4Message) GetToID ¶
func (srm *SignRound4Message) GetToID() []string
GetToID get the ID of the node that broacasting message to
func (*SignRound4Message) IsBroadcast ¶
func (srm *SignRound4Message) IsBroadcast() bool
IsBroadcast weather broacast the message
func (*SignRound4Message) OutMap ¶
func (srm *SignRound4Message) OutMap() map[string]string
OutMap transfer *SignRound4Message to map
type SignRound5Message ¶
type SignRound5Message struct { *SignRoundMessage DSB [64]byte }
SignRound5Message Round 5 sending message
func (*SignRound5Message) GetFromID ¶
func (srm *SignRound5Message) GetFromID() string
GetFromID get the ID of sending nodes in the group
func (*SignRound5Message) GetFromIndex ¶
func (srm *SignRound5Message) GetFromIndex() int
GetFromIndex get the Serial number of sending nodes in the group
func (*SignRound5Message) GetMsgType ¶
func (srm *SignRound5Message) GetMsgType() string
GetMsgType get msg type
func (*SignRound5Message) GetToID ¶
func (srm *SignRound5Message) GetToID() []string
GetToID get the ID of the node that broacasting message to
func (*SignRound5Message) IsBroadcast ¶
func (srm *SignRound5Message) IsBroadcast() bool
IsBroadcast weather broacast the message
func (*SignRound5Message) OutMap ¶
func (srm *SignRound5Message) OutMap() map[string]string
OutMap transfer *SignRound5Message to map
type SignRound6Message ¶
type SignRound6Message struct { *SignRoundMessage S [32]byte }
SignRound6Message Round 6 sending message
func (*SignRound6Message) GetFromID ¶
func (srm *SignRound6Message) GetFromID() string
GetFromID get the ID of sending nodes in the group
func (*SignRound6Message) GetFromIndex ¶
func (srm *SignRound6Message) GetFromIndex() int
GetFromIndex get the Serial number of sending nodes in the group
func (*SignRound6Message) GetMsgType ¶
func (srm *SignRound6Message) GetMsgType() string
GetMsgType get msg type
func (*SignRound6Message) GetToID ¶
func (srm *SignRound6Message) GetToID() []string
GetToID get the ID of the node that broacasting message to
func (*SignRound6Message) IsBroadcast ¶
func (srm *SignRound6Message) IsBroadcast() bool
IsBroadcast weather broacast the message
func (*SignRound6Message) OutMap ¶
func (srm *SignRound6Message) OutMap() map[string]string
OutMap transfer *SignRound6Message to map
type SignRoundMessage ¶
type SignRoundMessage struct { FromID string `json:"FromID"` //DNodeID FromIndex int `json:"FromIndex"` ToID []string `json:"ToID"` }
SignRoundMessage base type of sign round message
func (*SignRoundMessage) AppendToID ¶
func (srm *SignRoundMessage) AppendToID(toid string)
AppendToID get the ID of nodes that the message will broacast to
func (*SignRoundMessage) SetFromID ¶
func (srm *SignRoundMessage) SetFromID(id string)
SetFromID set sending nodes's ID
func (*SignRoundMessage) SetFromIndex ¶
func (srm *SignRoundMessage) SetFromIndex(index int)
SetFromIndex set sending nodes's serial number in group