aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:55 +0000
committerChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:55 +0000
commit022002438e4047d235a688cfd9da7b63ab990103 (patch)
tree8d0cb444a3ab376b5a8f614fb87bdeb31e7b3327 /src/include
parentb62eb443ee3af84f87030fad9fd11a948b1a2503 (diff)
downloadgnunet-022002438e4047d235a688cfd9da7b63ab990103.tar.gz
gnunet-022002438e4047d235a688cfd9da7b63ab990103.zip
-switching GNS from RSA to ECC
Diffstat (limited to 'src/include')
-rw-r--r--src/include/block_dns.h6
-rw-r--r--src/include/block_gns.h4
-rw-r--r--src/include/gnunet_consensus_service.h2
-rw-r--r--src/include/gnunet_crypto_lib.h5
-rw-r--r--src/include/gnunet_gns_service.h4
-rw-r--r--src/include/gnunet_namestore_plugin.h8
-rw-r--r--src/include/gnunet_namestore_service.h16
7 files changed, 24 insertions, 21 deletions
diff --git a/src/include/block_dns.h b/src/include/block_dns.h
index 0ca5a47a5..c7e1fbb55 100644
--- a/src/include/block_dns.h
+++ b/src/include/block_dns.h
@@ -47,18 +47,18 @@ struct GNUNET_DNS_Record
47 /** 47 /**
48 * Signature of the peer affirming that he is offering the service. 48 * Signature of the peer affirming that he is offering the service.
49 */ 49 */
50 struct GNUNET_CRYPTO_RsaSignature signature; 50 struct GNUNET_CRYPTO_EccSignature signature;
51 51
52 /** 52 /**
53 * Beginning of signed portion of the record, signs everything until 53 * Beginning of signed portion of the record, signs everything until
54 * the end of the struct. 54 * the end of the struct.
55 */ 55 */
56 struct GNUNET_CRYPTO_RsaSignaturePurpose purpose; 56 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
57 57
58 /** 58 /**
59 * The peer providing this service 59 * The peer providing this service
60 */ 60 */
61 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded peer; 61 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded peer;
62 62
63 /** 63 /**
64 * The descriptor for the service 64 * The descriptor for the service
diff --git a/src/include/block_gns.h b/src/include/block_gns.h
index 7b4ceed18..2f864f4d3 100644
--- a/src/include/block_gns.h
+++ b/src/include/block_gns.h
@@ -39,12 +39,12 @@ struct GNSNameRecordBlock
39 /** 39 /**
40 * The public key of the authority 40 * The public key of the authority
41 */ 41 */
42 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key; 42 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded public_key;
43 43
44 /** 44 /**
45 * GNUNET_RSA_Signature using RSA-key generated from the records. 45 * GNUNET_RSA_Signature using RSA-key generated from the records.
46 */ 46 */
47 struct GNUNET_CRYPTO_RsaSignature signature; 47 struct GNUNET_CRYPTO_EccSignature signature;
48 48
49 /* number of records that follow */ 49 /* number of records that follow */
50 uint32_t rd_count GNUNET_PACKED; 50 uint32_t rd_count GNUNET_PACKED;
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h
index f7f784f6e..66d48e0e2 100644
--- a/src/include/gnunet_consensus_service.h
+++ b/src/include/gnunet_consensus_service.h
@@ -4,7 +4,7 @@
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
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 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
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index a3c4e999f..eb16e0120 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -299,10 +299,13 @@ struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded
299}; 299};
300 300
301 301
302/**
303 * Private ECC key encoded for transmission (with length prefix).
304 */
302struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded 305struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded
303{ 306{
304 /** 307 /**
305 * Overall size of the private key. 308 * Overall size of the private key in network byte order.
306 */ 309 */
307 uint16_t size; 310 uint16_t size;
308 311
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h
index 8d2fde3d6..739bfa0f6 100644
--- a/src/include/gnunet_gns_service.h
+++ b/src/include/gnunet_gns_service.h
@@ -173,7 +173,7 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
173 const char * name, 173 const char * name,
174 enum GNUNET_GNS_RecordType type, 174 enum GNUNET_GNS_RecordType type,
175 int only_cached, 175 int only_cached,
176 struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key, 176 struct GNUNET_CRYPTO_EccPrivateKey *shorten_key,
177 GNUNET_GNS_LookupResultProcessor proc, 177 GNUNET_GNS_LookupResultProcessor proc,
178 void *proc_cls); 178 void *proc_cls);
179 179
@@ -199,7 +199,7 @@ GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle,
199 struct GNUNET_CRYPTO_ShortHashCode *zone, 199 struct GNUNET_CRYPTO_ShortHashCode *zone,
200 enum GNUNET_GNS_RecordType type, 200 enum GNUNET_GNS_RecordType type,
201 int only_cached, 201 int only_cached,
202 struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key, 202 struct GNUNET_CRYPTO_EccPrivateKey *shorten_key,
203 GNUNET_GNS_LookupResultProcessor proc, 203 GNUNET_GNS_LookupResultProcessor proc,
204 void *proc_cls); 204 void *proc_cls);
205 205
diff --git a/src/include/gnunet_namestore_plugin.h b/src/include/gnunet_namestore_plugin.h
index 1168e0d13..e969170e5 100644
--- a/src/include/gnunet_namestore_plugin.h
+++ b/src/include/gnunet_namestore_plugin.h
@@ -53,12 +53,12 @@ extern "C"
53 * because the user queried for a particular record type only) 53 * because the user queried for a particular record type only)
54 */ 54 */
55typedef void (*GNUNET_NAMESTORE_RecordIterator) (void *cls, 55typedef void (*GNUNET_NAMESTORE_RecordIterator) (void *cls,
56 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, 56 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key,
57 struct GNUNET_TIME_Absolute expire, 57 struct GNUNET_TIME_Absolute expire,
58 const char *name, 58 const char *name,
59 unsigned int rd_len, 59 unsigned int rd_len,
60 const struct GNUNET_NAMESTORE_RecordData *rd, 60 const struct GNUNET_NAMESTORE_RecordData *rd,
61 const struct GNUNET_CRYPTO_RsaSignature *signature); 61 const struct GNUNET_CRYPTO_EccSignature *signature);
62 62
63 63
64/** 64/**
@@ -88,12 +88,12 @@ struct GNUNET_NAMESTORE_PluginFunctions
88 * @return GNUNET_OK on success, else GNUNET_SYSERR 88 * @return GNUNET_OK on success, else GNUNET_SYSERR
89 */ 89 */
90 int (*put_records) (void *cls, 90 int (*put_records) (void *cls,
91 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, 91 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key,
92 struct GNUNET_TIME_Absolute expire, 92 struct GNUNET_TIME_Absolute expire,
93 const char *name, 93 const char *name,
94 unsigned int rd_len, 94 unsigned int rd_len,
95 const struct GNUNET_NAMESTORE_RecordData *rd, 95 const struct GNUNET_NAMESTORE_RecordData *rd,
96 const struct GNUNET_CRYPTO_RsaSignature *signature); 96 const struct GNUNET_CRYPTO_EccSignature *signature);
97 97
98 98
99 /** 99 /**
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index 4267e2044..38083ed9c 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -243,12 +243,12 @@ struct GNUNET_NAMESTORE_RecordData
243 */ 243 */
244struct GNUNET_NAMESTORE_QueueEntry * 244struct GNUNET_NAMESTORE_QueueEntry *
245GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h, 245GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h,
246 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, 246 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key,
247 const char *name, 247 const char *name,
248 struct GNUNET_TIME_Absolute freshness, 248 struct GNUNET_TIME_Absolute freshness,
249 unsigned int rd_count, 249 unsigned int rd_count,
250 const struct GNUNET_NAMESTORE_RecordData *rd, 250 const struct GNUNET_NAMESTORE_RecordData *rd,
251 const struct GNUNET_CRYPTO_RsaSignature *signature, 251 const struct GNUNET_CRYPTO_EccSignature *signature,
252 GNUNET_NAMESTORE_ContinuationWithStatus cont, 252 GNUNET_NAMESTORE_ContinuationWithStatus cont,
253 void *cont_cls); 253 void *cont_cls);
254 254
@@ -266,12 +266,12 @@ GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h,
266 * @return GNUNET_OK if the signature is valid 266 * @return GNUNET_OK if the signature is valid
267 */ 267 */
268int 268int
269GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key, 269GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *public_key,
270 const struct GNUNET_TIME_Absolute freshness, 270 const struct GNUNET_TIME_Absolute freshness,
271 const char *name, 271 const char *name,
272 unsigned int rd_count, 272 unsigned int rd_count,
273 const struct GNUNET_NAMESTORE_RecordData *rd, 273 const struct GNUNET_NAMESTORE_RecordData *rd,
274 const struct GNUNET_CRYPTO_RsaSignature *signature); 274 const struct GNUNET_CRYPTO_EccSignature *signature);
275 275
276 276
277/** 277/**
@@ -290,7 +290,7 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary
290 */ 290 */
291struct GNUNET_NAMESTORE_QueueEntry * 291struct GNUNET_NAMESTORE_QueueEntry *
292GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, 292GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
293 const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, 293 const struct GNUNET_CRYPTO_EccPrivateKey *pkey,
294 const char *name, 294 const char *name,
295 const struct GNUNET_NAMESTORE_RecordData *rd, 295 const struct GNUNET_NAMESTORE_RecordData *rd,
296 GNUNET_NAMESTORE_ContinuationWithStatus cont, 296 GNUNET_NAMESTORE_ContinuationWithStatus cont,
@@ -314,7 +314,7 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
314 */ 314 */
315struct GNUNET_NAMESTORE_QueueEntry * 315struct GNUNET_NAMESTORE_QueueEntry *
316GNUNET_NAMESTORE_record_remove (struct GNUNET_NAMESTORE_Handle *h, 316GNUNET_NAMESTORE_record_remove (struct GNUNET_NAMESTORE_Handle *h,
317 const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, 317 const struct GNUNET_CRYPTO_EccPrivateKey *pkey,
318 const char *name, 318 const char *name,
319 const struct GNUNET_NAMESTORE_RecordData *rd, 319 const struct GNUNET_NAMESTORE_RecordData *rd,
320 GNUNET_NAMESTORE_ContinuationWithStatus cont, 320 GNUNET_NAMESTORE_ContinuationWithStatus cont,
@@ -338,12 +338,12 @@ GNUNET_NAMESTORE_record_remove (struct GNUNET_NAMESTORE_Handle *h,
338 * because the user queried for a particular record type only) 338 * because the user queried for a particular record type only)
339 */ 339 */
340typedef void (*GNUNET_NAMESTORE_RecordProcessor) (void *cls, 340typedef void (*GNUNET_NAMESTORE_RecordProcessor) (void *cls,
341 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, 341 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key,
342 struct GNUNET_TIME_Absolute freshness, 342 struct GNUNET_TIME_Absolute freshness,
343 const char *name, 343 const char *name,
344 unsigned int rd_len, 344 unsigned int rd_len,
345 const struct GNUNET_NAMESTORE_RecordData *rd, 345 const struct GNUNET_NAMESTORE_RecordData *rd,
346 const struct GNUNET_CRYPTO_RsaSignature *signature); 346 const struct GNUNET_CRYPTO_EccSignature *signature);
347 347
348 348
349/** 349/**