Versions in this module Expand all Collapse all v1 v1.7.1 Mar 11, 2022 Changes in this version + const PaillierPrimeBits + const PsfProofLength + func NewKeys() (*PublicKey, *SecretKey, error) + type Ciphertext *big.Int + type PsfProof []*big.Int + func (p PsfProof) Verify(psf *PsfVerifyParams) error + type PsfProofParams struct + Curve elliptic.Curve + Pi uint32 + SecretKey *SecretKey + Y *curves.EcPoint + func (p *PsfProofParams) Prove() (PsfProof, error) + type PsfVerifyParams struct + Curve elliptic.Curve + Pi uint32 + PublicKey *PublicKey + Y *curves.EcPoint + type PublicKey struct + N *big.Int + N2 *big.Int + func NewPubkey(n *big.Int) (*PublicKey, error) + func (pk *PublicKey) Add(c, d Ciphertext) (Ciphertext, error) + func (pk *PublicKey) Encrypt(msg *big.Int) (Ciphertext, *big.Int, error) + func (pk *PublicKey) Mul(a *big.Int, c Ciphertext) (Ciphertext, error) + func (pk *PublicKey) UnmarshalJSON(bytes []byte) error + func (pk PublicKey) MarshalJSON() ([]byte, error) + type PublicKeyJson struct + N *big.Int + type SecretKey struct + Lambda *big.Int + Totient *big.Int + U *big.Int + func NewSecretKey(p, q *big.Int) (*SecretKey, error) + func (sk *SecretKey) Decrypt(c Ciphertext) (*big.Int, error) + func (sk *SecretKey) UnmarshalJSON(bytes []byte) error + func (sk SecretKey) MarshalJSON() ([]byte, error) + type SecretKeyJson struct + Lambda *big.Int + N *big.Int + Totient *big.Int + U *big.Int