Function gnunet_sys::GNUNET_CRYPTO_paillier_encrypt[][src]

pub unsafe extern "C" fn GNUNET_CRYPTO_paillier_encrypt(
    public_key: *const GNUNET_CRYPTO_PaillierPublicKey,
    m: gcry_mpi_t,
    desired_ops: c_int,
    ciphertext: *mut GNUNET_CRYPTO_PaillierCiphertext
) -> c_int

Encrypt a plaintext with a paillier public key.

@param public_key Public key to use. @param m Plaintext to encrypt. @param desired_ops How many homomorphic ops the caller intends to use @param[out] ciphertext Encryption of @a plaintext with @a public_key. @return guaranteed number of supported homomorphic operations >= 1, or desired_ops, in case that is lower, or -1 if less than one homomorphic operation is possible