aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/gnunet_crypto_lib.h6
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c2
-rw-r--r--src/util/crypto_ecc_dlog.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 00ecc565f8..8002b77109 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1030,7 +1030,7 @@ GNUNET_CRYPTO_kdf_v (void *result,
void
GNUNET_CRYPTO_kdf_mod_mpi (gcry_mpi_t *r,
gcry_mpi_t n,
- const void *xts, size_t xts_len,
+ const void *xts, size_t xts_len,
const void *skm, size_t skm_len,
const char *ctx);
@@ -1348,7 +1348,7 @@ struct GNUNET_CRYPTO_EccPoint
*
* @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,
@@ -1361,7 +1361,7 @@ GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max,
*
* @param dlc precalculated values, determine range of factors
* @param input point on the curve to factor
- * @return `dlc->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,
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
index 196bdbeeb9..bf5ee12419 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
@@ -472,7 +472,7 @@ compute_scalar_product (struct AliceServiceSession *session,
ai_bi = GNUNET_CRYPTO_ecc_dlog (edc,
g_ai_bi);
gcry_mpi_point_release (g_ai_bi);
- if (MAX_RESULT == ai_bi)
+ if (INT_MAX == ai_bi)
{
/* result too big */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
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)