};
-/**
- * Paillier plaintext.
- */
-struct GNUNET_CRYPTO_PaillierPlaintext
-{
- /**
- * The bits of the plaintext.
- */
- unsigned char bits[GNUNET_CRYPTO_PAILLIER_BITS / 8];
-};
-
-
/**
* Paillier ciphertext.
*/
/**
* 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.
* Note that this operation can only be done a finite number of times
* before an overflow occurs.
*
- * @param x1 Paillier cipher text.
- * @param x2 Paillier cipher text.
+ * @param public_key Public key to use for encryption.
+ * @param c1 Paillier cipher text.
+ * @param c2 Paillier cipher text.
* @param[out] result Result of the homomorphic operation.
* @return #GNUNET_OK if the result could be computed,
* #GNUNET_SYSERR if no more homomorphic operations are remaining.
*/
int
-GNUNET_CRYPTO_paillier_hom_add (const struct GNUNET_CRYPTO_PaillierCiphertext *x1,
- const struct GNUNET_CRYPTO_PaillierCiphertext *x2,
- const struct GNUNET_CRYPTO_PaillierCiphertext *result);
+GNUNET_CRYPTO_paillier_hom_add (const struct GNUNET_CRYPTO_PaillierPublicKey *public_key,
+ const struct GNUNET_CRYPTO_PaillierCiphertext *c1,
+ const struct GNUNET_CRYPTO_PaillierCiphertext *c2,
+ 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 */
{