aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-06 13:25:24 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-06 13:25:24 +0000
commit6cef8fea0c3b6756870786ebc4db0588373c8f65 (patch)
tree12c4eaf2b805f223e5170b5ce74829212a01d467 /src/util
parent43864a32204bf109593cbfbc5801f89cf39b7bfa (diff)
fix dlog API for mteich
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto_ecc_dlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/crypto_ecc_dlog.c b/src/util/crypto_ecc_dlog.c
index f6eb58a9ac..38e2088cc0 100644
--- a/src/util/crypto_ecc_dlog.c
+++ b/src/util/crypto_ecc_dlog.c
@@ -151,7 +151,7 @@ GNUNET_CRYPTO_ecc_bin_to_point (struct GNUNET_CRYPTO_EccDlogContext *edc,
*
* @param max maximum value the factor can be
* @param mem memory to use (should be smaller than @a max), must not be zero.
- * @return @a max if dlog failed, otherwise the factor
+ * @return NULL on error
*/
struct GNUNET_CRYPTO_EccDlogContext *
GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max,
@@ -219,7 +219,7 @@ GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max,
*
* @param edc precalculated values, determine range of factors
* @param input point on the curve to factor
- * @return `edc->max` if dlog failed, otherwise the factor
+ * @return INT_MAX if dlog failed, otherwise the factor
*/
int
GNUNET_CRYPTO_ecc_dlog (struct GNUNET_CRYPTO_EccDlogContext *edc,
@@ -237,7 +237,7 @@ GNUNET_CRYPTO_ecc_dlog (struct GNUNET_CRYPTO_EccDlogContext *edc,
GNUNET_assert (NULL != g);
q = gcry_mpi_point_new (0);
- res = edc->max;
+ res = INT_MAX;
for (i=0;i<=edc->max/edc->mem;i++)
{
if (0 == i)