diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-02-04 10:24:40 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-02-04 10:24:40 +0000 |
commit | a1f0862b225f7eae19d41ac4ed7d4f663af594cf (patch) | |
tree | 93282b1e7109a178d70504db236740a2a1a06dde /src/util/crypto_paillier.c | |
parent | 9728378c983196c86c2fc6b7902964955e41e379 (diff) | |
download | gnunet-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.c | 3 |
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))); |