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 (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
Constants ¶
View Source
const (
ProofIters = 13
)
Variables ¶
View Source
var (
ErrMessageTooLong = fmt.Errorf("the message is too large or < 0")
)
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 ¶
func (*PrivateKey) DecryptAndRecoverRandomness ¶
type PublicKey ¶
func (*PublicKey) AsInts ¶
AsInts returns the PublicKey serialised to a slice of *big.Int for hashing
func (*PublicKey) EncryptAndReturnRandomness ¶
func (*PublicKey) EncryptWithChosenRandomness ¶
Click to show internal directories.
Click to hide internal directories.