print active/inactive information
[oweals/gnunet.git] / src / include / gnunet_crypto_lib.h
index d9c5e49e1e5bc31f1aca0ef7f8cba6c5a9ec745d..0d18e118537261cfec546b2d1952a8ef5a809b91 100644 (file)
@@ -374,7 +374,7 @@ struct GNUNET_CRYPTO_PaillierCiphertext
    * guaranteed minimum number of homomorphic operations with this ciphertext
    */
   int32_t remaining_ops GNUNET_PACKED;
-  
+
   /**
    * The bits of the ciphertext.
    */
@@ -1046,6 +1046,8 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename);
 struct GNUNET_CRYPTO_EddsaPrivateKey *
 GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename);
 
+struct GNUNET_CONFIGURATION_Handle;
+
 
 /**
  * @ingroup crypto
@@ -1330,12 +1332,16 @@ GNUNET_CRYPTO_paillier_create (struct GNUNET_CRYPTO_PaillierPublicKey *public_ke
  *
  * @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 Encrytion of @a plaintext with @a public_key.
- * @return guaranteed number of supported homomorphic operations
+ * @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
  */
 int
 GNUNET_CRYPTO_paillier_encrypt (const struct GNUNET_CRYPTO_PaillierPublicKey *public_key,
                                 const gcry_mpi_t m,
+                                int desired_ops,
                                 struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext);
 
 
@@ -1375,7 +1381,7 @@ GNUNET_CRYPTO_paillier_hom_add (const struct GNUNET_CRYPTO_PaillierPublicKey *pu
 
 
 /**
- * Get the number of remaining supported homomorphic operations. 
+ * Get the number of remaining supported homomorphic operations.
  *
  * @param c Paillier cipher text.
  * @return the number of remaining homomorphic operations