Documentation ¶
Index ¶
- func NewDualpriv(newPriv1 func() (sig.Priv, error), newPriv2 func() (sig.Priv, error), ...) (sig.Priv, error)
- func NewDualprivCustomThresh(priv1, priv2 sig.Priv, useForCoin, useForSecondary types.SignType) (sig.Priv, error)
- type DualPriv
- func (priv *DualPriv) ComputeSharedSecret(pub sig.Pub) [32]byte
- func (priv *DualPriv) GenerateSig(header sig.SignedMessage, vrfProof sig.VRFProof, signType types.SignType) (*sig.SigItem, error)
- func (priv *DualPriv) GetPrivForSignType(signType types.SignType) (sig.Priv, error)
- func (priv *DualPriv) GetPub() sig.Pub
- func (priv *DualPriv) GetSecondaryPriv() sig.Priv
- func (priv *DualPriv) SetIndex(idx sig.PubKeyIndex)
- func (priv *DualPriv) ShallowCopy() sig.Priv
- type DualPub
- func (pub *DualPub) CheckSignature(msg *sig.MultipleSignedMessage, sigItem *sig.SigItem) error
- func (pub *DualPub) DeserializeSig(m *messages.Message, signType types.SignType) (*sig.SigItem, int, error)
- func (dpp *DualPub) FromPubBytes(inBuff sig.PubKeyBytes) (sig.Pub, error)
- func (dpp *DualPub) GetRealPubBytes() (ret sig.PubKeyBytes, err error)
- func (dpp *DualPub) New() sig.Pub
- func (dpp *DualPub) SetIndex(idx sig.PubKeyIndex)
- func (pub *DualPub) SetPubs(pub1, pub2 sig.Pub)
- func (dpp *DualPub) ShallowCopy() sig.Pub
- func (dpp *DualPub) VerifySecondarySig(msg sig.SignedMessage, sign sig.Sig) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDualpriv ¶
Types ¶
type DualPriv ¶
type DualPriv struct { sig.Priv sig.ThreshStateInterface sig.VRFPriv Priv2 sig.Priv // contains filtered or unexported fields }
func (*DualPriv) ComputeSharedSecret ¶
func (*DualPriv) GenerateSig ¶
func (priv *DualPriv) GenerateSig(header sig.SignedMessage, vrfProof sig.VRFProof, signType types.SignType) (*sig.SigItem, error)
GenerateSig signs a message and returns the SigItem object containing the signature
func (*DualPriv) GetPrivForSignType ¶
Returns key that is used for signing the sign type.
func (*DualPriv) GetSecondaryPriv ¶
func (*DualPriv) SetIndex ¶
func (priv *DualPriv) SetIndex(idx sig.PubKeyIndex)
func (*DualPriv) ShallowCopy ¶
type DualPub ¶
func (*DualPub) CheckSignature ¶
CheckSignature validates the signature with the public key. If the message type is a coin message, it is verified using CoinProof
func (*DualPub) DeserializeSig ¶
func (*DualPub) FromPubBytes ¶
FromPubBytes creates a pub from the bytes created by GetRealPubBytes
func (*DualPub) GetRealPubBytes ¶
func (dpp *DualPub) GetRealPubBytes() (ret sig.PubKeyBytes, err error)
GetRealPubBytes returns a buffer containing the results of GetRealPubBytes on both of the keys
func (*DualPub) SetIndex ¶
func (dpp *DualPub) SetIndex(idx sig.PubKeyIndex)
SetIndex sets the index of both the pubs
func (*DualPub) ShallowCopy ¶
ShallowCopy makes a copy of the object without following pointers.
func (*DualPub) VerifySecondarySig ¶
VerifySecondarySig calls VerifySig using the secondary public key.
Click to show internal directories.
Click to hide internal directories.