Documentation
¶
Overview ¶
Package client
@author: xwc1125 @date: 2019/9/25
Package client ¶
@author: xwc1125 @date: 2019/9/25
Package client ¶
@author: xwc1125 @date: 2019/9/25
Package client ¶
@author: xwc1125 @date: 2019/9/25
Index ¶
- Variables
- type KeyGenMsg1
- type KeyGenMsg2
- type KeyGenMsg3
- type KeyGenMsg4
- type KeyGenMsg5
- type KeyGenMsg6
- type KeyGenMsg7
- type Party1
- func (p *Party1) KeyGenPhase1(sid uint64) (*KeyGenMsg1, error)
- func (p *Party1) KeyGenPhase3(sid uint64, m2 *KeyGenMsg2) (*KeyGenMsg3, error)
- func (p *Party1) KeyGenPhase5(sid uint64, m4 *KeyGenMsg4) (*KeyGenMsg5, error)
- func (p *Party1) KeyGenPhase7(sid uint64, m6 *KeyGenMsg6) (*KeyGenMsg7, error)
- func (p *Party1) PrivateKey() (*Party1PrivateKey, error)
- type Party1PrivateKey
- type Party1SignCtx
- type SignMsg1
- type SignMsg2
- type SignMsg3
- type SignMsg4
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidOTMac = errors.New("invalid one-time MAC") ErrKeyNotGenerated = errors.New("private key has not been generated") )
View Source
var ErrInvalidSignature = errors.New("invalid presignature created")
Functions ¶
This section is empty.
Types ¶
type KeyGenMsg1 ¶
type KeyGenMsg3 ¶
type KeyGenMsg3 struct { X1PoK *common.DLogPoK X1PoKNonce common.Nonce PProof *common.PaillierNthRootProof Ckey []byte RPCtxtPairs []common.CiphertextPair }
type KeyGenMsg4 ¶
type KeyGenMsg7 ¶
type KeyGenMsg7 struct { AlphaPK *eckey.CompressedPublicKey AlphaNonce common.Nonce }
type Party1 ¶
type Party1 struct { Cfg *common.Config // Keygen phase 1 Sx1 *eckey.SecretKey // 私钥 X1 *eckey.PublicKey // 公钥 X1PoK *common.DLogPoK // DlogPoK 2P-ECDSA-KEYGEN-1的sign和公钥内容 X1Nonce common.Nonce // nonce值 // Keygen phase 3 X2 *eckey.PublicKey // 公钥 PSK *paillier.PrivateKey CKey *big.Int CKeyNonce *big.Int RPProver *common.RangeProofProver // Keygen phase 5 ABComm common.Comm Alpha *big.Int AlphaPK *eckey.CompressedPublicKey AlphaNonce common.Nonce // Keygen phase 7 Q *eckey.PublicKey }
func (*Party1) KeyGenPhase3 ¶
func (p *Party1) KeyGenPhase3(sid uint64, m2 *KeyGenMsg2) (*KeyGenMsg3, error)
生成PSK
func (*Party1) KeyGenPhase5 ¶
func (p *Party1) KeyGenPhase5(sid uint64, m4 *KeyGenMsg4) (*KeyGenMsg5, error)
func (*Party1) KeyGenPhase7 ¶
func (p *Party1) KeyGenPhase7(sid uint64, m6 *KeyGenMsg6) (*KeyGenMsg7, error)
func (*Party1) PrivateKey ¶
func (p *Party1) PrivateKey() (*Party1PrivateKey, error)
type Party1PrivateKey ¶
type Party1PrivateKey struct { Cfg *common.Config PSK *paillier.PrivateKey X1SK *eckey.SecretKey PublicKey *btcec.PublicKey }
func (*Party1PrivateKey) NewSignCtx ¶
func (sk *Party1PrivateKey) NewSignCtx(msg []byte) *Party1SignCtx
type Party1SignCtx ¶
type Party1SignCtx struct { R1 *eckey.PublicKey R1PoK *common.DLogPoK R1PoKNonce common.Nonce // Sign phase 3 R2 *eckey.PublicKey // contains filtered or unexported fields }
func (*Party1SignCtx) SignMsgPhase1 ¶
func (p *Party1SignCtx) SignMsgPhase1(sid uint64) (*SignMsg1, error)
func (*Party1SignCtx) SignMsgPhase3 ¶
func (p *Party1SignCtx) SignMsgPhase3(sid uint64, m2 *SignMsg2) (*SignMsg3, error)
func (*Party1SignCtx) SignMsgPhase5 ¶
func (*Party1SignCtx) Zero ¶
func (c *Party1SignCtx) Zero()
Click to show internal directories.
Click to hide internal directories.