Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct { PublicKey // public part. Lambda *big.Int // lcm(p - 1, q - 1) Mu *big.Int // L(g ^ lambda mod n ^ 2) ^ -1 mod n }
秘密鍵 (p, q)
func GenerateKey ¶
func GenerateKey(random io.Reader, bits int) (*PrivateKey, error)
GenerateKey generates an Paillier keypair of the given bit size using the random source random (for example, crypto/rand.Reader).
func (*PrivateKey) Equal ¶
func (priv *PrivateKey) Equal(x crypto.PrivateKey) bool
func (*PrivateKey) Public ¶
func (priv *PrivateKey) Public() crypto.PublicKey
Click to show internal directories.
Click to hide internal directories.