-/* Generates random private value `x' such that 1 < x < n. The rnd sent
- as argument must be initialized. Returns FALSE if the random number
- could not be generated. Returns the generated value into `x' pointer
- sent as argument, unless the `x' is NULL. The returned `x' must no be
- freed by the caller. */
-int silc_dh_generate_private(SilcDH dh, SilcInt **x);
-
-/* Computes the public key y = g ^ x mod p, and returns it to the `y'
- pointer sent as argument, unless the `y' is NULL. Returns FALSE if
- the computation could not be performed. The returned `y' must not be
- freed by the caller. */
-int silc_dh_compute_public(SilcDH dh, SilcInt **y);
-
-/* Sets the remote end's public value y' into the DH context. This must be
- done before computing the secret key. Returns FALSE on error. */
-int silc_dh_set_remote_public(SilcDH dh, SilcInt **y);
-
-/* Computes the secret key z = y' ^ x mod p, and returns the key to the
- `z' pointer sent as argument, unless the `z' is NULL. Returns FALSE if
- the computation could not be performed. The returned `z' must not be
- freed by the caller. */
-int silc_dh_compute_key(SilcDH dh, SilcInt **z);
-
-/* Same as above but returns the computed secret key as octet binary
- string. */
-int silc_dh_compute_key_data(SilcDH dh, unsigned char **z,
- unsigned int *z_len);
+/****f* silccrypt/SilcDH/silc_dh_generate_private
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_dh_generate_private(SilcDH dh, const SilcMPInt **x);
+ *
+ * DESCRIPTION
+ *
+ * Generates random private value `x' such that 0 < x < lpf at most of
+ * length of lpf. Returns FALSE if the random number could not be generated.
+ * Returns the generated value into `x' pointer sent as argument, unless
+ * the `x' is NULL. The returned `x' must not be freed by the caller.
+ *
+ ***/
+SilcBool silc_dh_generate_private(SilcDH dh, const SilcMPInt **x);
+
+/****f* silccrypt/SilcDH/silc_dh_compute_public
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_dh_compute_public(SilcDH dh, const SilcMPInt **y);
+ *
+ * DESCRIPTION
+ *
+ * Computes the public key y = g ^ x mod p, and returns it to the `y'
+ * pointer sent as argument, unless the `y' is NULL. Returns FALSE if
+ * the computation could not be performed. The returned `y' must not be
+ * freed by the caller.
+ *
+ ***/
+SilcBool silc_dh_compute_public(SilcDH dh, const SilcMPInt **y);
+
+/****f* silccrypt/SilcDH/silc_dh_remote_public
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_dh_compute_public(SilcDH dh, SilcMPInt *y);
+ *
+ * DESCRIPTION
+ *
+ * Sets the remote end's public value y' into the SilcDH context.
+ * This must be done before computing the secret key. Returns FALSE
+ * on error.
+ *
+ ***/
+SilcBool silc_dh_set_remote_public(SilcDH dh, SilcMPInt *y);
+
+/****f* silccrypt/SilcDH/silc_dh_compute_key
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_dh_compute_key(SilcDH dh, const SilcMPInt **z);
+ *
+ * DESCRIPTION
+ *
+ * Computes the secret key z = y' ^ x mod p, and returns the key to the
+ * `z' pointer sent as argument, unless the `z' is NULL. Returns FALSE if
+ * the computation could not be performed. The returned `z' must not be
+ * freed by the caller.
+ *
+ ***/
+SilcBool silc_dh_compute_key(SilcDH dh, const SilcMPInt **z);
+
+/****f* silccrypt/SilcDH/silc_dh_remote_public
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_dh_compute_key_data(SilcDH dh, unsigned char **z,
+ * SilcUInt32 *z_len);
+ *
+ * DESCRIPTION
+ *
+ * Same as above but returns the computed secret key as octet binary
+ * string. The caller must free the returned binary string.
+ *
+ ***/
+SilcBool silc_dh_compute_key_data(SilcDH dh, unsigned char **z,
+ SilcUInt32 *z_len);