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.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 0bffef212..8a591fa09 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -206,14 +206,15 @@ struct GNUNET_CRYPTO_EcdsaSignature
206 206
207 207
208/** 208/**
209 * Public ECC key (always for Curve25519) encoded in a format suitable 209 * Public ECC key (always for curve Ed25519) encoded in a format
210 * for network transmission and EdDSA signatures. 210 * suitable for network transmission and EdDSA signatures.
211 */ 211 */
212struct GNUNET_CRYPTO_EddsaPublicKey 212struct GNUNET_CRYPTO_EddsaPublicKey
213{ 213{
214 /** 214 /**
215 * Q consists of an x- and a y-value, each mod p (256 bits), given 215 * Point Q consists of a y-value mod p (256 bits); the x-value is
216 * here in affine coordinates and Ed25519 standard compact format. 216 * always positive. The point is stored in Ed25519 standard
217 * compact format.
217 */ 218 */
218 unsigned char q_y[256 / 8]; 219 unsigned char q_y[256 / 8];
219 220
@@ -725,6 +726,23 @@ GNUNET_CRYPTO_hash_context_abort (struct GNUNET_HashContext *hc);
725 726
726 727
727/** 728/**
729 * Calculate HMAC of a message (RFC 2104)
730 * TODO: Shouldn' this be the standard hmac function and
731 * the above be renamed?
732 *
733 * @param key secret key
734 * @param key_len secret key length
735 * @param plaintext input plaintext
736 * @param plaintext_len length of @a plaintext
737 * @param hmac where to store the hmac
738 */
739void
740GNUNET_CRYPTO_hmac_raw (const void *key, size_t key_len,
741 const void *plaintext, size_t plaintext_len,
742 struct GNUNET_HashCode *hmac);
743
744
745/**
728 * @ingroup hash 746 * @ingroup hash
729 * Calculate HMAC of a message (RFC 2104) 747 * Calculate HMAC of a message (RFC 2104)
730 * 748 *