diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-10 14:38:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-10 14:38:55 +0000 |
commit | 9351b1e9bdf2b067b6db06562c26ba658cff42b8 (patch) | |
tree | 68dc4ab447e7e8b6a20a706858cd36238c1c7c5f /src/gns/gnunet-gns.c | |
parent | 8beabcd96c0cf1e1873c0b5ff96e537f1beb0b34 (diff) | |
download | gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.tar.gz gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.zip |
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA
Diffstat (limited to 'src/gns/gnunet-gns.c')
-rw-r--r-- | src/gns/gnunet-gns.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index 713f94b92..0a4275f0d 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c | |||
@@ -191,8 +191,8 @@ process_lookup_result (void *cls, uint32_t rd_count, | |||
191 | * @param shorten_key private key used for shortening, can be NULL | 191 | * @param shorten_key private key used for shortening, can be NULL |
192 | */ | 192 | */ |
193 | static void | 193 | static void |
194 | lookup_with_keys (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey, | 194 | lookup_with_keys (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey, |
195 | const struct GNUNET_CRYPTO_EccPrivateKey *shorten_key) | 195 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key) |
196 | { | 196 | { |
197 | if (NULL != lookup_type) | 197 | if (NULL != lookup_type) |
198 | rtype = GNUNET_NAMESTORE_typename_to_number (lookup_type); | 198 | rtype = GNUNET_NAMESTORE_typename_to_number (lookup_type); |
@@ -238,7 +238,7 @@ identity_shorten_cb (void *cls, | |||
238 | void **ctx, | 238 | void **ctx, |
239 | const char *name) | 239 | const char *name) |
240 | { | 240 | { |
241 | struct GNUNET_CRYPTO_EccPublicSignKey *pkeym = cls; | 241 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkeym = cls; |
242 | 242 | ||
243 | id_op = NULL; | 243 | id_op = NULL; |
244 | if (NULL == ego) | 244 | if (NULL == ego) |
@@ -257,12 +257,12 @@ identity_shorten_cb (void *cls, | |||
257 | * @param pkey public key to use for the zone | 257 | * @param pkey public key to use for the zone |
258 | */ | 258 | */ |
259 | static void | 259 | static void |
260 | lookup_with_public_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey) | 260 | lookup_with_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey) |
261 | { | 261 | { |
262 | struct GNUNET_CRYPTO_EccPublicSignKey *pkeym; | 262 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkeym; |
263 | 263 | ||
264 | GNUNET_assert (NULL != pkey); | 264 | GNUNET_assert (NULL != pkey); |
265 | pkeym = GNUNET_new (struct GNUNET_CRYPTO_EccPublicSignKey); | 265 | pkeym = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); |
266 | *pkeym = *pkey; | 266 | *pkeym = *pkey; |
267 | id_op = GNUNET_IDENTITY_get (identity, | 267 | id_op = GNUNET_IDENTITY_get (identity, |
268 | "gns-short", | 268 | "gns-short", |
@@ -287,7 +287,7 @@ static void | |||
287 | identity_zone_cb (void *cls, | 287 | identity_zone_cb (void *cls, |
288 | const struct GNUNET_IDENTITY_Ego *ego) | 288 | const struct GNUNET_IDENTITY_Ego *ego) |
289 | { | 289 | { |
290 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; | 290 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; |
291 | 291 | ||
292 | el = NULL; | 292 | el = NULL; |
293 | if (NULL == ego) | 293 | if (NULL == ego) |
@@ -325,7 +325,7 @@ identity_master_cb (void *cls, | |||
325 | void **ctx, | 325 | void **ctx, |
326 | const char *name) | 326 | const char *name) |
327 | { | 327 | { |
328 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; | 328 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; |
329 | 329 | ||
330 | id_op = NULL; | 330 | id_op = NULL; |
331 | if (NULL == ego) | 331 | if (NULL == ego) |
@@ -352,7 +352,7 @@ static void | |||
352 | run (void *cls, char *const *args, const char *cfgfile, | 352 | run (void *cls, char *const *args, const char *cfgfile, |
353 | const struct GNUNET_CONFIGURATION_Handle *c) | 353 | const struct GNUNET_CONFIGURATION_Handle *c) |
354 | { | 354 | { |
355 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; | 355 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; |
356 | 356 | ||
357 | cfg = c; | 357 | cfg = c; |
358 | gns = GNUNET_GNS_connect (cfg); | 358 | gns = GNUNET_GNS_connect (cfg); |
@@ -368,7 +368,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
368 | if (NULL != public_key) | 368 | if (NULL != public_key) |
369 | { | 369 | { |
370 | if (GNUNET_OK != | 370 | if (GNUNET_OK != |
371 | GNUNET_CRYPTO_ecc_public_sign_key_from_string (public_key, | 371 | GNUNET_CRYPTO_ecdsa_public_key_from_string (public_key, |
372 | strlen (public_key), | 372 | strlen (public_key), |
373 | &pkey)) | 373 | &pkey)) |
374 | { | 374 | { |
@@ -395,7 +395,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
395 | &lookup_name[strlen (lookup_name) - 4])) ) | 395 | &lookup_name[strlen (lookup_name) - 4])) ) |
396 | { | 396 | { |
397 | /* no zone required, use 'anonymous' zone */ | 397 | /* no zone required, use 'anonymous' zone */ |
398 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (GNUNET_CRYPTO_ecc_key_get_anonymous (), | 398 | GNUNET_CRYPTO_ecdsa_key_get_public (GNUNET_CRYPTO_ecdsa_key_get_anonymous (), |
399 | &pkey); | 399 | &pkey); |
400 | lookup_with_public_key (&pkey); | 400 | lookup_with_public_key (&pkey); |
401 | } | 401 | } |