Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type Proof
- type PublicKey
- func (publicKey *PublicKey) AsInts() []*big.Int
- func (publicKey *PublicKey) Encrypt(m *big.Int) (c *big.Int, err error)
- func (publicKey *PublicKey) EncryptAndReturnRandomness(m *big.Int) (c *big.Int, x *big.Int, err error)
- func (publicKey *PublicKey) Gamma() *big.Int
- func (publicKey *PublicKey) HomoAdd(c1, c2 *big.Int) (*big.Int, error)
- func (publicKey *PublicKey) HomoMult(m, c1 *big.Int) (*big.Int, error)
- func (publicKey *PublicKey) NSquare() *big.Int
Constants ¶
View Source
const (
ProofIters = 13
)
Variables ¶
View Source
var ( ErrMessageTooLong = fmt.Errorf("the message is too large or < 0") ErrMessageMalFormed = fmt.Errorf("the message is mal-formed") )
Functions ¶
func GenerateKeyPair ¶
func GenerateKeyPair(modulusBitLen int, timeout time.Duration, optionalConcurrency ...int) (privateKey *PrivateKey, publicKey *PublicKey, err error)
len is the length of the modulus (each prime = len / 2)
func GenerateXs ¶
GenerateXs generates the challenges used in Paillier key Proof
Types ¶
type PrivateKey ¶
Click to show internal directories.
Click to hide internal directories.