1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| def generate_paillier_keypair(private_keyring=None, n_length=DEFAULT_KEYSIZE): ''' 返回两个类 ''' """Return a new :class:`PaillierPublicKey` and :class:`PaillierPrivateKey`.
Add the private key to *private_keyring* if given.
Args: private_keyring (PaillierPrivateKeyring): a :class:`PaillierPrivateKeyring` on which to store the private key. n_length: key size in bits.
Returns: tuple: The generated :class:`PaillierPublicKey` and :class:`PaillierPrivateKey` """
|