aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_paillier.c
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2014-02-04 10:24:40 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2014-02-04 10:24:40 +0000
commita1f0862b225f7eae19d41ac4ed7d4f663af594cf (patch)
tree93282b1e7109a178d70504db236740a2a1a06dde /src/util/crypto_paillier.c
parent9728378c983196c86c2fc6b7902964955e41e379 (diff)
downloadgnunet-a1f0862b225f7eae19d41ac4ed7d4f663af594cf.tar.gz
gnunet-a1f0862b225f7eae19d41ac4ed7d4f663af594cf.zip
- added caller-hom-ops soft-cap logics
Diffstat (limited to 'src/util/crypto_paillier.c')
-rw-r--r--src/util/crypto_paillier.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/crypto_paillier.c b/src/util/crypto_paillier.c
index 6873d159f..eb5bfe87c 100644
--- a/src/util/crypto_paillier.c
+++ b/src/util/crypto_paillier.c
@@ -131,6 +131,9 @@ GNUNET_CRYPTO_paillier_encrypt (const struct GNUNET_CRYPTO_PaillierPublicKey *pu
131 131
132 if (possible_opts < 1) 132 if (possible_opts < 1)
133 possible_opts = 0; 133 possible_opts = 0;
134 //soft-cap by caller
135 possible_opts = (desired_ops < possible_opts)? desired_ops : possible_opts;
136
134 ciphertext->remaining_ops = htonl (possible_opts); 137 ciphertext->remaining_ops = htonl (possible_opts);
135 138
136 GNUNET_assert (0 != (n_square = gcry_mpi_new (0))); 139 GNUNET_assert (0 != (n_square = gcry_mpi_new (0)));