extending bandwidth tracker api to support notifications
[oweals/gnunet.git] / src / include / gnunet_crypto_lib.h
index 5dc76be79178b5f2e6c5ef5f0840ca89e27d2138..d9c5e49e1e5bc31f1aca0ef7f8cba6c5a9ec745d 100644 (file)
@@ -365,18 +365,6 @@ struct GNUNET_CRYPTO_PaillierPrivateKey
 };
 
 
-/**
- * Paillier plaintext.
- */
-struct GNUNET_CRYPTO_PaillierPlaintext
-{
-  /**
-   * The bits of the plaintext.
-   */
-  unsigned char bits[GNUNET_CRYPTO_PAILLIER_BITS / 8];
-};
-
-
 /**
  * Paillier ciphertext.
  */
@@ -385,7 +373,7 @@ struct GNUNET_CRYPTO_PaillierCiphertext
   /**
    * guaranteed minimum number of homomorphic operations with this ciphertext
    */
-  uint32_t remaining_ops GNUNET_PACKED;
+  int32_t remaining_ops GNUNET_PACKED;
   
   /**
    * The bits of the ciphertext.
@@ -1386,6 +1374,15 @@ GNUNET_CRYPTO_paillier_hom_add (const struct GNUNET_CRYPTO_PaillierPublicKey *pu
                                 struct GNUNET_CRYPTO_PaillierCiphertext *result);
 
 
+/**
+ * Get the number of remaining supported homomorphic operations. 
+ *
+ * @param c Paillier cipher text.
+ * @return the number of remaining homomorphic operations
+ */
+int
+GNUNET_CRYPTO_paillier_hom_get_remaining (const struct GNUNET_CRYPTO_PaillierCiphertext *c);
+
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
 #endif