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.h44
1 files changed, 30 insertions, 14 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index f46afa6cc..8a591fa09 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2001-2013 GNUnet e.V. 3 Copyright (C) 2001-2013 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
@@ -208,14 +206,15 @@ struct GNUNET_CRYPTO_EcdsaSignature
208 206
209 207
210/** 208/**
211 * Public ECC key (always for Curve25519) encoded in a format suitable 209 * Public ECC key (always for curve Ed25519) encoded in a format
212 * for network transmission and EdDSA signatures. 210 * suitable for network transmission and EdDSA signatures.
213 */ 211 */
214struct GNUNET_CRYPTO_EddsaPublicKey 212struct GNUNET_CRYPTO_EddsaPublicKey
215{ 213{
216 /** 214 /**
217 * 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
218 * here in affine coordinates and Ed25519 standard compact format. 216 * always positive. The point is stored in Ed25519 standard
217 * compact format.
219 */ 218 */
220 unsigned char q_y[256 / 8]; 219 unsigned char q_y[256 / 8];
221 220
@@ -727,6 +726,23 @@ GNUNET_CRYPTO_hash_context_abort (struct GNUNET_HashContext *hc);
727 726
728 727
729/** 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/**
730 * @ingroup hash 746 * @ingroup hash
731 * Calculate HMAC of a message (RFC 2104) 747 * Calculate HMAC of a message (RFC 2104)
732 * 748 *