Versions in this module Expand all Collapse all v0 v0.1.7 Oct 27, 2023 Changes in this version + const ProofIters + var ErrMessageTooLong = fmt.Errorf("the message is too large or < 0") + func GenerateKeyPair(modulusBitLen int, timeout time.Duration, optionalConcurrency ...int) (privateKey *PrivateKey, publicKey *PublicKey, err error) + func GenerateXs(m int, k, N *big.Int, ecdsaPub *crypto2.ECPoint) []*big.Int + func L(u, N *big.Int) *big.Int + type PrivateKey struct + LambdaN *big.Int + P *big.Int + PhiN *big.Int + Q *big.Int + func (sk *PrivateKey) Decrypt(c *big.Int) (m *big.Int, err error) + func (sk *PrivateKey) DecryptAndRecoverRandomness(c *big.Int) (m, x *big.Int, err error) + func (sk *PrivateKey) Proof(k *big.Int, ecdsaPub *crypto2.ECPoint) Proof + type Proof [ProofIters]*big.Int + func (pf Proof) Verify(pkN, k *big.Int, ecdsaPub *crypto2.ECPoint) (bool, error) + type PublicKey struct + N *big.Int + func (pk *PublicKey) AsInts() []*big.Int + func (pk *PublicKey) Encrypt(m *big.Int) (c *big.Int, err error) + func (pk *PublicKey) EncryptAndReturnRandomness(m *big.Int) (c *big.Int, x *big.Int, err error) + func (pk *PublicKey) EncryptWithChosenRandomness(m, x *big.Int) (c *big.Int, err error) + func (pk *PublicKey) Gamma() *big.Int + func (pk *PublicKey) HomoAdd(c1, c2 *big.Int) (*big.Int, error) + func (pk *PublicKey) HomoMult(m, c1 *big.Int) (*big.Int, error) + func (pk *PublicKey) NSquare() *big.Int