Versions in this module Expand all Collapse all v0 v0.0.1 Apr 22, 2023 Changes in this version + func NewCommit(data []byte) (Commitments, Nonce, error) + type BitSlice []byte + func (b BitSlice) Bit(i int) byte + type CiphertextPair struct + C1 *big.Int + C2 *big.Int + func NewCiphertextPairs(size int) []CiphertextPair + type Commitments [32]byte + func (c *Commitments) MarshalText() ([]byte, error) + func (c *Commitments) UnmarshalText(input []byte) error + func (c *Commitments) Verify(data []byte, nonce *Nonce) error + type DLogProof struct + ChallengeResponse *big.Int + PkRandComm []byte + PublicShare []byte + func (proof *DLogProof) Verify() error + type KenGenParams struct + Curve elliptic.Curve + NPaillierBits int + Q *big.Int + Q3 *big.Int + QSquared *big.Int + RangeSecBits int + type KeyGenCommWitness struct + PkCommitNonce Nonce + Proof *DLogProof + PublicShare []byte + ZkPokNonce Nonce + type KeyGenParty1FirstMsg struct + PkCommit Commitments + ZkPokCommit Commitments + type KeyGenParty1FourthMsg struct + PdlDecommit *Party1PDLDecommit + type KeyGenParty1SecondMsg struct + CKProof *NICorrectKeyProof + Ckey *big.Int + RPCtxtPairs []CiphertextPair + Witness *KeyGenCommWitness + type KeyGenParty1ThirdMsg struct + Party1PdlMsg1 *Party1PDLFirstMsg + RPProofPairs []ProofPair + type KeyGenParty2FirstMsg struct + Proof *DLogProof + RPChalComm Commitments + type KeyGenParty2SThirdMsg struct + PdlDecomm *Party2PDLDecommit + type KeyGenParty2SecondMsg struct + Pdl1stMsg *Party2PDLFirstMsg + RPChalNonce Nonce + RPChallenge BitSlice + type MasterKey1 struct + PSk *paillier.PrivateKey + Pk *ecdsa.PublicKey + Pk2 *ecdsa.PublicKey + Sk1 *ecdsa.PrivateKey + func (k *MasterKey1) MarshalJSON() ([]byte, error) + func (k *MasterKey1) UnmarshalJSON(input []byte) error + type MasterKey2 struct + Ckey *big.Int + PPK *paillier.PublicKey + Pk *ecdsa.PublicKey + Pk1 *ecdsa.PublicKey + Sk2 *ecdsa.PrivateKey + func (k *MasterKey2) MarshalJSON() ([]byte, error) + func (k *MasterKey2) UnmarshalJSON(input []byte) error + type NICorrectKeyProof struct + PPk *paillier.PublicKey + Sigma []*big.Int + func NewCorrectKeyProof(p1Paillier *Party1Paillier) (*NICorrectKeyProof, error) + func (p *NICorrectKeyProof) Verify() error + type Nonce [32]byte + func (n *Nonce) MarshalText() ([]byte, error) + func (n *Nonce) UnmarshalText(input []byte) error + type PDLChallenge struct + A *big.Int + ABComm Commitments + ABNonce Nonce + B *big.Int + CPrime []byte + Q []byte + type Party1Generator struct + RPProver *RangeProofProver + Sk1Puk ecdsa.PublicKey + X2 *ecdsa.PublicKey + func (g *Party1Generator) KeyGenMaster() (*MasterKey1, error) + func (g *Party1Generator) KeyGenPhase1() ([]byte, error) + func (g *Party1Generator) KeyGenPhase2(msg []byte) ([]byte, error) + func (g *Party1Generator) KeyGenPhase3(msg []byte) ([]byte, error) + func (g *Party1Generator) KeyGenPhase4(msg []byte) ([]byte, error) + type Party1PDLDecommit struct + AlphaNonce Nonce + AlphaPk []byte + type Party1PDLFirstMsg struct + AlphaComm Commitments + type Party1Paillier struct + func (p *Party1Paillier) PDLFirstStage(pdlMsg1 *Party2PDLFirstMsg) (*Party1PDLFirstMsg, *Party1PDLDecommit, *ecdsa.PrivateKey, error) + func (p *Party1Paillier) PDLSecondStage(p2Decomm *Party2PDLDecommit, p2PdlMsg1 *Party2PDLFirstMsg, ...) error + type Party1SignCtx struct + func NewParty1SignCtx(sk *MasterKey1, hash []byte) *Party1SignCtx + func (ctx *Party1SignCtx) SignPhase1(msg []byte) ([]byte, error) + func (ctx *Party1SignCtx) SignPhase2(msg []byte) ([]byte, error) + type Party2Generator struct + Sk2Puk ecdsa.PublicKey + X1 *ecdsa.PublicKey + func (g *Party2Generator) KeyGenMaster() (*MasterKey2, error) + func (g *Party2Generator) KeyGenPhase1(msg []byte) ([]byte, error) + func (g *Party2Generator) KeyGenPhase2(msg []byte) ([]byte, error) + func (g *Party2Generator) KeyGenPhase3(msg []byte) ([]byte, error) + func (g *Party2Generator) KeyGenPhase4(msg []byte) error + type Party2PDLDecommit struct + A *big.Int + ABNonce Nonce + B *big.Int + type Party2PDLFirstMsg struct + ABComm Commitments + CPrime []byte + type Party2Paillier struct + func (p *Party2Paillier) PDLChallenge(pubShare *ecdsa.PublicKey) (*Party2PDLFirstMsg, *PDLChallenge, error) + func (p *Party2Paillier) PDLDecommit(challenge *PDLChallenge) *Party2PDLDecommit + func (p *Party2Paillier) VerifyPDL(alphaComm *Commitments, pdlDecomm *Party1PDLDecommit, challenge *PDLChallenge) error + type Party2SignCtx struct + func NewParty2SignCtx(sk *MasterKey2, hash []byte) *Party2SignCtx + func (ctx *Party2SignCtx) GetSignature() (*big.Int, *big.Int) + func (ctx *Party2SignCtx) SignPhase1() ([]byte, error) + func (ctx *Party2SignCtx) SignPhase2(msg []byte) ([]byte, error) + func (ctx *Party2SignCtx) SignPhase3(msg []byte) error + type ProofPair struct + J byte + R1 *big.Int + R2 *big.Int + W1 *big.Int + W2 *big.Int + func NewProofPairs(size int) []ProofPair + type RangeProof struct + CtxtPairs []CiphertextPair + ProofPairs []ProofPair + type RangeProofProver struct + Accuracy int + ChallengeComm Commitments + CtxtPairs []CiphertextPair + PSK *paillier.PrivateKey + Q *big.Int + Q3 *big.Int + R *big.Int + SecPairs []SecretPair + X *big.Int + func NewRangeProofProver(x *big.Int, r *big.Int, q *big.Int, q3 *big.Int, psk *paillier.PrivateKey, ...) (*RangeProofProver, error) + func (p *RangeProofProver) Prove(challenge BitSlice, nonce *Nonce) ([]ProofPair, error) + type RangeProofVerifier struct + Accuracy int + C *big.Int + Challenge BitSlice + Comm Commitments + CtxtPairs []CiphertextPair + Nonce Nonce + PPK *paillier.PublicKey + Q3 *big.Int + func NewRangeProofVerifier(q3 *big.Int, accuracy int) (*RangeProofVerifier, error) + func (p *RangeProofVerifier) ReceiveCtxt(c *big.Int, ppk *paillier.PublicKey, ctxtPairs []CiphertextPair) + func (p *RangeProofVerifier) Verify(proofPairs []ProofPair) error + type SecretPair struct + R1 *big.Int + R2 *big.Int + W1 *big.Int + W2 *big.Int + func NewSecretPairs(size int) []SecretPair + type SignParty1FirstMsg struct + R1Proof *DLogProof + type SignParty1SecondMsg struct + S *big.Int + type SignParty2FirstMsg struct + Hash []byte + R2Commit Commitments + R2PokCommit Commitments + type SignParty2SecondMsg struct + S1 *big.Int + Witness *SignRCommWitness + type SignRCommWitness struct + Proof *DLogProof + R2CommNonce Nonce + R2PokNonce Nonce + R2Share []byte