Documentation ¶
Overview ¶
Package server
@author: xwc1125 @date: 2019/9/25
Package server ¶
@author: xwc1125 @date: 2019/9/25
Package server ¶
@author: xwc1125 @date: 2019/9/25
Package server ¶
@author: xwc1125 @date: 2019/9/25
Index ¶
- Variables
- type KeyGenMsg1
- type KeyGenMsg2
- type KeyGenMsg3
- type KeyGenMsg4
- type KeyGenMsg5
- type KeyGenMsg6
- type KeyGenMsg7
- type Party2
- func (p *Party2) KeyGenPhase2(sid uint64, m1 *KeyGenMsg1) (*KeyGenMsg2, error)
- func (p *Party2) KeyGenPhase4(sid uint64, m3 *KeyGenMsg3) (*KeyGenMsg4, error)
- func (p *Party2) KeyGenPhase6(sid uint64, m5 *KeyGenMsg5) (*KeyGenMsg6, error)
- func (p *Party2) KeyGenPhase8(sid uint64, m7 *KeyGenMsg7) error
- func (p *Party2) PrivateKey() (*Party2PrivateKey, error)
- type Party2PrivateKey
- type Party2SignCtx
- type SignMsg1
- type SignMsg2
- type SignMsg3
- type SignMsg4
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFinalKeyMismatch = errors.New("final OT key doesn't match") ErrKeyNotGenerated = errors.New("private key has not been generated") )
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 Party2 ¶
type Party2 struct { // Keygen phase 2 X1PoKComm common.Comm X2 *eckey.PublicKey // 公钥 X2PoK *common.DLogPoK // 2P-ECDSA-KEYGEN-2 对应的sign和公钥 RPVerifier *common.RangeProofVerifier // 随机证明的校验者 // Keygen phase 4 X1 *eckey.PublicKey PPK *paillier.PublicKey CKey *big.Int CPrime *big.Int A *big.Int B *big.Int ABNonce common.Nonce // Keygen phase 6 AlphaComm common.Comm // Keygen phase 8 Q *eckey.PublicKey // contains filtered or unexported fields }
func (*Party2) KeyGenPhase2 ¶
func (p *Party2) KeyGenPhase2(sid uint64, m1 *KeyGenMsg1) (*KeyGenMsg2, error)
生成x2
func (*Party2) KeyGenPhase4 ¶
func (p *Party2) KeyGenPhase4(sid uint64, m3 *KeyGenMsg3) (*KeyGenMsg4, error)
生成PPK,CKey
func (*Party2) KeyGenPhase6 ¶
func (p *Party2) KeyGenPhase6(sid uint64, m5 *KeyGenMsg5) (*KeyGenMsg6, error)
func (*Party2) KeyGenPhase8 ¶
func (p *Party2) KeyGenPhase8( sid uint64, m7 *KeyGenMsg7) error
func (*Party2) PrivateKey ¶
func (p *Party2) PrivateKey() (*Party2PrivateKey, error)
type Party2PrivateKey ¶
type Party2PrivateKey struct { Cfg *common.Config PPK *paillier.PublicKey CKey *big.Int X2SK *eckey.SecretKey PublicKey *btcec.PublicKey }
func (*Party2PrivateKey) NewSignCtx ¶
func (sk *Party2PrivateKey) NewSignCtx(msg []byte) *Party2SignCtx
type Party2SignCtx ¶
type Party2SignCtx struct { // Sign phase 2 R1PoKComm common.Comm R2 *eckey.PublicKey R2PoK *common.DLogPoK // Sign phase 4 R1 *eckey.PublicKey // contains filtered or unexported fields }
func (*Party2SignCtx) SignMsgPhase2 ¶
func (p *Party2SignCtx) SignMsgPhase2(sid uint64, m1 *SignMsg1) (*SignMsg2, error)
func (*Party2SignCtx) SignMsgPhase4 ¶
func (p *Party2SignCtx) SignMsgPhase4(sid uint64, m3 *SignMsg3) (*SignMsg4, error)
func (*Party2SignCtx) Zero ¶
func (c *Party2SignCtx) Zero()
Click to show internal directories.
Click to hide internal directories.