diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-01-21 11:37:50 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-01-21 11:37:50 +0000 |
commit | b5bdfc8c7f57a9afff7a7dc2b6a8cdf5c303940d (patch) | |
tree | 2ffbc466ef232d4ab524b2e6552c1d8349c48ae3 /src/include | |
parent | 84e1871a793507afdba49cf385cbf7ce2e04aca4 (diff) | |
download | gnunet-b5bdfc8c7f57a9afff7a7dc2b6a8cdf5c303940d.tar.gz gnunet-b5bdfc8c7f57a9afff7a7dc2b6a8cdf5c303940d.zip |
- added logics for homomorphic operation in paillier
- adjusted headers
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index a8e9d6027..5dc76be79 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -1372,16 +1372,18 @@ GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *p | |||
1372 | * Note that this operation can only be done a finite number of times | 1372 | * Note that this operation can only be done a finite number of times |
1373 | * before an overflow occurs. | 1373 | * before an overflow occurs. |
1374 | * | 1374 | * |
1375 | * @param x1 Paillier cipher text. | 1375 | * @param public_key Public key to use for encryption. |
1376 | * @param x2 Paillier cipher text. | 1376 | * @param c1 Paillier cipher text. |
1377 | * @param c2 Paillier cipher text. | ||
1377 | * @param[out] result Result of the homomorphic operation. | 1378 | * @param[out] result Result of the homomorphic operation. |
1378 | * @return #GNUNET_OK if the result could be computed, | 1379 | * @return #GNUNET_OK if the result could be computed, |
1379 | * #GNUNET_SYSERR if no more homomorphic operations are remaining. | 1380 | * #GNUNET_SYSERR if no more homomorphic operations are remaining. |
1380 | */ | 1381 | */ |
1381 | int | 1382 | int |
1382 | GNUNET_CRYPTO_paillier_hom_add (const struct GNUNET_CRYPTO_PaillierCiphertext *x1, | 1383 | GNUNET_CRYPTO_paillier_hom_add (const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, |
1383 | const struct GNUNET_CRYPTO_PaillierCiphertext *x2, | 1384 | const struct GNUNET_CRYPTO_PaillierCiphertext *c1, |
1384 | const struct GNUNET_CRYPTO_PaillierCiphertext *result); | 1385 | const struct GNUNET_CRYPTO_PaillierCiphertext *c2, |
1386 | struct GNUNET_CRYPTO_PaillierCiphertext *result); | ||
1385 | 1387 | ||
1386 | 1388 | ||
1387 | #if 0 /* keep Emacsens' auto-indent happy */ | 1389 | #if 0 /* keep Emacsens' auto-indent happy */ |