aboutsummaryrefslogtreecommitdiff
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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index a82b2fdd6..a5ee98092 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -55,6 +55,7 @@ struct GNUNET_PeerIdentity;
55 55
56#include "gnunet_common.h" 56#include "gnunet_common.h"
57#include "gnunet_scheduler_lib.h" 57#include "gnunet_scheduler_lib.h"
58#include <gcrypt.h>
58 59
59 60
60/** 61/**
@@ -1232,6 +1233,35 @@ GNUNET_CRYPTO_ecdsa_public_key_derive (const struct GNUNET_CRYPTO_EcdsaPublicKey
1232 struct GNUNET_CRYPTO_EcdsaPublicKey *result); 1233 struct GNUNET_CRYPTO_EcdsaPublicKey *result);
1233 1234
1234 1235
1236/**
1237 * Output the given MPI value to the given buffer in network
1238 * byte order. The MPI @a val may not be negative.
1239 *
1240 * @param buf where to output to
1241 * @param size number of bytes in @a buf
1242 * @param val value to write to @a buf
1243 */
1244void
1245GNUNET_CRYPTO_mpi_print_unsigned (void *buf,
1246 size_t size,
1247 gcry_mpi_t val);
1248
1249
1250/**
1251 * Convert data buffer into MPI value.
1252 * The buffer is interpreted as network
1253 * byte order, unsigned integer.
1254 *
1255 * @param result where to store MPI value (allocated)
1256 * @param data raw data (GCRYMPI_FMT_USG)
1257 * @param size number of bytes in @a data
1258 */
1259void
1260GNUNET_CRYPTO_mpi_scan_unsigned (gcry_mpi_t *result,
1261 const void *data,
1262 size_t size);
1263
1264
1235#if 0 /* keep Emacsens' auto-indent happy */ 1265#if 0 /* keep Emacsens' auto-indent happy */
1236{ 1266{
1237#endif 1267#endif