aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2014-01-21 10:54:47 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2014-01-21 10:54:47 +0000
commit84e1871a793507afdba49cf385cbf7ce2e04aca4 (patch)
tree5846909b13922f6c551606801ef2812b16d14b74 /src/include
parenta43f7e0dad6e3c984f57b6181f0234566e771ce1 (diff)
downloadgnunet-84e1871a793507afdba49cf385cbf7ce2e04aca4.tar.gz
gnunet-84e1871a793507afdba49cf385cbf7ce2e04aca4.zip
- scalarproduct element container was 1 byte too large
- added logics to compute the maximum supported number of paillier hom.ops for a ciphertext - updated comments
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_crypto_lib.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 5ccc557fe..a8e9d6027 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1341,10 +1341,11 @@ GNUNET_CRYPTO_paillier_create (struct GNUNET_CRYPTO_PaillierPublicKey *public_ke
1341 * Encrypt a plaintext with a paillier public key. 1341 * Encrypt a plaintext with a paillier public key.
1342 * 1342 *
1343 * @param public_key Public key to use. 1343 * @param public_key Public key to use.
1344 * @param plaintext Plaintext to encrypt. 1344 * @param m Plaintext to encrypt.
1345 * @param[out] ciphertext Encrytion of @a plaintext with @a public_key. 1345 * @param[out] ciphertext Encrytion of @a plaintext with @a public_key.
1346 * @return guaranteed number of supported homomorphic operations
1346 */ 1347 */
1347void 1348int
1348GNUNET_CRYPTO_paillier_encrypt (const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, 1349GNUNET_CRYPTO_paillier_encrypt (const struct GNUNET_CRYPTO_PaillierPublicKey *public_key,
1349 const gcry_mpi_t m, 1350 const gcry_mpi_t m,
1350 struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext); 1351 struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext);
@@ -1356,7 +1357,7 @@ GNUNET_CRYPTO_paillier_encrypt (const struct GNUNET_CRYPTO_PaillierPublicKey *pu
1356 * @param private_key Private key to use for decryption. 1357 * @param private_key Private key to use for decryption.
1357 * @param public_key Public key to use for decryption. 1358 * @param public_key Public key to use for decryption.
1358 * @param ciphertext Ciphertext to decrypt. 1359 * @param ciphertext Ciphertext to decrypt.
1359 * @param[out] plaintext Decryption of @a ciphertext with @private_key. 1360 * @param[out] m Decryption of @a ciphertext with @private_key.
1360 */ 1361 */
1361void 1362void
1362GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *private_key, 1363GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *private_key,