summaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 4dc4f9445..7920dd54e 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1451,7 +1451,7 @@ struct GNUNET_CRYPTO_EccPoint
*/
struct GNUNET_CRYPTO_EccScalar
{
- unsigned char v[256 / 8]; //TODO probably too small
+ unsigned char v[256 / 8]; // TODO probably too small
};
/**
@@ -1462,7 +1462,8 @@ struct GNUNET_CRYPTO_EccScalar
* @return NULL on error
*/
struct GNUNET_CRYPTO_EccDlogContext *
-GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max, unsigned int mem);
+GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max,
+ unsigned int mem);
/**
@@ -1500,7 +1501,7 @@ GNUNET_CRYPTO_ecc_dexp (int val,
*
* @param val (positive) value to encode into a point
* @param r where to write the point (must be allocated)
- * @return GNUNET_OK on success.
+ * @return #GNUNET_OK on success.
*/
enum GNUNET_GenericReturnValue
GNUNET_CRYPTO_ecc_dexp_mpi (const struct GNUNET_CRYPTO_EccScalar *val,
@@ -1513,7 +1514,7 @@ GNUNET_CRYPTO_ecc_dexp_mpi (const struct GNUNET_CRYPTO_EccScalar *val,
* @param p point to multiply
* @param val (positive) value to encode into a point
* @param r where to write the point (must be allocated)
- * @return GNUNET_OK on success.
+ * @return #GNUNET_OK on success.
*/
enum GNUNET_GenericReturnValue
GNUNET_CRYPTO_ecc_pmul_mpi (const struct GNUNET_CRYPTO_EccPoint *p,
@@ -1527,7 +1528,7 @@ GNUNET_CRYPTO_ecc_pmul_mpi (const struct GNUNET_CRYPTO_EccPoint *p,
* @param a some value
* @param b some value
* @param r where to write the point (must be allocated)
- * @return GNUNET_OK on success.
+ * @return #GNUNET_OK on success.
*/
enum GNUNET_GenericReturnValue
GNUNET_CRYPTO_ecc_add (const struct GNUNET_CRYPTO_EccPoint *a,
@@ -1541,7 +1542,7 @@ GNUNET_CRYPTO_ecc_add (const struct GNUNET_CRYPTO_EccPoint *a,
*
* @param[out] r set to a random point on the curve
* @param[out] r_inv set to the additive inverse of @a r
- * @return GNUNET_OK on success.
+ * @return #GNUNET_OK on success.
*/
enum GNUNET_GenericReturnValue
GNUNET_CRYPTO_ecc_rnd (struct GNUNET_CRYPTO_EccPoint *r,
@@ -1566,7 +1567,7 @@ GNUNET_CRYPTO_ecc_rnd_mpi (struct GNUNET_CRYPTO_EccScalar *r,
* @param[out] r random value mod n.
*/
void
-GNUNET_CRYPTO_ecc_random_mod_n (struct GNUNET_CRYPTO_EccScalar* r);
+GNUNET_CRYPTO_ecc_random_mod_n (struct GNUNET_CRYPTO_EccScalar*r);
/**
@@ -1585,8 +1586,8 @@ GNUNET_CRYPTO_ecc_dlog_release (struct GNUNET_CRYPTO_EccDlogContext *dlc);
* @param[out] r where to write the salar
*/
void
-GNUNET_CRYPTO_ecc_scalar_from_int (int val,
- struct GNUNET_CRYPTO_EccScalar* r);
+GNUNET_CRYPTO_ecc_scalar_from_int (int64_t val,
+ struct GNUNET_CRYPTO_EccScalar *r);
/**
@@ -1619,6 +1620,7 @@ GNUNET_CRYPTO_eddsa_ecdh (const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
const struct GNUNET_CRYPTO_EcdhePublicKey *pub,
struct GNUNET_HashCode *key_material);
+
/**
* @ingroup crypto
* Derive key material from a ECDH public key and a private ECDSA key.
@@ -1913,7 +1915,9 @@ GNUNET_CRYPTO_ecdsa_public_key_derive (
* @param val value to write to @a buf
*/
void
-GNUNET_CRYPTO_mpi_print_unsigned (void *buf, size_t size, gcry_mpi_t val);
+GNUNET_CRYPTO_mpi_print_unsigned (void *buf,
+ size_t size,
+ gcry_mpi_t val);
/**