Versions in this module Expand all Collapse all v0 v0.0.7 Jan 21, 2020 Changes in this version type DecryptShareZK + E *big.Int + V *big.Int + Vi *big.Int + Z *big.Int type EncryptZK + B *big.Int + W *big.Int + Z *big.Int type MulZK + A *big.Int + B *big.Int + CAlpha *big.Int + W *big.Int + Y *big.Int + Z *big.Int v0.0.6 Jan 21, 2020 v0.0.5 Jan 10, 2020 Changes in this version + func NewFixedKey(bitSize int, s, l, k uint8, randSource io.Reader, params *FixedParams) (keyShares []*KeyShare, pubKey *PubKey, err error) + type FixedParams struct + P *big.Int + P1 *big.Int + Q *big.Int + Q1 *big.Int + func (fp *FixedParams) String() string + func (fp *FixedParams) Validate() bool v0.0.4 Jan 9, 2020 Changes in this version + type DecryptShareZK struct + func (zk *DecryptShareZK) Verify(pk *PubKey, vals ...interface{}) error type KeyShare + func (ts *KeyShare) PartialDecrypt(c *big.Int) (ds *DecryptionShare, err error) + func (ts *KeyShare) PartialDecryptProof(c *big.Int, ds *DecryptionShare) (zk *DecryptShareZK, err error) + func (ts *KeyShare) PartialDecryptWithProof(c *big.Int) (ds *DecryptionShare, zk *DecryptShareZK, err error) type PubKey + func (pk *PubKey) EncryptFixedWithProof(message, r *big.Int) (c *big.Int, proof ZKProof, err error) + func (pk *PubKey) EncryptProof(message *big.Int, c, s *big.Int) (zk ZKProof, err error) + func (pk *PubKey) EncryptWithProof(message *big.Int) (c *big.Int, proof ZKProof, err error) + func (pk *PubKey) MultiplyFixed(c *big.Int, alpha, gamma *big.Int) (mul *big.Int, err error) + func (pk *PubKey) MultiplyProof(ca, cAlpha, d, alpha, s, gamma *big.Int) (zk ZKProof, err error) + func (pk *PubKey) MultiplyWithProof(encrypted *big.Int, constant *big.Int) (result *big.Int, proof ZKProof, err error) + func (pk *PubKey) RandomModN() (r *big.Int, err error) + func (pk *PubKey) RandomModNToSPlusOneStar() (r *big.Int, err error) + func (pk *PubKey) ReRand(c, r *big.Int) (reRand *big.Int, err error) v0.0.3 Jan 3, 2020 Changes in this version + func GenerateSafePrimes(bitLen int, randSource io.Reader) (*big.Int, *big.Int, error) + func RandomInt(bitLen int, randSource io.Reader) (randNum *big.Int, err error) v0.0.2 Dec 26, 2019 v0.0.1 Dec 26, 2019 Changes in this version + func NewKey(bitSize int, s, l, k uint8, randSource io.Reader) (keyShares []*KeyShare, pubKey *PubKey, err error) + type DecryptionShare struct + Ci *big.Int + Index uint8 + func (ds *DecryptionShare) Verify(pk *PubKey) error + type EncryptZK struct + func (zk *EncryptZK) Verify(pk *PubKey) error + type KeyShare struct + Index uint8 + Si *big.Int + func (ts *KeyShare) DecryptProof(c *big.Int) (ds *DecryptionShare, err error) + func (ts *KeyShare) PartialDecryption(c *big.Int) (pd *big.Int, err error) + type MulZK struct + func (zk *MulZK) Verify(pk *PubKey) error + type PubKey struct + Constant *big.Int + Delta *big.Int + K uint8 + L uint8 + N *big.Int + RandSource io.Reader + S uint8 + V *big.Int + Vi []*big.Int + func (pk *PubKey) Add(cList ...*big.Int) (sum *big.Int, err error) + func (pk *PubKey) Cache() *cached + func (pk *PubKey) CombineShares(shares ...*DecryptionShare) (dec []byte, err error) + func (pk *PubKey) Encrypt(message []byte) (c *big.Int, proof ZKProof, err error) + func (pk *PubKey) EncryptFixed(message []byte, r *big.Int) (c *big.Int, proof ZKProof, err error) + func (pk *PubKey) Multiply(c *big.Int, alpha *big.Int) (d *big.Int, proof ZKProof, err error) + type ZKProof interface + Verify func(pk *PubKey) error