aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-10 14:38:55 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-10 14:38:55 +0000
commit9351b1e9bdf2b067b6db06562c26ba658cff42b8 (patch)
tree68dc4ab447e7e8b6a20a706858cd36238c1c7c5f /src
parent8beabcd96c0cf1e1873c0b5ff96e537f1beb0b34 (diff)
downloadgnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.tar.gz
gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.zip
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA
Diffstat (limited to 'src')
-rw-r--r--src/ats-tool/gnunet-ats.c2
-rw-r--r--src/core/gnunet-service-core.c4
-rw-r--r--src/core/gnunet-service-core_kx.c70
-rw-r--r--src/core/gnunet-service-core_kx.h2
-rw-r--r--src/dns/plugin_block_dns.c4
-rw-r--r--src/exit/gnunet-daemon-exit.c10
-rw-r--r--src/fs/fs_api.c6
-rw-r--r--src/fs/fs_api.h36
-rw-r--r--src/fs/fs_namespace.c18
-rw-r--r--src/fs/fs_publish.c4
-rw-r--r--src/fs/fs_publish_ksk.c2
-rw-r--r--src/fs/fs_publish_ublock.c20
-rw-r--r--src/fs/fs_publish_ublock.h4
-rw-r--r--src/fs/fs_search.c28
-rw-r--r--src/fs/fs_unindex.c16
-rw-r--r--src/fs/fs_uri.c40
-rw-r--r--src/fs/gnunet-publish.c4
-rw-r--r--src/fs/plugin_block_fs.c4
-rw-r--r--src/fs/test_fs_namespace.c12
-rw-r--r--src/fs/test_fs_namespace_list_updateable.c4
-rw-r--r--src/fs/test_fs_uri.c8
-rw-r--r--src/gns/gns.h4
-rw-r--r--src/gns/gns_api.c4
-rw-r--r--src/gns/gnunet-dns2gns.c4
-rw-r--r--src/gns/gnunet-gns-helper-service-w32.c16
-rw-r--r--src/gns/gnunet-gns-proxy.c6
-rw-r--r--src/gns/gnunet-gns.c22
-rw-r--r--src/gns/gnunet-service-gns.c12
-rw-r--r--src/gns/gnunet-service-gns_interceptor.c4
-rw-r--r--src/gns/gnunet-service-gns_interceptor.h2
-rw-r--r--src/gns/gnunet-service-gns_resolver.c28
-rw-r--r--src/gns/gnunet-service-gns_resolver.h4
-rw-r--r--src/gns/gnunet-service-gns_shorten.c24
-rw-r--r--src/gns/gnunet-service-gns_shorten.h4
-rw-r--r--src/gns/plugin_block_gns.c2
-rw-r--r--src/gns/test_gns_proxy.c4
-rw-r--r--src/gns/test_gns_pseu_shorten.c52
-rw-r--r--src/gns/test_gns_revocation.c18
-rw-r--r--src/gns/test_gns_simple_shorten.c42
-rw-r--r--src/gns/test_gns_simple_srv_lookup.c18
-rw-r--r--src/gns/test_gns_simple_zkey_lookup.c18
-rw-r--r--src/hello/gnunet-hello.c2
-rw-r--r--src/hello/hello.c14
-rw-r--r--src/hello/test_friend_hello.c4
-rw-r--r--src/hello/test_hello.c4
-rw-r--r--src/identity/gnunet-identity.c4
-rw-r--r--src/identity/gnunet-service-identity.c16
-rw-r--r--src/identity/identity.h6
-rw-r--r--src/identity/identity_api.c26
-rw-r--r--src/include/block_dns.h2
-rw-r--r--src/include/block_fs.h4
-rw-r--r--src/include/block_regex.h2
-rw-r--r--src/include/gnunet_crypto_lib.h325
-rw-r--r--src/include/gnunet_fs_service.h12
-rw-r--r--src/include/gnunet_gns_service.h4
-rw-r--r--src/include/gnunet_hello_lib.h6
-rw-r--r--src/include/gnunet_identity_service.h4
-rw-r--r--src/include/gnunet_multicast_service.h18
-rw-r--r--src/include/gnunet_namestore_plugin.h10
-rw-r--r--src/include/gnunet_namestore_service.h30
-rw-r--r--src/include/gnunet_psyc_service.h16
-rw-r--r--src/include/gnunet_psycstore_plugin.h44
-rw-r--r--src/include/gnunet_psycstore_service.h30
-rw-r--r--src/include/gnunet_revocation_service.h12
-rw-r--r--src/include/gnunet_testing_lib.h4
-rw-r--r--src/mesh/gnunet-mesh.c2
-rw-r--r--src/mesh/gnunet-service-mesh-enc.c8
-rw-r--r--src/mesh/gnunet-service-mesh.c8
-rw-r--r--src/mesh/gnunet-service-mesh_dht.c2
-rw-r--r--src/mesh/gnunet-service-mesh_tunnel.c10
-rw-r--r--src/mesh/gnunet-service-mesh_tunnel.h2
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c26
-rw-r--r--src/namestore/gnunet-namestore.c34
-rw-r--r--src/namestore/gnunet-service-namestore.c22
-rw-r--r--src/namestore/namestore.h22
-rw-r--r--src/namestore/namestore_api.c12
-rw-r--r--src/namestore/namestore_api_common.c68
-rw-r--r--src/namestore/namestore_api_monitor.c4
-rw-r--r--src/namestore/plugin_namestore_postgres.c28
-rw-r--r--src/namestore/plugin_namestore_sqlite.c38
-rw-r--r--src/namestore/test_namestore_api_blocks.c8
-rw-r--r--src/namestore/test_namestore_api_cache_block.c8
-rw-r--r--src/namestore/test_namestore_api_lookup_public.c12
-rw-r--r--src/namestore/test_namestore_api_monitoring.c12
-rw-r--r--src/namestore/test_namestore_api_monitoring_existing.c12
-rw-r--r--src/namestore/test_namestore_api_put.c10
-rw-r--r--src/namestore/test_namestore_api_remove.c8
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c8
-rw-r--r--src/namestore/test_namestore_api_store.c8
-rw-r--r--src/namestore/test_namestore_api_store_update.c8
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c16
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c16
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c16
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c18
-rw-r--r--src/namestore/test_plugin_namestore.c10
-rw-r--r--src/nse/gnunet-service-nse.c24
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c6
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c4
-rw-r--r--src/psycstore/plugin_psycstore_sqlite.c54
-rw-r--r--src/psycstore/psycstore.h24
-rw-r--r--src/psycstore/psycstore_api.c30
-rw-r--r--src/psycstore/test_plugin_psycstore.c14
-rw-r--r--src/psycstore/test_psycstore.c14
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c4
-rw-r--r--src/regex/gnunet-service-regex.c4
-rw-r--r--src/regex/plugin_block_regex.c2
-rw-r--r--src/regex/regex_internal_dht.c8
-rw-r--r--src/regex/regex_internal_lib.h2
-rw-r--r--src/revocation/gnunet-revocation.c12
-rw-r--r--src/revocation/gnunet-service-revocation.c8
-rw-r--r--src/revocation/revocation.h6
-rw-r--r--src/revocation/revocation_api.c30
-rw-r--r--src/testing/gnunet-testing.c4
-rw-r--r--src/testing/testing.c10
-rw-r--r--src/topology/friends.c4
-rw-r--r--src/transport/gnunet-service-transport.c8
-rw-r--r--src/transport/gnunet-service-transport.h2
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c2
-rw-r--r--src/transport/gnunet-service-transport_hello.c4
-rw-r--r--src/transport/gnunet-service-transport_hello.h2
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c14
-rw-r--r--src/transport/gnunet-service-transport_validation.c26
-rw-r--r--src/transport/gnunet-service-transport_validation.h2
-rw-r--r--src/transport/gnunet-transport.c2
-rw-r--r--src/transport/plugin_transport_http_server.c2
-rw-r--r--src/transport/test_plugin_transport.c6
-rw-r--r--src/util/Makefile.am122
-rw-r--r--src/util/common_logging.c4
-rw-r--r--src/util/crypto_ecc.c827
-rw-r--r--src/util/gnunet-ecc.c30
-rw-r--r--src/vpn/gnunet-vpn.c2
131 files changed, 1883 insertions, 1077 deletions
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 90523652d..a873ab0f2 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -352,7 +352,7 @@ testservice_ats (void *cls,
352 352
353 if (NULL != pid_str) 353 if (NULL != pid_str)
354 { 354 {
355 if (GNUNET_OK != GNUNET_CRYPTO_ecc_public_sign_key_from_string (pid_str, 355 if (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string (pid_str,
356 strlen (pid_str), 356 strlen (pid_str),
357 &pid.public_key)) 357 &pid.public_key))
358 { 358 {
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index ada9b7bd9..c6eeb070b 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -91,7 +91,7 @@ static void
91run (void *cls, struct GNUNET_SERVER_Handle *server, 91run (void *cls, struct GNUNET_SERVER_Handle *server,
92 const struct GNUNET_CONFIGURATION_Handle *c) 92 const struct GNUNET_CONFIGURATION_Handle *c)
93{ 93{
94 struct GNUNET_CRYPTO_EccPrivateKey *pk; 94 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
95 char *keyfile; 95 char *keyfile;
96 96
97 GSC_cfg = c; 97 GSC_cfg = c;
@@ -111,7 +111,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
111 NULL); 111 NULL);
112 GNUNET_SERVER_suspend (server); 112 GNUNET_SERVER_suspend (server);
113 GSC_TYPEMAP_init (); 113 GSC_TYPEMAP_init ();
114 pk = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 114 pk = GNUNET_CRYPTO_eddsa_key_create_from_file (keyfile);
115 GNUNET_free (keyfile); 115 GNUNET_free (keyfile);
116 GNUNET_assert (NULL != pk); 116 GNUNET_assert (NULL != pk);
117 if ((GNUNET_OK != GSC_KX_init (pk)) || 117 if ((GNUNET_OK != GSC_KX_init (pk)) ||
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index a74b3ae74..25db9c750 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -90,7 +90,7 @@ struct EphemeralKeyMessage
90 * An ECC signature of the 'origin' asserting the validity of 90 * An ECC signature of the 'origin' asserting the validity of
91 * the given ephemeral key. 91 * the given ephemeral key.
92 */ 92 */
93 struct GNUNET_CRYPTO_EccSignature signature; 93 struct GNUNET_CRYPTO_EddsaSignature signature;
94 94
95 /** 95 /**
96 * Information about what is being signed. 96 * Information about what is being signed.
@@ -111,7 +111,7 @@ struct EphemeralKeyMessage
111 * Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable 111 * Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable
112 * for network transmission as created using 'gcry_sexp_sprint'. 112 * for network transmission as created using 'gcry_sexp_sprint'.
113 */ 113 */
114 struct GNUNET_CRYPTO_EccPublicEncryptKey ephemeral_key; 114 struct GNUNET_CRYPTO_EcdhePublicKey ephemeral_key;
115 115
116 /** 116 /**
117 * Public key of the signing peer (persistent version, not the ephemeral public key). 117 * Public key of the signing peer (persistent version, not the ephemeral public key).
@@ -377,12 +377,12 @@ struct GSC_KeyExchangeInfo
377/** 377/**
378 * Our private key. 378 * Our private key.
379 */ 379 */
380static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 380static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
381 381
382/** 382/**
383 * Our ephemeral private key. 383 * Our ephemeral private key.
384 */ 384 */
385static struct GNUNET_CRYPTO_EccPrivateKey *my_ephemeral_key; 385static struct GNUNET_CRYPTO_EcdhePrivateKey *my_ephemeral_key;
386 386
387/** 387/**
388 * Current message we send for a key exchange. 388 * Current message we send for a key exchange.
@@ -675,7 +675,7 @@ GSC_KX_start (const struct GNUNET_PeerIdentity *pid)
675 kx); 675 kx);
676 GNUNET_CRYPTO_hash (pid, sizeof (struct GNUNET_PeerIdentity), &h1); 676 GNUNET_CRYPTO_hash (pid, sizeof (struct GNUNET_PeerIdentity), &h1);
677 GNUNET_CRYPTO_hash (&GSC_my_identity, sizeof (struct GNUNET_PeerIdentity), &h2); 677 GNUNET_CRYPTO_hash (&GSC_my_identity, sizeof (struct GNUNET_PeerIdentity), &h2);
678 678
679 if (0 < GNUNET_CRYPTO_hash_cmp (&h1, 679 if (0 < GNUNET_CRYPTO_hash_cmp (&h1,
680 &h2)) 680 &h2))
681 { 681 {
@@ -785,10 +785,10 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
785 sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 785 sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
786 sizeof (struct GNUNET_TIME_AbsoluteNBO) + 786 sizeof (struct GNUNET_TIME_AbsoluteNBO) +
787 sizeof (struct GNUNET_TIME_AbsoluteNBO) + 787 sizeof (struct GNUNET_TIME_AbsoluteNBO) +
788 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 788 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey) +
789 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)) || 789 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)) ||
790 (GNUNET_OK != 790 (GNUNET_OK !=
791 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY, 791 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY,
792 &m->purpose, 792 &m->purpose,
793 &m->signature, &m->origin_identity.public_key))) 793 &m->signature, &m->origin_identity.public_key)))
794 { 794 {
@@ -810,7 +810,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
810 } 810 }
811 if (GNUNET_OK != 811 if (GNUNET_OK !=
812 GNUNET_CRYPTO_ecc_ecdh (my_ephemeral_key, 812 GNUNET_CRYPTO_ecc_ecdh (my_ephemeral_key,
813 &m->ephemeral_key, 813 &m->ephemeral_key,
814 &key_material)) 814 &key_material))
815 { 815 {
816 GNUNET_break (0); 816 GNUNET_break (0);
@@ -1478,8 +1478,8 @@ sign_ephemeral_key ()
1478 current_ekm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 1478 current_ekm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
1479 sizeof (struct GNUNET_TIME_AbsoluteNBO) + 1479 sizeof (struct GNUNET_TIME_AbsoluteNBO) +
1480 sizeof (struct GNUNET_TIME_AbsoluteNBO) + 1480 sizeof (struct GNUNET_TIME_AbsoluteNBO) +
1481 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 1481 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey) +
1482 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 1482 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey));
1483 current_ekm.creation_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 1483 current_ekm.creation_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
1484 if (GNUNET_YES == 1484 if (GNUNET_YES ==
1485 GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg, 1485 GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg,
@@ -1493,11 +1493,11 @@ sign_ephemeral_key ()
1493 { 1493 {
1494 current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS); 1494 current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS);
1495 } 1495 }
1496 GNUNET_CRYPTO_ecc_key_get_public_for_encryption (my_ephemeral_key, 1496 GNUNET_CRYPTO_ecdhe_key_get_public (my_ephemeral_key,
1497 &current_ekm.ephemeral_key); 1497 &current_ekm.ephemeral_key);
1498 current_ekm.origin_identity = GSC_my_identity; 1498 current_ekm.origin_identity = GSC_my_identity;
1499 GNUNET_assert (GNUNET_OK == 1499 GNUNET_assert (GNUNET_OK ==
1500 GNUNET_CRYPTO_ecc_sign (my_private_key, 1500 GNUNET_CRYPTO_eddsa_sign (my_private_key,
1501 &current_ekm.purpose, 1501 &current_ekm.purpose,
1502 &current_ekm.signature)); 1502 &current_ekm.signature));
1503} 1503}
@@ -1520,7 +1520,7 @@ do_rekey (void *cls,
1520 NULL); 1520 NULL);
1521 if (NULL != my_ephemeral_key) 1521 if (NULL != my_ephemeral_key)
1522 GNUNET_free (my_ephemeral_key); 1522 GNUNET_free (my_ephemeral_key);
1523 my_ephemeral_key = GNUNET_CRYPTO_ecc_key_create (); 1523 my_ephemeral_key = GNUNET_CRYPTO_ecdhe_key_create ();
1524 GNUNET_assert (NULL != my_ephemeral_key); 1524 GNUNET_assert (NULL != my_ephemeral_key);
1525 sign_ephemeral_key (); 1525 sign_ephemeral_key ();
1526 for (pos = kx_head; NULL != pos; pos = pos->next) 1526 for (pos = kx_head; NULL != pos; pos = pos->next)
@@ -1535,38 +1535,27 @@ do_rekey (void *cls,
1535 * Initialize KX subsystem. 1535 * Initialize KX subsystem.
1536 * 1536 *
1537 * @param pk private key to use for the peer 1537 * @param pk private key to use for the peer
1538 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 1538 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
1539 */ 1539 */
1540int 1540int
1541GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk) 1541GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk)
1542{ 1542{
1543 GNUNET_assert (NULL != pk); 1543 GNUNET_assert (NULL != pk);
1544 my_private_key = pk; 1544 my_private_key = pk;
1545 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, 1545 GNUNET_CRYPTO_eddsa_key_get_public (my_private_key,
1546 &GSC_my_identity.public_key); 1546 &GSC_my_identity.public_key);
1547 if (GNUNET_YES == 1547 my_ephemeral_key = GNUNET_CRYPTO_ecdhe_key_create ();
1548 GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg, 1548 if (NULL == my_ephemeral_key)
1549 "core",
1550 "USE_EPHEMERAL_KEYS"))
1551 { 1549 {
1552 my_ephemeral_key = GNUNET_CRYPTO_ecc_key_create (); 1550 GNUNET_break (0);
1553 if (NULL == my_ephemeral_key) 1551 GNUNET_free (my_private_key);
1554 { 1552 my_private_key = NULL;
1555 GNUNET_break (0); 1553 return GNUNET_SYSERR;
1556 GNUNET_free (my_private_key);
1557 my_private_key = NULL;
1558 return GNUNET_SYSERR;
1559 }
1560 sign_ephemeral_key ();
1561 rekey_task = GNUNET_SCHEDULER_add_delayed (REKEY_FREQUENCY,
1562 &do_rekey,
1563 NULL);
1564 }
1565 else
1566 {
1567 my_ephemeral_key = my_private_key;
1568 sign_ephemeral_key ();
1569 } 1554 }
1555 sign_ephemeral_key ();
1556 rekey_task = GNUNET_SCHEDULER_add_delayed (REKEY_FREQUENCY,
1557 &do_rekey,
1558 NULL);
1570 mst = GNUNET_SERVER_mst_create (&deliver_message, NULL); 1559 mst = GNUNET_SERVER_mst_create (&deliver_message, NULL);
1571 return GNUNET_OK; 1560 return GNUNET_OK;
1572} 1561}
@@ -1583,8 +1572,7 @@ GSC_KX_done ()
1583 GNUNET_SCHEDULER_cancel (rekey_task); 1572 GNUNET_SCHEDULER_cancel (rekey_task);
1584 rekey_task = GNUNET_SCHEDULER_NO_TASK; 1573 rekey_task = GNUNET_SCHEDULER_NO_TASK;
1585 } 1574 }
1586 if ( (NULL != my_ephemeral_key) && 1575 if (NULL != my_ephemeral_key)
1587 (my_ephemeral_key != my_private_key) )
1588 { 1576 {
1589 GNUNET_free (my_ephemeral_key); 1577 GNUNET_free (my_ephemeral_key);
1590 my_ephemeral_key = NULL; 1578 my_ephemeral_key = NULL;
diff --git a/src/core/gnunet-service-core_kx.h b/src/core/gnunet-service-core_kx.h
index e1b860919..4c99669b2 100644
--- a/src/core/gnunet-service-core_kx.h
+++ b/src/core/gnunet-service-core_kx.h
@@ -121,7 +121,7 @@ GSC_KX_stop (struct GSC_KeyExchangeInfo *kx);
121 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 121 * @return GNUNET_OK on success, GNUNET_SYSERR on failure
122 */ 122 */
123int 123int
124GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk); 124GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk);
125 125
126 126
127/** 127/**
diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c
index a8846944e..fd76d0ce0 100644
--- a/src/dns/plugin_block_dns.c
+++ b/src/dns/plugin_block_dns.c
@@ -76,7 +76,7 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
76 76
77 if (ntohl (ad->purpose.size) != 77 if (ntohl (ad->purpose.size) !=
78 sizeof (struct GNUNET_DNS_Advertisement) - 78 sizeof (struct GNUNET_DNS_Advertisement) -
79 sizeof (struct GNUNET_CRYPTO_EccSignature)) 79 sizeof (struct GNUNET_CRYPTO_EddsaSignature))
80 { 80 {
81 GNUNET_break_op (0); 81 GNUNET_break_op (0);
82 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 82 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
@@ -90,7 +90,7 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
90 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 90 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
91 } 91 }
92 if (GNUNET_OK != 92 if (GNUNET_OK !=
93 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD, 93 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD,
94 &ad->purpose, 94 &ad->purpose,
95 &ad->signature, 95 &ad->signature,
96 &ad->peer.public_key)) 96 &ad->peer.public_key))
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index f4d656f3c..5b1f5b681 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -438,7 +438,7 @@ static struct GNUNET_HashCode dht_put_key;
438/** 438/**
439 * Private key for this peer. 439 * Private key for this peer.
440 */ 440 */
441static struct GNUNET_CRYPTO_EccPrivateKey *peer_key; 441static struct GNUNET_CRYPTO_EddsaPrivateKey *peer_key;
442 442
443/** 443/**
444 * Are we an IPv4-exit? 444 * Are we an IPv4-exit?
@@ -3415,7 +3415,7 @@ do_dht_put (void *cls,
3415 expiration = GNUNET_TIME_relative_to_absolute (DNS_ADVERTISEMENT_TIMEOUT); 3415 expiration = GNUNET_TIME_relative_to_absolute (DNS_ADVERTISEMENT_TIMEOUT);
3416 dns_advertisement.expiration_time = GNUNET_TIME_absolute_hton (expiration); 3416 dns_advertisement.expiration_time = GNUNET_TIME_absolute_hton (expiration);
3417 GNUNET_assert (GNUNET_OK == 3417 GNUNET_assert (GNUNET_OK ==
3418 GNUNET_CRYPTO_ecc_sign (peer_key, 3418 GNUNET_CRYPTO_eddsa_sign (peer_key,
3419 &dns_advertisement.purpose, 3419 &dns_advertisement.purpose,
3420 &dns_advertisement.signature)); 3420 &dns_advertisement.signature));
3421 } 3421 }
@@ -3572,11 +3572,11 @@ run (void *cls, char *const *args GNUNET_UNUSED,
3572 if (NULL != dns_exit) 3572 if (NULL != dns_exit)
3573 { 3573 {
3574 dht = GNUNET_DHT_connect (cfg, 1); 3574 dht = GNUNET_DHT_connect (cfg, 1);
3575 peer_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); 3575 peer_key = GNUNET_CRYPTO_eddsa_key_create_from_configuration (cfg);
3576 GNUNET_CRYPTO_ecc_key_get_public_for_signature (peer_key, 3576 GNUNET_CRYPTO_eddsa_key_get_public (peer_key,
3577 &dns_advertisement.peer.public_key); 3577 &dns_advertisement.peer.public_key);
3578 dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) - 3578 dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) -
3579 sizeof (struct GNUNET_CRYPTO_EccSignature)); 3579 sizeof (struct GNUNET_CRYPTO_EddsaSignature));
3580 dns_advertisement.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD); 3580 dns_advertisement.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD);
3581 GNUNET_CRYPTO_hash ("dns", 3581 GNUNET_CRYPTO_hash ("dns",
3582 strlen ("dns"), 3582 strlen ("dns"),
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index 04057bc98..688bdf282 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -1477,7 +1477,7 @@ deserialize_publish_file (void *cls, const char *filename)
1477 int32_t all_done; 1477 int32_t all_done;
1478 int32_t have_ns; 1478 int32_t have_ns;
1479 char *fi_root; 1479 char *fi_root;
1480 struct GNUNET_CRYPTO_EccPrivateKey ns; 1480 struct GNUNET_CRYPTO_EcdsaPrivateKey ns;
1481 char *fi_pos; 1481 char *fi_pos;
1482 char *emsg; 1482 char *emsg;
1483 1483
@@ -1522,7 +1522,7 @@ deserialize_publish_file (void *cls, const char *filename)
1522 } 1522 }
1523 if (GNUNET_YES == have_ns) 1523 if (GNUNET_YES == have_ns)
1524 { 1524 {
1525 pc->ns = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 1525 pc->ns = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
1526 *pc->ns = ns; 1526 *pc->ns = ns;
1527 } 1527 }
1528 if ((0 == (pc->options & GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY)) && 1528 if ((0 == (pc->options & GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY)) &&
@@ -1637,7 +1637,7 @@ GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc)
1637 ( (NULL != pc->ns) && 1637 ( (NULL != pc->ns) &&
1638 (GNUNET_OK != GNUNET_BIO_write (wh, 1638 (GNUNET_OK != GNUNET_BIO_write (wh,
1639 pc->ns, 1639 pc->ns,
1640 sizeof (struct GNUNET_CRYPTO_EccPrivateKey)) ) )) 1640 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)) ) ))
1641 { 1641 {
1642 GNUNET_break (0); 1642 GNUNET_break (0);
1643 goto cleanup; 1643 goto cleanup;
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h
index 5858c916c..4b0965f15 100644
--- a/src/fs/fs_api.h
+++ b/src/fs/fs_api.h
@@ -128,10 +128,10 @@ struct Location
128 struct GNUNET_TIME_Absolute expirationTime; 128 struct GNUNET_TIME_Absolute expirationTime;
129 129
130 /** 130 /**
131 * RSA signature over the GNUNET_EC_FileIdentifier, 131 * Signature over the GNUNET_EC_FileIdentifier,
132 * GNUNET_hash of the peer and expiration time. 132 * peer identity and expiration time.
133 */ 133 */
134 struct GNUNET_CRYPTO_EccSignature contentSignature; 134 struct GNUNET_CRYPTO_EddsaSignature contentSignature;
135 135
136}; 136};
137 137
@@ -140,24 +140,24 @@ struct Location
140 */ 140 */
141enum GNUNET_FS_UriType 141enum GNUNET_FS_UriType
142{ 142{
143 /** 143 /**
144 * Content-hash-key (simple file). 144 * Content-hash-key (simple file).
145 */ 145 */
146 GNUNET_FS_URI_CHK, 146 GNUNET_FS_URI_CHK,
147 147
148 /** 148 /**
149 * Signed key space (file in namespace). 149 * Signed key space (file in namespace).
150 */ 150 */
151 GNUNET_FS_URI_SKS, 151 GNUNET_FS_URI_SKS,
152 152
153 /** 153 /**
154 * Keyword search key (query with keywords). 154 * Keyword search key (query with keywords).
155 */ 155 */
156 GNUNET_FS_URI_KSK, 156 GNUNET_FS_URI_KSK,
157 157
158 /** 158 /**
159 * Location (chk with identity of hosting peer). 159 * Location (chk with identity of hosting peer).
160 */ 160 */
161 GNUNET_FS_URI_LOC 161 GNUNET_FS_URI_LOC
162}; 162};
163 163
@@ -198,7 +198,7 @@ struct GNUNET_FS_Uri
198 /** 198 /**
199 * Identifier of the namespace. 199 * Identifier of the namespace.
200 */ 200 */
201 struct GNUNET_CRYPTO_EccPublicSignKey ns; 201 struct GNUNET_CRYPTO_EcdsaPublicKey ns;
202 202
203 /** 203 /**
204 * Human-readable identifier chosen for this entry in the 204 * Human-readable identifier chosen for this entry in the
@@ -1171,7 +1171,7 @@ struct GNUNET_FS_PublishContext
1171 /** 1171 /**
1172 * Namespace that we are publishing in, NULL if we have no namespace. 1172 * Namespace that we are publishing in, NULL if we have no namespace.
1173 */ 1173 */
1174 struct GNUNET_CRYPTO_EccPrivateKey *ns; 1174 struct GNUNET_CRYPTO_EcdsaPrivateKey *ns;
1175 1175
1176 /** 1176 /**
1177 * ID of the content in the namespace, NULL if we have no namespace. 1177 * ID of the content in the namespace, NULL if we have no namespace.
@@ -1461,7 +1461,7 @@ struct SearchRequestEntry
1461 /** 1461 /**
1462 * Derived public key, hashes to 'uquery'. 1462 * Derived public key, hashes to 'uquery'.
1463 */ 1463 */
1464 struct GNUNET_CRYPTO_EccPublicSignKey dpub; 1464 struct GNUNET_CRYPTO_EcdsaPublicKey dpub;
1465 1465
1466 /** 1466 /**
1467 * The original keyword, used to derive the 1467 * The original keyword, used to derive the
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c
index f4cd82978..39bb39701 100644
--- a/src/fs/fs_namespace.c
+++ b/src/fs/fs_namespace.c
@@ -92,7 +92,7 @@ struct GNUNET_FS_UpdateInformationGraph
92 /** 92 /**
93 * Private key for the namespace. 93 * Private key for the namespace.
94 */ 94 */
95 struct GNUNET_CRYPTO_EccPrivateKey ns; 95 struct GNUNET_CRYPTO_EcdsaPrivateKey ns;
96 96
97 /** 97 /**
98 * Hash map mapping identifiers of update nodes 98 * Hash map mapping identifiers of update nodes
@@ -127,11 +127,11 @@ struct GNUNET_FS_UpdateInformationGraph
127 */ 127 */
128static char * 128static char *
129get_update_information_directory (struct GNUNET_FS_Handle *h, 129get_update_information_directory (struct GNUNET_FS_Handle *h,
130 const struct GNUNET_CRYPTO_EccPrivateKey *ns) 130 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns)
131{ 131{
132 char *dn; 132 char *dn;
133 char *ret; 133 char *ret;
134 struct GNUNET_CRYPTO_EccPublicSignKey pub; 134 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
135 struct GNUNET_HashCode hc; 135 struct GNUNET_HashCode hc;
136 struct GNUNET_CRYPTO_HashAsciiEncoded enc; 136 struct GNUNET_CRYPTO_HashAsciiEncoded enc;
137 137
@@ -143,7 +143,7 @@ get_update_information_directory (struct GNUNET_FS_Handle *h,
143 "fs", "UPDATE_DIR"); 143 "fs", "UPDATE_DIR");
144 return NULL; 144 return NULL;
145 } 145 }
146 GNUNET_CRYPTO_ecc_key_get_public_for_signature (ns, &pub); 146 GNUNET_CRYPTO_ecdsa_key_get_public (ns, &pub);
147 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &hc); 147 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &hc);
148 GNUNET_CRYPTO_hash_to_enc (&hc, 148 GNUNET_CRYPTO_hash_to_enc (&hc,
149 &enc); 149 &enc);
@@ -241,7 +241,7 @@ END:
241 */ 241 */
242static struct GNUNET_FS_UpdateInformationGraph * 242static struct GNUNET_FS_UpdateInformationGraph *
243read_update_information_graph (struct GNUNET_FS_Handle *h, 243read_update_information_graph (struct GNUNET_FS_Handle *h,
244 const struct GNUNET_CRYPTO_EccPrivateKey *ns) 244 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns)
245{ 245{
246 struct GNUNET_FS_UpdateInformationGraph *uig; 246 struct GNUNET_FS_UpdateInformationGraph *uig;
247 char *fn; 247 char *fn;
@@ -346,7 +346,7 @@ struct GNUNET_FS_PublishSksContext
346 /** 346 /**
347 * Namespace we're publishing to. 347 * Namespace we're publishing to.
348 */ 348 */
349 struct GNUNET_CRYPTO_EccPrivateKey ns; 349 struct GNUNET_CRYPTO_EcdsaPrivateKey ns;
350 350
351 /** 351 /**
352 * Handle to the datastore. 352 * Handle to the datastore.
@@ -434,7 +434,7 @@ sks_publish_cont (void *cls,
434 */ 434 */
435struct GNUNET_FS_PublishSksContext * 435struct GNUNET_FS_PublishSksContext *
436GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, 436GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
437 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 437 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
438 const char *identifier, const char *update, 438 const char *identifier, const char *update,
439 const struct GNUNET_CONTAINER_MetaData *meta, 439 const struct GNUNET_CONTAINER_MetaData *meta,
440 const struct GNUNET_FS_Uri *uri, 440 const struct GNUNET_FS_Uri *uri,
@@ -448,7 +448,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
448 sks_uri = GNUNET_new (struct GNUNET_FS_Uri); 448 sks_uri = GNUNET_new (struct GNUNET_FS_Uri);
449 sks_uri->type = GNUNET_FS_URI_SKS; 449 sks_uri->type = GNUNET_FS_URI_SKS;
450 sks_uri->data.sks.identifier = GNUNET_strdup (identifier); 450 sks_uri->data.sks.identifier = GNUNET_strdup (identifier);
451 GNUNET_CRYPTO_ecc_key_get_public_for_signature (ns, 451 GNUNET_CRYPTO_ecdsa_key_get_public (ns,
452 &sks_uri->data.sks.ns); 452 &sks_uri->data.sks.ns);
453 453
454 psc = GNUNET_new (struct GNUNET_FS_PublishSksContext); 454 psc = GNUNET_new (struct GNUNET_FS_PublishSksContext);
@@ -679,7 +679,7 @@ find_trees (void *cls,
679 */ 679 */
680void 680void
681GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h, 681GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h,
682 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 682 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
683 const char *next_id, 683 const char *next_id,
684 GNUNET_FS_IdentifierProcessor ip, 684 GNUNET_FS_IdentifierProcessor ip,
685 void *ip_cls) 685 void *ip_cls)
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index 387ede6a1..05645f0ab 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -1152,7 +1152,7 @@ finish_reserve (void *cls, int success,
1152struct GNUNET_FS_PublishContext * 1152struct GNUNET_FS_PublishContext *
1153GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, 1153GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
1154 struct GNUNET_FS_FileInformation *fi, 1154 struct GNUNET_FS_FileInformation *fi,
1155 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 1155 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
1156 const char *nid, 1156 const char *nid,
1157 const char *nuid, 1157 const char *nuid,
1158 enum GNUNET_FS_PublishOptions options) 1158 enum GNUNET_FS_PublishOptions options)
@@ -1177,7 +1177,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
1177 ret->fi = fi; 1177 ret->fi = fi;
1178 if (NULL != ns) 1178 if (NULL != ns)
1179 { 1179 {
1180 ret->ns = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 1180 ret->ns = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
1181 *ret->ns = *ns; 1181 *ret->ns = *ns;
1182 GNUNET_assert (NULL != nid); 1182 GNUNET_assert (NULL != nid);
1183 ret->nid = GNUNET_strdup (nid); 1183 ret->nid = GNUNET_strdup (nid);
diff --git a/src/fs/fs_publish_ksk.c b/src/fs/fs_publish_ksk.c
index 6aac94011..67157f408 100644
--- a/src/fs/fs_publish_ksk.c
+++ b/src/fs/fs_publish_ksk.c
@@ -170,7 +170,7 @@ publish_ksk_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
170 pkc->dsh, 170 pkc->dsh,
171 keyword + 1 /* skip '+' */, 171 keyword + 1 /* skip '+' */,
172 NULL, 172 NULL,
173 GNUNET_CRYPTO_ecc_key_get_anonymous (), 173 GNUNET_CRYPTO_ecdsa_key_get_anonymous (),
174 pkc->meta, 174 pkc->meta,
175 pkc->uri, 175 pkc->uri,
176 &pkc->bo, 176 &pkc->bo,
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c
index 18f4804d1..791366073 100644
--- a/src/fs/fs_publish_ublock.c
+++ b/src/fs/fs_publish_ublock.c
@@ -46,7 +46,7 @@ static void
46derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey, 46derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey,
47 struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, 47 struct GNUNET_CRYPTO_SymmetricInitializationVector *iv,
48 const char *label, 48 const char *label,
49 const struct GNUNET_CRYPTO_EccPublicSignKey *pub) 49 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
50{ 50{
51 struct GNUNET_HashCode key; 51 struct GNUNET_HashCode key;
52 52
@@ -73,7 +73,7 @@ derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey,
73void 73void
74GNUNET_FS_ublock_decrypt_ (const void *input, 74GNUNET_FS_ublock_decrypt_ (const void *input,
75 size_t input_len, 75 size_t input_len,
76 const struct GNUNET_CRYPTO_EccPublicSignKey *ns, 76 const struct GNUNET_CRYPTO_EcdsaPublicKey *ns,
77 const char *label, 77 const char *label,
78 void *output) 78 void *output)
79{ 79{
@@ -158,7 +158,7 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
158 struct GNUNET_DATASTORE_Handle *dsh, 158 struct GNUNET_DATASTORE_Handle *dsh,
159 const char *label, 159 const char *label,
160 const char *ulabel, 160 const char *ulabel,
161 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 161 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
162 const struct GNUNET_CONTAINER_MetaData *meta, 162 const struct GNUNET_CONTAINER_MetaData *meta,
163 const struct GNUNET_FS_Uri *uri, 163 const struct GNUNET_FS_Uri *uri,
164 const struct GNUNET_FS_BlockOptions *bo, 164 const struct GNUNET_FS_BlockOptions *bo,
@@ -169,8 +169,8 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
169 struct GNUNET_HashCode query; 169 struct GNUNET_HashCode query;
170 struct GNUNET_CRYPTO_SymmetricInitializationVector iv; 170 struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
171 struct GNUNET_CRYPTO_SymmetricSessionKey skey; 171 struct GNUNET_CRYPTO_SymmetricSessionKey skey;
172 struct GNUNET_CRYPTO_EccPrivateKey *nsd; 172 struct GNUNET_CRYPTO_EcdsaPrivateKey *nsd;
173 struct GNUNET_CRYPTO_EccPublicSignKey pub; 173 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
174 char *uris; 174 char *uris;
175 size_t size; 175 size_t size;
176 char *kbe; 176 char *kbe;
@@ -225,7 +225,7 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
225 "Publishing under identifier `%s'\n", 225 "Publishing under identifier `%s'\n",
226 label); 226 label);
227 /* get public key of the namespace */ 227 /* get public key of the namespace */
228 GNUNET_CRYPTO_ecc_key_get_public_for_signature (ns, 228 GNUNET_CRYPTO_ecdsa_key_get_public (ns,
229 &pub); 229 &pub);
230 derive_ublock_encryption_key (&skey, &iv, 230 derive_ublock_encryption_key (&skey, &iv,
231 label, &pub); 231 label, &pub);
@@ -238,15 +238,15 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
238 &ub_enc[1]); 238 &ub_enc[1]);
239 ub_enc->purpose.size = htonl (ulen + slen + mdsize + 239 ub_enc->purpose.size = htonl (ulen + slen + mdsize +
240 sizeof (struct UBlock) 240 sizeof (struct UBlock)
241 - sizeof (struct GNUNET_CRYPTO_EccSignature)); 241 - sizeof (struct GNUNET_CRYPTO_EcdsaSignature));
242 ub_enc->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK); 242 ub_enc->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK);
243 243
244 /* derive signing-key from 'label' and public key of the namespace */ 244 /* derive signing-key from 'label' and public key of the namespace */
245 nsd = GNUNET_CRYPTO_ecc_key_derive (ns, label, "fs-ublock"); 245 nsd = GNUNET_CRYPTO_ecdsa_private_key_derive (ns, label, "fs-ublock");
246 GNUNET_CRYPTO_ecc_key_get_public_for_signature (nsd, 246 GNUNET_CRYPTO_ecdsa_key_get_public (nsd,
247 &ub_enc->verification_key); 247 &ub_enc->verification_key);
248 GNUNET_assert (GNUNET_OK == 248 GNUNET_assert (GNUNET_OK ==
249 GNUNET_CRYPTO_ecc_sign (nsd, 249 GNUNET_CRYPTO_ecdsa_sign (nsd,
250 &ub_enc->purpose, 250 &ub_enc->purpose,
251 &ub_enc->signature)); 251 &ub_enc->signature));
252 GNUNET_CRYPTO_hash (&ub_enc->verification_key, 252 GNUNET_CRYPTO_hash (&ub_enc->verification_key,
diff --git a/src/fs/fs_publish_ublock.h b/src/fs/fs_publish_ublock.h
index ed8d599a8..0b22366d5 100644
--- a/src/fs/fs_publish_ublock.h
+++ b/src/fs/fs_publish_ublock.h
@@ -46,7 +46,7 @@
46void 46void
47GNUNET_FS_ublock_decrypt_ (const void *input, 47GNUNET_FS_ublock_decrypt_ (const void *input,
48 size_t input_len, 48 size_t input_len,
49 const struct GNUNET_CRYPTO_EccPublicSignKey *ns, 49 const struct GNUNET_CRYPTO_EcdsaPublicKey *ns,
50 const char *label, 50 const char *label,
51 void *output); 51 void *output);
52 52
@@ -89,7 +89,7 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
89 struct GNUNET_DATASTORE_Handle *dsh, 89 struct GNUNET_DATASTORE_Handle *dsh,
90 const char *label, 90 const char *label,
91 const char *ulabel, 91 const char *ulabel,
92 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 92 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
93 const struct GNUNET_CONTAINER_MetaData *meta, 93 const struct GNUNET_CONTAINER_MetaData *meta,
94 const struct GNUNET_FS_Uri *uri, 94 const struct GNUNET_FS_Uri *uri,
95 const struct GNUNET_FS_BlockOptions *bo, 95 const struct GNUNET_FS_BlockOptions *bo,
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 11af03646..bc3561856 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -679,20 +679,20 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, const char *id_update,
679 */ 679 */
680static int 680static int
681decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc, 681decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
682 const struct GNUNET_CRYPTO_EccPublicSignKey *dpub, 682 const struct GNUNET_CRYPTO_EcdsaPublicKey *dpub,
683 const void *edata, 683 const void *edata,
684 size_t edata_size, 684 size_t edata_size,
685 char *data) 685 char *data)
686{ 686{
687 const struct GNUNET_CRYPTO_EccPrivateKey *anon; 687 const struct GNUNET_CRYPTO_EcdsaPrivateKey *anon;
688 struct GNUNET_CRYPTO_EccPublicSignKey anon_pub; 688 struct GNUNET_CRYPTO_EcdsaPublicKey anon_pub;
689 unsigned int i; 689 unsigned int i;
690 690
691 /* find key */ 691 /* find key */
692 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) 692 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
693 if (0 == memcmp (dpub, 693 if (0 == memcmp (dpub,
694 &sc->requests[i].dpub, 694 &sc->requests[i].dpub,
695 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey))) 695 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)))
696 break; 696 break;
697 if (i == sc->uri->data.ksk.keywordCount) 697 if (i == sc->uri->data.ksk.keywordCount)
698 { 698 {
@@ -701,8 +701,8 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
701 return GNUNET_SYSERR; 701 return GNUNET_SYSERR;
702 } 702 }
703 /* decrypt */ 703 /* decrypt */
704 anon = GNUNET_CRYPTO_ecc_key_get_anonymous (); 704 anon = GNUNET_CRYPTO_ecdsa_key_get_anonymous ();
705 GNUNET_CRYPTO_ecc_key_get_public_for_signature (anon, &anon_pub); 705 GNUNET_CRYPTO_ecdsa_key_get_public (anon, &anon_pub);
706 GNUNET_FS_ublock_decrypt_ (edata, edata_size, 706 GNUNET_FS_ublock_decrypt_ (edata, edata_size,
707 &anon_pub, 707 &anon_pub,
708 sc->requests[i].keyword, 708 sc->requests[i].keyword,
@@ -1035,7 +1035,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
1035 struct MessageBuilderContext mbc; 1035 struct MessageBuilderContext mbc;
1036 size_t msize; 1036 size_t msize;
1037 struct SearchMessage *sm; 1037 struct SearchMessage *sm;
1038 struct GNUNET_CRYPTO_EccPublicSignKey dpub; 1038 struct GNUNET_CRYPTO_EcdsaPublicKey dpub;
1039 unsigned int sqms; 1039 unsigned int sqms;
1040 uint32_t options; 1040 uint32_t options;
1041 1041
@@ -1102,7 +1102,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
1102 sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK); 1102 sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK);
1103 sm->anonymity_level = htonl (sc->anonymity); 1103 sm->anonymity_level = htonl (sc->anonymity);
1104 memset (&sm->target, 0, sizeof (struct GNUNET_HashCode)); 1104 memset (&sm->target, 0, sizeof (struct GNUNET_HashCode));
1105 GNUNET_CRYPTO_ecc_public_key_derive (&sc->uri->data.sks.ns, 1105 GNUNET_CRYPTO_ecdsa_public_key_derive (&sc->uri->data.sks.ns,
1106 sc->uri->data.sks.identifier, 1106 sc->uri->data.sks.identifier,
1107 "fs-ublock", 1107 "fs-ublock",
1108 &dpub); 1108 &dpub);
@@ -1271,16 +1271,16 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc)
1271{ 1271{
1272 unsigned int i; 1272 unsigned int i;
1273 const char *keyword; 1273 const char *keyword;
1274 const struct GNUNET_CRYPTO_EccPrivateKey *anon; 1274 const struct GNUNET_CRYPTO_EcdsaPrivateKey *anon;
1275 struct GNUNET_CRYPTO_EccPublicSignKey anon_pub; 1275 struct GNUNET_CRYPTO_EcdsaPublicKey anon_pub;
1276 struct SearchRequestEntry *sre; 1276 struct SearchRequestEntry *sre;
1277 1277
1278 GNUNET_assert (NULL == sc->client); 1278 GNUNET_assert (NULL == sc->client);
1279 if (GNUNET_FS_uri_test_ksk (sc->uri)) 1279 if (GNUNET_FS_uri_test_ksk (sc->uri))
1280 { 1280 {
1281 GNUNET_assert (0 != sc->uri->data.ksk.keywordCount); 1281 GNUNET_assert (0 != sc->uri->data.ksk.keywordCount);
1282 anon = GNUNET_CRYPTO_ecc_key_get_anonymous (); 1282 anon = GNUNET_CRYPTO_ecdsa_key_get_anonymous ();
1283 GNUNET_CRYPTO_ecc_key_get_public_for_signature (anon, &anon_pub); 1283 GNUNET_CRYPTO_ecdsa_key_get_public (anon, &anon_pub);
1284 sc->requests = 1284 sc->requests =
1285 GNUNET_malloc (sizeof (struct SearchRequestEntry) * 1285 GNUNET_malloc (sizeof (struct SearchRequestEntry) *
1286 sc->uri->data.ksk.keywordCount); 1286 sc->uri->data.ksk.keywordCount);
@@ -1289,12 +1289,12 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc)
1289 keyword = &sc->uri->data.ksk.keywords[i][1]; 1289 keyword = &sc->uri->data.ksk.keywords[i][1];
1290 sre = &sc->requests[i]; 1290 sre = &sc->requests[i];
1291 sre->keyword = GNUNET_strdup (keyword); 1291 sre->keyword = GNUNET_strdup (keyword);
1292 GNUNET_CRYPTO_ecc_public_key_derive (&anon_pub, 1292 GNUNET_CRYPTO_ecdsa_public_key_derive (&anon_pub,
1293 keyword, 1293 keyword,
1294 "fs-ublock", 1294 "fs-ublock",
1295 &sre->dpub); 1295 &sre->dpub);
1296 GNUNET_CRYPTO_hash (&sre->dpub, 1296 GNUNET_CRYPTO_hash (&sre->dpub,
1297 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 1297 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
1298 &sre->uquery); 1298 &sre->uquery);
1299 sre->mandatory = (sc->uri->data.ksk.keywords[i][0] == '+'); 1299 sre->mandatory = (sc->uri->data.ksk.keywords[i][0] == '+');
1300 if (sre->mandatory) 1300 if (sre->mandatory)
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index 7e189d697..14ab0fd69 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -490,10 +490,10 @@ process_kblock_for_unindex (void *cls,
490 } 490 }
491 { 491 {
492 char pt[size - sizeof (struct UBlock)]; 492 char pt[size - sizeof (struct UBlock)];
493 struct GNUNET_CRYPTO_EccPublicSignKey anon_pub; 493 struct GNUNET_CRYPTO_EcdsaPublicKey anon_pub;
494 const char *keyword; 494 const char *keyword;
495 495
496 GNUNET_CRYPTO_ecc_key_get_public_for_signature (GNUNET_CRYPTO_ecc_key_get_anonymous (), 496 GNUNET_CRYPTO_ecdsa_key_get_public (GNUNET_CRYPTO_ecdsa_key_get_anonymous (),
497 &anon_pub); 497 &anon_pub);
498 keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1]; 498 keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1];
499 GNUNET_FS_ublock_decrypt_ (&ub[1], size - sizeof (struct UBlock), 499 GNUNET_FS_ublock_decrypt_ (&ub[1], size - sizeof (struct UBlock),
@@ -550,9 +550,9 @@ void
550GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc) 550GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc)
551{ 551{
552 const char *keyword; 552 const char *keyword;
553 const struct GNUNET_CRYPTO_EccPrivateKey *anon; 553 const struct GNUNET_CRYPTO_EcdsaPrivateKey *anon;
554 struct GNUNET_CRYPTO_EccPublicSignKey anon_pub; 554 struct GNUNET_CRYPTO_EcdsaPublicKey anon_pub;
555 struct GNUNET_CRYPTO_EccPublicSignKey dpub; 555 struct GNUNET_CRYPTO_EcdsaPublicKey dpub;
556 556
557 if (NULL == uc->dsh) 557 if (NULL == uc->dsh)
558 uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg); 558 uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg);
@@ -570,10 +570,10 @@ GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc)
570 unindex_finish (uc); 570 unindex_finish (uc);
571 return; 571 return;
572 } 572 }
573 anon = GNUNET_CRYPTO_ecc_key_get_anonymous (); 573 anon = GNUNET_CRYPTO_ecdsa_key_get_anonymous ();
574 GNUNET_CRYPTO_ecc_key_get_public_for_signature (anon, &anon_pub); 574 GNUNET_CRYPTO_ecdsa_key_get_public (anon, &anon_pub);
575 keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1]; 575 keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1];
576 GNUNET_CRYPTO_ecc_public_key_derive (&anon_pub, 576 GNUNET_CRYPTO_ecdsa_public_key_derive (&anon_pub,
577 keyword, 577 keyword,
578 "fs-ublock", 578 "fs-ublock",
579 &dpub); 579 &dpub);
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index e64fabeba..578fc6820 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -118,7 +118,7 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
118 case GNUNET_FS_URI_LOC: 118 case GNUNET_FS_URI_LOC:
119 GNUNET_CRYPTO_hash (&uri->data.loc.fi, 119 GNUNET_CRYPTO_hash (&uri->data.loc.fi,
120 sizeof (struct FileIdentifier) + 120 sizeof (struct FileIdentifier) +
121 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 121 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
122 key); 122 key);
123 break; 123 break;
124 default: 124 default:
@@ -357,7 +357,7 @@ static struct GNUNET_FS_Uri *
357uri_sks_parse (const char *s, char **emsg) 357uri_sks_parse (const char *s, char **emsg)
358{ 358{
359 struct GNUNET_FS_Uri *ret; 359 struct GNUNET_FS_Uri *ret;
360 struct GNUNET_CRYPTO_EccPublicSignKey ns; 360 struct GNUNET_CRYPTO_EcdsaPublicKey ns;
361 size_t pos; 361 size_t pos;
362 char *end; 362 char *end;
363 363
@@ -559,7 +559,7 @@ uri_loc_parse (const char *s, char **emsg)
559 unsigned long long exptime; 559 unsigned long long exptime;
560 unsigned long long flen; 560 unsigned long long flen;
561 struct GNUNET_TIME_Absolute et; 561 struct GNUNET_TIME_Absolute et;
562 struct GNUNET_CRYPTO_EccSignature sig; 562 struct GNUNET_CRYPTO_EddsaSignature sig;
563 struct LocUriAssembly ass; 563 struct LocUriAssembly ass;
564 int ret; 564 int ret;
565 size_t slen; 565 size_t slen;
@@ -604,7 +604,7 @@ uri_loc_parse (const char *s, char **emsg)
604 npos++; 604 npos++;
605 ret = 605 ret =
606 enc2bin (&s[npos], &ass.peer, 606 enc2bin (&s[npos], &ass.peer,
607 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 607 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
608 if (ret == -1) 608 if (ret == -1)
609 { 609 {
610 *emsg = 610 *emsg =
@@ -617,7 +617,7 @@ uri_loc_parse (const char *s, char **emsg)
617 *emsg = GNUNET_strdup (_("SKS URI malformed (could not find signature)")); 617 *emsg = GNUNET_strdup (_("SKS URI malformed (could not find signature)"));
618 goto ERR; 618 goto ERR;
619 } 619 }
620 ret = enc2bin (&s[npos], &sig, sizeof (struct GNUNET_CRYPTO_EccSignature)); 620 ret = enc2bin (&s[npos], &sig, sizeof (struct GNUNET_CRYPTO_EcdsaSignature));
621 if (ret == -1) 621 if (ret == -1)
622 { 622 {
623 *emsg = GNUNET_strdup (_("SKS URI malformed (could not decode signature)")); 623 *emsg = GNUNET_strdup (_("SKS URI malformed (could not decode signature)"));
@@ -641,8 +641,8 @@ uri_loc_parse (const char *s, char **emsg)
641 et.abs_value_us = exptime * 1000LL * 1000LL; 641 et.abs_value_us = exptime * 1000LL * 1000LL;
642 ass.exptime = GNUNET_TIME_absolute_hton (et); 642 ass.exptime = GNUNET_TIME_absolute_hton (et);
643 if (GNUNET_OK != 643 if (GNUNET_OK !=
644 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT, 644 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT,
645 &ass.purpose, &sig, &ass.peer.public_key)) 645 &ass.purpose, &sig, &ass.peer.public_key))
646 { 646 {
647 *emsg = 647 *emsg =
648 GNUNET_strdup (_("SKS URI malformed (signature failed validation)")); 648 GNUNET_strdup (_("SKS URI malformed (signature failed validation)"));
@@ -894,8 +894,8 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
894 struct GNUNET_TIME_Absolute expiration_time) 894 struct GNUNET_TIME_Absolute expiration_time)
895{ 895{
896 struct GNUNET_FS_Uri *uri; 896 struct GNUNET_FS_Uri *uri;
897 struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 897 struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
898 struct GNUNET_CRYPTO_EccPublicSignKey my_public_key; 898 struct GNUNET_CRYPTO_EddsaPublicKey my_public_key;
899 char *keyfile; 899 char *keyfile;
900 struct LocUriAssembly ass; 900 struct LocUriAssembly ass;
901 struct GNUNET_TIME_Absolute et; 901 struct GNUNET_TIME_Absolute et;
@@ -910,7 +910,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
910 _("Lacking key configuration settings.\n")); 910 _("Lacking key configuration settings.\n"));
911 return NULL; 911 return NULL;
912 } 912 }
913 if (NULL == (my_private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile))) 913 if (NULL == (my_private_key = GNUNET_CRYPTO_eddsa_key_create_from_file (keyfile)))
914 { 914 {
915 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 915 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
916 _("Could not access hostkey file `%s'.\n"), keyfile); 916 _("Could not access hostkey file `%s'.\n"), keyfile);
@@ -920,7 +920,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
920 GNUNET_free (keyfile); 920 GNUNET_free (keyfile);
921 /* we round expiration time to full seconds for SKS URIs */ 921 /* we round expiration time to full seconds for SKS URIs */
922 et.abs_value_us = (expiration_time.abs_value_us / 1000000LL) * 1000000LL; 922 et.abs_value_us = (expiration_time.abs_value_us / 1000000LL) * 1000000LL;
923 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, &my_public_key); 923 GNUNET_CRYPTO_eddsa_key_get_public (my_private_key, &my_public_key);
924 ass.purpose.size = htonl (sizeof (struct LocUriAssembly)); 924 ass.purpose.size = htonl (sizeof (struct LocUriAssembly));
925 ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT); 925 ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT);
926 ass.exptime = GNUNET_TIME_absolute_hton (et); 926 ass.exptime = GNUNET_TIME_absolute_hton (et);
@@ -932,8 +932,8 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
932 uri->data.loc.expirationTime = et; 932 uri->data.loc.expirationTime = et;
933 uri->data.loc.peer.public_key = my_public_key; 933 uri->data.loc.peer.public_key = my_public_key;
934 GNUNET_assert (GNUNET_OK == 934 GNUNET_assert (GNUNET_OK ==
935 GNUNET_CRYPTO_ecc_sign (my_private_key, &ass.purpose, 935 GNUNET_CRYPTO_eddsa_sign (my_private_key, &ass.purpose,
936 &uri->data.loc.contentSignature)); 936 &uri->data.loc.contentSignature));
937 GNUNET_free (my_private_key); 937 GNUNET_free (my_private_key);
938 return uri; 938 return uri;
939} 939}
@@ -947,7 +947,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
947 * @return an FS URI for the given namespace and identifier 947 * @return an FS URI for the given namespace and identifier
948 */ 948 */
949struct GNUNET_FS_Uri * 949struct GNUNET_FS_Uri *
950GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EccPublicSignKey *ns, 950GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EcdsaPublicKey *ns,
951 const char *id) 951 const char *id)
952{ 952{
953 struct GNUNET_FS_Uri *ns_uri; 953 struct GNUNET_FS_Uri *ns_uri;
@@ -1258,7 +1258,7 @@ GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
1258 case GNUNET_FS_URI_SKS: 1258 case GNUNET_FS_URI_SKS:
1259 if ((0 == 1259 if ((0 ==
1260 memcmp (&u1->data.sks.ns, &u2->data.sks.ns, 1260 memcmp (&u1->data.sks.ns, &u2->data.sks.ns,
1261 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey))) && 1261 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))) &&
1262 (0 == strcmp (u1->data.sks.identifier, u2->data.sks.identifier))) 1262 (0 == strcmp (u1->data.sks.identifier, u2->data.sks.identifier)))
1263 1263
1264 return GNUNET_YES; 1264 return GNUNET_YES;
@@ -1285,7 +1285,7 @@ GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
1285 if (memcmp 1285 if (memcmp
1286 (&u1->data.loc, &u2->data.loc, 1286 (&u1->data.loc, &u2->data.loc,
1287 sizeof (struct FileIdentifier) + 1287 sizeof (struct FileIdentifier) +
1288 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 1288 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
1289 sizeof (struct GNUNET_TIME_Absolute) + sizeof (unsigned short) + 1289 sizeof (struct GNUNET_TIME_Absolute) + sizeof (unsigned short) +
1290 sizeof (unsigned short)) != 0) 1290 sizeof (unsigned short)) != 0)
1291 return GNUNET_NO; 1291 return GNUNET_NO;
@@ -1319,7 +1319,7 @@ GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri)
1319 */ 1319 */
1320int 1320int
1321GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri, 1321GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
1322 struct GNUNET_CRYPTO_EccPublicSignKey *pseudonym) 1322 struct GNUNET_CRYPTO_EcdsaPublicKey *pseudonym)
1323{ 1323{
1324 if (!GNUNET_FS_uri_test_sks (uri)) 1324 if (!GNUNET_FS_uri_test_sks (uri))
1325 { 1325 {
@@ -1927,7 +1927,7 @@ uri_sks_to_string (const struct GNUNET_FS_Uri *uri)
1927 if (GNUNET_FS_URI_SKS != uri->type) 1927 if (GNUNET_FS_URI_SKS != uri->type)
1928 return NULL; 1928 return NULL;
1929 ret = GNUNET_STRINGS_data_to_string (&uri->data.sks.ns, 1929 ret = GNUNET_STRINGS_data_to_string (&uri->data.sks.ns,
1930 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 1930 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
1931 buf, 1931 buf,
1932 sizeof (buf)); 1932 sizeof (buf));
1933 GNUNET_assert (NULL != ret); 1933 GNUNET_assert (NULL != ret);
@@ -2032,10 +2032,10 @@ uri_loc_to_string (const struct GNUNET_FS_Uri *uri)
2032 GNUNET_CRYPTO_hash_to_enc (&uri->data.loc.fi.chk.query, &queryhash); 2032 GNUNET_CRYPTO_hash_to_enc (&uri->data.loc.fi.chk.query, &queryhash);
2033 peerId = 2033 peerId =
2034 bin2enc (&uri->data.loc.peer, 2034 bin2enc (&uri->data.loc.peer,
2035 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 2035 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
2036 peerSig = 2036 peerSig =
2037 bin2enc (&uri->data.loc.contentSignature, 2037 bin2enc (&uri->data.loc.contentSignature,
2038 sizeof (struct GNUNET_CRYPTO_EccSignature)); 2038 sizeof (struct GNUNET_CRYPTO_EcdsaSignature));
2039 GNUNET_asprintf (&ret, 2039 GNUNET_asprintf (&ret,
2040 "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX, 2040 "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
2041 GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash, 2041 GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash,
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index 83dd45a28..7f7423ae5 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -438,7 +438,7 @@ static void
438uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, 438uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri,
439 const char *emsg) 439 const char *emsg)
440{ 440{
441 const struct GNUNET_CRYPTO_EccPrivateKey *priv; 441 const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv;
442 442
443 if (NULL != emsg) 443 if (NULL != emsg)
444 { 444 {
@@ -520,7 +520,7 @@ static void
520directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result) 520directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result)
521{ 521{
522 struct GNUNET_FS_FileInformation *fi; 522 struct GNUNET_FS_FileInformation *fi;
523 const struct GNUNET_CRYPTO_EccPrivateKey *priv; 523 const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv;
524 524
525 fi = get_file_information (directory_scan_result); 525 fi = get_file_information (directory_scan_result);
526 GNUNET_FS_share_tree_free (directory_scan_result); 526 GNUNET_FS_share_tree_free (directory_scan_result);
diff --git a/src/fs/plugin_block_fs.c b/src/fs/plugin_block_fs.c
index 9f6791bb5..36e7f0796 100644
--- a/src/fs/plugin_block_fs.c
+++ b/src/fs/plugin_block_fs.c
@@ -105,13 +105,13 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
105 GNUNET_break_op (0); 105 GNUNET_break_op (0);
106 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 106 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
107 } 107 }
108 if (reply_block_size != ntohl (ub->purpose.size) + sizeof (struct GNUNET_CRYPTO_EccSignature)) 108 if (reply_block_size != ntohl (ub->purpose.size) + sizeof (struct GNUNET_CRYPTO_EcdsaSignature))
109 { 109 {
110 GNUNET_break_op (0); 110 GNUNET_break_op (0);
111 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 111 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
112 } 112 }
113 if (GNUNET_OK != 113 if (GNUNET_OK !=
114 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK, 114 GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK,
115 &ub->purpose, 115 &ub->purpose,
116 &ub->signature, 116 &ub->signature,
117 &ub->verification_key)) 117 &ub->verification_key))
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index b0358e809..c78008122 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -29,7 +29,7 @@
29#include "gnunet_fs_service.h" 29#include "gnunet_fs_service.h"
30 30
31 31
32static struct GNUNET_CRYPTO_EccPublicSignKey nsid; 32static struct GNUNET_CRYPTO_EcdsaPublicKey nsid;
33 33
34static struct GNUNET_FS_Uri *sks_expect_uri; 34static struct GNUNET_FS_Uri *sks_expect_uri;
35 35
@@ -237,7 +237,7 @@ static void
237adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) 237adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
238{ 238{
239 struct GNUNET_CONTAINER_MetaData *meta; 239 struct GNUNET_CONTAINER_MetaData *meta;
240 struct GNUNET_CRYPTO_EccPrivateKey *ns; 240 struct GNUNET_CRYPTO_EcdsaPrivateKey *ns;
241 struct GNUNET_FS_BlockOptions bo; 241 struct GNUNET_FS_BlockOptions bo;
242 242
243 if (NULL != emsg) 243 if (NULL != emsg)
@@ -247,7 +247,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
247 GNUNET_FS_stop (fs); 247 GNUNET_FS_stop (fs);
248 return; 248 return;
249 } 249 }
250 ns = GNUNET_CRYPTO_ecc_key_create (); 250 ns = GNUNET_CRYPTO_ecdsa_key_create ();
251 meta = GNUNET_CONTAINER_meta_data_create (); 251 meta = GNUNET_CONTAINER_meta_data_create ();
252 sks_expect_uri = GNUNET_FS_uri_dup (uri); 252 sks_expect_uri = GNUNET_FS_uri_dup (uri);
253 bo.content_priority = 1; 253 bo.content_priority = 1;
@@ -255,7 +255,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
255 bo.replication_level = 0; 255 bo.replication_level = 0;
256 bo.expiration_time = 256 bo.expiration_time =
257 GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES); 257 GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
258 GNUNET_CRYPTO_ecc_key_get_public_for_signature (ns, &nsid); 258 GNUNET_CRYPTO_ecdsa_key_get_public (ns, &nsid);
259 GNUNET_FS_publish_sks (fs, ns, "this", "next", meta, uri, 259 GNUNET_FS_publish_sks (fs, ns, "this", "next", meta, uri,
260 &bo, GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont, NULL); 260 &bo, GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont, NULL);
261 GNUNET_CONTAINER_meta_data_destroy (meta); 261 GNUNET_CONTAINER_meta_data_destroy (meta);
@@ -266,13 +266,13 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
266static void 266static void
267testNamespace () 267testNamespace ()
268{ 268{
269 struct GNUNET_CRYPTO_EccPrivateKey *ns; 269 struct GNUNET_CRYPTO_EcdsaPrivateKey *ns;
270 struct GNUNET_FS_BlockOptions bo; 270 struct GNUNET_FS_BlockOptions bo;
271 struct GNUNET_CONTAINER_MetaData *meta; 271 struct GNUNET_CONTAINER_MetaData *meta;
272 struct GNUNET_FS_Uri *ksk_uri; 272 struct GNUNET_FS_Uri *ksk_uri;
273 struct GNUNET_FS_Uri *sks_uri; 273 struct GNUNET_FS_Uri *sks_uri;
274 274
275 ns = GNUNET_CRYPTO_ecc_key_create (); 275 ns = GNUNET_CRYPTO_ecdsa_key_create ();
276 meta = GNUNET_CONTAINER_meta_data_create (); 276 meta = GNUNET_CONTAINER_meta_data_create ();
277 ksk_uri = GNUNET_FS_uri_parse ("gnunet://fs/ksk/testnsa", NULL); 277 ksk_uri = GNUNET_FS_uri_parse ("gnunet://fs/ksk/testnsa", NULL);
278 bo.content_priority = 1; 278 bo.content_priority = 1;
diff --git a/src/fs/test_fs_namespace_list_updateable.c b/src/fs/test_fs_namespace_list_updateable.c
index 69fc6542c..e8cfb2b77 100644
--- a/src/fs/test_fs_namespace_list_updateable.c
+++ b/src/fs/test_fs_namespace_list_updateable.c
@@ -33,7 +33,7 @@ static struct GNUNET_FS_Handle *fs;
33 33
34static int err; 34static int err;
35 35
36static struct GNUNET_CRYPTO_EccPrivateKey *ns; 36static struct GNUNET_CRYPTO_EcdsaPrivateKey *ns;
37 37
38static struct GNUNET_CONTAINER_MetaData *meta; 38static struct GNUNET_CONTAINER_MetaData *meta;
39 39
@@ -127,7 +127,7 @@ sks_cont_this (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
127static void 127static void
128testNamespace () 128testNamespace ()
129{ 129{
130 ns = GNUNET_CRYPTO_ecc_key_create (); 130 ns = GNUNET_CRYPTO_ecdsa_key_create ();
131 GNUNET_assert (NULL != ns); 131 GNUNET_assert (NULL != ns);
132 bo.content_priority = 1; 132 bo.content_priority = 1;
133 bo.anonymity_level = 1; 133 bo.anonymity_level = 1;
diff --git a/src/fs/test_fs_uri.c b/src/fs/test_fs_uri.c
index 1e1bd8fb8..2fc5b2a2d 100644
--- a/src/fs/test_fs_uri.c
+++ b/src/fs/test_fs_uri.c
@@ -163,8 +163,8 @@ testNamespace (int i)
163 char *uri; 163 char *uri;
164 struct GNUNET_FS_Uri *ret; 164 struct GNUNET_FS_Uri *ret;
165 char *emsg; 165 char *emsg;
166 struct GNUNET_CRYPTO_EccPrivateKey *ph; 166 struct GNUNET_CRYPTO_EcdsaPrivateKey *ph;
167 struct GNUNET_CRYPTO_EccPublicSignKey id; 167 struct GNUNET_CRYPTO_EcdsaPublicKey id;
168 char buf[1024]; 168 char buf[1024];
169 char ubuf[1024]; 169 char ubuf[1024];
170 char *sret; 170 char *sret;
@@ -193,8 +193,8 @@ testNamespace (int i)
193 GNUNET_assert (0); 193 GNUNET_assert (0);
194 } 194 }
195 GNUNET_free (emsg); 195 GNUNET_free (emsg);
196 ph = GNUNET_CRYPTO_ecc_key_create (); 196 ph = GNUNET_CRYPTO_ecdsa_key_create ();
197 GNUNET_CRYPTO_ecc_key_get_public_for_signature (ph, &id); 197 GNUNET_CRYPTO_ecdsa_key_get_public (ph, &id);
198 sret = GNUNET_STRINGS_data_to_string (&id, sizeof (id), 198 sret = GNUNET_STRINGS_data_to_string (&id, sizeof (id),
199 ubuf, sizeof (ubuf) - 1); 199 ubuf, sizeof (ubuf) - 1);
200 GNUNET_assert (NULL != sret); 200 GNUNET_assert (NULL != sret);
diff --git a/src/gns/gns.h b/src/gns/gns.h
index 571b62dc7..17a7c7323 100644
--- a/src/gns/gns.h
+++ b/src/gns/gns.h
@@ -63,7 +63,7 @@ struct GNUNET_GNS_ClientLookupMessage
63 /** 63 /**
64 * Zone that is to be used for lookup 64 * Zone that is to be used for lookup
65 */ 65 */
66 struct GNUNET_CRYPTO_EccPublicSignKey zone; 66 struct GNUNET_CRYPTO_EcdsaPublicKey zone;
67 67
68 /** 68 /**
69 * Only check cached results 69 * Only check cached results
@@ -83,7 +83,7 @@ struct GNUNET_GNS_ClientLookupMessage
83 /** 83 /**
84 * The key for shorten, if @e have_key is set 84 * The key for shorten, if @e have_key is set
85 */ 85 */
86 struct GNUNET_CRYPTO_EccPrivateKey shorten_key; 86 struct GNUNET_CRYPTO_EcdsaPrivateKey shorten_key;
87 87
88 /* Followed by the name to look up */ 88 /* Followed by the name to look up */
89}; 89};
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c
index 75c2f9530..3d58922ad 100644
--- a/src/gns/gns_api.c
+++ b/src/gns/gns_api.c
@@ -527,10 +527,10 @@ GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr)
527struct GNUNET_GNS_LookupRequest* 527struct GNUNET_GNS_LookupRequest*
528GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, 528GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
529 const char *name, 529 const char *name,
530 const struct GNUNET_CRYPTO_EccPublicSignKey *zone, 530 const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
531 int type, 531 int type,
532 int only_cached, 532 int only_cached,
533 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone_key, 533 const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_zone_key,
534 GNUNET_GNS_LookupResultProcessor proc, 534 GNUNET_GNS_LookupResultProcessor proc,
535 void *proc_cls) 535 void *proc_cls)
536{ 536{
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c
index 42d5ef0e2..6b7afdb59 100644
--- a/src/gns/gnunet-dns2gns.c
+++ b/src/gns/gnunet-dns2gns.c
@@ -143,7 +143,7 @@ static unsigned int listen_port = 53;
143/** 143/**
144 * Which GNS zone do we translate incoming DNS requests to? 144 * Which GNS zone do we translate incoming DNS requests to?
145 */ 145 */
146static struct GNUNET_CRYPTO_EccPublicSignKey my_zone; 146static struct GNUNET_CRYPTO_EcdsaPublicKey my_zone;
147 147
148/** 148/**
149 * '-z' option with the main zone to use. 149 * '-z' option with the main zone to use.
@@ -741,7 +741,7 @@ run (void *cls, char *const *args, const char *cfgfile,
741 } 741 }
742 if ( (NULL == gns_zone_str) || 742 if ( (NULL == gns_zone_str) ||
743 (GNUNET_OK != 743 (GNUNET_OK !=
744 GNUNET_CRYPTO_ecc_public_sign_key_from_string (gns_zone_str, 744 GNUNET_CRYPTO_ecdsa_public_key_from_string (gns_zone_str,
745 strlen (gns_zone_str), 745 strlen (gns_zone_str),
746 &my_zone)) ) 746 &my_zone)) )
747 { 747 {
diff --git a/src/gns/gnunet-gns-helper-service-w32.c b/src/gns/gnunet-gns-helper-service-w32.c
index 26a3f688a..78eb1e0a3 100644
--- a/src/gns/gnunet-gns-helper-service-w32.c
+++ b/src/gns/gnunet-gns-helper-service-w32.c
@@ -61,9 +61,9 @@ struct request
61 */ 61 */
62static struct GNUNET_GNS_Handle *gns; 62static struct GNUNET_GNS_Handle *gns;
63 63
64static struct GNUNET_CRYPTO_EccPublicSignKey *zone = NULL; 64static struct GNUNET_CRYPTO_EcdsaPublicKey *zone = NULL;
65static struct GNUNET_HashCode user_zone; 65static struct GNUNET_HashCode user_zone;
66struct GNUNET_CRYPTO_EccPrivateKey *shorten_key = NULL; 66struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key = NULL;
67 67
68 68
69/** 69/**
@@ -662,8 +662,8 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
662 }; 662 };
663 663
664 char* keyfile; 664 char* keyfile;
665 struct GNUNET_CRYPTO_EccPrivateKey *key = NULL; 665 struct GNUNET_CRYPTO_EcdsaPrivateKey *key = NULL;
666 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 666 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
667 struct GNUNET_CRYPTO_HashAsciiEncoded zonename; 667 struct GNUNET_CRYPTO_HashAsciiEncoded zonename;
668 668
669 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", 669 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
@@ -677,9 +677,9 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
677 { 677 {
678 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile)) 678 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile))
679 { 679 {
680 key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 680 key = GNUNET_CRYPTO_ecdsa_key_create_from_file (keyfile);
681 GNUNET_CRYPTO_ecc_key_get_public_for_signature (key, &pkey); 681 GNUNET_CRYPTO_ecdsa_key_get_public (key, &pkey);
682 GNUNET_CRYPTO_hash (&pkey, sizeof(struct GNUNET_CRYPTO_EccPublicSignKey), 682 GNUNET_CRYPTO_hash (&pkey, sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
683 &user_zone); 683 &user_zone);
684 GNUNET_CRYPTO_hash_to_enc (&user_zone, &zonename); 684 GNUNET_CRYPTO_hash_to_enc (&user_zone, &zonename);
685 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 685 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -700,7 +700,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
700 { 700 {
701 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile)) 701 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile))
702 { 702 {
703 shorten_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 703 shorten_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (keyfile);
704 } 704 }
705 GNUNET_free(keyfile); 705 GNUNET_free(keyfile);
706 } 706 }
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index a67f7356e..276ea70b0 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -623,12 +623,12 @@ static struct Socks5Request *s5r_tail;
623/** 623/**
624 * The users local GNS master zone 624 * The users local GNS master zone
625 */ 625 */
626static struct GNUNET_CRYPTO_EccPublicSignKey local_gns_zone; 626static struct GNUNET_CRYPTO_EcdsaPublicKey local_gns_zone;
627 627
628/** 628/**
629 * The users local shorten zone 629 * The users local shorten zone
630 */ 630 */
631static struct GNUNET_CRYPTO_EccPrivateKey local_shorten_zone; 631static struct GNUNET_CRYPTO_EcdsaPrivateKey local_shorten_zone;
632 632
633/** 633/**
634 * Is shortening enabled? 634 * Is shortening enabled?
@@ -2864,7 +2864,7 @@ main (int argc, char *const *argv)
2864 &run, NULL)) ? 0 : 1; 2864 &run, NULL)) ? 0 : 1;
2865 MHD_destroy_response (curl_failure_response); 2865 MHD_destroy_response (curl_failure_response);
2866 GNUNET_free_non_null ((char *) argv); 2866 GNUNET_free_non_null ((char *) argv);
2867 GNUNET_CRYPTO_ecc_key_clear (&local_shorten_zone); 2867 GNUNET_CRYPTO_ecdsa_key_clear (&local_shorten_zone);
2868 return ret; 2868 return ret;
2869} 2869}
2870 2870
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 */
193static void 193static void
194lookup_with_keys (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey, 194lookup_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 */
259static void 259static void
260lookup_with_public_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey) 260lookup_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
287identity_zone_cb (void *cls, 287identity_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
352run (void *cls, char *const *args, const char *cfgfile, 352run (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 }
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c
index 8fcd75e7c..d3728ee00 100644
--- a/src/gns/gnunet-service-gns.c
+++ b/src/gns/gnunet-service-gns.c
@@ -318,7 +318,7 @@ dht_put_continuation (void *cls,
318 */ 318 */
319static void 319static void
320put_gns_record (void *cls, 320put_gns_record (void *cls,
321 const struct GNUNET_CRYPTO_EccPrivateKey *key, 321 const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
322 const char *name, 322 const char *name,
323 unsigned int rd_count, 323 unsigned int rd_count,
324 const struct GNUNET_NAMESTORE_RecordData *rd) 324 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -414,8 +414,8 @@ put_gns_record (void *cls,
414 rd_public, 414 rd_public,
415 rd_public_count); 415 rd_public_count);
416 block_size = ntohl (block->purpose.size) 416 block_size = ntohl (block->purpose.size)
417 + sizeof (struct GNUNET_CRYPTO_EccSignature) 417 + sizeof (struct GNUNET_CRYPTO_EcdsaSignature)
418 + sizeof (struct GNUNET_CRYPTO_EccPublicSignKey); 418 + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
419 GNUNET_NAMESTORE_query_from_private_key (key, 419 GNUNET_NAMESTORE_query_from_private_key (key,
420 name, 420 name,
421 &query); 421 &query);
@@ -528,7 +528,7 @@ handle_lookup (void *cls,
528 struct ClientLookupHandle *clh; 528 struct ClientLookupHandle *clh;
529 char *nameptr = name; 529 char *nameptr = name;
530 const char *utf_in; 530 const char *utf_in;
531 const struct GNUNET_CRYPTO_EccPrivateKey *key; 531 const struct GNUNET_CRYPTO_EcdsaPrivateKey *key;
532 uint16_t msg_size; 532 uint16_t msg_size;
533 const struct GNUNET_GNS_ClientLookupMessage *sh_msg; 533 const struct GNUNET_GNS_ClientLookupMessage *sh_msg;
534 534
@@ -630,7 +630,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
630 { &handle_lookup, NULL, GNUNET_MESSAGE_TYPE_GNS_LOOKUP, 0}, 630 { &handle_lookup, NULL, GNUNET_MESSAGE_TYPE_GNS_LOOKUP, 0},
631 {NULL, NULL, 0, 0} 631 {NULL, NULL, 0, 0}
632 }; 632 };
633 struct GNUNET_CRYPTO_EccPublicSignKey dns_root; 633 struct GNUNET_CRYPTO_EcdsaPublicKey dns_root;
634 unsigned long long max_parallel_bg_queries = 0; 634 unsigned long long max_parallel_bg_queries = 0;
635 char *dns_root_name; 635 char *dns_root_name;
636 636
@@ -683,7 +683,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
683 &dns_root_name)) 683 &dns_root_name))
684 { 684 {
685 if (GNUNET_OK != 685 if (GNUNET_OK !=
686 GNUNET_CRYPTO_ecc_public_sign_key_from_string (dns_root_name, 686 GNUNET_CRYPTO_ecdsa_public_key_from_string (dns_root_name,
687 strlen (dns_root_name), 687 strlen (dns_root_name),
688 &dns_root)) 688 &dns_root))
689 { 689 {
diff --git a/src/gns/gnunet-service-gns_interceptor.c b/src/gns/gnunet-service-gns_interceptor.c
index 8cb1951bf..61568c438 100644
--- a/src/gns/gnunet-service-gns_interceptor.c
+++ b/src/gns/gnunet-service-gns_interceptor.c
@@ -75,7 +75,7 @@ static struct GNUNET_DNS_Handle *dns_handle;
75/** 75/**
76 * Key of the zone we start lookups in. 76 * Key of the zone we start lookups in.
77 */ 77 */
78static struct GNUNET_CRYPTO_EccPublicSignKey zone; 78static struct GNUNET_CRYPTO_EcdsaPublicKey zone;
79 79
80/** 80/**
81 * Head of the DLL. 81 * Head of the DLL.
@@ -353,7 +353,7 @@ handle_dns_request (void *cls,
353 * @return #GNUNET_OK on success 353 * @return #GNUNET_OK on success
354 */ 354 */
355int 355int
356GNS_interceptor_init (const struct GNUNET_CRYPTO_EccPublicSignKey *gnu_zone, 356GNS_interceptor_init (const struct GNUNET_CRYPTO_EcdsaPublicKey *gnu_zone,
357 const struct GNUNET_CONFIGURATION_Handle *c) 357 const struct GNUNET_CONFIGURATION_Handle *c)
358{ 358{
359 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 359 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/gns/gnunet-service-gns_interceptor.h b/src/gns/gnunet-service-gns_interceptor.h
index 509875645..bfcc54017 100644
--- a/src/gns/gnunet-service-gns_interceptor.h
+++ b/src/gns/gnunet-service-gns_interceptor.h
@@ -36,7 +36,7 @@
36 * @return GNUNET_YES on success GNUNET_SYSERR on error 36 * @return GNUNET_YES on success GNUNET_SYSERR on error
37 */ 37 */
38int 38int
39GNS_interceptor_init (const struct GNUNET_CRYPTO_EccPublicSignKey *gnu_zone, 39GNS_interceptor_init (const struct GNUNET_CRYPTO_EcdsaPublicKey *gnu_zone,
40 const struct GNUNET_CONFIGURATION_Handle *c); 40 const struct GNUNET_CONFIGURATION_Handle *c);
41 41
42/** 42/**
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 43d50aed5..4b26803ff 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -112,7 +112,7 @@ struct AuthorityChain
112 /** 112 /**
113 * The zone of the GNS authority 113 * The zone of the GNS authority
114 */ 114 */
115 struct GNUNET_CRYPTO_EccPublicSignKey gns_authority; 115 struct GNUNET_CRYPTO_EcdsaPublicKey gns_authority;
116 116
117 struct 117 struct
118 { 118 {
@@ -230,7 +230,7 @@ struct GNS_ResolverHandle
230 /** 230 /**
231 * The top-level GNS authoritative zone to query 231 * The top-level GNS authoritative zone to query
232 */ 232 */
233 struct GNUNET_CRYPTO_EccPublicSignKey authority_zone; 233 struct GNUNET_CRYPTO_EcdsaPublicKey authority_zone;
234 234
235 /** 235 /**
236 * called when resolution phase finishes 236 * called when resolution phase finishes
@@ -286,7 +286,7 @@ struct GNS_ResolverHandle
286 /** 286 /**
287 * Private key of the shorten zone, NULL to not shorten. 287 * Private key of the shorten zone, NULL to not shorten.
288 */ 288 */
289 struct GNUNET_CRYPTO_EccPrivateKey *shorten_key; 289 struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key;
290 290
291 /** 291 /**
292 * ID of a task associated with the resolution process. 292 * ID of a task associated with the resolution process.
@@ -1421,9 +1421,9 @@ handle_gns_resolution_result (void *cls,
1421 /* tigger shortening */ 1421 /* tigger shortening */
1422 if (NULL != rh->shorten_key) 1422 if (NULL != rh->shorten_key)
1423 { 1423 {
1424 struct GNUNET_CRYPTO_EccPublicSignKey pub; 1424 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
1425 1425
1426 if (rd[i].data_size != sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)) 1426 if (rd[i].data_size != sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))
1427 { 1427 {
1428 GNUNET_break_op (0); 1428 GNUNET_break_op (0);
1429 break; 1429 break;
@@ -1454,7 +1454,7 @@ handle_gns_resolution_result (void *cls,
1454 { 1454 {
1455 case GNUNET_NAMESTORE_TYPE_PKEY: 1455 case GNUNET_NAMESTORE_TYPE_PKEY:
1456 /* delegation to another zone */ 1456 /* delegation to another zone */
1457 if (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) != 1457 if (sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) !=
1458 rd[i].data_size) 1458 rd[i].data_size)
1459 { 1459 {
1460 GNUNET_break_op (0); 1460 GNUNET_break_op (0);
@@ -1468,7 +1468,7 @@ handle_gns_resolution_result (void *cls,
1468 ac->gns_authority = GNUNET_YES; 1468 ac->gns_authority = GNUNET_YES;
1469 memcpy (&ac->authority_info.gns_authority, 1469 memcpy (&ac->authority_info.gns_authority,
1470 rd[i].data, 1470 rd[i].data,
1471 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 1471 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
1472 ac->label = resolver_lookup_get_next_label (rh); 1472 ac->label = resolver_lookup_get_next_label (rh);
1473 /* tigger shortening */ 1473 /* tigger shortening */
1474 if (NULL != rh->shorten_key) 1474 if (NULL != rh->shorten_key)
@@ -1719,8 +1719,8 @@ handle_dht_response (void *cls,
1719 block = data; 1719 block = data;
1720 if (size != 1720 if (size !=
1721 ntohl (block->purpose.size) + 1721 ntohl (block->purpose.size) +
1722 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 1722 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
1723 sizeof (struct GNUNET_CRYPTO_EccSignature)) 1723 sizeof (struct GNUNET_CRYPTO_EcdsaSignature))
1724 { 1724 {
1725 /* how did this pass DHT block validation!? */ 1725 /* how did this pass DHT block validation!? */
1726 GNUNET_break (0); 1726 GNUNET_break (0);
@@ -1768,7 +1768,7 @@ handle_namestore_block_response (void *cls,
1768 struct GNS_ResolverHandle *rx; 1768 struct GNS_ResolverHandle *rx;
1769 struct AuthorityChain *ac = rh->ac_tail; 1769 struct AuthorityChain *ac = rh->ac_tail;
1770 const char *label = ac->label; 1770 const char *label = ac->label;
1771 const struct GNUNET_CRYPTO_EccPublicSignKey *auth = &ac->authority_info.gns_authority; 1771 const struct GNUNET_CRYPTO_EcdsaPublicKey *auth = &ac->authority_info.gns_authority;
1772 struct GNUNET_HashCode query; 1772 struct GNUNET_HashCode query;
1773 1773
1774 GNUNET_NAMESTORE_query_from_public_key (auth, 1774 GNUNET_NAMESTORE_query_from_public_key (auth,
@@ -1947,7 +1947,7 @@ start_resolver_lookup (struct GNS_ResolverHandle *rh)
1947 if ( (NULL == x) || 1947 if ( (NULL == x) ||
1948 (NULL == y) || 1948 (NULL == y) ||
1949 (GNUNET_OK != 1949 (GNUNET_OK !=
1950 GNUNET_CRYPTO_ecc_public_sign_key_from_string (pkey, 1950 GNUNET_CRYPTO_ecdsa_public_key_from_string (pkey,
1951 strlen (pkey), 1951 strlen (pkey),
1952 &rh->authority_zone)) ) 1952 &rh->authority_zone)) )
1953 { 1953 {
@@ -1995,10 +1995,10 @@ start_resolver_lookup (struct GNS_ResolverHandle *rh)
1995 * @return handle to cancel operation 1995 * @return handle to cancel operation
1996 */ 1996 */
1997struct GNS_ResolverHandle * 1997struct GNS_ResolverHandle *
1998GNS_resolver_lookup (const struct GNUNET_CRYPTO_EccPublicSignKey *zone, 1998GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
1999 uint32_t record_type, 1999 uint32_t record_type,
2000 const char *name, 2000 const char *name,
2001 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_key, 2001 const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key,
2002 int only_cached, 2002 int only_cached,
2003 GNS_ResultProcessor proc, void *proc_cls) 2003 GNS_ResultProcessor proc, void *proc_cls)
2004{ 2004{
@@ -2022,7 +2022,7 @@ GNS_resolver_lookup (const struct GNUNET_CRYPTO_EccPublicSignKey *zone,
2022 rh->name_resolution_pos = strlen (name); 2022 rh->name_resolution_pos = strlen (name);
2023 if (NULL != shorten_key) 2023 if (NULL != shorten_key)
2024 { 2024 {
2025 rh->shorten_key = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 2025 rh->shorten_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
2026 *rh->shorten_key = *shorten_key; 2026 *rh->shorten_key = *shorten_key;
2027 } 2027 }
2028 start_resolver_lookup (rh); 2028 start_resolver_lookup (rh);
diff --git a/src/gns/gnunet-service-gns_resolver.h b/src/gns/gnunet-service-gns_resolver.h
index e9916c778..06273766a 100644
--- a/src/gns/gnunet-service-gns_resolver.h
+++ b/src/gns/gnunet-service-gns_resolver.h
@@ -83,10 +83,10 @@ typedef void (*GNS_ResultProcessor)(void *cls,
83 * @return handle to cancel operation 83 * @return handle to cancel operation
84 */ 84 */
85struct GNS_ResolverHandle * 85struct GNS_ResolverHandle *
86GNS_resolver_lookup (const struct GNUNET_CRYPTO_EccPublicSignKey *zone, 86GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
87 uint32_t record_type, 87 uint32_t record_type,
88 const char *name, 88 const char *name,
89 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_key, 89 const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key,
90 int only_cached, 90 int only_cached,
91 GNS_ResultProcessor proc, 91 GNS_ResultProcessor proc,
92 void *proc_cls); 92 void *proc_cls);
diff --git a/src/gns/gnunet-service-gns_shorten.c b/src/gns/gnunet-service-gns_shorten.c
index ff2cab097..f0c96716a 100644
--- a/src/gns/gnunet-service-gns_shorten.c
+++ b/src/gns/gnunet-service-gns_shorten.c
@@ -65,7 +65,7 @@ struct GetPseuAuthorityHandle
65 * Private key of the (shorten) zone to store the resulting 65 * Private key of the (shorten) zone to store the resulting
66 * pseudonym in. 66 * pseudonym in.
67 */ 67 */
68 struct GNUNET_CRYPTO_EccPrivateKey shorten_zone_key; 68 struct GNUNET_CRYPTO_EcdsaPrivateKey shorten_zone_key;
69 69
70 /** 70 /**
71 * Original label (used if no PSEU record is found). 71 * Original label (used if no PSEU record is found).
@@ -80,7 +80,7 @@ struct GetPseuAuthorityHandle
80 /** 80 /**
81 * The zone for which we are trying to find the PSEU record. 81 * The zone for which we are trying to find the PSEU record.
82 */ 82 */
83 struct GNUNET_CRYPTO_EccPublicSignKey target_zone; 83 struct GNUNET_CRYPTO_EcdsaPublicKey target_zone;
84 84
85 /** 85 /**
86 * Handle for DHT lookups. Should be NULL if no lookups are in progress 86 * Handle for DHT lookups. Should be NULL if no lookups are in progress
@@ -195,7 +195,7 @@ process_pseu_block_ns (void *cls,
195 const struct GNUNET_NAMESTORE_Block *block) 195 const struct GNUNET_NAMESTORE_Block *block)
196{ 196{
197 struct GetPseuAuthorityHandle *gph = cls; 197 struct GetPseuAuthorityHandle *gph = cls;
198 struct GNUNET_CRYPTO_EccPublicSignKey pub; 198 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
199 199
200 gph->namestore_task = NULL; 200 gph->namestore_task = NULL;
201 if (NULL == block) 201 if (NULL == block)
@@ -203,7 +203,7 @@ process_pseu_block_ns (void *cls,
203 process_pseu_lookup_ns (gph, 0, NULL); 203 process_pseu_lookup_ns (gph, 0, NULL);
204 return; 204 return;
205 } 205 }
206 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&gph->shorten_zone_key, 206 GNUNET_CRYPTO_ecdsa_key_get_public (&gph->shorten_zone_key,
207 &pub); 207 &pub);
208 if (GNUNET_OK != 208 if (GNUNET_OK !=
209 GNUNET_NAMESTORE_block_decrypt (block, 209 GNUNET_NAMESTORE_block_decrypt (block,
@@ -229,10 +229,10 @@ static void
229perform_pseu_lookup (struct GetPseuAuthorityHandle *gph, 229perform_pseu_lookup (struct GetPseuAuthorityHandle *gph,
230 const char *label) 230 const char *label)
231{ 231{
232 struct GNUNET_CRYPTO_EccPublicSignKey pub; 232 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
233 struct GNUNET_HashCode query; 233 struct GNUNET_HashCode query;
234 234
235 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&gph->shorten_zone_key, 235 GNUNET_CRYPTO_ecdsa_key_get_public (&gph->shorten_zone_key,
236 &pub); 236 &pub);
237 GNUNET_free_non_null (gph->current_label); 237 GNUNET_free_non_null (gph->current_label);
238 gph->current_label = GNUNET_strdup (label); 238 gph->current_label = GNUNET_strdup (label);
@@ -287,7 +287,7 @@ process_pseu_lookup_ns (void *cls,
287 GNUNET_NAMESTORE_z2s (&gph->target_zone), 287 GNUNET_NAMESTORE_z2s (&gph->target_zone),
288 gph->current_label); 288 gph->current_label);
289 new_pkey.expiration_time = UINT64_MAX; 289 new_pkey.expiration_time = UINT64_MAX;
290 new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_EccPublicSignKey); 290 new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
291 new_pkey.data = &gph->target_zone; 291 new_pkey.data = &gph->target_zone;
292 new_pkey.record_type = GNUNET_NAMESTORE_TYPE_PKEY; 292 new_pkey.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
293 new_pkey.flags = GNUNET_NAMESTORE_RF_NONE 293 new_pkey.flags = GNUNET_NAMESTORE_RF_NONE
@@ -437,8 +437,8 @@ process_auth_discovery_dht_result (void* cls,
437 block = data; 437 block = data;
438 if (size != 438 if (size !=
439 ntohl (block->purpose.size) + 439 ntohl (block->purpose.size) +
440 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 440 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
441 sizeof (struct GNUNET_CRYPTO_EccSignature)) 441 sizeof (struct GNUNET_CRYPTO_EcdsaSignature))
442 { 442 {
443 /* how did this pass DHT block validation!? */ 443 /* how did this pass DHT block validation!? */
444 GNUNET_break (0); 444 GNUNET_break (0);
@@ -472,7 +472,7 @@ process_auth_discovery_dht_result (void* cls,
472 */ 472 */
473static void 473static void
474process_zone_to_name_discover (void *cls, 474process_zone_to_name_discover (void *cls,
475 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 475 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
476 const char *name, 476 const char *name,
477 unsigned int rd_len, 477 unsigned int rd_len,
478 const struct GNUNET_NAMESTORE_RecordData *rd) 478 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -519,8 +519,8 @@ process_zone_to_name_discover (void *cls,
519 */ 519 */
520void 520void
521GNS_shorten_start (const char *original_label, 521GNS_shorten_start (const char *original_label,
522 const struct GNUNET_CRYPTO_EccPublicSignKey *pub, 522 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub,
523 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone) 523 const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_zone)
524{ 524{
525 struct GetPseuAuthorityHandle *gph; 525 struct GetPseuAuthorityHandle *gph;
526 526
diff --git a/src/gns/gnunet-service-gns_shorten.h b/src/gns/gnunet-service-gns_shorten.h
index ed3bdf11f..5f583eeb5 100644
--- a/src/gns/gnunet-service-gns_shorten.h
+++ b/src/gns/gnunet-service-gns_shorten.h
@@ -59,8 +59,8 @@ GNS_shorten_done (void);
59 */ 59 */
60void 60void
61GNS_shorten_start (const char *original_label, 61GNS_shorten_start (const char *original_label,
62 const struct GNUNET_CRYPTO_EccPublicSignKey *pub, 62 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub,
63 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone); 63 const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_zone);
64 64
65 65
66#endif 66#endif
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c
index 932900910..ad2e6594e 100644
--- a/src/gns/plugin_block_gns.c
+++ b/src/gns/plugin_block_gns.c
@@ -85,7 +85,7 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
85 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 85 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
86 } 86 }
87 block = reply_block; 87 block = reply_block;
88 if (ntohl (block->purpose.size) + sizeof (struct GNUNET_CRYPTO_EccSignature) + sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) != 88 if (ntohl (block->purpose.size) + sizeof (struct GNUNET_CRYPTO_EcdsaSignature) + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) !=
89 reply_block_size) 89 reply_block_size)
90 { 90 {
91 GNUNET_break_op (0); 91 GNUNET_break_op (0);
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c
index 8563eda2f..66a2eb091 100644
--- a/src/gns/test_gns_proxy.c
+++ b/src/gns/test_gns_proxy.c
@@ -364,7 +364,7 @@ run (void *cls,
364 struct GNUNET_TESTING_Peer *peer) 364 struct GNUNET_TESTING_Peer *peer)
365{ 365{
366 enum MHD_FLAG flags; 366 enum MHD_FLAG flags;
367 struct GNUNET_CRYPTO_EccPrivateKey *host_key; 367 struct GNUNET_CRYPTO_EcdsaPrivateKey *host_key;
368 struct GNUNET_NAMESTORE_RecordData rd; 368 struct GNUNET_NAMESTORE_RecordData rd;
369 char *zone_keyfile; 369 char *zone_keyfile;
370 370
@@ -421,7 +421,7 @@ run (void *cls,
421 return; 421 return;
422 } 422 }
423 423
424 host_key = GNUNET_CRYPTO_ecc_key_create_from_file (zone_keyfile); 424 host_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (zone_keyfile);
425 rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; 425 rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
426 GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_DNSPARSER_TYPE_A, 426 GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_DNSPARSER_TYPE_A,
427 "127.0.0.1", 427 "127.0.0.1",
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c
index a4c337067..f4c628cb0 100644
--- a/src/gns/test_gns_pseu_shorten.c
+++ b/src/gns/test_gns_pseu_shorten.c
@@ -69,16 +69,16 @@ static struct GNUNET_DHT_Handle *dht_handle;
69 69
70static const struct GNUNET_CONFIGURATION_Handle *cfg; 70static const struct GNUNET_CONFIGURATION_Handle *cfg;
71 71
72static struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey; 72static struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
73static struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey; 73static struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
74static struct GNUNET_CRYPTO_EccPublicSignKey our_pkey; 74static struct GNUNET_CRYPTO_EcdsaPublicKey our_pkey;
75static struct GNUNET_CRYPTO_EccPublicSignKey priv_pkey; 75static struct GNUNET_CRYPTO_EcdsaPublicKey priv_pkey;
76static struct GNUNET_CRYPTO_EccPublicSignKey short_pkey; 76static struct GNUNET_CRYPTO_EcdsaPublicKey short_pkey;
77static struct GNUNET_CRYPTO_EccPrivateKey *alice_key; 77static struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
78static struct GNUNET_CRYPTO_EccPrivateKey *bob_key; 78static struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
79static struct GNUNET_CRYPTO_EccPrivateKey *our_key; 79static struct GNUNET_CRYPTO_EcdsaPrivateKey *our_key;
80static struct GNUNET_CRYPTO_EccPrivateKey *priv_key; 80static struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
81static struct GNUNET_CRYPTO_EccPrivateKey *short_key; 81static struct GNUNET_CRYPTO_EcdsaPrivateKey *short_key;
82static struct GNUNET_CRYPTO_ShortHashCode alice_hash; 82static struct GNUNET_CRYPTO_ShortHashCode alice_hash;
83static struct GNUNET_CRYPTO_ShortHashCode bob_hash; 83static struct GNUNET_CRYPTO_ShortHashCode bob_hash;
84static struct GNUNET_CRYPTO_ShortHashCode our_zone; 84static struct GNUNET_CRYPTO_ShortHashCode our_zone;
@@ -265,7 +265,7 @@ put_pseu_dht (void *cls, int success)
265 struct GNUNET_HashCode zone_hash_double; 265 struct GNUNET_HashCode zone_hash_double;
266 uint32_t rd_payload_length; 266 uint32_t rd_payload_length;
267 char* nrb_data = NULL; 267 char* nrb_data = NULL;
268 struct GNUNET_CRYPTO_EccSignature *sig; 268 struct GNUNET_CRYPTO_EcdsaSignature *sig;
269 struct GNUNET_NAMESTORE_RecordData rd; 269 struct GNUNET_NAMESTORE_RecordData rd;
270 270
271 memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData)); 271 memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData));
@@ -316,7 +316,7 @@ put_pseu_dht (void *cls, int success)
316 } 316 }
317 GNUNET_CRYPTO_short_hash(GNUNET_GNS_MASTERZONE_STR, strlen(GNUNET_GNS_MASTERZONE_STR), &name_hash); 317 GNUNET_CRYPTO_short_hash(GNUNET_GNS_MASTERZONE_STR, strlen(GNUNET_GNS_MASTERZONE_STR), &name_hash);
318 GNUNET_CRYPTO_short_hash(&alice_pkey, 318 GNUNET_CRYPTO_short_hash(&alice_pkey,
319 sizeof(struct GNUNET_CRYPTO_EccPublicSignKey), 319 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
320 &zone_hash); 320 &zone_hash);
321 321
322 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); 322 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
@@ -353,7 +353,7 @@ put_www_dht (void *cls, int success)
353 struct GNUNET_HashCode zone_hash_double; 353 struct GNUNET_HashCode zone_hash_double;
354 uint32_t rd_payload_length; 354 uint32_t rd_payload_length;
355 char* nrb_data = NULL; 355 char* nrb_data = NULL;
356 struct GNUNET_CRYPTO_EccSignature *sig; 356 struct GNUNET_CRYPTO_EcdsaSignature *sig;
357 struct GNUNET_NAMESTORE_RecordData rd; 357 struct GNUNET_NAMESTORE_RecordData rd;
358 char* ip = TEST_IP; 358 char* ip = TEST_IP;
359 struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); 359 struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr));
@@ -405,7 +405,7 @@ put_www_dht (void *cls, int success)
405 } 405 }
406 GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash); 406 GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash);
407 GNUNET_CRYPTO_short_hash(&alice_pkey, 407 GNUNET_CRYPTO_short_hash(&alice_pkey,
408 sizeof(struct GNUNET_CRYPTO_EccPublicSignKey), 408 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
409 &zone_hash); 409 &zone_hash);
410 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); 410 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
411 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); 411 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
@@ -441,7 +441,7 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg)
441 struct GNUNET_HashCode zone_hash_double; 441 struct GNUNET_HashCode zone_hash_double;
442 uint32_t rd_payload_length; 442 uint32_t rd_payload_length;
443 char* nrb_data = NULL; 443 char* nrb_data = NULL;
444 struct GNUNET_CRYPTO_EccSignature *sig; 444 struct GNUNET_CRYPTO_EcdsaSignature *sig;
445 struct GNUNET_NAMESTORE_RecordData rd; 445 struct GNUNET_NAMESTORE_RecordData rd;
446 446
447 rd.expiration_time = UINT64_MAX; 447 rd.expiration_time = UINT64_MAX;
@@ -488,7 +488,7 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg)
488 GNUNET_CRYPTO_short_hash (TEST_AUTHORITY_ALICE, 488 GNUNET_CRYPTO_short_hash (TEST_AUTHORITY_ALICE,
489 strlen (TEST_AUTHORITY_ALICE), &name_hash); 489 strlen (TEST_AUTHORITY_ALICE), &name_hash);
490 GNUNET_CRYPTO_short_hash (&bob_pkey, 490 GNUNET_CRYPTO_short_hash (&bob_pkey,
491 sizeof(struct GNUNET_CRYPTO_EccPublicSignKey), 491 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
492 &zone_hash); 492 &zone_hash);
493 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); 493 GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double);
494 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); 494 GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double);
@@ -616,21 +616,21 @@ do_check (void *cls,
616 GNUNET_free (private_keyfile); 616 GNUNET_free (private_keyfile);
617 return; 617 return;
618 } 618 }
619 our_key = GNUNET_CRYPTO_ecc_key_create_from_file (our_keyfile); 619 our_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (our_keyfile);
620 priv_key = GNUNET_CRYPTO_ecc_key_create_from_file (private_keyfile); 620 priv_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (private_keyfile);
621 short_key = GNUNET_CRYPTO_ecc_key_create_from_file (shorten_keyfile); 621 short_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (shorten_keyfile);
622 bob_key = GNUNET_CRYPTO_ecc_key_create (); 622 bob_key = GNUNET_CRYPTO_ecdsa_key_create ();
623 alice_key = GNUNET_CRYPTO_ecc_key_create (); 623 alice_key = GNUNET_CRYPTO_ecdsa_key_create ();
624 624
625 GNUNET_free (our_keyfile); 625 GNUNET_free (our_keyfile);
626 GNUNET_free (shorten_keyfile); 626 GNUNET_free (shorten_keyfile);
627 GNUNET_free (private_keyfile); 627 GNUNET_free (private_keyfile);
628 628
629 GNUNET_CRYPTO_ecc_key_get_public_for_signature (our_key, &our_pkey); 629 GNUNET_CRYPTO_ecdsa_key_get_public (our_key, &our_pkey);
630 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv_key, &priv_pkey); 630 GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, &priv_pkey);
631 GNUNET_CRYPTO_ecc_key_get_public_for_signature (short_key, &short_pkey); 631 GNUNET_CRYPTO_ecdsa_key_get_public (short_key, &short_pkey);
632 GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); 632 GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
633 GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); 633 GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey);
634 GNUNET_CRYPTO_short_hash (&bob_pkey, sizeof(bob_pkey), &bob_hash); 634 GNUNET_CRYPTO_short_hash (&bob_pkey, sizeof(bob_pkey), &bob_hash);
635 GNUNET_CRYPTO_short_hash (&alice_pkey, sizeof(alice_pkey), &alice_hash); 635 GNUNET_CRYPTO_short_hash (&alice_pkey, sizeof(alice_pkey), &alice_hash);
636 GNUNET_CRYPTO_short_hash (&our_pkey, sizeof(our_pkey), &our_zone); 636 GNUNET_CRYPTO_short_hash (&our_pkey, sizeof(our_pkey), &our_zone);
diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c
index 30fe5eb66..5be15759a 100644
--- a/src/gns/test_gns_revocation.c
+++ b/src/gns/test_gns_revocation.c
@@ -181,12 +181,12 @@ do_check (void *cls,
181 const struct GNUNET_CONFIGURATION_Handle *ccfg, 181 const struct GNUNET_CONFIGURATION_Handle *ccfg,
182 struct GNUNET_TESTING_Peer *peer) 182 struct GNUNET_TESTING_Peer *peer)
183{ 183{
184 struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey; 184 struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
185 struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey; 185 struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
186 struct GNUNET_CRYPTO_EccPrivateKey *alice_key; 186 struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
187 struct GNUNET_CRYPTO_EccPrivateKey *bob_key; 187 struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
188 struct GNUNET_CRYPTO_ShortHashCode bob_hash; 188 struct GNUNET_CRYPTO_ShortHashCode bob_hash;
189 struct GNUNET_CRYPTO_EccSignature *sig; 189 struct GNUNET_CRYPTO_EcdsaSignature *sig;
190 char* alice_keyfile; 190 char* alice_keyfile;
191 191
192 cfg = ccfg; 192 cfg = ccfg;
@@ -210,11 +210,11 @@ do_check (void *cls,
210 return; 210 return;
211 } 211 }
212 212
213 alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); 213 alice_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (alice_keyfile);
214 bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); 214 bob_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_BOB);
215 215
216 GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); 216 GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey);
217 GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); 217 GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
218 218
219 struct GNUNET_NAMESTORE_RecordData rd; 219 struct GNUNET_NAMESTORE_RecordData rd;
220 char* ip = TEST_IP; 220 char* ip = TEST_IP;
diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c
index 1b383a0bd..a4cfa26dc 100644
--- a/src/gns/test_gns_simple_shorten.c
+++ b/src/gns/test_gns_simple_shorten.c
@@ -61,10 +61,10 @@ static struct GNUNET_GNS_Handle *gns_handle;
61 61
62const struct GNUNET_CONFIGURATION_Handle *cfg; 62const struct GNUNET_CONFIGURATION_Handle *cfg;
63 63
64struct GNUNET_CRYPTO_EccPublicSignKey priv_pkey; 64struct GNUNET_CRYPTO_EcdsaPublicKey priv_pkey;
65struct GNUNET_CRYPTO_EccPublicSignKey short_pkey; 65struct GNUNET_CRYPTO_EcdsaPublicKey short_pkey;
66struct GNUNET_CRYPTO_EccPrivateKey *priv_key; 66struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key;
67struct GNUNET_CRYPTO_EccPrivateKey *short_key; 67struct GNUNET_CRYPTO_EcdsaPrivateKey *short_key;
68 68
69struct GNUNET_CRYPTO_ShortHashCode priv_zone; 69struct GNUNET_CRYPTO_ShortHashCode priv_zone;
70struct GNUNET_CRYPTO_ShortHashCode short_zone; 70struct GNUNET_CRYPTO_ShortHashCode short_zone;
@@ -170,15 +170,15 @@ void do_check (void *cls,
170 const struct GNUNET_CONFIGURATION_Handle *ccfg, 170 const struct GNUNET_CONFIGURATION_Handle *ccfg,
171 struct GNUNET_TESTING_Peer *peer) 171 struct GNUNET_TESTING_Peer *peer)
172{ 172{
173 struct GNUNET_CRYPTO_EccPublicSignKey our_pkey; 173 struct GNUNET_CRYPTO_EcdsaPublicKey our_pkey;
174 struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey; 174 struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
175 struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey; 175 struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
176 struct GNUNET_CRYPTO_EccPrivateKey *our_key; 176 struct GNUNET_CRYPTO_EcdsaPrivateKey *our_key;
177 struct GNUNET_CRYPTO_EccPrivateKey *alice_key; 177 struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
178 struct GNUNET_CRYPTO_EccPrivateKey *bob_key; 178 struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
179 struct GNUNET_CRYPTO_ShortHashCode bob_hash; 179 struct GNUNET_CRYPTO_ShortHashCode bob_hash;
180 struct GNUNET_CRYPTO_ShortHashCode alice_hash; 180 struct GNUNET_CRYPTO_ShortHashCode alice_hash;
181 struct GNUNET_CRYPTO_EccSignature *sig; 181 struct GNUNET_CRYPTO_EcdsaSignature *sig;
182 char* our_keyfile; 182 char* our_keyfile;
183 char* private_keyfile; 183 char* private_keyfile;
184 char* shorten_keyfile; 184 char* shorten_keyfile;
@@ -226,22 +226,22 @@ void do_check (void *cls,
226 return; 226 return;
227 } 227 }
228 228
229 our_key = GNUNET_CRYPTO_ecc_key_create_from_file (our_keyfile); 229 our_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (our_keyfile);
230 GNUNET_free(our_keyfile); 230 GNUNET_free(our_keyfile);
231 231
232 bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); 232 bob_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_BOB);
233 alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_ALICE); 233 alice_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_ALICE);
234 priv_key = GNUNET_CRYPTO_ecc_key_create_from_file (private_keyfile); 234 priv_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (private_keyfile);
235 short_key = GNUNET_CRYPTO_ecc_key_create_from_file (shorten_keyfile); 235 short_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (shorten_keyfile);
236 236
237 GNUNET_free(shorten_keyfile); 237 GNUNET_free(shorten_keyfile);
238 GNUNET_free(private_keyfile); 238 GNUNET_free(private_keyfile);
239 239
240 GNUNET_CRYPTO_ecc_key_get_public_for_signature (our_key, &our_pkey); 240 GNUNET_CRYPTO_ecdsa_key_get_public (our_key, &our_pkey);
241 GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); 241 GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey);
242 GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); 242 GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
243 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv_key, &priv_pkey); 243 GNUNET_CRYPTO_ecdsa_key_get_public (priv_key, &priv_pkey);
244 GNUNET_CRYPTO_ecc_key_get_public_for_signature (short_key, &short_pkey); 244 GNUNET_CRYPTO_ecdsa_key_get_public (short_key, &short_pkey);
245 245
246 GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone); 246 GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone);
247 GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone); 247 GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone);
diff --git a/src/gns/test_gns_simple_srv_lookup.c b/src/gns/test_gns_simple_srv_lookup.c
index 76e564f41..f31ae6daa 100644
--- a/src/gns/test_gns_simple_srv_lookup.c
+++ b/src/gns/test_gns_simple_srv_lookup.c
@@ -182,12 +182,12 @@ do_check (void *cls,
182 const struct GNUNET_CONFIGURATION_Handle *ccfg, 182 const struct GNUNET_CONFIGURATION_Handle *ccfg,
183 struct GNUNET_TESTING_Peer *peer) 183 struct GNUNET_TESTING_Peer *peer)
184{ 184{
185 struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey; 185 struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
186 struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey; 186 struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
187 struct GNUNET_CRYPTO_EccPrivateKey *alice_key; 187 struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
188 struct GNUNET_CRYPTO_EccPrivateKey *bob_key; 188 struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
189 struct GNUNET_CRYPTO_ShortHashCode bob_hash; 189 struct GNUNET_CRYPTO_ShortHashCode bob_hash;
190 struct GNUNET_CRYPTO_EccSignature *sig; 190 struct GNUNET_CRYPTO_EcdsaSignature *sig;
191 char* alice_keyfile; 191 char* alice_keyfile;
192 struct GNUNET_TUN_DnsSrvRecord *srv_data; 192 struct GNUNET_TUN_DnsSrvRecord *srv_data;
193 struct GNUNET_TIME_Absolute et; 193 struct GNUNET_TIME_Absolute et;
@@ -213,11 +213,11 @@ do_check (void *cls,
213 return; 213 return;
214 } 214 }
215 215
216 alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); 216 alice_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (alice_keyfile);
217 bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); 217 bob_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_BOB);
218 218
219 GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); 219 GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey);
220 GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); 220 GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
221 221
222 struct GNUNET_NAMESTORE_RecordData rd; 222 struct GNUNET_NAMESTORE_RecordData rd;
223 char* ip = TEST_IP; 223 char* ip = TEST_IP;
diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c
index 52a550ebf..a808d2d9d 100644
--- a/src/gns/test_gns_simple_zkey_lookup.c
+++ b/src/gns/test_gns_simple_zkey_lookup.c
@@ -199,11 +199,11 @@ do_check (void *cls,
199 const struct GNUNET_CONFIGURATION_Handle *ccfg, 199 const struct GNUNET_CONFIGURATION_Handle *ccfg,
200 struct GNUNET_TESTING_Peer *peer) 200 struct GNUNET_TESTING_Peer *peer)
201{ 201{
202 struct GNUNET_CRYPTO_EccPublicSignKey alice_pkey; 202 struct GNUNET_CRYPTO_EcdsaPublicKey alice_pkey;
203 struct GNUNET_CRYPTO_EccPublicSignKey bob_pkey; 203 struct GNUNET_CRYPTO_EcdsaPublicKey bob_pkey;
204 struct GNUNET_CRYPTO_EccPrivateKey *alice_key; 204 struct GNUNET_CRYPTO_EcdsaPrivateKey *alice_key;
205 struct GNUNET_CRYPTO_EccPrivateKey *bob_key; 205 struct GNUNET_CRYPTO_EcdsaPrivateKey *bob_key;
206 struct GNUNET_CRYPTO_EccSignature *sig; 206 struct GNUNET_CRYPTO_EcdsaSignature *sig;
207 char* alice_keyfile; 207 char* alice_keyfile;
208 208
209 cfg = ccfg; 209 cfg = ccfg;
@@ -227,11 +227,11 @@ do_check (void *cls,
227 return; 227 return;
228 } 228 }
229 229
230 alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); 230 alice_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (alice_keyfile);
231 bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); 231 bob_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (KEYFILE_BOB);
232 232
233 GNUNET_CRYPTO_ecc_key_get_public_for_signature (alice_key, &alice_pkey); 233 GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey);
234 GNUNET_CRYPTO_ecc_key_get_public_for_signature (bob_key, &bob_pkey); 234 GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey);
235 235
236 struct GNUNET_NAMESTORE_RecordData rd; 236 struct GNUNET_NAMESTORE_RecordData rd;
237 char* ip = TEST_IP; 237 char* ip = TEST_IP;
diff --git a/src/hello/gnunet-hello.c b/src/hello/gnunet-hello.c
index 795f4f29b..e857bde26 100644
--- a/src/hello/gnunet-hello.c
+++ b/src/hello/gnunet-hello.c
@@ -111,7 +111,7 @@ main (int argc, char *argv[])
111 struct GNUNET_DISK_FileHandle *fh; 111 struct GNUNET_DISK_FileHandle *fh;
112 struct GNUNET_HELLO_Message *orig; 112 struct GNUNET_HELLO_Message *orig;
113 struct GNUNET_HELLO_Message *result; 113 struct GNUNET_HELLO_Message *result;
114 struct GNUNET_CRYPTO_EccPublicSignKey pk; 114 struct GNUNET_CRYPTO_EddsaPublicKey pk;
115 uint64_t fsize; 115 uint64_t fsize;
116 address_count = 0; 116 address_count = 0;
117 117
diff --git a/src/hello/hello.c b/src/hello/hello.c
index 6261dcb6b..37acc5996 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -59,7 +59,7 @@ struct GNUNET_HELLO_Message
59 /** 59 /**
60 * The public key of the peer. 60 * The public key of the peer.
61 */ 61 */
62 struct GNUNET_CRYPTO_EccPublicSignKey publicKey; 62 struct GNUNET_CRYPTO_EddsaPublicKey publicKey;
63 63
64}; 64};
65GNUNET_NETWORK_STRUCT_END 65GNUNET_NETWORK_STRUCT_END
@@ -218,7 +218,7 @@ get_hello_address_size (const char *buf,
218 * @return the hello message 218 * @return the hello message
219 */ 219 */
220struct GNUNET_HELLO_Message * 220struct GNUNET_HELLO_Message *
221GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicSignKey *publicKey, 221GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EddsaPublicKey *publicKey,
222 GNUNET_HELLO_GenerateAddressListCallback addrgen, 222 GNUNET_HELLO_GenerateAddressListCallback addrgen,
223 void *addrgen_cls, 223 void *addrgen_cls,
224 int friend_only) 224 int friend_only)
@@ -249,7 +249,7 @@ GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicSignKey *publicKey,
249 hello->friend_only = htonl (friend_only); 249 hello->friend_only = htonl (friend_only);
250 250
251 memcpy (&hello->publicKey, publicKey, 251 memcpy (&hello->publicKey, publicKey,
252 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 252 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey));
253 memcpy (&hello[1], buffer, used); 253 memcpy (&hello[1], buffer, used);
254 return hello; 254 return hello;
255} 255}
@@ -530,7 +530,7 @@ GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello)
530 */ 530 */
531int 531int
532GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello, 532GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
533 struct GNUNET_CRYPTO_EccPublicSignKey *publicKey) 533 struct GNUNET_CRYPTO_EddsaPublicKey *publicKey)
534{ 534{
535 uint16_t ret = ntohs (hello->header.size); 535 uint16_t ret = ntohs (hello->header.size);
536 536
@@ -669,7 +669,7 @@ GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1,
669 669
670 if (0 != 670 if (0 !=
671 memcmp (&h1->publicKey, &h2->publicKey, 671 memcmp (&h1->publicKey, &h2->publicKey,
672 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey))) 672 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)))
673 return GNUNET_TIME_UNIT_ZERO_ABS; 673 return GNUNET_TIME_UNIT_ZERO_ABS;
674 ec.expiration_limit = now; 674 ec.expiration_limit = now;
675 ec.result = GNUNET_TIME_UNIT_FOREVER_ABS; 675 ec.result = GNUNET_TIME_UNIT_FOREVER_ABS;
@@ -871,7 +871,7 @@ GNUNET_HELLO_compose_uri (const struct GNUNET_HELLO_Message *hello,
871 struct GNUNET_HELLO_ComposeUriContext ctx; 871 struct GNUNET_HELLO_ComposeUriContext ctx;
872 ctx.plugins_find = plugins_find; 872 ctx.plugins_find = plugins_find;
873 873
874 char *pkey = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&(hello->publicKey)); 874 char *pkey = GNUNET_CRYPTO_eddsa_public_key_to_string (&(hello->publicKey));
875 875
876 GNUNET_asprintf (&(ctx.uri), 876 GNUNET_asprintf (&(ctx.uri),
877 "%s%s", 877 "%s%s",
@@ -1044,7 +1044,7 @@ add_address_to_hello (void *cls, size_t max, void *buffer)
1044 */ 1044 */
1045int 1045int
1046GNUNET_HELLO_parse_uri (const char *uri, 1046GNUNET_HELLO_parse_uri (const char *uri,
1047 struct GNUNET_CRYPTO_EccPublicSignKey *pubkey, 1047 struct GNUNET_CRYPTO_EddsaPublicKey *pubkey,
1048 struct GNUNET_HELLO_Message **hello, 1048 struct GNUNET_HELLO_Message **hello,
1049 GNUNET_HELLO_TransportPluginsFind plugins_find) 1049 GNUNET_HELLO_TransportPluginsFind plugins_find)
1050{ 1050{
diff --git a/src/hello/test_friend_hello.c b/src/hello/test_friend_hello.c
index d5f75c824..019bf4b9a 100644
--- a/src/hello/test_friend_hello.c
+++ b/src/hello/test_friend_hello.c
@@ -93,8 +93,8 @@ main (int argc, char *argv[])
93 struct GNUNET_HELLO_Message *msg1; 93 struct GNUNET_HELLO_Message *msg1;
94 struct GNUNET_HELLO_Message *msg2; 94 struct GNUNET_HELLO_Message *msg2;
95 struct GNUNET_HELLO_Message *msg3; 95 struct GNUNET_HELLO_Message *msg3;
96 struct GNUNET_CRYPTO_EccPublicSignKey publicKey; 96 struct GNUNET_CRYPTO_EddsaPublicKey publicKey;
97 struct GNUNET_CRYPTO_EccPublicSignKey pk; 97 struct GNUNET_CRYPTO_EddsaPublicKey pk;
98 struct GNUNET_TIME_Absolute startup_time; 98 struct GNUNET_TIME_Absolute startup_time;
99 unsigned int i; 99 unsigned int i;
100 100
diff --git a/src/hello/test_hello.c b/src/hello/test_hello.c
index f1fa8234a..ff80f1889 100644
--- a/src/hello/test_hello.c
+++ b/src/hello/test_hello.c
@@ -93,8 +93,8 @@ main (int argc, char *argv[])
93 struct GNUNET_HELLO_Message *msg1; 93 struct GNUNET_HELLO_Message *msg1;
94 struct GNUNET_HELLO_Message *msg2; 94 struct GNUNET_HELLO_Message *msg2;
95 struct GNUNET_HELLO_Message *msg3; 95 struct GNUNET_HELLO_Message *msg3;
96 struct GNUNET_CRYPTO_EccPublicSignKey publicKey; 96 struct GNUNET_CRYPTO_EddsaPublicKey publicKey;
97 struct GNUNET_CRYPTO_EccPublicSignKey pk; 97 struct GNUNET_CRYPTO_EddsaPublicKey pk;
98 struct GNUNET_TIME_Absolute startup_time; 98 struct GNUNET_TIME_Absolute startup_time;
99 unsigned int i; 99 unsigned int i;
100 100
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c
index c2c381604..8304a707d 100644
--- a/src/identity/gnunet-identity.c
+++ b/src/identity/gnunet-identity.c
@@ -226,7 +226,7 @@ print_ego (void *cls,
226 void **ctx, 226 void **ctx,
227 const char *identifier) 227 const char *identifier)
228{ 228{
229 struct GNUNET_CRYPTO_EccPublicSignKey pk; 229 struct GNUNET_CRYPTO_EcdsaPublicKey pk;
230 char *s; 230 char *s;
231 231
232 if ( (NULL != set_ego) && 232 if ( (NULL != set_ego) &&
@@ -267,7 +267,7 @@ print_ego (void *cls,
267 if (NULL == ego) 267 if (NULL == ego)
268 return; 268 return;
269 GNUNET_IDENTITY_ego_get_public_key (ego, &pk); 269 GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
270 s = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pk); 270 s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
271 if ( (monitor) || (NULL != identifier) ) 271 if ( (monitor) || (NULL != identifier) )
272 fprintf (stdout, "%s - %s\n", identifier, s); 272 fprintf (stdout, "%s - %s\n", identifier, s);
273 GNUNET_free (s); 273 GNUNET_free (s);
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c
index c61286bd5..e0c0bd783 100644
--- a/src/identity/gnunet-service-identity.c
+++ b/src/identity/gnunet-service-identity.c
@@ -58,7 +58,7 @@ struct Ego
58 /** 58 /**
59 * Private key of the ego. 59 * Private key of the ego.
60 */ 60 */
61 struct GNUNET_CRYPTO_EccPrivateKey *pk; 61 struct GNUNET_CRYPTO_EcdsaPrivateKey *pk;
62 62
63 /** 63 /**
64 * String identifier for the ego. 64 * String identifier for the ego.
@@ -370,10 +370,10 @@ handle_get_default_message (void *cls, struct GNUNET_SERVER_Client *client,
370 * @return 0 if the keys are equal 370 * @return 0 if the keys are equal
371 */ 371 */
372static int 372static int
373key_cmp (const struct GNUNET_CRYPTO_EccPrivateKey *pk1, 373key_cmp (const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk1,
374 const struct GNUNET_CRYPTO_EccPrivateKey *pk2) 374 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk2)
375{ 375{
376 return memcmp (pk1, pk2, sizeof (struct GNUNET_CRYPTO_EccPrivateKey)); 376 return memcmp (pk1, pk2, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey));
377} 377}
378 378
379 379
@@ -517,7 +517,7 @@ handle_create_message (void *cls, struct GNUNET_SERVER_Client *client,
517 } 517 }
518 } 518 }
519 ego = GNUNET_new (struct Ego); 519 ego = GNUNET_new (struct Ego);
520 ego->pk = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 520 ego->pk = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
521 *ego->pk = crm->private_key; 521 *ego->pk = crm->private_key;
522 ego->identifier = GNUNET_strdup (str); 522 ego->identifier = GNUNET_strdup (str);
523 GNUNET_CONTAINER_DLL_insert (ego_head, 523 GNUNET_CONTAINER_DLL_insert (ego_head,
@@ -526,10 +526,10 @@ handle_create_message (void *cls, struct GNUNET_SERVER_Client *client,
526 send_result_code (client, 0, NULL); 526 send_result_code (client, 0, NULL);
527 fn = get_ego_filename (ego); 527 fn = get_ego_filename (ego);
528 (void) GNUNET_DISK_directory_create_for_file (fn); 528 (void) GNUNET_DISK_directory_create_for_file (fn);
529 if (sizeof (struct GNUNET_CRYPTO_EccPrivateKey) != 529 if (sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey) !=
530 GNUNET_DISK_fn_write (fn, 530 GNUNET_DISK_fn_write (fn,
531 &crm->private_key, 531 &crm->private_key,
532 sizeof (struct GNUNET_CRYPTO_EccPrivateKey), 532 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey),
533 GNUNET_DISK_PERM_USER_READ | 533 GNUNET_DISK_PERM_USER_READ |
534 GNUNET_DISK_PERM_USER_WRITE)) 534 GNUNET_DISK_PERM_USER_WRITE))
535 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, 535 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
@@ -819,7 +819,7 @@ process_ego_file (void *cls,
819 return GNUNET_OK; 819 return GNUNET_OK;
820 } 820 }
821 ego = GNUNET_new (struct Ego); 821 ego = GNUNET_new (struct Ego);
822 ego->pk = GNUNET_CRYPTO_ecc_key_create_from_file (filename); 822 ego->pk = GNUNET_CRYPTO_ecdsa_key_create_from_file (filename);
823 if (NULL == ego->pk) 823 if (NULL == ego->pk)
824 { 824 {
825 GNUNET_free (ego); 825 GNUNET_free (ego);
diff --git a/src/identity/identity.h b/src/identity/identity.h
index 5e965b2c7..206f08f2a 100644
--- a/src/identity/identity.h
+++ b/src/identity/identity.h
@@ -81,7 +81,7 @@ struct GNUNET_IDENTITY_UpdateMessage
81 /** 81 /**
82 * The private key 82 * The private key
83 */ 83 */
84 struct GNUNET_CRYPTO_EccPrivateKey private_key; 84 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
85 85
86 /* followed by 0-terminated identity name */ 86 /* followed by 0-terminated identity name */
87 87
@@ -140,7 +140,7 @@ struct GNUNET_IDENTITY_SetDefaultMessage
140 /** 140 /**
141 * The private key 141 * The private key
142 */ 142 */
143 struct GNUNET_CRYPTO_EccPrivateKey private_key; 143 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
144 144
145 /* followed by 0-terminated service name */ 145 /* followed by 0-terminated service name */
146 146
@@ -171,7 +171,7 @@ struct GNUNET_IDENTITY_CreateRequestMessage
171 /** 171 /**
172 * The private key 172 * The private key
173 */ 173 */
174 struct GNUNET_CRYPTO_EccPrivateKey private_key; 174 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
175 175
176 /* followed by 0-terminated identity name */ 176 /* followed by 0-terminated identity name */
177 177
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index dc4613cdb..931deb509 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -40,7 +40,7 @@ struct GNUNET_IDENTITY_Ego
40 /** 40 /**
41 * Private key associated with this ego. 41 * Private key associated with this ego.
42 */ 42 */
43 struct GNUNET_CRYPTO_EccPrivateKey *pk; 43 struct GNUNET_CRYPTO_EcdsaPrivateKey *pk;
44 44
45 /** 45 /**
46 * Current name associated with this ego. 46 * Current name associated with this ego.
@@ -179,12 +179,12 @@ const struct GNUNET_IDENTITY_Ego *
179GNUNET_IDENTITY_ego_get_anonymous () 179GNUNET_IDENTITY_ego_get_anonymous ()
180{ 180{
181 static struct GNUNET_IDENTITY_Ego anon; 181 static struct GNUNET_IDENTITY_Ego anon;
182 struct GNUNET_CRYPTO_EccPublicSignKey pub; 182 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
183 183
184 if (NULL != anon.pk) 184 if (NULL != anon.pk)
185 return &anon; 185 return &anon;
186 anon.pk = (struct GNUNET_CRYPTO_EccPrivateKey *) GNUNET_CRYPTO_ecc_key_get_anonymous (); 186 anon.pk = (struct GNUNET_CRYPTO_EcdsaPrivateKey *) GNUNET_CRYPTO_ecdsa_key_get_anonymous ();
187 GNUNET_CRYPTO_ecc_key_get_public_for_signature (anon.pk, 187 GNUNET_CRYPTO_ecdsa_key_get_public (anon.pk,
188 &pub); 188 &pub);
189 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &anon.id); 189 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &anon.id);
190 return &anon; 190 return &anon;
@@ -249,7 +249,7 @@ message_handler (void *cls,
249 const struct GNUNET_IDENTITY_ResultCodeMessage *rcm; 249 const struct GNUNET_IDENTITY_ResultCodeMessage *rcm;
250 const struct GNUNET_IDENTITY_UpdateMessage *um; 250 const struct GNUNET_IDENTITY_UpdateMessage *um;
251 const struct GNUNET_IDENTITY_SetDefaultMessage *sdm; 251 const struct GNUNET_IDENTITY_SetDefaultMessage *sdm;
252 struct GNUNET_CRYPTO_EccPublicSignKey pub; 252 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
253 struct GNUNET_HashCode id; 253 struct GNUNET_HashCode id;
254 const char *str; 254 const char *str;
255 uint16_t size; 255 uint16_t size;
@@ -326,7 +326,7 @@ message_handler (void *cls,
326 h->cb (h->cb_cls, NULL, NULL, NULL); 326 h->cb (h->cb_cls, NULL, NULL, NULL);
327 break; 327 break;
328 } 328 }
329 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&um->private_key, 329 GNUNET_CRYPTO_ecdsa_key_get_public (&um->private_key,
330 &pub); 330 &pub);
331 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id); 331 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id);
332 if (0 == name_len) 332 if (0 == name_len)
@@ -346,7 +346,7 @@ message_handler (void *cls,
346 return; 346 return;
347 } 347 }
348 ego = GNUNET_new (struct GNUNET_IDENTITY_Ego); 348 ego = GNUNET_new (struct GNUNET_IDENTITY_Ego);
349 ego->pk = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 349 ego->pk = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
350 *ego->pk = um->private_key; 350 *ego->pk = um->private_key;
351 ego->name = GNUNET_strdup (str); 351 ego->name = GNUNET_strdup (str);
352 ego->id = id; 352 ego->id = id;
@@ -406,7 +406,7 @@ message_handler (void *cls,
406 } 406 }
407 /* Note: we know which service this should be for, so we're not 407 /* Note: we know which service this should be for, so we're not
408 really using 'str' henceforth */ 408 really using 'str' henceforth */
409 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&sdm->private_key, 409 GNUNET_CRYPTO_ecdsa_key_get_public (&sdm->private_key,
410 &pub); 410 &pub);
411 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id); 411 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &id);
412 ego = GNUNET_CONTAINER_multihashmap_get (h->egos, 412 ego = GNUNET_CONTAINER_multihashmap_get (h->egos,
@@ -591,7 +591,7 @@ GNUNET_IDENTITY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
591 * @param ego the ego 591 * @param ego the ego
592 * @return associated ECC key, valid as long as the ego is valid 592 * @return associated ECC key, valid as long as the ego is valid
593 */ 593 */
594const struct GNUNET_CRYPTO_EccPrivateKey * 594const struct GNUNET_CRYPTO_EcdsaPrivateKey *
595GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego) 595GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego)
596{ 596{
597 return ego->pk; 597 return ego->pk;
@@ -606,9 +606,9 @@ GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego)
606 */ 606 */
607void 607void
608GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego, 608GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego,
609 struct GNUNET_CRYPTO_EccPublicSignKey *pk) 609 struct GNUNET_CRYPTO_EcdsaPublicKey *pk)
610{ 610{
611 GNUNET_CRYPTO_ecc_key_get_public_for_signature (ego->pk, 611 GNUNET_CRYPTO_ecdsa_key_get_public (ego->pk,
612 pk); 612 pk);
613} 613}
614 614
@@ -730,11 +730,11 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id,
730{ 730{
731 struct GNUNET_IDENTITY_Operation *op; 731 struct GNUNET_IDENTITY_Operation *op;
732 struct GNUNET_IDENTITY_CreateRequestMessage *crm; 732 struct GNUNET_IDENTITY_CreateRequestMessage *crm;
733 struct GNUNET_CRYPTO_EccPrivateKey *pk; 733 struct GNUNET_CRYPTO_EcdsaPrivateKey *pk;
734 size_t slen; 734 size_t slen;
735 735
736 slen = strlen (name) + 1; 736 slen = strlen (name) + 1;
737 pk = GNUNET_CRYPTO_ecc_key_create (); 737 pk = GNUNET_CRYPTO_ecdsa_key_create ();
738 738
739 if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct GNUNET_IDENTITY_CreateRequestMessage)) 739 if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct GNUNET_IDENTITY_CreateRequestMessage))
740 { 740 {
diff --git a/src/include/block_dns.h b/src/include/block_dns.h
index 650b3bc14..9bfaac1c6 100644
--- a/src/include/block_dns.h
+++ b/src/include/block_dns.h
@@ -37,7 +37,7 @@ struct GNUNET_DNS_Advertisement
37 /** 37 /**
38 * Signature of the peer affirming that he is offering the service. 38 * Signature of the peer affirming that he is offering the service.
39 */ 39 */
40 struct GNUNET_CRYPTO_EccSignature signature; 40 struct GNUNET_CRYPTO_EddsaSignature signature;
41 41
42 /** 42 /**
43 * Beginning of signed portion of the record, signs everything until 43 * Beginning of signed portion of the record, signs everything until
diff --git a/src/include/block_fs.h b/src/include/block_fs.h
index 3a0afba14..3f904caeb 100644
--- a/src/include/block_fs.h
+++ b/src/include/block_fs.h
@@ -48,7 +48,7 @@ struct UBlock
48 /** 48 /**
49 * Signature using pseudonym and search keyword / identifier. 49 * Signature using pseudonym and search keyword / identifier.
50 */ 50 */
51 struct GNUNET_CRYPTO_EccSignature signature; 51 struct GNUNET_CRYPTO_EcdsaSignature signature;
52 52
53 /** 53 /**
54 * What is being signed and why? 54 * What is being signed and why?
@@ -58,7 +58,7 @@ struct UBlock
58 /** 58 /**
59 * Public key used to sign this block. 59 * Public key used to sign this block.
60 */ 60 */
61 struct GNUNET_CRYPTO_EccPublicSignKey verification_key; 61 struct GNUNET_CRYPTO_EcdsaPublicKey verification_key;
62 62
63 /* rest of the data is encrypted */ 63 /* rest of the data is encrypted */
64 64
diff --git a/src/include/block_regex.h b/src/include/block_regex.h
index 77f778c95..326183d56 100644
--- a/src/include/block_regex.h
+++ b/src/include/block_regex.h
@@ -72,7 +72,7 @@ struct RegexAcceptBlock
72 /** 72 /**
73 * The signature. 73 * The signature.
74 */ 74 */
75 struct GNUNET_CRYPTO_EccSignature signature; 75 struct GNUNET_CRYPTO_EddsaSignature signature;
76}; 76};
77 77
78 78
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index bd1a2f3bf..da4de4c87 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -148,9 +148,10 @@ struct GNUNET_CRYPTO_EccSignaturePurpose
148 148
149 149
150/** 150/**
151 * @brief an ECC signature 151 * @brief an ECC signature using EdDSA.
152 * See https://gnunet.org/ed25519
152 */ 153 */
153struct GNUNET_CRYPTO_EccSignature 154struct GNUNET_CRYPTO_EddsaSignature
154{ 155{
155 156
156 /** 157 /**
@@ -166,11 +167,54 @@ struct GNUNET_CRYPTO_EccSignature
166}; 167};
167 168
168 169
170
169/** 171/**
170 * Public ECC key (always for NIST P-521) encoded in a format suitable 172 * @brief an ECC signature using ECDSA
171 * for network transmission and signatures (ECDSA/EdDSA).
172 */ 173 */
173struct GNUNET_CRYPTO_EccPublicSignKey 174struct GNUNET_CRYPTO_EcdsaSignature
175{
176
177 /**
178 * R value.
179 */
180 unsigned char r[256 / 8];
181
182 /**
183 * S value.
184 */
185 unsigned char s[256 / 8];
186
187};
188
189
190/**
191 * Public ECC key (always for Curve25519) encoded in a format suitable
192 * for network transmission and EdDSA signatures.
193 */
194struct GNUNET_CRYPTO_EddsaPublicKey
195{
196 /**
197 * Q consists of an x- and a y-value, each mod p (256 bits),
198 * given here in affine coordinates.
199 *
200 * FIXME: this coordinate will be removed in the future (compressed point!).
201 */
202 unsigned char q_x[256 / 8];
203
204 /**
205 * Q consists of an x- and a y-value, each mod p (256 bits),
206 * given here in affine coordinates.
207 */
208 unsigned char q_y[256 / 8];
209
210};
211
212
213/**
214 * Public ECC key (always for Curve25519) encoded in a format suitable
215 * for network transmission and ECDSA signatures.
216 */
217struct GNUNET_CRYPTO_EcdsaPublicKey
174{ 218{
175 /** 219 /**
176 * Q consists of an x- and a y-value, each mod p (256 bits), 220 * Q consists of an x- and a y-value, each mod p (256 bits),
@@ -194,15 +238,16 @@ struct GNUNET_CRYPTO_EccPublicSignKey
194 */ 238 */
195struct GNUNET_PeerIdentity 239struct GNUNET_PeerIdentity
196{ 240{
197 struct GNUNET_CRYPTO_EccPublicSignKey public_key; 241 struct GNUNET_CRYPTO_EddsaPublicKey public_key;
198}; 242};
199 243
200 244
201/** 245/**
202 * Public ECC key (always for NIST P-521) encoded in a format suitable 246 * Public ECC key (always for Curve25519) encoded in a format suitable
203 * for network transmission and encryption (ECDH). 247 * for network transmission and encryption (ECDH),
248 * See http://cr.yp.to/ecdh.html
204 */ 249 */
205struct GNUNET_CRYPTO_EccPublicEncryptKey 250struct GNUNET_CRYPTO_EcdhePublicKey
206{ 251{
207 /** 252 /**
208 * Q consists of an x- and a y-value, each mod p (256 bits), 253 * Q consists of an x- and a y-value, each mod p (256 bits),
@@ -222,9 +267,36 @@ struct GNUNET_CRYPTO_EccPublicEncryptKey
222 267
223 268
224/** 269/**
225 * Private ECC key encoded for transmission. 270 * Private ECC key encoded for transmission. To be used only for ECDH
271 * key exchange (ECDHE to be precise).
226 */ 272 */
227struct GNUNET_CRYPTO_EccPrivateKey 273struct GNUNET_CRYPTO_EcdhePrivateKey
274{
275 /**
276 * d is a value mod n, where n has at most 256 bits.
277 */
278 unsigned char d[256 / 8];
279
280};
281
282/**
283 * Private ECC key encoded for transmission. To be used only for ECDSA
284 * signatures.
285 */
286struct GNUNET_CRYPTO_EcdsaPrivateKey
287{
288 /**
289 * d is a value mod n, where n has at most 256 bits.
290 */
291 unsigned char d[256 / 8];
292
293};
294
295/**
296 * Private ECC key encoded for transmission. To be used only for EdDSA
297 * signatures.
298 */
299struct GNUNET_CRYPTO_EddsaPrivateKey
228{ 300{
229 /** 301 /**
230 * d is a value mod n, where n has at most 256 bits. 302 * d is a value mod n, where n has at most 256 bits.
@@ -743,11 +815,11 @@ GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
743 * @param xtr_algo hash algorithm for the extraction phase, GCRY_MD_... 815 * @param xtr_algo hash algorithm for the extraction phase, GCRY_MD_...
744 * @param prf_algo hash algorithm for the expansion phase, GCRY_MD_... 816 * @param prf_algo hash algorithm for the expansion phase, GCRY_MD_...
745 * @param xts salt 817 * @param xts salt
746 * @param xts_len length of xts 818 * @param xts_len length of @a xts
747 * @param skm source key material 819 * @param skm source key material
748 * @param skm_len length of skm 820 * @param skm_len length of @a skm
749 * @param ... pair of void * & size_t for context chunks, terminated by NULL 821 * @param ... pair of void * & size_t for context chunks, terminated by NULL
750 * @return GNUNET_YES on success 822 * @return #GNUNET_YES on success
751 */ 823 */
752int 824int
753GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo, int prf_algo, 825GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo, int prf_algo,
@@ -763,11 +835,11 @@ GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo, int prf_algo,
763 * @param xtr_algo hash algorithm for the extraction phase, GCRY_MD_... 835 * @param xtr_algo hash algorithm for the extraction phase, GCRY_MD_...
764 * @param prf_algo hash algorithm for the expansion phase, GCRY_MD_... 836 * @param prf_algo hash algorithm for the expansion phase, GCRY_MD_...
765 * @param xts salt 837 * @param xts salt
766 * @param xts_len length of xts 838 * @param xts_len length of @a xts
767 * @param skm source key material 839 * @param skm source key material
768 * @param skm_len length of skm 840 * @param skm_len length of @a skm
769 * @param argp va_list of void * & size_t pairs for context chunks 841 * @param argp va_list of void * & size_t pairs for context chunks
770 * @return GNUNET_YES on success 842 * @return #GNUNET_YES on success
771 */ 843 */
772int 844int
773GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo, int prf_algo, 845GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo, int prf_algo,
@@ -780,11 +852,11 @@ GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo, int prf_algo,
780 * @param result buffer for the derived key, allocated by caller 852 * @param result buffer for the derived key, allocated by caller
781 * @param out_len desired length of the derived key 853 * @param out_len desired length of the derived key
782 * @param xts salt 854 * @param xts salt
783 * @param xts_len length of xts 855 * @param xts_len length of @a xts
784 * @param skm source key material 856 * @param skm source key material
785 * @param skm_len length of skm 857 * @param skm_len length of @a skm
786 * @param argp va_list of void * & size_t pairs for context chunks 858 * @param argp va_list of void * & size_t pairs for context chunks
787 * @return GNUNET_YES on success 859 * @return #GNUNET_YES on success
788 */ 860 */
789int 861int
790GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts, 862GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
@@ -798,9 +870,9 @@ GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
798 * @param result buffer for the derived key, allocated by caller 870 * @param result buffer for the derived key, allocated by caller
799 * @param out_len desired length of the derived key 871 * @param out_len desired length of the derived key
800 * @param xts salt 872 * @param xts salt
801 * @param xts_len length of xts 873 * @param xts_len length of @a xts
802 * @param skm source key material 874 * @param skm source key material
803 * @param skm_len length of skm 875 * @param skm_len length of @a skm
804 * @param ... void * & size_t pairs for context chunks 876 * @param ... void * & size_t pairs for context chunks
805 * @return #GNUNET_YES on success 877 * @return #GNUNET_YES on success
806 */ 878 */
@@ -810,16 +882,15 @@ GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
810 882
811 883
812/** 884/**
813 * Function called upon completion of 'GNUNET_CRYPTO_ecc_key_create_async'. 885 * @ingroup crypto
886 * Extract the public key for the given private key.
814 * 887 *
815 * @param cls closure 888 * @param priv the private key
816 * @param pk NULL on error, otherwise the private key (which must be free'd by the callee) 889 * @param pub where to write the public key
817 * @param emsg NULL on success, otherwise an error message
818 */ 890 */
819typedef void (*GNUNET_CRYPTO_EccKeyCallback)(void *cls, 891void
820 struct GNUNET_CRYPTO_EccPrivateKey *pk, 892GNUNET_CRYPTO_ecdsa_key_get_public (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
821 const char *emsg); 893 struct GNUNET_CRYPTO_EcdsaPublicKey *pub);
822
823 894
824/** 895/**
825 * @ingroup crypto 896 * @ingroup crypto
@@ -829,9 +900,8 @@ typedef void (*GNUNET_CRYPTO_EccKeyCallback)(void *cls,
829 * @param pub where to write the public key 900 * @param pub where to write the public key
830 */ 901 */
831void 902void
832GNUNET_CRYPTO_ecc_key_get_public_for_signature (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 903GNUNET_CRYPTO_eddsa_key_get_public (const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
833 struct GNUNET_CRYPTO_EccPublicSignKey *pub); 904 struct GNUNET_CRYPTO_EddsaPublicKey *pub);
834
835 905
836 906
837/** 907/**
@@ -842,8 +912,18 @@ GNUNET_CRYPTO_ecc_key_get_public_for_signature (const struct GNUNET_CRYPTO_EccPr
842 * @param pub where to write the public key 912 * @param pub where to write the public key
843 */ 913 */
844void 914void
845GNUNET_CRYPTO_ecc_key_get_public_for_encryption (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 915GNUNET_CRYPTO_ecdhe_key_get_public (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv,
846 struct GNUNET_CRYPTO_EccPublicEncryptKey *pub); 916 struct GNUNET_CRYPTO_EcdhePublicKey *pub);
917
918
919/**
920 * Convert a public key to a string.
921 *
922 * @param pub key to convert
923 * @return string representing @a pub
924 */
925char *
926GNUNET_CRYPTO_ecdsa_public_key_to_string (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub);
847 927
848 928
849/** 929/**
@@ -853,7 +933,7 @@ GNUNET_CRYPTO_ecc_key_get_public_for_encryption (const struct GNUNET_CRYPTO_EccP
853 * @return string representing @a pub 933 * @return string representing @a pub
854 */ 934 */
855char * 935char *
856GNUNET_CRYPTO_ecc_public_sign_key_to_string (const struct GNUNET_CRYPTO_EccPublicSignKey *pub); 936GNUNET_CRYPTO_eddsa_public_key_to_string (const struct GNUNET_CRYPTO_EddsaPublicKey *pub);
857 937
858 938
859/** 939/**
@@ -865,20 +945,9 @@ GNUNET_CRYPTO_ecc_public_sign_key_to_string (const struct GNUNET_CRYPTO_EccPubli
865 * @return #GNUNET_OK on success 945 * @return #GNUNET_OK on success
866 */ 946 */
867int 947int
868GNUNET_CRYPTO_ecc_public_sign_key_from_string (const char *enc, 948GNUNET_CRYPTO_ecdsa_public_key_from_string (const char *enc,
869 size_t enclen, 949 size_t enclen,
870 struct GNUNET_CRYPTO_EccPublicSignKey *pub); 950 struct GNUNET_CRYPTO_EcdsaPublicKey *pub);
871
872
873
874/**
875 * Convert a public key to a string.
876 *
877 * @param pub key to convert
878 * @return string representing @a pub
879 */
880char *
881GNUNET_CRYPTO_ecc_public_encrypt_key_to_string (const struct GNUNET_CRYPTO_EccPublicEncryptKey *pub);
882 951
883 952
884/** 953/**
@@ -890,9 +959,28 @@ GNUNET_CRYPTO_ecc_public_encrypt_key_to_string (const struct GNUNET_CRYPTO_EccPu
890 * @return #GNUNET_OK on success 959 * @return #GNUNET_OK on success
891 */ 960 */
892int 961int
893GNUNET_CRYPTO_ecc_public_encrypt_key_from_string (const char *enc, 962GNUNET_CRYPTO_eddsa_public_key_from_string (const char *enc,
894 size_t enclen, 963 size_t enclen,
895 struct GNUNET_CRYPTO_EccPublicEncryptKey *pub); 964 struct GNUNET_CRYPTO_EddsaPublicKey *pub);
965
966
967/**
968 * @ingroup crypto
969 * Create a new private key by reading it from a file. If the
970 * files does not exist, create a new key and write it to the
971 * file. Caller must free return value. Note that this function
972 * can not guarantee that another process might not be trying
973 * the same operation on the same file at the same time.
974 * If the contents of the file
975 * are invalid the old file is deleted and a fresh key is
976 * created.
977 *
978 * @param filename name of file to use to store the key
979 * @return new private key, NULL on error (for example,
980 * permission denied); free using #GNUNET_free
981 */
982struct GNUNET_CRYPTO_EcdsaPrivateKey *
983GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename);
896 984
897 985
898/** 986/**
@@ -910,8 +998,8 @@ GNUNET_CRYPTO_ecc_public_encrypt_key_from_string (const char *enc,
910 * @return new private key, NULL on error (for example, 998 * @return new private key, NULL on error (for example,
911 * permission denied); free using #GNUNET_free 999 * permission denied); free using #GNUNET_free
912 */ 1000 */
913struct GNUNET_CRYPTO_EccPrivateKey * 1001struct GNUNET_CRYPTO_EddsaPrivateKey *
914GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename); 1002GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename);
915 1003
916 1004
917/** 1005/**
@@ -923,8 +1011,28 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename);
923 * @return new private key, NULL on error (for example, 1011 * @return new private key, NULL on error (for example,
924 * permission denied); free using #GNUNET_free 1012 * permission denied); free using #GNUNET_free
925 */ 1013 */
926struct GNUNET_CRYPTO_EccPrivateKey * 1014struct GNUNET_CRYPTO_EddsaPrivateKey *
927GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg); 1015GNUNET_CRYPTO_eddsa_key_create_from_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg);
1016
1017
1018/**
1019 * @ingroup crypto
1020 * Create a new private key. Caller must free return value.
1021 *
1022 * @return fresh private key; free using #GNUNET_free
1023 */
1024struct GNUNET_CRYPTO_EcdsaPrivateKey *
1025GNUNET_CRYPTO_ecdsa_key_create (void);
1026
1027
1028/**
1029 * @ingroup crypto
1030 * Create a new private key. Caller must free return value.
1031 *
1032 * @return fresh private key; free using #GNUNET_free
1033 */
1034struct GNUNET_CRYPTO_EddsaPrivateKey *
1035GNUNET_CRYPTO_eddsa_key_create (void);
928 1036
929 1037
930/** 1038/**
@@ -933,8 +1041,8 @@ GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATI
933 * 1041 *
934 * @return fresh private key; free using #GNUNET_free 1042 * @return fresh private key; free using #GNUNET_free
935 */ 1043 */
936struct GNUNET_CRYPTO_EccPrivateKey * 1044struct GNUNET_CRYPTO_EcdhePrivateKey *
937GNUNET_CRYPTO_ecc_key_create (void); 1045GNUNET_CRYPTO_ecdhe_key_create (void);
938 1046
939 1047
940/** 1048/**
@@ -944,7 +1052,26 @@ GNUNET_CRYPTO_ecc_key_create (void);
944 * @param pk location of the key 1052 * @param pk location of the key
945 */ 1053 */
946void 1054void
947GNUNET_CRYPTO_ecc_key_clear (struct GNUNET_CRYPTO_EccPrivateKey *pk); 1055GNUNET_CRYPTO_eddsa_key_clear (struct GNUNET_CRYPTO_EddsaPrivateKey *pk);
1056
1057
1058/**
1059 * @ingroup crypto
1060 * Clear memory that was used to store a private key.
1061 *
1062 * @param pk location of the key
1063 */
1064void
1065GNUNET_CRYPTO_ecdsa_key_clear (struct GNUNET_CRYPTO_EcdsaPrivateKey *pk);
1066
1067/**
1068 * @ingroup crypto
1069 * Clear memory that was used to store a private key.
1070 *
1071 * @param pk location of the key
1072 */
1073void
1074GNUNET_CRYPTO_ecdhe_key_clear (struct GNUNET_CRYPTO_EcdhePrivateKey *pk);
948 1075
949 1076
950/** 1077/**
@@ -953,8 +1080,8 @@ GNUNET_CRYPTO_ecc_key_clear (struct GNUNET_CRYPTO_EccPrivateKey *pk);
953 * 1080 *
954 * @return "anonymous" private key; do not free 1081 * @return "anonymous" private key; do not free
955 */ 1082 */
956const struct GNUNET_CRYPTO_EccPrivateKey * 1083const struct GNUNET_CRYPTO_EcdsaPrivateKey *
957GNUNET_CRYPTO_ecc_key_get_anonymous (void); 1084GNUNET_CRYPTO_ecdsa_key_get_anonymous (void);
958 1085
959 1086
960/** 1087/**
@@ -967,7 +1094,7 @@ GNUNET_CRYPTO_ecc_key_get_anonymous (void);
967 * @param cfg_name name of the configuration file to use 1094 * @param cfg_name name of the configuration file to use
968 */ 1095 */
969void 1096void
970GNUNET_CRYPTO_ecc_setup_hostkey (const char *cfg_name); 1097GNUNET_CRYPTO_eddsa_setup_hostkey (const char *cfg_name);
971 1098
972 1099
973/** 1100/**
@@ -989,19 +1116,34 @@ GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg,
989 * Derive key material from a public and a private ECC key. 1116 * Derive key material from a public and a private ECC key.
990 * 1117 *
991 * @param priv private key to use for the ECDH (x) 1118 * @param priv private key to use for the ECDH (x)
992 * @param pub public key to use for the ECDY (yG) 1119 * @param pub public key to use for the ECDH (yG)
993 * @param key_material where to write the key material (xyG) 1120 * @param key_material where to write the key material (xyG)
994 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success 1121 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
995 */ 1122 */
996int 1123int
997GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 1124GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv,
998 const struct GNUNET_CRYPTO_EccPublicEncryptKey *pub, 1125 const struct GNUNET_CRYPTO_EcdhePublicKey *pub,
999 struct GNUNET_HashCode *key_material); 1126 struct GNUNET_HashCode *key_material);
1000 1127
1001 1128
1002/** 1129/**
1003 * @ingroup crypto 1130 * @ingroup crypto
1004 * Sign a given block. 1131 * EdDSA sign a given block.
1132 *
1133 * @param priv private key to use for the signing
1134 * @param purpose what to sign (size, purpose)
1135 * @param sig where to write the signature
1136 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
1137 */
1138int
1139GNUNET_CRYPTO_eddsa_sign (const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
1140 const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
1141 struct GNUNET_CRYPTO_EddsaSignature *sig);
1142
1143
1144/**
1145 * @ingroup crypto
1146 * ECDSA Sign a given block.
1005 * 1147 *
1006 * @param priv private key to use for the signing 1148 * @param priv private key to use for the signing
1007 * @param purpose what to sign (size, purpose) 1149 * @param purpose what to sign (size, purpose)
@@ -1009,14 +1151,31 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
1009 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success 1151 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
1010 */ 1152 */
1011int 1153int
1012GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 1154GNUNET_CRYPTO_ecdsa_sign (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
1013 const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, 1155 const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
1014 struct GNUNET_CRYPTO_EccSignature *sig); 1156 struct GNUNET_CRYPTO_EcdsaSignature *sig);
1157
1158/**
1159 * @ingroup crypto
1160 * Verify EdDSA signature.
1161 *
1162 * @param purpose what is the purpose that the signature should have?
1163 * @param validate block to validate (size, purpose, data)
1164 * @param sig signature that is being validated
1165 * @param pub public key of the signer
1166 * @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid
1167 */
1168int
1169GNUNET_CRYPTO_eddsa_verify (uint32_t purpose,
1170 const struct GNUNET_CRYPTO_EccSignaturePurpose *validate,
1171 const struct GNUNET_CRYPTO_EddsaSignature *sig,
1172 const struct GNUNET_CRYPTO_EddsaPublicKey *pub);
1173
1015 1174
1016 1175
1017/** 1176/**
1018 * @ingroup crypto 1177 * @ingroup crypto
1019 * Verify signature. 1178 * Verify ECDSA signature.
1020 * 1179 *
1021 * @param purpose what is the purpose that the signature should have? 1180 * @param purpose what is the purpose that the signature should have?
1022 * @param validate block to validate (size, purpose, data) 1181 * @param validate block to validate (size, purpose, data)
@@ -1025,10 +1184,10 @@ GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
1025 * @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid 1184 * @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid
1026 */ 1185 */
1027int 1186int
1028GNUNET_CRYPTO_ecc_verify (uint32_t purpose, 1187GNUNET_CRYPTO_ecdsa_verify (uint32_t purpose,
1029 const struct GNUNET_CRYPTO_EccSignaturePurpose *validate, 1188 const struct GNUNET_CRYPTO_EccSignaturePurpose *validate,
1030 const struct GNUNET_CRYPTO_EccSignature *sig, 1189 const struct GNUNET_CRYPTO_EcdsaSignature *sig,
1031 const struct GNUNET_CRYPTO_EccPublicSignKey *pub); 1190 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub);
1032 1191
1033 1192
1034/** 1193/**
@@ -1044,10 +1203,10 @@ GNUNET_CRYPTO_ecc_verify (uint32_t purpose,
1044 * typically the name of the subsystem/application 1203 * typically the name of the subsystem/application
1045 * @return derived private key 1204 * @return derived private key
1046 */ 1205 */
1047struct GNUNET_CRYPTO_EccPrivateKey * 1206struct GNUNET_CRYPTO_EcdsaPrivateKey *
1048GNUNET_CRYPTO_ecc_key_derive (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 1207GNUNET_CRYPTO_ecdsa_private_key_derive (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
1049 const char *label, 1208 const char *label,
1050 const char *context); 1209 const char *context);
1051 1210
1052 1211
1053/** 1212/**
@@ -1062,10 +1221,10 @@ GNUNET_CRYPTO_ecc_key_derive (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
1062 * @param result where to write the derived public key 1221 * @param result where to write the derived public key
1063 */ 1222 */
1064void 1223void
1065GNUNET_CRYPTO_ecc_public_key_derive (const struct GNUNET_CRYPTO_EccPublicSignKey *pub, 1224GNUNET_CRYPTO_ecdsa_public_key_derive (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub,
1066 const char *label, 1225 const char *label,
1067 const char *context, 1226 const char *context,
1068 struct GNUNET_CRYPTO_EccPublicSignKey *result); 1227 struct GNUNET_CRYPTO_EcdsaPublicKey *result);
1069 1228
1070 1229
1071#if 0 /* keep Emacsens' auto-indent happy */ 1230#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index a13c3b91c..3546fdcb7 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -337,7 +337,7 @@ GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri);
337 * @return an FS URI for the given namespace and identifier 337 * @return an FS URI for the given namespace and identifier
338 */ 338 */
339struct GNUNET_FS_Uri * 339struct GNUNET_FS_Uri *
340GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EccPublicSignKey *ns, 340GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EcdsaPublicKey *ns,
341 const char *id); 341 const char *id);
342 342
343 343
@@ -351,7 +351,7 @@ GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EccPublicSignKey *ns,
351 */ 351 */
352int 352int
353GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri, 353GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
354 struct GNUNET_CRYPTO_EccPublicSignKey *pseudonym); 354 struct GNUNET_CRYPTO_EcdsaPublicKey *pseudonym);
355 355
356 356
357/** 357/**
@@ -1377,7 +1377,7 @@ struct GNUNET_FS_ProgressInfo
1377 /** 1377 /**
1378 * Public key of the namespace. 1378 * Public key of the namespace.
1379 */ 1379 */
1380 struct GNUNET_CRYPTO_EccPublicSignKey pseudonym; 1380 struct GNUNET_CRYPTO_EcdsaPublicKey pseudonym;
1381 1381
1382 } ns; 1382 } ns;
1383 1383
@@ -1962,7 +1962,7 @@ enum GNUNET_FS_PublishOptions
1962struct GNUNET_FS_PublishContext * 1962struct GNUNET_FS_PublishContext *
1963GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, 1963GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
1964 struct GNUNET_FS_FileInformation *fi, 1964 struct GNUNET_FS_FileInformation *fi,
1965 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 1965 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
1966 const char *nid, 1966 const char *nid,
1967 const char *nuid, 1967 const char *nuid,
1968 enum GNUNET_FS_PublishOptions options); 1968 enum GNUNET_FS_PublishOptions options);
@@ -2054,7 +2054,7 @@ struct GNUNET_FS_PublishSksContext;
2054 */ 2054 */
2055struct GNUNET_FS_PublishSksContext * 2055struct GNUNET_FS_PublishSksContext *
2056GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, 2056GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
2057 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 2057 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
2058 const char *identifier, 2058 const char *identifier,
2059 const char *update, 2059 const char *update,
2060 const struct GNUNET_CONTAINER_MetaData *meta, 2060 const struct GNUNET_CONTAINER_MetaData *meta,
@@ -2176,7 +2176,7 @@ typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls,
2176 */ 2176 */
2177void 2177void
2178GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h, 2178GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h,
2179 const struct GNUNET_CRYPTO_EccPrivateKey *ns, 2179 const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
2180 const char *next_id, 2180 const char *next_id,
2181 GNUNET_FS_IdentifierProcessor ip, 2181 GNUNET_FS_IdentifierProcessor ip,
2182 void *ip_cls); 2182 void *ip_cls);
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h
index f16494c61..f26b44265 100644
--- a/src/include/gnunet_gns_service.h
+++ b/src/include/gnunet_gns_service.h
@@ -107,10 +107,10 @@ typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls,
107struct GNUNET_GNS_LookupRequest * 107struct GNUNET_GNS_LookupRequest *
108GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, 108GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
109 const char *name, 109 const char *name,
110 const struct GNUNET_CRYPTO_EccPublicSignKey *zone, 110 const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
111 int type, 111 int type,
112 int only_cached, 112 int only_cached,
113 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone_key, 113 const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_zone_key,
114 GNUNET_GNS_LookupResultProcessor proc, 114 GNUNET_GNS_LookupResultProcessor proc,
115 void *proc_cls); 115 void *proc_cls);
116 116
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index 901aa4f24..609cb2822 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -198,7 +198,7 @@ typedef size_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls,
198 * @return the hello message 198 * @return the hello message
199 */ 199 */
200struct GNUNET_HELLO_Message * 200struct GNUNET_HELLO_Message *
201GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicSignKey *publicKey, 201GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EddsaPublicKey *publicKey,
202 GNUNET_HELLO_GenerateAddressListCallback addrgen, 202 GNUNET_HELLO_GenerateAddressListCallback addrgen,
203 void *addrgen_cls, 203 void *addrgen_cls,
204 int friend_only); 204 int friend_only);
@@ -325,7 +325,7 @@ GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
325 */ 325 */
326int 326int
327GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello, 327GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
328 struct GNUNET_CRYPTO_EccPublicSignKey *publicKey); 328 struct GNUNET_CRYPTO_EddsaPublicKey *publicKey);
329 329
330 330
331/** 331/**
@@ -378,7 +378,7 @@ GNUNET_HELLO_compose_uri (const struct GNUNET_HELLO_Message *hello,
378 */ 378 */
379int 379int
380GNUNET_HELLO_parse_uri (const char *uri, 380GNUNET_HELLO_parse_uri (const char *uri,
381 struct GNUNET_CRYPTO_EccPublicSignKey *pubkey, 381 struct GNUNET_CRYPTO_EddsaPublicKey *pubkey,
382 struct GNUNET_HELLO_Message **hello, 382 struct GNUNET_HELLO_Message **hello,
383 GNUNET_HELLO_TransportPluginsFind plugins_find); 383 GNUNET_HELLO_TransportPluginsFind plugins_find);
384 384
diff --git a/src/include/gnunet_identity_service.h b/src/include/gnunet_identity_service.h
index 79d27fa02..49b269604 100644
--- a/src/include/gnunet_identity_service.h
+++ b/src/include/gnunet_identity_service.h
@@ -76,7 +76,7 @@ struct GNUNET_IDENTITY_Operation;
76 * @param ego the ego 76 * @param ego the ego
77 * @return associated ECC key, valid as long as the ego is valid 77 * @return associated ECC key, valid as long as the ego is valid
78 */ 78 */
79const struct GNUNET_CRYPTO_EccPrivateKey * 79const struct GNUNET_CRYPTO_EcdsaPrivateKey *
80GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego); 80GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego);
81 81
82 82
@@ -97,7 +97,7 @@ GNUNET_IDENTITY_ego_get_anonymous (void);
97 */ 97 */
98void 98void
99GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego, 99GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego,
100 struct GNUNET_CRYPTO_EccPublicSignKey *pk); 100 struct GNUNET_CRYPTO_EcdsaPublicKey *pk);
101 101
102 102
103/** 103/**
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h
index 7a2421b4b..58a99c0d8 100644
--- a/src/include/gnunet_multicast_service.h
+++ b/src/include/gnunet_multicast_service.h
@@ -112,7 +112,7 @@ struct GNUNET_MULTICAST_MessageHeader
112 * 112 *
113 * Signature must match the public key of the multicast group. 113 * Signature must match the public key of the multicast group.
114 */ 114 */
115 struct GNUNET_CRYPTO_EccSignature signature; 115 struct GNUNET_CRYPTO_EddsaSignature signature;
116 116
117 /** 117 /**
118 * Purpose for the signature and size of the signed data. 118 * Purpose for the signature and size of the signed data.
@@ -214,7 +214,7 @@ GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh,
214 */ 214 */
215typedef void 215typedef void
216(*GNUNET_MULTICAST_JoinCallback) (void *cls, 216(*GNUNET_MULTICAST_JoinCallback) (void *cls,
217 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 217 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
218 const struct GNUNET_MessageHeader *join_req, 218 const struct GNUNET_MessageHeader *join_req,
219 struct GNUNET_MULTICAST_JoinHandle *jh); 219 struct GNUNET_MULTICAST_JoinHandle *jh);
220 220
@@ -253,7 +253,7 @@ GNUNET_MULTICAST_membership_test_result (struct GNUNET_MULTICAST_MembershipTestH
253 */ 253 */
254typedef void 254typedef void
255(*GNUNET_MULTICAST_MembershipTestCallback) (void *cls, 255(*GNUNET_MULTICAST_MembershipTestCallback) (void *cls,
256 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 256 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
257 uint64_t message_id, 257 uint64_t message_id,
258 uint64_t group_generation, 258 uint64_t group_generation,
259 struct GNUNET_MULTICAST_MembershipTestHandle *mth); 259 struct GNUNET_MULTICAST_MembershipTestHandle *mth);
@@ -277,7 +277,7 @@ typedef void
277 */ 277 */
278typedef void 278typedef void
279(*GNUNET_MULTICAST_RequestCallback) (void *cls, 279(*GNUNET_MULTICAST_RequestCallback) (void *cls,
280 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 280 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
281 const struct GNUNET_MessageHeader *req, 281 const struct GNUNET_MessageHeader *req,
282 enum GNUNET_MULTICAST_MessageFlags flags); 282 enum GNUNET_MULTICAST_MessageFlags flags);
283 283
@@ -341,7 +341,7 @@ struct GNUNET_MULTICAST_ReplayHandle;
341 */ 341 */
342typedef void 342typedef void
343(*GNUNET_MULTICAST_ReplayFragmentCallback) (void *cls, 343(*GNUNET_MULTICAST_ReplayFragmentCallback) (void *cls,
344 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 344 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
345 uint64_t fragment_id, 345 uint64_t fragment_id,
346 uint64_t flags, 346 uint64_t flags,
347 struct GNUNET_MULTICAST_ReplayHandle *rh); 347 struct GNUNET_MULTICAST_ReplayHandle *rh);
@@ -364,7 +364,7 @@ typedef void
364 */ 364 */
365typedef void 365typedef void
366(*GNUNET_MULTICAST_ReplayMessageCallback) (void *cls, 366(*GNUNET_MULTICAST_ReplayMessageCallback) (void *cls,
367 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 367 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
368 uint64_t message_id, 368 uint64_t message_id,
369 uint64_t fragment_offset, 369 uint64_t fragment_offset,
370 uint64_t flags, 370 uint64_t flags,
@@ -491,7 +491,7 @@ GNUNET_MULTICAST_replay_response2 (struct GNUNET_MULTICAST_ReplayHandle *rh,
491 */ 491 */
492struct GNUNET_MULTICAST_Origin * 492struct GNUNET_MULTICAST_Origin *
493GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 493GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
494 const struct GNUNET_CRYPTO_EccPrivateKey *priv_key, 494 const struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key,
495 uint64_t next_fragment_id, 495 uint64_t next_fragment_id,
496 GNUNET_MULTICAST_JoinCallback join_cb, 496 GNUNET_MULTICAST_JoinCallback join_cb,
497 GNUNET_MULTICAST_MembershipTestCallback mem_test_cb, 497 GNUNET_MULTICAST_MembershipTestCallback mem_test_cb,
@@ -623,8 +623,8 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin);
623 */ 623 */
624struct GNUNET_MULTICAST_Member * 624struct GNUNET_MULTICAST_Member *
625GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 625GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
626 const struct GNUNET_CRYPTO_EccPublicSignKey *group_key, 626 const struct GNUNET_CRYPTO_EddsaPublicKey *group_key,
627 const struct GNUNET_CRYPTO_EccPrivateKey *member_key, 627 const struct GNUNET_CRYPTO_EddsaPrivateKey *member_key,
628 const struct GNUNET_PeerIdentity *origin, 628 const struct GNUNET_PeerIdentity *origin,
629 uint32_t relay_count, 629 uint32_t relay_count,
630 const struct GNUNET_PeerIdentity *relays, 630 const struct GNUNET_PeerIdentity *relays,
diff --git a/src/include/gnunet_namestore_plugin.h b/src/include/gnunet_namestore_plugin.h
index 4d4821bcb..5c7408eec 100644
--- a/src/include/gnunet_namestore_plugin.h
+++ b/src/include/gnunet_namestore_plugin.h
@@ -58,7 +58,7 @@ typedef void (*GNUNET_NAMESTORE_BlockCallback) (void *cls,
58 * @param rd array of records with data to store 58 * @param rd array of records with data to store
59 */ 59 */
60typedef void (*GNUNET_NAMESTORE_RecordIterator) (void *cls, 60typedef void (*GNUNET_NAMESTORE_RecordIterator) (void *cls,
61 const struct GNUNET_CRYPTO_EccPrivateKey *private_key, 61 const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key,
62 const char *label, 62 const char *label,
63 unsigned int rd_count, 63 unsigned int rd_count,
64 const struct GNUNET_NAMESTORE_RecordData *rd); 64 const struct GNUNET_NAMESTORE_RecordData *rd);
@@ -115,7 +115,7 @@ struct GNUNET_NAMESTORE_PluginFunctions
115 * @return #GNUNET_OK on success, else #GNUNET_SYSERR 115 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
116 */ 116 */
117 int (*store_records) (void *cls, 117 int (*store_records) (void *cls,
118 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 118 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
119 const char *label, 119 const char *label,
120 unsigned int rd_count, 120 unsigned int rd_count,
121 const struct GNUNET_NAMESTORE_RecordData *rd); 121 const struct GNUNET_NAMESTORE_RecordData *rd);
@@ -133,7 +133,7 @@ struct GNUNET_NAMESTORE_PluginFunctions
133 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error 133 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error
134 */ 134 */
135 int (*iterate_records) (void *cls, 135 int (*iterate_records) (void *cls,
136 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 136 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
137 uint64_t offset, 137 uint64_t offset,
138 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls); 138 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls);
139 139
@@ -150,8 +150,8 @@ struct GNUNET_NAMESTORE_PluginFunctions
150 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error 150 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error
151 */ 151 */
152 int (*zone_to_name) (void *cls, 152 int (*zone_to_name) (void *cls,
153 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 153 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
154 const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, 154 const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone,
155 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls); 155 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls);
156 156
157 157
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index 7e39adc49..c31c3689b 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -239,12 +239,12 @@ struct GNUNET_NAMESTORE_Block
239 /** 239 /**
240 * Signature of the block. 240 * Signature of the block.
241 */ 241 */
242 struct GNUNET_CRYPTO_EccSignature signature; 242 struct GNUNET_CRYPTO_EcdsaSignature signature;
243 243
244 /** 244 /**
245 * Derived key used for signing; hash of this is the query. 245 * Derived key used for signing; hash of this is the query.
246 */ 246 */
247 struct GNUNET_CRYPTO_EccPublicSignKey derived_key; 247 struct GNUNET_CRYPTO_EcdsaPublicKey derived_key;
248 248
249 /** 249 /**
250 * Number of bytes signed; also specifies the number of bytes 250 * Number of bytes signed; also specifies the number of bytes
@@ -297,7 +297,7 @@ GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h,
297 */ 297 */
298struct GNUNET_NAMESTORE_QueueEntry * 298struct GNUNET_NAMESTORE_QueueEntry *
299GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, 299GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h,
300 const struct GNUNET_CRYPTO_EccPrivateKey *pkey, 300 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
301 const char *label, 301 const char *label,
302 unsigned int rd_count, 302 unsigned int rd_count,
303 const struct GNUNET_NAMESTORE_RecordData *rd, 303 const struct GNUNET_NAMESTORE_RecordData *rd,
@@ -343,7 +343,7 @@ GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h,
343 * @param rd array of records with data to store 343 * @param rd array of records with data to store
344 */ 344 */
345typedef void (*GNUNET_NAMESTORE_RecordMonitor) (void *cls, 345typedef void (*GNUNET_NAMESTORE_RecordMonitor) (void *cls,
346 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 346 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
347 const char *label, 347 const char *label,
348 unsigned int rd_count, 348 unsigned int rd_count,
349 const struct GNUNET_NAMESTORE_RecordData *rd); 349 const struct GNUNET_NAMESTORE_RecordData *rd);
@@ -364,8 +364,8 @@ typedef void (*GNUNET_NAMESTORE_RecordMonitor) (void *cls,
364 */ 364 */
365struct GNUNET_NAMESTORE_QueueEntry * 365struct GNUNET_NAMESTORE_QueueEntry *
366GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h, 366GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h,
367 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 367 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
368 const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, 368 const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone,
369 GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls); 369 GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls);
370 370
371 371
@@ -411,7 +411,7 @@ GNUNET_NAMESTORE_cancel (struct GNUNET_NAMESTORE_QueueEntry *qe);
411 */ 411 */
412struct GNUNET_NAMESTORE_ZoneIterator * 412struct GNUNET_NAMESTORE_ZoneIterator *
413GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h, 413GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
414 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 414 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
415 GNUNET_NAMESTORE_RecordMonitor proc, 415 GNUNET_NAMESTORE_RecordMonitor proc,
416 void *proc_cls); 416 void *proc_cls);
417 417
@@ -471,7 +471,7 @@ typedef void (*GNUNET_NAMESTORE_RecordsSynchronizedCallback)(void *cls);
471 */ 471 */
472struct GNUNET_NAMESTORE_ZoneMonitor * 472struct GNUNET_NAMESTORE_ZoneMonitor *
473GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 473GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
474 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 474 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
475 GNUNET_NAMESTORE_RecordMonitor monitor, 475 GNUNET_NAMESTORE_RecordMonitor monitor,
476 GNUNET_NAMESTORE_RecordsSynchronizedCallback sync_cb, 476 GNUNET_NAMESTORE_RecordsSynchronizedCallback sync_cb,
477 void *cls); 477 void *cls);
@@ -614,7 +614,7 @@ GNUNET_NAMESTORE_normalize_string (const char *src);
614 * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s. 614 * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s.
615 */ 615 */
616const char * 616const char *
617GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EccPublicSignKey *z); 617GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z);
618 618
619 619
620/** 620/**
@@ -628,7 +628,7 @@ GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EccPublicSignKey *z);
628 * key in an encoding suitable for DNS labels. 628 * key in an encoding suitable for DNS labels.
629 */ 629 */
630const char * 630const char *
631GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey); 631GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey);
632 632
633 633
634/** 634/**
@@ -642,7 +642,7 @@ GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey
642 */ 642 */
643int 643int
644GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, 644GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey,
645 struct GNUNET_CRYPTO_EccPublicSignKey *pkey); 645 struct GNUNET_CRYPTO_EcdsaPublicKey *pkey);
646 646
647 647
648/** 648/**
@@ -653,7 +653,7 @@ GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey,
653 * @param query hash to use for the query 653 * @param query hash to use for the query
654 */ 654 */
655void 655void
656GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EccPrivateKey *zone, 656GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
657 const char *label, 657 const char *label,
658 struct GNUNET_HashCode *query); 658 struct GNUNET_HashCode *query);
659 659
@@ -666,7 +666,7 @@ GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EccPrivateKe
666 * @param query hash to use for the query 666 * @param query hash to use for the query
667 */ 667 */
668void 668void
669GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pub, 669GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub,
670 const char *label, 670 const char *label,
671 struct GNUNET_HashCode *query); 671 struct GNUNET_HashCode *query);
672 672
@@ -681,7 +681,7 @@ GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicSign
681 * @param rd_count number of records in @a rd 681 * @param rd_count number of records in @a rd
682 */ 682 */
683struct GNUNET_NAMESTORE_Block * 683struct GNUNET_NAMESTORE_Block *
684GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, 684GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
685 struct GNUNET_TIME_Absolute expire, 685 struct GNUNET_TIME_Absolute expire,
686 const char *label, 686 const char *label,
687 const struct GNUNET_NAMESTORE_RecordData *rd, 687 const struct GNUNET_NAMESTORE_RecordData *rd,
@@ -712,7 +712,7 @@ GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block);
712 */ 712 */
713int 713int
714GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, 714GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block,
715 const struct GNUNET_CRYPTO_EccPublicSignKey *zone_key, 715 const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key,
716 const char *label, 716 const char *label,
717 GNUNET_NAMESTORE_RecordCallback proc, 717 GNUNET_NAMESTORE_RecordCallback proc,
718 void *proc_cls); 718 void *proc_cls);
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h
index e9f935de7..7ac40a4c5 100644
--- a/src/include/gnunet_psyc_service.h
+++ b/src/include/gnunet_psyc_service.h
@@ -210,7 +210,7 @@ struct GNUNET_PSYC_MessageMethod
210 * Sending slave's public key. NULL if the message is from the master, or when 210 * Sending slave's public key. NULL if the message is from the master, or when
211 * transmitting a message. 211 * transmitting a message.
212 */ 212 */
213 struct GNUNET_CRYPTO_EccPublicSignKey slave_key; 213 struct GNUNET_CRYPTO_EddsaPublicKey slave_key;
214 214
215 /* Followed by NUL-terminated method name. */ 215 /* Followed by NUL-terminated method name. */
216}; 216};
@@ -305,7 +305,7 @@ struct GNUNET_PSYC_JoinHandle;
305 */ 305 */
306typedef int 306typedef int
307(*GNUNET_PSYC_Method) (void *cls, 307(*GNUNET_PSYC_Method) (void *cls,
308 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 308 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
309 uint64_t message_id, 309 uint64_t message_id,
310 const char *method_name, 310 const char *method_name,
311 size_t modifier_count, 311 size_t modifier_count,
@@ -331,7 +331,7 @@ typedef int
331 */ 331 */
332typedef int 332typedef int
333(*GNUNET_PSYC_JoinCallback) (void *cls, 333(*GNUNET_PSYC_JoinCallback) (void *cls,
334 const struct GNUNET_CRYPTO_EccPublicSignKey 334 const struct GNUNET_CRYPTO_EddsaPublicKey
335 *slave_key, 335 *slave_key,
336 const char *method_name, 336 const char *method_name,
337 size_t variable_count, 337 size_t variable_count,
@@ -421,7 +421,7 @@ typedef void
421 */ 421 */
422struct GNUNET_PSYC_Master * 422struct GNUNET_PSYC_Master *
423GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 423GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
424 const struct GNUNET_CRYPTO_EccPrivateKey *channel_key, 424 const struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key,
425 enum GNUNET_PSYC_Policy policy, 425 enum GNUNET_PSYC_Policy policy,
426 GNUNET_PSYC_Method method, 426 GNUNET_PSYC_Method method,
427 GNUNET_PSYC_JoinCallback join_cb, 427 GNUNET_PSYC_JoinCallback join_cb,
@@ -579,8 +579,8 @@ typedef void
579 */ 579 */
580struct GNUNET_PSYC_Slave * 580struct GNUNET_PSYC_Slave *
581GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 581GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
582 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 582 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
583 const struct GNUNET_CRYPTO_EccPrivateKey *slave_key, 583 const struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key,
584 const struct GNUNET_PeerIdentity *origin, 584 const struct GNUNET_PeerIdentity *origin,
585 size_t relay_count, 585 size_t relay_count,
586 const struct GNUNET_PeerIdentity *relays, 586 const struct GNUNET_PeerIdentity *relays,
@@ -732,7 +732,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave);
732 */ 732 */
733void 733void
734GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel, 734GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
735 const struct GNUNET_CRYPTO_EccPublicSignKey 735 const struct GNUNET_CRYPTO_EddsaPublicKey
736 *slave_key, 736 *slave_key,
737 uint64_t announced_at, 737 uint64_t announced_at,
738 uint64_t effective_since); 738 uint64_t effective_since);
@@ -761,7 +761,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
761 */ 761 */
762void 762void
763GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, 763GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel,
764 const struct GNUNET_CRYPTO_EccPublicSignKey 764 const struct GNUNET_CRYPTO_EddsaPublicKey
765 *slave_key, 765 *slave_key,
766 uint64_t announced_at); 766 uint64_t announced_at);
767 767
diff --git a/src/include/gnunet_psycstore_plugin.h b/src/include/gnunet_psycstore_plugin.h
index 8f8668043..7564ed4bd 100644
--- a/src/include/gnunet_psycstore_plugin.h
+++ b/src/include/gnunet_psycstore_plugin.h
@@ -59,8 +59,8 @@ struct GNUNET_PSYCSTORE_PluginFunctions
59 */ 59 */
60 int 60 int
61 (*membership_store) (void *cls, 61 (*membership_store) (void *cls,
62 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 62 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
63 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 63 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
64 int did_join, 64 int did_join,
65 uint64_t announced_at, 65 uint64_t announced_at,
66 uint64_t effective_since, 66 uint64_t effective_since,
@@ -76,8 +76,8 @@ struct GNUNET_PSYCSTORE_PluginFunctions
76 */ 76 */
77 int 77 int
78 (*membership_test) (void *cls, 78 (*membership_test) (void *cls,
79 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 79 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
80 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 80 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
81 uint64_t message_id); 81 uint64_t message_id);
82 82
83 /** 83 /**
@@ -89,7 +89,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
89 */ 89 */
90 int 90 int
91 (*fragment_store) (void *cls, 91 (*fragment_store) (void *cls,
92 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 92 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
93 const struct GNUNET_MULTICAST_MessageHeader *message, 93 const struct GNUNET_MULTICAST_MessageHeader *message,
94 uint32_t psycstore_flags); 94 uint32_t psycstore_flags);
95 95
@@ -107,7 +107,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
107 */ 107 */
108 int 108 int
109 (*message_add_flags) (void *cls, 109 (*message_add_flags) (void *cls,
110 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 110 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
111 uint64_t message_id, 111 uint64_t message_id,
112 uint64_t psycstore_flags); 112 uint64_t psycstore_flags);
113 113
@@ -120,7 +120,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
120 */ 120 */
121 int 121 int
122 (*fragment_get) (void *cls, 122 (*fragment_get) (void *cls,
123 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 123 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
124 uint64_t fragment_id, 124 uint64_t fragment_id,
125 GNUNET_PSYCSTORE_FragmentCallback cb, 125 GNUNET_PSYCSTORE_FragmentCallback cb,
126 void *cb_cls); 126 void *cb_cls);
@@ -134,7 +134,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
134 */ 134 */
135 int 135 int
136 (*message_get) (void *cls, 136 (*message_get) (void *cls,
137 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 137 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
138 uint64_t message_id, 138 uint64_t message_id,
139 uint64_t *returned_fragments, 139 uint64_t *returned_fragments,
140 GNUNET_PSYCSTORE_FragmentCallback cb, 140 GNUNET_PSYCSTORE_FragmentCallback cb,
@@ -150,7 +150,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
150 */ 150 */
151 int 151 int
152 (*message_get_fragment) (void *cls, 152 (*message_get_fragment) (void *cls,
153 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 153 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
154 uint64_t message_id, 154 uint64_t message_id,
155 uint64_t fragment_offset, 155 uint64_t fragment_offset,
156 GNUNET_PSYCSTORE_FragmentCallback cb, 156 GNUNET_PSYCSTORE_FragmentCallback cb,
@@ -165,7 +165,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
165 */ 165 */
166 int 166 int
167 (*counters_message_get) (void *cls, 167 (*counters_message_get) (void *cls,
168 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 168 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
169 uint64_t *max_fragment_id, 169 uint64_t *max_fragment_id,
170 uint64_t *max_message_id, 170 uint64_t *max_message_id,
171 uint64_t *max_group_generation); 171 uint64_t *max_group_generation);
@@ -179,7 +179,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
179 */ 179 */
180 int 180 int
181 (*counters_state_get) (void *cls, 181 (*counters_state_get) (void *cls,
182 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 182 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
183 uint64_t *max_state_message_id); 183 uint64_t *max_state_message_id);
184 184
185 185
@@ -192,7 +192,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
192 */ 192 */
193 int 193 int
194 (*state_modify_begin) (void *cls, 194 (*state_modify_begin) (void *cls,
195 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 195 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
196 uint64_t message_id, uint64_t state_delta); 196 uint64_t message_id, uint64_t state_delta);
197 197
198 /** 198 /**
@@ -208,7 +208,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
208 */ 208 */
209 int 209 int
210 (*state_modify_set) (void *cls, 210 (*state_modify_set) (void *cls,
211 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 211 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
212 const char *name, const void *value, size_t value_size); 212 const char *name, const void *value, size_t value_size);
213 213
214 214
@@ -221,7 +221,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
221 */ 221 */
222 int 222 int
223 (*state_modify_end) (void *cls, 223 (*state_modify_end) (void *cls,
224 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 224 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
225 uint64_t message_id); 225 uint64_t message_id);
226 226
227 227
@@ -234,7 +234,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
234 */ 234 */
235 int 235 int
236 (*state_sync_begin) (void *cls, 236 (*state_sync_begin) (void *cls,
237 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key); 237 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key);
238 238
239 /** 239 /**
240 * Set the value of a state variable while synchronizing state. 240 * Set the value of a state variable while synchronizing state.
@@ -249,7 +249,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
249 */ 249 */
250 int 250 int
251 (*state_sync_set) (void *cls, 251 (*state_sync_set) (void *cls,
252 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 252 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
253 const char *name, const void *value, size_t value_size); 253 const char *name, const void *value, size_t value_size);
254 254
255 255
@@ -262,7 +262,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
262 */ 262 */
263 int 263 int
264 (*state_sync_end) (void *cls, 264 (*state_sync_end) (void *cls,
265 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 265 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
266 uint64_t message_id); 266 uint64_t message_id);
267 267
268 268
@@ -277,7 +277,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
277 */ 277 */
278 int 278 int
279 (*state_reset) (void *cls, 279 (*state_reset) (void *cls,
280 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key); 280 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key);
281 281
282 /** 282 /**
283 * Update signed state values from the current ones. 283 * Update signed state values from the current ones.
@@ -286,7 +286,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
286 */ 286 */
287 int 287 int
288 (*state_update_signed) (void *cls, 288 (*state_update_signed) (void *cls,
289 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key); 289 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key);
290 290
291 291
292 /** 292 /**
@@ -296,7 +296,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
296 */ 296 */
297 int 297 int
298 (*state_get) (void *cls, 298 (*state_get) (void *cls,
299 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 299 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
300 const char *name, 300 const char *name,
301 GNUNET_PSYCSTORE_StateCallback cb, 301 GNUNET_PSYCSTORE_StateCallback cb,
302 void *cb_cls); 302 void *cb_cls);
@@ -310,7 +310,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
310 */ 310 */
311 int 311 int
312 (*state_get_prefix) (void *cls, 312 (*state_get_prefix) (void *cls,
313 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 313 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
314 const char *name, 314 const char *name,
315 GNUNET_PSYCSTORE_StateCallback cb, 315 GNUNET_PSYCSTORE_StateCallback cb,
316 void *cb_cls); 316 void *cb_cls);
@@ -323,7 +323,7 @@ struct GNUNET_PSYCSTORE_PluginFunctions
323 */ 323 */
324 int 324 int
325 (*state_get_signed) (void *cls, 325 (*state_get_signed) (void *cls,
326 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 326 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
327 GNUNET_PSYCSTORE_StateCallback cb, 327 GNUNET_PSYCSTORE_StateCallback cb,
328 void *cb_cls); 328 void *cb_cls);
329 329
diff --git a/src/include/gnunet_psycstore_service.h b/src/include/gnunet_psycstore_service.h
index 25d4339a3..5f4a32b7b 100644
--- a/src/include/gnunet_psycstore_service.h
+++ b/src/include/gnunet_psycstore_service.h
@@ -133,8 +133,8 @@ typedef void
133 */ 133 */
134struct GNUNET_PSYCSTORE_OperationHandle * 134struct GNUNET_PSYCSTORE_OperationHandle *
135GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, 135GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
136 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 136 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
137 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 137 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
138 int did_join, 138 int did_join,
139 uint64_t announced_at, 139 uint64_t announced_at,
140 uint64_t effective_since, 140 uint64_t effective_since,
@@ -165,8 +165,8 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
165 */ 165 */
166struct GNUNET_PSYCSTORE_OperationHandle * 166struct GNUNET_PSYCSTORE_OperationHandle *
167GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h, 167GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
168 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 168 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
169 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 169 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
170 uint64_t message_id, 170 uint64_t message_id,
171 uint64_t group_generation, 171 uint64_t group_generation,
172 GNUNET_PSYCSTORE_ResultCallback rcb, 172 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -188,7 +188,7 @@ GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
188 */ 188 */
189struct GNUNET_PSYCSTORE_OperationHandle * 189struct GNUNET_PSYCSTORE_OperationHandle *
190GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h, 190GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h,
191 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 191 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
192 const struct GNUNET_MULTICAST_MessageHeader *message, 192 const struct GNUNET_MULTICAST_MessageHeader *message,
193 uint32_t psycstore_flags, 193 uint32_t psycstore_flags,
194 GNUNET_PSYCSTORE_ResultCallback rcb, 194 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -227,7 +227,7 @@ typedef int
227 */ 227 */
228struct GNUNET_PSYCSTORE_OperationHandle * 228struct GNUNET_PSYCSTORE_OperationHandle *
229GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h, 229GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
230 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 230 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
231 uint64_t fragment_id, 231 uint64_t fragment_id,
232 GNUNET_PSYCSTORE_FragmentCallback fcb, 232 GNUNET_PSYCSTORE_FragmentCallback fcb,
233 GNUNET_PSYCSTORE_ResultCallback rcb, 233 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -248,7 +248,7 @@ GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
248 */ 248 */
249struct GNUNET_PSYCSTORE_OperationHandle * 249struct GNUNET_PSYCSTORE_OperationHandle *
250GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, 250GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
251 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 251 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
252 uint64_t message_id, 252 uint64_t message_id,
253 GNUNET_PSYCSTORE_FragmentCallback fcb, 253 GNUNET_PSYCSTORE_FragmentCallback fcb,
254 GNUNET_PSYCSTORE_ResultCallback rcb, 254 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -271,7 +271,7 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
271 */ 271 */
272struct GNUNET_PSYCSTORE_OperationHandle * 272struct GNUNET_PSYCSTORE_OperationHandle *
273GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h, 273GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h,
274 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 274 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
275 uint64_t message_id, 275 uint64_t message_id,
276 uint64_t fragment_offset, 276 uint64_t fragment_offset,
277 GNUNET_PSYCSTORE_FragmentCallback fcb, 277 GNUNET_PSYCSTORE_FragmentCallback fcb,
@@ -316,7 +316,7 @@ typedef void
316 */ 316 */
317struct GNUNET_PSYCSTORE_OperationHandle * 317struct GNUNET_PSYCSTORE_OperationHandle *
318GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h, 318GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
319 struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 319 struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
320 GNUNET_PSYCSTORE_CountersCallback ccb, 320 GNUNET_PSYCSTORE_CountersCallback ccb,
321 void *ccb_cls); 321 void *ccb_cls);
322 322
@@ -340,7 +340,7 @@ GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
340 */ 340 */
341struct GNUNET_PSYCSTORE_OperationHandle * 341struct GNUNET_PSYCSTORE_OperationHandle *
342GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h, 342GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
343 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 343 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
344 uint64_t message_id, 344 uint64_t message_id,
345 uint64_t state_delta, 345 uint64_t state_delta,
346 size_t modifier_count, 346 size_t modifier_count,
@@ -364,7 +364,7 @@ GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
364 */ 364 */
365struct GNUNET_PSYCSTORE_OperationHandle * 365struct GNUNET_PSYCSTORE_OperationHandle *
366GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h, 366GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
367 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 367 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
368 uint64_t message_id, 368 uint64_t message_id,
369 size_t modifier_count, 369 size_t modifier_count,
370 const struct GNUNET_ENV_Modifier *modifiers, 370 const struct GNUNET_ENV_Modifier *modifiers,
@@ -387,7 +387,7 @@ GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
387 */ 387 */
388struct GNUNET_PSYCSTORE_OperationHandle * 388struct GNUNET_PSYCSTORE_OperationHandle *
389GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h, 389GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h,
390 const struct GNUNET_CRYPTO_EccPublicSignKey 390 const struct GNUNET_CRYPTO_EddsaPublicKey
391 *channel_key, 391 *channel_key,
392 GNUNET_PSYCSTORE_ResultCallback rcb, 392 GNUNET_PSYCSTORE_ResultCallback rcb,
393 void *rcb_cls); 393 void *rcb_cls);
@@ -406,7 +406,7 @@ GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h,
406 */ 406 */
407struct GNUNET_PSYCSTORE_OperationHandle * 407struct GNUNET_PSYCSTORE_OperationHandle *
408GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h, 408GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h,
409 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 409 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
410 uint64_t message_id, 410 uint64_t message_id,
411 const struct GNUNET_HashCode *hash, 411 const struct GNUNET_HashCode *hash,
412 GNUNET_PSYCSTORE_ResultCallback rcb, 412 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -444,7 +444,7 @@ typedef int
444 */ 444 */
445struct GNUNET_PSYCSTORE_OperationHandle * 445struct GNUNET_PSYCSTORE_OperationHandle *
446GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h, 446GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
447 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 447 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
448 const char *name, 448 const char *name,
449 GNUNET_PSYCSTORE_StateCallback scb, 449 GNUNET_PSYCSTORE_StateCallback scb,
450 GNUNET_PSYCSTORE_ResultCallback rcb, 450 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -465,7 +465,7 @@ GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
465 */ 465 */
466struct GNUNET_PSYCSTORE_OperationHandle * 466struct GNUNET_PSYCSTORE_OperationHandle *
467GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h, 467GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h,
468 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 468 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
469 const char *name_prefix, 469 const char *name_prefix,
470 GNUNET_PSYCSTORE_StateCallback scb, 470 GNUNET_PSYCSTORE_StateCallback scb,
471 GNUNET_PSYCSTORE_ResultCallback rcb, 471 GNUNET_PSYCSTORE_ResultCallback rcb,
diff --git a/src/include/gnunet_revocation_service.h b/src/include/gnunet_revocation_service.h
index 8809f9ece..82decc30b 100644
--- a/src/include/gnunet_revocation_service.h
+++ b/src/include/gnunet_revocation_service.h
@@ -73,7 +73,7 @@ typedef void (*GNUNET_REVOCATION_Callback) (void *cls,
73 */ 73 */
74struct GNUNET_REVOCATION_Query * 74struct GNUNET_REVOCATION_Query *
75GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg, 75GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg,
76 const struct GNUNET_CRYPTO_EccPublicSignKey *key, 76 const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
77 GNUNET_REVOCATION_Callback func, void *func_cls); 77 GNUNET_REVOCATION_Callback func, void *func_cls);
78 78
79 79
@@ -109,8 +109,8 @@ struct GNUNET_REVOCATION_Handle;
109 */ 109 */
110struct GNUNET_REVOCATION_Handle * 110struct GNUNET_REVOCATION_Handle *
111GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, 111GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg,
112 const struct GNUNET_CRYPTO_EccPublicSignKey *key, 112 const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
113 const struct GNUNET_CRYPTO_EccSignature *sig, 113 const struct GNUNET_CRYPTO_EcdsaSignature *sig,
114 uint64_t pow, 114 uint64_t pow,
115 GNUNET_REVOCATION_Callback func, void *func_cls); 115 GNUNET_REVOCATION_Callback func, void *func_cls);
116 116
@@ -134,7 +134,7 @@ GNUNET_REVOCATION_revoke_cancel (struct GNUNET_REVOCATION_Handle *h);
134 * @return #GNUNET_YES if the @a pow is acceptable, #GNUNET_NO if not 134 * @return #GNUNET_YES if the @a pow is acceptable, #GNUNET_NO if not
135 */ 135 */
136int 136int
137GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EccPublicSignKey *key, 137GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
138 uint64_t pow, 138 uint64_t pow,
139 unsigned int matching_bits); 139 unsigned int matching_bits);
140 140
@@ -146,8 +146,8 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EccPublicSignKey *key,
146 * @param sig where to write the revocation signature 146 * @param sig where to write the revocation signature
147 */ 147 */
148void 148void
149GNUNET_REVOCATION_sign_revocation (const struct GNUNET_CRYPTO_EccPrivateKey *key, 149GNUNET_REVOCATION_sign_revocation (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
150 struct GNUNET_CRYPTO_EccSignature *sig); 150 struct GNUNET_CRYPTO_EcdsaSignature *sig);
151 151
152 152
153#if 0 /* keep Emacsens' auto-indent happy */ 153#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 910662d3f..1f27347eb 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -48,7 +48,7 @@ extern "C"
48/** 48/**
49 * Size of each hostkey in the hostkey file (in BYTES). 49 * Size of each hostkey in the hostkey file (in BYTES).
50 */ 50 */
51#define GNUNET_TESTING_HOSTKEYFILESIZE sizeof (struct GNUNET_CRYPTO_EccPrivateKey) 51#define GNUNET_TESTING_HOSTKEYFILESIZE sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey)
52 52
53/** 53/**
54 * The environmental variable, if set, that dictates where testing should place 54 * The environmental variable, if set, that dictates where testing should place
@@ -185,7 +185,7 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system,
185 * key; if NULL, GNUNET_SYSERR is returned immediately 185 * key; if NULL, GNUNET_SYSERR is returned immediately
186 * @return NULL on error (not enough keys) 186 * @return NULL on error (not enough keys)
187 */ 187 */
188struct GNUNET_CRYPTO_EccPrivateKey * 188struct GNUNET_CRYPTO_EddsaPrivateKey *
189GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system, 189GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system,
190 uint32_t key_number, 190 uint32_t key_number,
191 struct GNUNET_PeerIdentity *id); 191 struct GNUNET_PeerIdentity *id);
diff --git a/src/mesh/gnunet-mesh.c b/src/mesh/gnunet-mesh.c
index 440dc272d..77bb7317f 100644
--- a/src/mesh/gnunet-mesh.c
+++ b/src/mesh/gnunet-mesh.c
@@ -138,7 +138,7 @@ show_tunnel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
138 struct GNUNET_PeerIdentity pid; 138 struct GNUNET_PeerIdentity pid;
139 139
140 if (GNUNET_OK != 140 if (GNUNET_OK !=
141 GNUNET_CRYPTO_ecc_public_sign_key_from_string (tunnel_id, 141 GNUNET_CRYPTO_eddsa_public_key_from_string (tunnel_id,
142 strlen (tunnel_id), 142 strlen (tunnel_id),
143 &pid.public_key)) 143 &pid.public_key))
144 { 144 {
diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c
index 55b189da1..0a3aeaf35 100644
--- a/src/mesh/gnunet-service-mesh-enc.c
+++ b/src/mesh/gnunet-service-mesh-enc.c
@@ -94,7 +94,7 @@ static struct GNUNET_PeerIdentity my_full_id;
94/** 94/**
95 * Own private key. 95 * Own private key.
96 */ 96 */
97static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 97static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
98 98
99 99
100/******************************************************************************/ 100/******************************************************************************/
@@ -156,7 +156,7 @@ static void
156run (void *cls, struct GNUNET_SERVER_Handle *server, 156run (void *cls, struct GNUNET_SERVER_Handle *server,
157 const struct GNUNET_CONFIGURATION_Handle *c) 157 const struct GNUNET_CONFIGURATION_Handle *c)
158{ 158{
159 struct GNUNET_CRYPTO_EccPrivateKey *pk; 159 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
160 160
161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "starting to run\n"); 161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "starting to run\n");
162 162
@@ -166,10 +166,10 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
166 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 166 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
167 NULL); 167 NULL);
168 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "reading key\n"); 168 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "reading key\n");
169 pk = GNUNET_CRYPTO_ecc_key_create_from_configuration (c); 169 pk = GNUNET_CRYPTO_eddsa_key_create_from_configuration (c);
170 GNUNET_assert (NULL != pk); 170 GNUNET_assert (NULL != pk);
171 my_private_key = pk; 171 my_private_key = pk;
172 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, 172 GNUNET_CRYPTO_eddsa_key_get_public (my_private_key,
173 &my_full_id.public_key); 173 &my_full_id.public_key);
174 myid = GNUNET_PEER_intern (&my_full_id); 174 myid = GNUNET_PEER_intern (&my_full_id);
175 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 175 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index afa64f1fd..b17412b02 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -717,7 +717,7 @@ static struct GNUNET_PeerIdentity my_full_id;
717/** 717/**
718 * Own private key. 718 * Own private key.
719 */ 719 */
720static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 720static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
721 721
722/** 722/**
723 * Tunnel ID for the next created tunnel (global tunnel number). 723 * Tunnel ID for the next created tunnel (global tunnel number).
@@ -5758,7 +5758,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
5758 const struct GNUNET_CONFIGURATION_Handle *c) 5758 const struct GNUNET_CONFIGURATION_Handle *c)
5759{ 5759{
5760 char *keyfile; 5760 char *keyfile;
5761 struct GNUNET_CRYPTO_EccPrivateKey *pk; 5761 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
5762 5762
5763 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "starting to run\n"); 5763 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "starting to run\n");
5764 server_handle = server; 5764 server_handle = server;
@@ -5897,11 +5897,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
5897 /* Scheduled the task to clean up when shutdown is called */ 5897 /* Scheduled the task to clean up when shutdown is called */
5898 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 5898 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
5899 NULL); 5899 NULL);
5900 pk = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 5900 pk = GNUNET_CRYPTO_eddsa_key_create_from_file (keyfile);
5901 GNUNET_free (keyfile); 5901 GNUNET_free (keyfile);
5902 GNUNET_assert (NULL != pk); 5902 GNUNET_assert (NULL != pk);
5903 my_private_key = pk; 5903 my_private_key = pk;
5904 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, 5904 GNUNET_CRYPTO_eddsa_key_get_public (my_private_key,
5905 &my_full_id.public_key); 5905 &my_full_id.public_key);
5906 myid = GNUNET_PEER_intern (&my_full_id); 5906 myid = GNUNET_PEER_intern (&my_full_id);
5907 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 5907 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/mesh/gnunet-service-mesh_dht.c b/src/mesh/gnunet-service-mesh_dht.c
index 3beb2da8a..00dfb9d46 100644
--- a/src/mesh/gnunet-service-mesh_dht.c
+++ b/src/mesh/gnunet-service-mesh_dht.c
@@ -94,7 +94,7 @@ static struct GNUNET_PeerIdentity *full_id;
94/** 94/**
95 * Own private key. 95 * Own private key.
96 */ 96 */
97static struct GNUNET_CRYPTO_EccPrivateKey *private_key; 97static struct GNUNET_CRYPTO_EddsaPrivateKey *private_key;
98 98
99 99
100/******************************************************************************/ 100/******************************************************************************/
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c
index 88a04eea6..b077d00b2 100644
--- a/src/mesh/gnunet-service-mesh_tunnel.c
+++ b/src/mesh/gnunet-service-mesh_tunnel.c
@@ -70,17 +70,17 @@ struct MeshTunnel3
70 /** 70 /**
71 * Local peer ephemeral private key 71 * Local peer ephemeral private key
72 */ 72 */
73 struct GNUNET_CRYPTO_EccPrivateKey *my_eph_key; 73 struct GNUNET_CRYPTO_EddsaPrivateKey *my_eph_key;
74 74
75 /** 75 /**
76 * Local peer ephemeral public key 76 * Local peer ephemeral public key
77 */ 77 */
78 struct GNUNET_CRYPTO_EccPublicSignKey *my_eph; 78 struct GNUNET_CRYPTO_EddsaPublicKey *my_eph;
79 79
80 /** 80 /**
81 * Remote peer's public key. 81 * Remote peer's public key.
82 */ 82 */
83 struct GNUNET_CRYPTO_EccPublicSignKey *peers_eph; 83 struct GNUNET_CRYPTO_EddsaPublicKey *peers_eph;
84 84
85 /** 85 /**
86 * Encryption ("our") key. 86 * Encryption ("our") key.
@@ -181,7 +181,7 @@ const static struct GNUNET_PeerIdentity *my_full_id;
181/** 181/**
182 * Own private key. 182 * Own private key.
183 */ 183 */
184const static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 184const static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
185 185
186 186
187/******************************************************************************/ 187/******************************************************************************/
@@ -548,7 +548,7 @@ GMT_send_queued_data (struct MeshTunnel3 *t, int fwd)
548void 548void
549GMT_init (const struct GNUNET_CONFIGURATION_Handle *c, 549GMT_init (const struct GNUNET_CONFIGURATION_Handle *c,
550 const struct GNUNET_PeerIdentity *id, 550 const struct GNUNET_PeerIdentity *id,
551 const struct GNUNET_CRYPTO_EccPrivateKey *key) 551 const struct GNUNET_CRYPTO_EddsaPrivateKey *key)
552{ 552{
553 if (GNUNET_OK != 553 if (GNUNET_OK !=
554 GNUNET_CONFIGURATION_get_value_number (c, "MESH", "DEFAULT_TTL", 554 GNUNET_CONFIGURATION_get_value_number (c, "MESH", "DEFAULT_TTL",
diff --git a/src/mesh/gnunet-service-mesh_tunnel.h b/src/mesh/gnunet-service-mesh_tunnel.h
index 18104a147..b80f7dff1 100644
--- a/src/mesh/gnunet-service-mesh_tunnel.h
+++ b/src/mesh/gnunet-service-mesh_tunnel.h
@@ -95,7 +95,7 @@ struct MeshTunnel3;
95void 95void
96GMT_init (const struct GNUNET_CONFIGURATION_Handle *c, 96GMT_init (const struct GNUNET_CONFIGURATION_Handle *c,
97 const struct GNUNET_PeerIdentity *id, 97 const struct GNUNET_PeerIdentity *id,
98 const struct GNUNET_CRYPTO_EccPrivateKey *key); 98 const struct GNUNET_CRYPTO_EddsaPrivateKey *key);
99 99
100/** 100/**
101 * Shut down the tunnel subsystem. 101 * Shut down the tunnel subsystem.
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 7455c0ba5..08f03a055 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -196,7 +196,7 @@ static struct GNUNET_NAMESTORE_Handle *ns;
196/** 196/**
197 * Private key for the fcfsd zone. 197 * Private key for the fcfsd zone.
198 */ 198 */
199static struct GNUNET_CRYPTO_EccPrivateKey fcfs_zone_pkey; 199static struct GNUNET_CRYPTO_EcdsaPrivateKey fcfs_zone_pkey;
200 200
201/** 201/**
202 * Connection to identity service. 202 * Connection to identity service.
@@ -242,7 +242,7 @@ run_httpd_now ()
242 242
243static void 243static void
244iterate_cb (void *cls, 244iterate_cb (void *cls,
245 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 245 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
246 const char *name, 246 const char *name,
247 unsigned int rd_len, 247 unsigned int rd_len,
248 const struct GNUNET_NAMESTORE_RecordData *rd) 248 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -504,14 +504,14 @@ put_continuation (void *cls,
504 */ 504 */
505static void 505static void
506zone_to_name_cb (void *cls, 506zone_to_name_cb (void *cls,
507 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 507 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
508 const char *name, 508 const char *name,
509 unsigned int rd_count, 509 unsigned int rd_count,
510 const struct GNUNET_NAMESTORE_RecordData *rd) 510 const struct GNUNET_NAMESTORE_RecordData *rd)
511{ 511{
512 struct Request *request = cls; 512 struct Request *request = cls;
513 struct GNUNET_NAMESTORE_RecordData r; 513 struct GNUNET_NAMESTORE_RecordData r;
514 struct GNUNET_CRYPTO_EccPublicSignKey pub; 514 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
515 515
516 request->qe = NULL; 516 request->qe = NULL;
517 if (NULL != name) 517 if (NULL != name)
@@ -523,7 +523,7 @@ zone_to_name_cb (void *cls,
523 run_httpd_now (); 523 run_httpd_now ();
524 return; 524 return;
525 } 525 }
526 GNUNET_CRYPTO_ecc_key_get_public_for_signature (zone_key, 526 GNUNET_CRYPTO_ecdsa_key_get_public (zone_key,
527 &pub); 527 &pub);
528 r.data = &pub; 528 r.data = &pub;
529 r.data_size = sizeof (pub); 529 r.data_size = sizeof (pub);
@@ -554,7 +554,7 @@ lookup_result_processor (void *cls,
554 const struct GNUNET_NAMESTORE_RecordData *rd) 554 const struct GNUNET_NAMESTORE_RecordData *rd)
555{ 555{
556 struct Request *request = cls; 556 struct Request *request = cls;
557 struct GNUNET_CRYPTO_EccPublicSignKey pub; 557 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
558 558
559 if (0 != rd_count) 559 if (0 != rd_count)
560 { 560 {
@@ -567,7 +567,7 @@ lookup_result_processor (void *cls,
567 return; 567 return;
568 } 568 }
569 if (GNUNET_OK != 569 if (GNUNET_OK !=
570 GNUNET_CRYPTO_ecc_public_sign_key_from_string (request->public_key, 570 GNUNET_CRYPTO_ecdsa_public_key_from_string (request->public_key,
571 strlen (request->public_key), 571 strlen (request->public_key),
572 &pub)) 572 &pub))
573 { 573 {
@@ -596,7 +596,7 @@ lookup_block_processor (void *cls,
596 const struct GNUNET_NAMESTORE_Block *block) 596 const struct GNUNET_NAMESTORE_Block *block)
597{ 597{
598 struct Request *request = cls; 598 struct Request *request = cls;
599 struct GNUNET_CRYPTO_EccPublicSignKey pub; 599 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
600 600
601 request->qe = NULL; 601 request->qe = NULL;
602 if (NULL == block) 602 if (NULL == block)
@@ -604,7 +604,7 @@ lookup_block_processor (void *cls,
604 lookup_result_processor (request, 0, NULL); 604 lookup_result_processor (request, 0, NULL);
605 return; 605 return;
606 } 606 }
607 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&fcfs_zone_pkey, 607 GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey,
608 &pub); 608 &pub);
609 if (GNUNET_OK != 609 if (GNUNET_OK !=
610 GNUNET_NAMESTORE_block_decrypt (block, 610 GNUNET_NAMESTORE_block_decrypt (block,
@@ -657,7 +657,7 @@ create_response (void *cls,
657 struct MHD_Response *response; 657 struct MHD_Response *response;
658 struct Request *request; 658 struct Request *request;
659 int ret; 659 int ret;
660 struct GNUNET_CRYPTO_EccPublicSignKey pub; 660 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
661 struct GNUNET_HashCode query; 661 struct GNUNET_HashCode query;
662 662
663 if ( (0 == strcmp (method, MHD_HTTP_METHOD_GET)) || 663 if ( (0 == strcmp (method, MHD_HTTP_METHOD_GET)) ||
@@ -707,7 +707,7 @@ create_response (void *cls,
707 request->pp = NULL; 707 request->pp = NULL;
708 } 708 }
709 if (GNUNET_OK != 709 if (GNUNET_OK !=
710 GNUNET_CRYPTO_ecc_public_sign_key_from_string (request->public_key, 710 GNUNET_CRYPTO_ecdsa_public_key_from_string (request->public_key,
711 strlen (request->public_key), 711 strlen (request->public_key),
712 &pub)) 712 &pub))
713 { 713 {
@@ -735,7 +735,7 @@ create_response (void *cls,
735 request, connection); 735 request, connection);
736 } 736 }
737 request->phase = RP_LOOKUP; 737 request->phase = RP_LOOKUP;
738 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&fcfs_zone_pkey, 738 GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey,
739 &pub); 739 &pub);
740 GNUNET_NAMESTORE_query_from_public_key (&pub, 740 GNUNET_NAMESTORE_query_from_public_key (&pub,
741 request->domain_name, 741 request->domain_name,
@@ -1030,7 +1030,7 @@ main (int argc, char *const *argv)
1030 options, 1030 options,
1031 &run, NULL)) ? 0 : 1; 1031 &run, NULL)) ? 0 : 1;
1032 GNUNET_free ((void*) argv); 1032 GNUNET_free ((void*) argv);
1033 GNUNET_CRYPTO_ecc_key_clear (&fcfs_zone_pkey); 1033 GNUNET_CRYPTO_ecdsa_key_clear (&fcfs_zone_pkey);
1034 return ret; 1034 return ret;
1035} 1035}
1036 1036
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 2ff640604..322030e65 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -41,7 +41,7 @@ static struct GNUNET_NAMESTORE_Handle *ns;
41/** 41/**
42 * Private key for the our zone. 42 * Private key for the our zone.
43 */ 43 */
44static struct GNUNET_CRYPTO_EccPrivateKey zone_pkey; 44static struct GNUNET_CRYPTO_EcdsaPrivateKey zone_pkey;
45 45
46/** 46/**
47 * Handle to identity lookup. 47 * Handle to identity lookup.
@@ -334,7 +334,7 @@ del_continuation (void *cls,
334 */ 334 */
335static void 335static void
336display_record (void *cls, 336display_record (void *cls,
337 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 337 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
338 const char *name, 338 const char *name,
339 unsigned int rd_len, 339 unsigned int rd_len,
340 const struct GNUNET_NAMESTORE_RecordData *rd) 340 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -413,7 +413,7 @@ sync_cb (void *cls)
413 */ 413 */
414static void 414static void
415get_existing_record (void *cls, 415get_existing_record (void *cls,
416 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 416 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
417 const char *rec_name, 417 const char *rec_name,
418 unsigned int rd_count, 418 unsigned int rd_count,
419 const struct GNUNET_NAMESTORE_RecordData *rd) 419 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -524,10 +524,10 @@ static void
524handle_block (void *cls, 524handle_block (void *cls,
525 const struct GNUNET_NAMESTORE_Block *block) 525 const struct GNUNET_NAMESTORE_Block *block)
526{ 526{
527 struct GNUNET_CRYPTO_EccPublicSignKey zone_pubkey; 527 struct GNUNET_CRYPTO_EcdsaPublicKey zone_pubkey;
528 528
529 list_qe = NULL; 529 list_qe = NULL;
530 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&zone_pkey, 530 GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey,
531 &zone_pubkey); 531 &zone_pubkey);
532 if (NULL == block) 532 if (NULL == block)
533 { 533 {
@@ -560,7 +560,7 @@ handle_block (void *cls,
560 */ 560 */
561static void 561static void
562handle_reverse_lookup (void *cls, 562handle_reverse_lookup (void *cls,
563 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 563 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
564 const char *label, 564 const char *label,
565 unsigned int rd_count, 565 unsigned int rd_count,
566 const struct GNUNET_NAMESTORE_RecordData *rd) 566 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -591,7 +591,7 @@ testservice_task (void *cls,
591 int result) 591 int result)
592{ 592{
593 const struct GNUNET_CONFIGURATION_Handle *cfg = cls; 593 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
594 struct GNUNET_CRYPTO_EccPublicSignKey pub; 594 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
595 struct GNUNET_NAMESTORE_RecordData rd; 595 struct GNUNET_NAMESTORE_RecordData rd;
596 596
597 if (GNUNET_YES != result) 597 if (GNUNET_YES != result)
@@ -608,7 +608,7 @@ testservice_task (void *cls,
608 GNUNET_SCHEDULER_shutdown (); 608 GNUNET_SCHEDULER_shutdown ();
609 return; 609 return;
610 } 610 }
611 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&zone_pkey, 611 GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey,
612 &pub); 612 &pub);
613 613
614 ns = GNUNET_NAMESTORE_connect (cfg); 614 ns = GNUNET_NAMESTORE_connect (cfg);
@@ -738,9 +738,9 @@ testservice_task (void *cls,
738 else 738 else
739 { 739 {
740 struct GNUNET_HashCode query; 740 struct GNUNET_HashCode query;
741 struct GNUNET_CRYPTO_EccPublicSignKey zone_pubkey; 741 struct GNUNET_CRYPTO_EcdsaPublicKey zone_pubkey;
742 742
743 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&zone_pkey, 743 GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey,
744 &zone_pubkey); 744 &zone_pubkey);
745 GNUNET_NAMESTORE_query_from_public_key (&zone_pubkey, 745 GNUNET_NAMESTORE_query_from_public_key (&zone_pubkey,
746 name, 746 name,
@@ -753,10 +753,10 @@ testservice_task (void *cls,
753 } 753 }
754 if (NULL != reverse_pkey) 754 if (NULL != reverse_pkey)
755 { 755 {
756 struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 756 struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
757 757
758 if (GNUNET_OK != 758 if (GNUNET_OK !=
759 GNUNET_CRYPTO_ecc_public_sign_key_from_string (reverse_pkey, 759 GNUNET_CRYPTO_ecdsa_public_key_from_string (reverse_pkey,
760 strlen (reverse_pkey), 760 strlen (reverse_pkey),
761 &pubkey)) 761 &pubkey))
762 { 762 {
@@ -775,14 +775,14 @@ testservice_task (void *cls,
775 { 775 {
776 char sh[105]; 776 char sh[105];
777 char sname[64]; 777 char sname[64];
778 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 778 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
779 779
780 if ( (2 != (sscanf (uri, 780 if ( (2 != (sscanf (uri,
781 "gnunet://gns/%104s/%63s", 781 "gnunet://gns/%104s/%63s",
782 sh, 782 sh,
783 sname)) ) || 783 sname)) ) ||
784 (GNUNET_OK != 784 (GNUNET_OK !=
785 GNUNET_CRYPTO_ecc_public_sign_key_from_string (sh, strlen (sh), &pkey)) ) 785 GNUNET_CRYPTO_ecdsa_public_key_from_string (sh, strlen (sh), &pkey)) )
786 { 786 {
787 fprintf (stderr, 787 fprintf (stderr,
788 _("Invalid URI `%s'\n"), 788 _("Invalid URI `%s'\n"),
@@ -793,7 +793,7 @@ testservice_task (void *cls,
793 } 793 }
794 memset (&rd, 0, sizeof (rd)); 794 memset (&rd, 0, sizeof (rd));
795 rd.data = &pkey; 795 rd.data = &pkey;
796 rd.data_size = sizeof (struct GNUNET_CRYPTO_EccPublicSignKey); 796 rd.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
797 rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; 797 rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
798 if (GNUNET_YES == etime_is_rel) 798 if (GNUNET_YES == etime_is_rel)
799 { 799 {
@@ -952,11 +952,11 @@ main (int argc, char *const *argv)
952 &run, NULL)) 952 &run, NULL))
953 { 953 {
954 GNUNET_free ((void*) argv); 954 GNUNET_free ((void*) argv);
955 GNUNET_CRYPTO_ecc_key_clear (&zone_pkey); 955 GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
956 return 1; 956 return 1;
957 } 957 }
958 GNUNET_free ((void*) argv); 958 GNUNET_free ((void*) argv);
959 GNUNET_CRYPTO_ecc_key_clear (&zone_pkey); 959 GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
960 return ret; 960 return ret;
961} 961}
962 962
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 49315f6e0..2cce92635 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -64,7 +64,7 @@ struct ZoneIteration
64 /** 64 /**
65 * Key of the zone we are iterating over. 65 * Key of the zone we are iterating over.
66 */ 66 */
67 struct GNUNET_CRYPTO_EccPrivateKey zone; 67 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
68 68
69 /** 69 /**
70 * The operation id fot the zone iteration in the response for the client 70 * The operation id fot the zone iteration in the response for the client
@@ -140,7 +140,7 @@ struct ZoneMonitor
140 /** 140 /**
141 * Private key of the zone. 141 * Private key of the zone.
142 */ 142 */
143 struct GNUNET_CRYPTO_EccPrivateKey zone; 143 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
144 144
145 /** 145 /**
146 * The operation id fot the zone iteration in the response for the client 146 * The operation id fot the zone iteration in the response for the client
@@ -512,7 +512,7 @@ static void
512send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc, 512send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc,
513 struct GNUNET_SERVER_Client *client, 513 struct GNUNET_SERVER_Client *client,
514 uint32_t request_id, 514 uint32_t request_id,
515 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 515 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
516 const char *name, 516 const char *name,
517 unsigned int rd_count, 517 unsigned int rd_count,
518 const struct GNUNET_NAMESTORE_RecordData *rd) 518 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -563,7 +563,7 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc,
563 * @param rd records stored under the given @a name 563 * @param rd records stored under the given @a name
564 */ 564 */
565static void 565static void
566refresh_block (const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 566refresh_block (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
567 const char *name, 567 const char *name,
568 unsigned int rd_count, 568 unsigned int rd_count,
569 const struct GNUNET_NAMESTORE_RecordData *rd) 569 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -617,7 +617,7 @@ handle_record_store (void *cls,
617 const char *rd_ser; 617 const char *rd_ser;
618 unsigned int rd_count; 618 unsigned int rd_count;
619 int res; 619 int res;
620 struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 620 struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
621 struct ZoneMonitor *zm; 621 struct ZoneMonitor *zm;
622 622
623 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 623 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -670,7 +670,7 @@ handle_record_store (void *cls,
670 } 670 }
671 671
672 /* Extracting and converting private key */ 672 /* Extracting and converting private key */
673 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&rp_msg->private_key, 673 GNUNET_CRYPTO_ecdsa_key_get_public (&rp_msg->private_key,
674 &pubkey); 674 &pubkey);
675 conv_name = GNUNET_NAMESTORE_normalize_string (name_tmp); 675 conv_name = GNUNET_NAMESTORE_normalize_string (name_tmp);
676 if (NULL == conv_name) 676 if (NULL == conv_name)
@@ -711,7 +711,7 @@ handle_record_store (void *cls,
711 711
712 for (zm = monitor_head; NULL != zm; zm = zm->next) 712 for (zm = monitor_head; NULL != zm; zm = zm->next)
713 if (0 == memcmp (&rp_msg->private_key, &zm->zone, 713 if (0 == memcmp (&rp_msg->private_key, &zm->zone,
714 sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 714 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
715 send_lookup_response (monitor_nc, 715 send_lookup_response (monitor_nc,
716 zm->nc->client, 716 zm->nc->client,
717 zm->request_id, 717 zm->request_id,
@@ -774,7 +774,7 @@ struct ZoneToNameCtx
774 */ 774 */
775static void 775static void
776handle_zone_to_name_it (void *cls, 776handle_zone_to_name_it (void *cls,
777 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 777 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
778 const char *name, 778 const char *name,
779 unsigned int rd_count, 779 unsigned int rd_count,
780 const struct GNUNET_NAMESTORE_RecordData *rd) 780 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -936,7 +936,7 @@ struct ZoneIterationProcResult
936 */ 936 */
937static void 937static void
938zone_iteraterate_proc (void *cls, 938zone_iteraterate_proc (void *cls,
939 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 939 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
940 const char *name, 940 const char *name,
941 unsigned int rd_count, 941 unsigned int rd_count,
942 const struct GNUNET_NAMESTORE_RecordData *rd) 942 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -992,7 +992,7 @@ zone_iteraterate_proc (void *cls,
992static void 992static void
993run_zone_iteration_round (struct ZoneIteration *zi) 993run_zone_iteration_round (struct ZoneIteration *zi)
994{ 994{
995 static struct GNUNET_CRYPTO_EccPrivateKey zero; 995 static struct GNUNET_CRYPTO_EcdsaPrivateKey zero;
996 struct ZoneIterationProcResult proc; 996 struct ZoneIterationProcResult proc;
997 struct RecordResultMessage rrm; 997 struct RecordResultMessage rrm;
998 int ret; 998 int ret;
@@ -1198,7 +1198,7 @@ monitor_next (void *cls,
1198 */ 1198 */
1199static void 1199static void
1200monitor_iterate_cb (void *cls, 1200monitor_iterate_cb (void *cls,
1201 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 1201 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
1202 const char *name, 1202 const char *name,
1203 unsigned int rd_count, 1203 unsigned int rd_count,
1204 const struct GNUNET_NAMESTORE_RecordData *rd) 1204 const struct GNUNET_NAMESTORE_RecordData *rd)
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h
index a8851e104..4350dbab4 100644
--- a/src/namestore/namestore.h
+++ b/src/namestore/namestore.h
@@ -88,12 +88,12 @@ struct LookupBlockResponseMessage
88 /** 88 /**
89 * Signature. 89 * Signature.
90 */ 90 */
91 struct GNUNET_CRYPTO_EccSignature signature; 91 struct GNUNET_CRYPTO_EcdsaSignature signature;
92 92
93 /** 93 /**
94 * Derived public key. 94 * Derived public key.
95 */ 95 */
96 struct GNUNET_CRYPTO_EccPublicSignKey derived_key; 96 struct GNUNET_CRYPTO_EcdsaPublicKey derived_key;
97 97
98 /* follwed by encrypted block data */ 98 /* follwed by encrypted block data */
99}; 99};
@@ -117,12 +117,12 @@ struct BlockCacheMessage
117 /** 117 /**
118 * Signature. 118 * Signature.
119 */ 119 */
120 struct GNUNET_CRYPTO_EccSignature signature; 120 struct GNUNET_CRYPTO_EcdsaSignature signature;
121 121
122 /** 122 /**
123 * Derived public key. 123 * Derived public key.
124 */ 124 */
125 struct GNUNET_CRYPTO_EccPublicSignKey derived_key; 125 struct GNUNET_CRYPTO_EcdsaPublicKey derived_key;
126 126
127 /* follwed by encrypted block data */ 127 /* follwed by encrypted block data */
128}; 128};
@@ -183,7 +183,7 @@ struct RecordStoreMessage
183 /** 183 /**
184 * The private key of the authority. 184 * The private key of the authority.
185 */ 185 */
186 struct GNUNET_CRYPTO_EccPrivateKey private_key; 186 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
187 187
188 /* followed by: 188 /* followed by:
189 * name with length name_len 189 * name with length name_len
@@ -223,12 +223,12 @@ struct ZoneToNameMessage
223 /** 223 /**
224 * The private key of the zone to look up in 224 * The private key of the zone to look up in
225 */ 225 */
226 struct GNUNET_CRYPTO_EccPrivateKey zone; 226 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
227 227
228 /** 228 /**
229 * The public key of the target zone 229 * The public key of the target zone
230 */ 230 */
231 struct GNUNET_CRYPTO_EccPublicSignKey value_zone; 231 struct GNUNET_CRYPTO_EcdsaPublicKey value_zone;
232}; 232};
233 233
234 234
@@ -266,7 +266,7 @@ struct ZoneToNameResponseMessage
266 /** 266 /**
267 * The private key of the zone that contained the name. 267 * The private key of the zone that contained the name.
268 */ 268 */
269 struct GNUNET_CRYPTO_EccPrivateKey zone; 269 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
270 270
271 /* followed by: 271 /* followed by:
272 * name with length name_len 272 * name with length name_len
@@ -309,7 +309,7 @@ struct RecordResultMessage
309 /** 309 /**
310 * The private key of the authority. 310 * The private key of the authority.
311 */ 311 */
312 struct GNUNET_CRYPTO_EccPrivateKey private_key; 312 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
313 313
314 /* followed by: 314 /* followed by:
315 * name with length name_len 315 * name with length name_len
@@ -331,7 +331,7 @@ struct ZoneMonitorStartMessage
331 /** 331 /**
332 * Zone key. 332 * Zone key.
333 */ 333 */
334 struct GNUNET_CRYPTO_EccPrivateKey zone; 334 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
335 335
336}; 336};
337 337
@@ -349,7 +349,7 @@ struct ZoneIterationStartMessage
349 /** 349 /**
350 * Zone key. All zeros for "all zones". 350 * Zone key. All zeros for "all zones".
351 */ 351 */
352 struct GNUNET_CRYPTO_EccPrivateKey zone; 352 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
353 353
354}; 354};
355 355
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 3df6f8210..c4282ec71 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -134,7 +134,7 @@ struct GNUNET_NAMESTORE_ZoneIterator
134 /** 134 /**
135 * Private key of the zone. 135 * Private key of the zone.
136 */ 136 */
137 struct GNUNET_CRYPTO_EccPrivateKey zone; 137 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
138 138
139 /** 139 /**
140 * The operation id this zone iteration operation has 140 * The operation id this zone iteration operation has
@@ -592,7 +592,7 @@ handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze,
592 const struct RecordResultMessage *msg, 592 const struct RecordResultMessage *msg,
593 size_t size) 593 size_t size)
594{ 594{
595 static struct GNUNET_CRYPTO_EccPrivateKey priv_dummy; 595 static struct GNUNET_CRYPTO_EcdsaPrivateKey priv_dummy;
596 size_t msg_len; 596 size_t msg_len;
597 size_t exp_msg_len; 597 size_t exp_msg_len;
598 size_t name_len; 598 size_t name_len;
@@ -1082,7 +1082,7 @@ GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h,
1082 */ 1082 */
1083struct GNUNET_NAMESTORE_QueueEntry * 1083struct GNUNET_NAMESTORE_QueueEntry *
1084GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, 1084GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h,
1085 const struct GNUNET_CRYPTO_EccPrivateKey *pkey, 1085 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
1086 const char *label, 1086 const char *label,
1087 unsigned int rd_count, 1087 unsigned int rd_count,
1088 const struct GNUNET_NAMESTORE_RecordData *rd, 1088 const struct GNUNET_NAMESTORE_RecordData *rd,
@@ -1212,8 +1212,8 @@ GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h,
1212 */ 1212 */
1213struct GNUNET_NAMESTORE_QueueEntry * 1213struct GNUNET_NAMESTORE_QueueEntry *
1214GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h, 1214GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h,
1215 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 1215 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
1216 const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, 1216 const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone,
1217 GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls) 1217 GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls)
1218{ 1218{
1219 struct GNUNET_NAMESTORE_QueueEntry *qe; 1219 struct GNUNET_NAMESTORE_QueueEntry *qe;
@@ -1268,7 +1268,7 @@ GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h,
1268 */ 1268 */
1269struct GNUNET_NAMESTORE_ZoneIterator * 1269struct GNUNET_NAMESTORE_ZoneIterator *
1270GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h, 1270GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
1271 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 1271 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
1272 GNUNET_NAMESTORE_RecordMonitor proc, 1272 GNUNET_NAMESTORE_RecordMonitor proc,
1273 void *proc_cls) 1273 void *proc_cls)
1274{ 1274{
diff --git a/src/namestore/namestore_api_common.c b/src/namestore/namestore_api_common.c
index 8cf75330c..81662a861 100644
--- a/src/namestore/namestore_api_common.c
+++ b/src/namestore/namestore_api_common.c
@@ -98,13 +98,13 @@ GNUNET_NAMESTORE_normalize_string (const char *src)
98 * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s 98 * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s
99 */ 99 */
100const char * 100const char *
101GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EccPublicSignKey *z) 101GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z)
102{ 102{
103 static char buf[sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) * 8]; 103 static char buf[sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) * 8];
104 char *end; 104 char *end;
105 105
106 end = GNUNET_STRINGS_data_to_string ((const unsigned char *) z, 106 end = GNUNET_STRINGS_data_to_string ((const unsigned char *) z,
107 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 107 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
108 buf, sizeof (buf)); 108 buf, sizeof (buf));
109 if (NULL == end) 109 if (NULL == end)
110 { 110 {
@@ -342,18 +342,18 @@ static void
342derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, 342derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv,
343 struct GNUNET_CRYPTO_SymmetricSessionKey *skey, 343 struct GNUNET_CRYPTO_SymmetricSessionKey *skey,
344 const char *label, 344 const char *label,
345 const struct GNUNET_CRYPTO_EccPublicSignKey *pub) 345 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
346{ 346{
347 static const char ctx_key[] = "gns-aes-ctx-key"; 347 static const char ctx_key[] = "gns-aes-ctx-key";
348 static const char ctx_iv[] = "gns-aes-ctx-iv"; 348 static const char ctx_iv[] = "gns-aes-ctx-iv";
349 349
350 GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey), 350 GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey),
351 pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 351 pub, sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
352 label, strlen (label), 352 label, strlen (label),
353 ctx_key, strlen (ctx_key), 353 ctx_key, strlen (ctx_key),
354 NULL, 0); 354 NULL, 0);
355 GNUNET_CRYPTO_kdf (iv, sizeof (struct GNUNET_CRYPTO_SymmetricInitializationVector), 355 GNUNET_CRYPTO_kdf (iv, sizeof (struct GNUNET_CRYPTO_SymmetricInitializationVector),
356 pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 356 pub, sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
357 label, strlen (label), 357 label, strlen (label),
358 ctx_iv, strlen (ctx_iv), 358 ctx_iv, strlen (ctx_iv),
359 NULL, 0); 359 NULL, 0);
@@ -371,7 +371,7 @@ derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv,
371 * @return NULL on error (block too large) 371 * @return NULL on error (block too large)
372 */ 372 */
373struct GNUNET_NAMESTORE_Block * 373struct GNUNET_NAMESTORE_Block *
374GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, 374GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
375 struct GNUNET_TIME_Absolute expire, 375 struct GNUNET_TIME_Absolute expire,
376 const char *label, 376 const char *label,
377 const struct GNUNET_NAMESTORE_RecordData *rd, 377 const struct GNUNET_NAMESTORE_RecordData *rd,
@@ -380,8 +380,8 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key,
380 size_t payload_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); 380 size_t payload_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd);
381 char payload[sizeof (uint32_t) + payload_len]; 381 char payload[sizeof (uint32_t) + payload_len];
382 struct GNUNET_NAMESTORE_Block *block; 382 struct GNUNET_NAMESTORE_Block *block;
383 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 383 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
384 struct GNUNET_CRYPTO_EccPrivateKey *dkey; 384 struct GNUNET_CRYPTO_EcdsaPrivateKey *dkey;
385 struct GNUNET_CRYPTO_SymmetricInitializationVector iv; 385 struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
386 struct GNUNET_CRYPTO_SymmetricSessionKey skey; 386 struct GNUNET_CRYPTO_SymmetricSessionKey skey;
387 uint32_t rd_count_nbo; 387 uint32_t rd_count_nbo;
@@ -400,12 +400,12 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key,
400 sizeof (struct GNUNET_TIME_AbsoluteNBO)); 400 sizeof (struct GNUNET_TIME_AbsoluteNBO));
401 block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); 401 block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN);
402 block->expiration_time = GNUNET_TIME_absolute_hton (expire); 402 block->expiration_time = GNUNET_TIME_absolute_hton (expire);
403 dkey = GNUNET_CRYPTO_ecc_key_derive (key, 403 dkey = GNUNET_CRYPTO_ecdsa_private_key_derive (key,
404 label, 404 label,
405 "gns"); 405 "gns");
406 GNUNET_CRYPTO_ecc_key_get_public_for_signature (dkey, 406 GNUNET_CRYPTO_ecdsa_key_get_public (dkey,
407 &block->derived_key); 407 &block->derived_key);
408 GNUNET_CRYPTO_ecc_key_get_public_for_signature (key, 408 GNUNET_CRYPTO_ecdsa_key_get_public (key,
409 &pkey); 409 &pkey);
410 derive_block_aes_key (&iv, &skey, label, &pkey); 410 derive_block_aes_key (&iv, &skey, label, &pkey);
411 GNUNET_break (payload_len + sizeof (uint32_t) == 411 GNUNET_break (payload_len + sizeof (uint32_t) ==
@@ -413,7 +413,7 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key,
413 &skey, &iv, 413 &skey, &iv,
414 &block[1])); 414 &block[1]));
415 if (GNUNET_OK != 415 if (GNUNET_OK !=
416 GNUNET_CRYPTO_ecc_sign (dkey, 416 GNUNET_CRYPTO_ecdsa_sign (dkey,
417 &block->purpose, 417 &block->purpose,
418 &block->signature)) 418 &block->signature))
419 { 419 {
@@ -437,7 +437,7 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key,
437int 437int
438GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block) 438GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block)
439{ 439{
440 return GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN, 440 return GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN,
441 &block->purpose, 441 &block->purpose,
442 &block->signature, 442 &block->signature,
443 &block->derived_key); 443 &block->derived_key);
@@ -457,7 +457,7 @@ GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block)
457 */ 457 */
458int 458int
459GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, 459GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block,
460 const struct GNUNET_CRYPTO_EccPublicSignKey *zone_key, 460 const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key,
461 const char *label, 461 const char *label,
462 GNUNET_NAMESTORE_RecordCallback proc, 462 GNUNET_NAMESTORE_RecordCallback proc,
463 void *proc_cls) 463 void *proc_cls)
@@ -653,9 +653,9 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type,
653 return NULL; 653 return NULL;
654 return GNUNET_strdup (tmp); 654 return GNUNET_strdup (tmp);
655 case GNUNET_NAMESTORE_TYPE_PKEY: 655 case GNUNET_NAMESTORE_TYPE_PKEY:
656 if (data_size != sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)) 656 if (data_size != sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))
657 return NULL; 657 return NULL;
658 return GNUNET_CRYPTO_ecc_public_sign_key_to_string (data); 658 return GNUNET_CRYPTO_ecdsa_public_key_to_string (data);
659 case GNUNET_NAMESTORE_TYPE_PHONE: 659 case GNUNET_NAMESTORE_TYPE_PHONE:
660 { 660 {
661 const struct GNUNET_CONVERSATION_PhoneRecord *pr; 661 const struct GNUNET_CONVERSATION_PhoneRecord *pr;
@@ -667,7 +667,7 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type,
667 pr = data; 667 pr = data;
668 if (0 != ntohl (pr->version)) 668 if (0 != ntohl (pr->version))
669 return NULL; 669 return NULL;
670 pkey = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pr->peer.public_key); 670 pkey = GNUNET_CRYPTO_eddsa_public_key_to_string (&pr->peer.public_key);
671 GNUNET_asprintf (&ret, 671 GNUNET_asprintf (&ret,
672 "%u-%s", 672 "%u-%s",
673 ntohl (pr->line), 673 ntohl (pr->line),
@@ -792,7 +792,7 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
792{ 792{
793 struct in_addr value_a; 793 struct in_addr value_a;
794 struct in6_addr value_aaaa; 794 struct in6_addr value_aaaa;
795 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 795 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
796 struct GNUNET_TUN_GnsVpnRecord *vpn; 796 struct GNUNET_TUN_GnsVpnRecord *vpn;
797 struct GNUNET_TUN_DnsTlsaRecord *tlsa; 797 struct GNUNET_TUN_DnsTlsaRecord *tlsa;
798 char s_peer[103 + 1]; 798 char s_peer[103 + 1];
@@ -987,16 +987,16 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
987 return GNUNET_OK; 987 return GNUNET_OK;
988 case GNUNET_NAMESTORE_TYPE_PKEY: 988 case GNUNET_NAMESTORE_TYPE_PKEY:
989 if (GNUNET_OK != 989 if (GNUNET_OK !=
990 GNUNET_CRYPTO_ecc_public_sign_key_from_string (s, strlen (s), &pkey)) 990 GNUNET_CRYPTO_ecdsa_public_key_from_string (s, strlen (s), &pkey))
991 { 991 {
992 LOG (GNUNET_ERROR_TYPE_ERROR, 992 LOG (GNUNET_ERROR_TYPE_ERROR,
993 _("Unable to parse PKEY record `%s'\n"), 993 _("Unable to parse PKEY record `%s'\n"),
994 s); 994 s);
995 return GNUNET_SYSERR; 995 return GNUNET_SYSERR;
996 } 996 }
997 *data = GNUNET_new (struct GNUNET_CRYPTO_EccPublicSignKey); 997 *data = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey);
998 memcpy (*data, &pkey, sizeof (pkey)); 998 memcpy (*data, &pkey, sizeof (pkey));
999 *data_size = sizeof (struct GNUNET_CRYPTO_EccPublicSignKey); 999 *data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
1000 return GNUNET_OK; 1000 return GNUNET_OK;
1001 case GNUNET_NAMESTORE_TYPE_PHONE: 1001 case GNUNET_NAMESTORE_TYPE_PHONE:
1002 { 1002 {
@@ -1008,7 +1008,7 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
1008 if ( (NULL == (dash = strchr (s, '-'))) || 1008 if ( (NULL == (dash = strchr (s, '-'))) ||
1009 (1 != sscanf (s, "%u-", &line)) || 1009 (1 != sscanf (s, "%u-", &line)) ||
1010 (GNUNET_OK != 1010 (GNUNET_OK !=
1011 GNUNET_CRYPTO_ecc_public_sign_key_from_string (dash + 1, 1011 GNUNET_CRYPTO_eddsa_public_key_from_string (dash + 1,
1012 strlen (dash + 1), 1012 strlen (dash + 1),
1013 &peer.public_key)) ) 1013 &peer.public_key)) )
1014 { 1014 {
@@ -1044,7 +1044,7 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
1044 } 1044 }
1045 *data_size = sizeof (struct GNUNET_TUN_GnsVpnRecord) + strlen (s_serv) + 1; 1045 *data_size = sizeof (struct GNUNET_TUN_GnsVpnRecord) + strlen (s_serv) + 1;
1046 *data = vpn = GNUNET_malloc (*data_size); 1046 *data = vpn = GNUNET_malloc (*data_size);
1047 if (GNUNET_OK != GNUNET_CRYPTO_ecc_public_sign_key_from_string ((char*) s_peer, 1047 if (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string ((char*) s_peer,
1048 strlen (s_peer), 1048 strlen (s_peer),
1049 &vpn->peer.public_key)) 1049 &vpn->peer.public_key))
1050 { 1050 {
@@ -1194,13 +1194,13 @@ GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd)
1194 * @param query hash to use for the query 1194 * @param query hash to use for the query
1195 */ 1195 */
1196void 1196void
1197GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EccPrivateKey *zone, 1197GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
1198 const char *label, 1198 const char *label,
1199 struct GNUNET_HashCode *query) 1199 struct GNUNET_HashCode *query)
1200{ 1200{
1201 struct GNUNET_CRYPTO_EccPublicSignKey pub; 1201 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
1202 1202
1203 GNUNET_CRYPTO_ecc_key_get_public_for_signature (zone, &pub); 1203 GNUNET_CRYPTO_ecdsa_key_get_public (zone, &pub);
1204 GNUNET_NAMESTORE_query_from_public_key (&pub, label, query); 1204 GNUNET_NAMESTORE_query_from_public_key (&pub, label, query);
1205} 1205}
1206 1206
@@ -1213,13 +1213,13 @@ GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EccPrivateKe
1213 * @param query hash to use for the query 1213 * @param query hash to use for the query
1214 */ 1214 */
1215void 1215void
1216GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pub, 1216GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub,
1217 const char *label, 1217 const char *label,
1218 struct GNUNET_HashCode *query) 1218 struct GNUNET_HashCode *query)
1219{ 1219{
1220 struct GNUNET_CRYPTO_EccPublicSignKey pd; 1220 struct GNUNET_CRYPTO_EcdsaPublicKey pd;
1221 1221
1222 GNUNET_CRYPTO_ecc_public_key_derive (pub, label, "gns", &pd); 1222 GNUNET_CRYPTO_ecdsa_public_key_derive (pub, label, "gns", &pd);
1223 GNUNET_CRYPTO_hash (&pd, sizeof (pd), query); 1223 GNUNET_CRYPTO_hash (&pd, sizeof (pd), query);
1224} 1224}
1225 1225
@@ -1235,12 +1235,12 @@ GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicSign
1235 * key in an encoding suitable for DNS labels. 1235 * key in an encoding suitable for DNS labels.
1236 */ 1236 */
1237const char * 1237const char *
1238GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey) 1238GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey)
1239{ 1239{
1240 static char ret[128]; 1240 static char ret[128];
1241 char *pkeys; 1241 char *pkeys;
1242 1242
1243 pkeys = GNUNET_CRYPTO_ecc_public_sign_key_to_string (pkey); 1243 pkeys = GNUNET_CRYPTO_ecdsa_public_key_to_string (pkey);
1244 GNUNET_snprintf (ret, 1244 GNUNET_snprintf (ret,
1245 sizeof (ret), 1245 sizeof (ret),
1246 "%s.zkey", 1246 "%s.zkey",
@@ -1261,7 +1261,7 @@ GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey
1261 */ 1261 */
1262int 1262int
1263GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, 1263GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey,
1264 struct GNUNET_CRYPTO_EccPublicSignKey *pkey) 1264 struct GNUNET_CRYPTO_EcdsaPublicKey *pkey)
1265{ 1265{
1266 char *cpy; 1266 char *cpy;
1267 char *dot; 1267 char *dot;
@@ -1277,7 +1277,7 @@ GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey,
1277 goto error; 1277 goto error;
1278 1278
1279 if (GNUNET_OK != 1279 if (GNUNET_OK !=
1280 GNUNET_CRYPTO_ecc_public_sign_key_from_string (x, 1280 GNUNET_CRYPTO_ecdsa_public_key_from_string (x,
1281 strlen (x), 1281 strlen (x),
1282 pkey)) 1282 pkey))
1283 goto error; 1283 goto error;
diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c
index ccf556abd..c9834e46c 100644
--- a/src/namestore/namestore_api_monitor.c
+++ b/src/namestore/namestore_api_monitor.c
@@ -73,7 +73,7 @@ struct GNUNET_NAMESTORE_ZoneMonitor
73 /** 73 /**
74 * Monitored zone. 74 * Monitored zone.
75 */ 75 */
76 struct GNUNET_CRYPTO_EccPrivateKey zone; 76 struct GNUNET_CRYPTO_EcdsaPrivateKey zone;
77 77
78}; 78};
79 79
@@ -255,7 +255,7 @@ transmit_monitor_message (void *cls,
255 */ 255 */
256struct GNUNET_NAMESTORE_ZoneMonitor * 256struct GNUNET_NAMESTORE_ZoneMonitor *
257GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 257GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
258 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 258 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
259 GNUNET_NAMESTORE_RecordMonitor monitor, 259 GNUNET_NAMESTORE_RecordMonitor monitor,
260 GNUNET_NAMESTORE_RecordsSynchronizedCallback sync_cb, 260 GNUNET_NAMESTORE_RecordsSynchronizedCallback sync_cb,
261 void *cls) 261 void *cls)
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c
index 7be06b2f5..6a1dc6f2c 100644
--- a/src/namestore/plugin_namestore_postgres.c
+++ b/src/namestore/plugin_namestore_postgres.c
@@ -337,8 +337,8 @@ namestore_postgres_cache_block (void *cls,
337 struct Plugin *plugin = cls; 337 struct Plugin *plugin = cls;
338 struct GNUNET_HashCode query; 338 struct GNUNET_HashCode query;
339 size_t block_size = ntohl (block->purpose.size) + 339 size_t block_size = ntohl (block->purpose.size) +
340 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 340 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
341 sizeof (struct GNUNET_CRYPTO_EccSignature); 341 sizeof (struct GNUNET_CRYPTO_EcdsaSignature);
342 const char *paramValues[] = { 342 const char *paramValues[] = {
343 (const char *) &query, 343 (const char *) &query,
344 (const char *) block, 344 (const char *) block,
@@ -354,7 +354,7 @@ namestore_postgres_cache_block (void *cls,
354 354
355 namestore_postgres_expire_blocks (plugin); 355 namestore_postgres_expire_blocks (plugin);
356 GNUNET_CRYPTO_hash (&block->derived_key, 356 GNUNET_CRYPTO_hash (&block->derived_key,
357 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 357 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
358 &query); 358 &query);
359 if (block_size > 64 * 65536) 359 if (block_size > 64 * 65536)
360 { 360 {
@@ -433,8 +433,8 @@ namestore_postgres_lookup_block (void *cls,
433 block = (const struct GNUNET_NAMESTORE_Block *) PQgetvalue (res, 0, 0); 433 block = (const struct GNUNET_NAMESTORE_Block *) PQgetvalue (res, 0, 0);
434 if ( (bsize < sizeof (*block)) || 434 if ( (bsize < sizeof (*block)) ||
435 (bsize != ntohl (block->purpose.size) + 435 (bsize != ntohl (block->purpose.size) +
436 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 436 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
437 sizeof (struct GNUNET_CRYPTO_EccSignature)) ) 437 sizeof (struct GNUNET_CRYPTO_EcdsaSignature)) )
438 { 438 {
439 GNUNET_break (0); 439 GNUNET_break (0);
440 LOG (GNUNET_ERROR_TYPE_DEBUG, 440 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -461,13 +461,13 @@ namestore_postgres_lookup_block (void *cls,
461 */ 461 */
462static int 462static int
463namestore_postgres_store_records (void *cls, 463namestore_postgres_store_records (void *cls,
464 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 464 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
465 const char *label, 465 const char *label,
466 unsigned int rd_count, 466 unsigned int rd_count,
467 const struct GNUNET_NAMESTORE_RecordData *rd) 467 const struct GNUNET_NAMESTORE_RecordData *rd)
468{ 468{
469 struct Plugin *plugin = cls; 469 struct Plugin *plugin = cls;
470 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 470 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
471 uint64_t rvalue; 471 uint64_t rvalue;
472 uint32_t rd_count_nbo = htonl ((uint32_t) rd_count); 472 uint32_t rd_count_nbo = htonl ((uint32_t) rd_count);
473 size_t data_size; 473 size_t data_size;
@@ -477,7 +477,7 @@ namestore_postgres_store_records (void *cls,
477 for (i=0;i<rd_count;i++) 477 for (i=0;i<rd_count;i++)
478 if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type) 478 if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type)
479 { 479 {
480 GNUNET_break (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) == rd[i].data_size); 480 GNUNET_break (sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) == rd[i].data_size);
481 memcpy (&pkey, 481 memcpy (&pkey,
482 rd[i].data, 482 rd[i].data,
483 rd[i].data_size); 483 rd[i].data_size);
@@ -549,7 +549,7 @@ namestore_postgres_store_records (void *cls,
549static int 549static int
550get_record_and_call_iterator (struct Plugin *plugin, 550get_record_and_call_iterator (struct Plugin *plugin,
551 PGresult *res, 551 PGresult *res,
552 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 552 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
553 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) 553 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
554{ 554{
555 const char *data; 555 const char *data;
@@ -580,13 +580,13 @@ get_record_and_call_iterator (struct Plugin *plugin,
580 GNUNET_assert (3 + ((NULL == zone_key) ? 1 : 0) == PQnfields (res)); 580 GNUNET_assert (3 + ((NULL == zone_key) ? 1 : 0) == PQnfields (res));
581 if (NULL == zone_key) 581 if (NULL == zone_key)
582 { 582 {
583 if (sizeof (struct GNUNET_CRYPTO_EccPrivateKey) != PQgetlength (res, 0, 3)) 583 if (sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey) != PQgetlength (res, 0, 3))
584 { 584 {
585 GNUNET_break (0); 585 GNUNET_break (0);
586 PQclear (res); 586 PQclear (res);
587 return GNUNET_SYSERR; 587 return GNUNET_SYSERR;
588 } 588 }
589 zone_key = (const struct GNUNET_CRYPTO_EccPrivateKey *) PQgetvalue (res, 0, 3); 589 zone_key = (const struct GNUNET_CRYPTO_EcdsaPrivateKey *) PQgetvalue (res, 0, 3);
590 } 590 }
591 if (sizeof (uint32_t) != PQfsize (res, 0)) 591 if (sizeof (uint32_t) != PQfsize (res, 0))
592 { 592 {
@@ -642,7 +642,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
642 */ 642 */
643static int 643static int
644namestore_postgres_iterate_records (void *cls, 644namestore_postgres_iterate_records (void *cls,
645 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 645 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
646 uint64_t offset, 646 uint64_t offset,
647 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) 647 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
648{ 648{
@@ -707,8 +707,8 @@ namestore_postgres_iterate_records (void *cls,
707 */ 707 */
708static int 708static int
709namestore_postgres_zone_to_name (void *cls, 709namestore_postgres_zone_to_name (void *cls,
710 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 710 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
711 const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, 711 const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone,
712 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) 712 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
713{ 713{
714 struct Plugin *plugin = cls; 714 struct Plugin *plugin = cls;
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index 19fa86bf3..729b916ca 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -467,15 +467,15 @@ namestore_sqlite_cache_block (void *cls,
467 467
468 namestore_sqlite_expire_blocks (plugin); 468 namestore_sqlite_expire_blocks (plugin);
469 GNUNET_CRYPTO_hash (&block->derived_key, 469 GNUNET_CRYPTO_hash (&block->derived_key,
470 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 470 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
471 &query); 471 &query);
472 expiration = GNUNET_TIME_absolute_ntoh (block->expiration_time); 472 expiration = GNUNET_TIME_absolute_ntoh (block->expiration_time);
473 dval = (int64_t) expiration.abs_value_us; 473 dval = (int64_t) expiration.abs_value_us;
474 if (dval < 0) 474 if (dval < 0)
475 dval = INT64_MAX; 475 dval = INT64_MAX;
476 block_size = ntohl (block->purpose.size) + 476 block_size = ntohl (block->purpose.size) +
477 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 477 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
478 sizeof (struct GNUNET_CRYPTO_EccSignature); 478 sizeof (struct GNUNET_CRYPTO_EcdsaSignature);
479 if (block_size > 64 * 65536) 479 if (block_size > 64 * 65536)
480 { 480 {
481 GNUNET_break (0); 481 GNUNET_break (0);
@@ -606,8 +606,8 @@ namestore_sqlite_lookup_block (void *cls,
606 block_size = sqlite3_column_bytes (plugin->lookup_block, 0); 606 block_size = sqlite3_column_bytes (plugin->lookup_block, 0);
607 if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) || 607 if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) ||
608 (ntohl (block->purpose.size) + 608 (ntohl (block->purpose.size) +
609 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 609 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
610 sizeof (struct GNUNET_CRYPTO_EccSignature) != block_size) ) 610 sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) )
611 { 611 {
612 GNUNET_break (0); 612 GNUNET_break (0);
613 ret = GNUNET_SYSERR; 613 ret = GNUNET_SYSERR;
@@ -656,14 +656,14 @@ namestore_sqlite_lookup_block (void *cls,
656 */ 656 */
657static int 657static int
658namestore_sqlite_store_records (void *cls, 658namestore_sqlite_store_records (void *cls,
659 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 659 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
660 const char *label, 660 const char *label,
661 unsigned int rd_count, 661 unsigned int rd_count,
662 const struct GNUNET_NAMESTORE_RecordData *rd) 662 const struct GNUNET_NAMESTORE_RecordData *rd)
663{ 663{
664 struct Plugin *plugin = cls; 664 struct Plugin *plugin = cls;
665 int n; 665 int n;
666 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 666 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
667 uint64_t rvalue; 667 uint64_t rvalue;
668 size_t data_size; 668 size_t data_size;
669 unsigned int i; 669 unsigned int i;
@@ -672,7 +672,7 @@ namestore_sqlite_store_records (void *cls,
672 for (i=0;i<rd_count;i++) 672 for (i=0;i<rd_count;i++)
673 if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type) 673 if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type)
674 { 674 {
675 GNUNET_break (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) == rd[i].data_size); 675 GNUNET_break (sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) == rd[i].data_size);
676 memcpy (&pkey, 676 memcpy (&pkey,
677 rd[i].data, 677 rd[i].data,
678 rd[i].data_size); 678 rd[i].data_size);
@@ -697,7 +697,7 @@ namestore_sqlite_store_records (void *cls,
697 697
698 /* First delete 'old' records */ 698 /* First delete 'old' records */
699 if ((SQLITE_OK != sqlite3_bind_blob (plugin->delete_records, 1, 699 if ((SQLITE_OK != sqlite3_bind_blob (plugin->delete_records, 1,
700 zone_key, sizeof (struct GNUNET_CRYPTO_EccPrivateKey), SQLITE_STATIC)) || 700 zone_key, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey), SQLITE_STATIC)) ||
701 (SQLITE_OK != sqlite3_bind_text (plugin->delete_records, 2, label, -1, SQLITE_STATIC))) 701 (SQLITE_OK != sqlite3_bind_text (plugin->delete_records, 2, label, -1, SQLITE_STATIC)))
702 { 702 {
703 LOG_SQLITE (plugin, 703 LOG_SQLITE (plugin,
@@ -718,9 +718,9 @@ namestore_sqlite_store_records (void *cls,
718 if (0 != rd_count) 718 if (0 != rd_count)
719 { 719 {
720 if ((SQLITE_OK != sqlite3_bind_blob (plugin->store_records, 1, 720 if ((SQLITE_OK != sqlite3_bind_blob (plugin->store_records, 1,
721 zone_key, sizeof (struct GNUNET_CRYPTO_EccPrivateKey), SQLITE_STATIC)) || 721 zone_key, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey), SQLITE_STATIC)) ||
722 (SQLITE_OK != sqlite3_bind_blob (plugin->store_records, 2, 722 (SQLITE_OK != sqlite3_bind_blob (plugin->store_records, 2,
723 &pkey, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), SQLITE_STATIC)) || 723 &pkey, sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey), SQLITE_STATIC)) ||
724 (SQLITE_OK != sqlite3_bind_int64 (plugin->store_records, 3, rvalue)) || 724 (SQLITE_OK != sqlite3_bind_int64 (plugin->store_records, 3, rvalue)) ||
725 (SQLITE_OK != sqlite3_bind_int (plugin->store_records, 4, rd_count)) || 725 (SQLITE_OK != sqlite3_bind_int (plugin->store_records, 4, rd_count)) ||
726 (SQLITE_OK != sqlite3_bind_blob (plugin->store_records, 5, data, data_size, SQLITE_STATIC)) || 726 (SQLITE_OK != sqlite3_bind_blob (plugin->store_records, 5, data, data_size, SQLITE_STATIC)) ||
@@ -776,7 +776,7 @@ namestore_sqlite_store_records (void *cls,
776static int 776static int
777get_record_and_call_iterator (struct Plugin *plugin, 777get_record_and_call_iterator (struct Plugin *plugin,
778 sqlite3_stmt *stmt, 778 sqlite3_stmt *stmt,
779 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 779 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
780 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) 780 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
781{ 781{
782 unsigned int record_count; 782 unsigned int record_count;
@@ -796,7 +796,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
796 if (NULL == zone_key) 796 if (NULL == zone_key)
797 { 797 {
798 /* must be "iterate_all_zones", got one extra return value */ 798 /* must be "iterate_all_zones", got one extra return value */
799 if (sizeof (struct GNUNET_CRYPTO_EccPrivateKey) != 799 if (sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey) !=
800 sqlite3_column_bytes (stmt, 3)) 800 sqlite3_column_bytes (stmt, 3))
801 { 801 {
802 GNUNET_break (0); 802 GNUNET_break (0);
@@ -859,7 +859,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
859 */ 859 */
860static int 860static int
861namestore_sqlite_iterate_records (void *cls, 861namestore_sqlite_iterate_records (void *cls,
862 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 862 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
863 uint64_t offset, 863 uint64_t offset,
864 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) 864 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
865{ 865{
@@ -877,7 +877,7 @@ namestore_sqlite_iterate_records (void *cls,
877 { 877 {
878 stmt = plugin->iterate_zone; 878 stmt = plugin->iterate_zone;
879 err = ( (SQLITE_OK != sqlite3_bind_blob (stmt, 1, 879 err = ( (SQLITE_OK != sqlite3_bind_blob (stmt, 1,
880 zone, sizeof (struct GNUNET_CRYPTO_EccPrivateKey), 880 zone, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey),
881 SQLITE_STATIC)) || 881 SQLITE_STATIC)) ||
882 (SQLITE_OK != sqlite3_bind_int64 (stmt, 2, 882 (SQLITE_OK != sqlite3_bind_int64 (stmt, 2,
883 offset)) ); 883 offset)) );
@@ -909,8 +909,8 @@ namestore_sqlite_iterate_records (void *cls,
909 */ 909 */
910static int 910static int
911namestore_sqlite_zone_to_name (void *cls, 911namestore_sqlite_zone_to_name (void *cls,
912 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 912 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
913 const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, 913 const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone,
914 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) 914 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
915{ 915{
916 struct Plugin *plugin = cls; 916 struct Plugin *plugin = cls;
@@ -918,10 +918,10 @@ namestore_sqlite_zone_to_name (void *cls,
918 918
919 stmt = plugin->zone_to_name; 919 stmt = plugin->zone_to_name;
920 if ( (SQLITE_OK != sqlite3_bind_blob (stmt, 1, 920 if ( (SQLITE_OK != sqlite3_bind_blob (stmt, 1,
921 zone, sizeof (struct GNUNET_CRYPTO_EccPrivateKey), 921 zone, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey),
922 SQLITE_STATIC)) || 922 SQLITE_STATIC)) ||
923 (SQLITE_OK != sqlite3_bind_blob (stmt, 2, 923 (SQLITE_OK != sqlite3_bind_blob (stmt, 2,
924 value_zone, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 924 value_zone, sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
925 SQLITE_STATIC)) ) 925 SQLITE_STATIC)) )
926 { 926 {
927 LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, 927 LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
diff --git a/src/namestore/test_namestore_api_blocks.c b/src/namestore/test_namestore_api_blocks.c
index e480def31..001e7e182 100644
--- a/src/namestore/test_namestore_api_blocks.c
+++ b/src/namestore/test_namestore_api_blocks.c
@@ -40,7 +40,7 @@
40#define TEST_REMOVE_RECORD_DATA 'b' 40#define TEST_REMOVE_RECORD_DATA 'b'
41 41
42 42
43static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 43static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
44 44
45static struct GNUNET_NAMESTORE_RecordData *s_rd; 45static struct GNUNET_NAMESTORE_RecordData *s_rd;
46 46
@@ -99,19 +99,19 @@ run (void *cls, char *const *args, const char *cfgfile,
99 const struct GNUNET_CONFIGURATION_Handle *cfg) 99 const struct GNUNET_CONFIGURATION_Handle *cfg)
100{ 100{
101 struct GNUNET_NAMESTORE_Block *block; 101 struct GNUNET_NAMESTORE_Block *block;
102 struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 102 struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
103 103
104 /* load privat key */ 104 /* load privat key */
105 char *hostkey_file; 105 char *hostkey_file;
106 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 106 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
107 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 107 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
108 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 108 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
109 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 109 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
110 GNUNET_free (hostkey_file); 110 GNUNET_free (hostkey_file);
111 GNUNET_assert (privkey != NULL); 111 GNUNET_assert (privkey != NULL);
112 struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get(); 112 struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get();
113 /* get public key */ 113 /* get public key */
114 GNUNET_CRYPTO_ecc_key_get_public_for_signature(privkey, &pubkey); 114 GNUNET_CRYPTO_ecdsa_key_get_public(privkey, &pubkey);
115 115
116 /* create record */ 116 /* create record */
117 s_name = "DUMMY.dummy.gnunet"; 117 s_name = "DUMMY.dummy.gnunet";
diff --git a/src/namestore/test_namestore_api_cache_block.c b/src/namestore/test_namestore_api_cache_block.c
index 8ed010abd..1fee80ec8 100644
--- a/src/namestore/test_namestore_api_cache_block.c
+++ b/src/namestore/test_namestore_api_cache_block.c
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh;
38 38
39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
40 40
41static struct GNUNET_CRYPTO_EccPrivateKey *privkey; 41static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
42 42
43static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 43static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
44 44
45static int res; 45static int res;
46 46
@@ -182,10 +182,10 @@ run (void *cls,
182 DIR_SEPARATOR_STR, 182 DIR_SEPARATOR_STR,
183 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 183 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
184 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 184 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
185 privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); 185 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file);
186 GNUNET_free (hostkey_file); 186 GNUNET_free (hostkey_file);
187 GNUNET_assert (privkey != NULL); 187 GNUNET_assert (privkey != NULL);
188 GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); 188 GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey);
189 189
190 190
191 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; 191 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c
index f2b009ac5..6c6ee55ec 100644
--- a/src/namestore/test_namestore_api_lookup_public.c
+++ b/src/namestore/test_namestore_api_lookup_public.c
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh;
38 38
39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
40 40
41static struct GNUNET_CRYPTO_EccPrivateKey *privkey; 41static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
42 42
43static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 43static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
44 44
45static int res; 45static int res;
46 46
@@ -149,7 +149,7 @@ put_cont (void *cls, int32_t success, const char *emsg)
149{ 149{
150 const char *name = cls; 150 const char *name = cls;
151 struct GNUNET_HashCode derived_hash; 151 struct GNUNET_HashCode derived_hash;
152 struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 152 struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
153 153
154 GNUNET_assert (NULL != cls); 154 GNUNET_assert (NULL != cls);
155 155
@@ -159,7 +159,7 @@ put_cont (void *cls, int32_t success, const char *emsg)
159 (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); 159 (success == GNUNET_OK) ? "SUCCESS" : "FAIL");
160 160
161 /* Create derived hash */ 161 /* Create derived hash */
162 GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); 162 GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey);
163 GNUNET_NAMESTORE_query_from_public_key (&pubkey, name, &derived_hash); 163 GNUNET_NAMESTORE_query_from_public_key (&pubkey, name, &derived_hash);
164 164
165 nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, 165 nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash,
@@ -183,10 +183,10 @@ run (void *cls,
183 DIR_SEPARATOR_STR, 183 DIR_SEPARATOR_STR,
184 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 184 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
185 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 185 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
186 privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); 186 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file);
187 GNUNET_free (hostkey_file); 187 GNUNET_free (hostkey_file);
188 GNUNET_assert (privkey != NULL); 188 GNUNET_assert (privkey != NULL);
189 GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); 189 GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey);
190 190
191 191
192 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; 192 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index d0662617e..2d5888a5e 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -34,9 +34,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
34 34
35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
36 36
37static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 37static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
38 38
39static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 39static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey2;
40 40
41static struct GNUNET_NAMESTORE_ZoneMonitor *zm; 41static struct GNUNET_NAMESTORE_ZoneMonitor *zm;
42 42
@@ -145,7 +145,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
145 145
146static void 146static void
147zone_proc (void *cls, 147zone_proc (void *cls,
148 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 148 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
149 const char *name, 149 const char *name,
150 unsigned int rd_count, 150 unsigned int rd_count,
151 const struct GNUNET_NAMESTORE_RecordData *rd) 151 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -156,7 +156,7 @@ zone_proc (void *cls,
156 "Comparing results name %s\n", 156 "Comparing results name %s\n",
157 name); 157 name);
158 158
159 if (0 != memcmp (zone_key, privkey, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 159 if (0 != memcmp (zone_key, privkey, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
160 { 160 {
161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
162 "Monitoring returned wrong zone key\n"); 162 "Monitoring returned wrong zone key\n");
@@ -268,7 +268,7 @@ run (void *cls,
268 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 268 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
269 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 269 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
270 "Using zonekey file `%s' \n", hostkey_file); 270 "Using zonekey file `%s' \n", hostkey_file);
271 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 271 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
272 GNUNET_free (hostkey_file); 272 GNUNET_free (hostkey_file);
273 GNUNET_assert (privkey != NULL); 273 GNUNET_assert (privkey != NULL);
274 274
@@ -301,7 +301,7 @@ run (void *cls,
301 DIR_SEPARATOR_STR, 301 DIR_SEPARATOR_STR,
302 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 302 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
303 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 303 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
304 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 304 privkey2 = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
305 GNUNET_free (hostkey_file); 305 GNUNET_free (hostkey_file);
306 GNUNET_assert (privkey2 != NULL); 306 GNUNET_assert (privkey2 != NULL);
307 307
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c
index 4db1c6d62..3b2ca6092 100644
--- a/src/namestore/test_namestore_api_monitoring_existing.c
+++ b/src/namestore/test_namestore_api_monitoring_existing.c
@@ -35,9 +35,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
35 35
36static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 36static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
37 37
38static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 38static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
39 39
40static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 40static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey2;
41 41
42static struct GNUNET_NAMESTORE_ZoneMonitor *zm; 42static struct GNUNET_NAMESTORE_ZoneMonitor *zm;
43 43
@@ -146,7 +146,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
146 146
147static void 147static void
148zone_proc (void *cls, 148zone_proc (void *cls,
149 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 149 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
150 const char *name, 150 const char *name,
151 unsigned int rd_count, 151 unsigned int rd_count,
152 const struct GNUNET_NAMESTORE_RecordData *rd) 152 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -157,7 +157,7 @@ zone_proc (void *cls,
157 "Comparing results name %s\n", 157 "Comparing results name %s\n",
158 name); 158 name);
159 159
160 if (0 != memcmp (zone_key, privkey, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 160 if (0 != memcmp (zone_key, privkey, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
161 { 161 {
162 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 162 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
163 "Monitoring returned wrong zone key\n"); 163 "Monitoring returned wrong zone key\n");
@@ -286,7 +286,7 @@ run (void *cls,
286 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 286 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
287 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 287 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
288 "Using zonekey file `%s' \n", hostkey_file); 288 "Using zonekey file `%s' \n", hostkey_file);
289 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 289 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
290 GNUNET_free (hostkey_file); 290 GNUNET_free (hostkey_file);
291 GNUNET_assert (privkey != NULL); 291 GNUNET_assert (privkey != NULL);
292 292
@@ -306,7 +306,7 @@ run (void *cls,
306 DIR_SEPARATOR_STR, 306 DIR_SEPARATOR_STR,
307 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 307 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
308 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 308 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
309 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 309 privkey2 = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
310 GNUNET_free (hostkey_file); 310 GNUNET_free (hostkey_file);
311 GNUNET_assert (privkey2 != NULL); 311 GNUNET_assert (privkey2 != NULL);
312 312
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c
index e3610ccaf..983ea6804 100644
--- a/src/namestore/test_namestore_api_put.c
+++ b/src/namestore/test_namestore_api_put.c
@@ -41,9 +41,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
41 41
42static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 42static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
43 43
44static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 44static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
45 45
46static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 46static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
47 47
48static struct GNUNET_NAMESTORE_RecordData *s_rd; 48static struct GNUNET_NAMESTORE_RecordData *s_rd;
49 49
@@ -135,7 +135,7 @@ run (void *cls,
135 const struct GNUNET_CONFIGURATION_Handle *cfg, 135 const struct GNUNET_CONFIGURATION_Handle *cfg,
136 struct GNUNET_TESTING_Peer *peer) 136 struct GNUNET_TESTING_Peer *peer)
137{ 137{
138 struct GNUNET_CRYPTO_EccSignature *signature; 138 struct GNUNET_CRYPTO_EcdsaSignature *signature;
139 char * s_name; 139 char * s_name;
140 int c; 140 int c;
141 char *hostkey_file; 141 char *hostkey_file;
@@ -146,11 +146,11 @@ run (void *cls,
146 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 146 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
147 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 147 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
148 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 148 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
149 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 149 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
150 GNUNET_assert (privkey != NULL); 150 GNUNET_assert (privkey != NULL);
151 GNUNET_free (hostkey_file); 151 GNUNET_free (hostkey_file);
152 /* get public key */ 152 /* get public key */
153 GNUNET_CRYPTO_ecc_key_get_public_for_signature(privkey, &pubkey); 153 GNUNET_CRYPTO_ecdsa_key_get_public(privkey, &pubkey);
154 nsh = GNUNET_NAMESTORE_connect (cfg); 154 nsh = GNUNET_NAMESTORE_connect (cfg);
155 GNUNET_break (NULL != nsh); 155 GNUNET_break (NULL != nsh);
156 /* create record */ 156 /* create record */
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c
index 3f3823e89..f43bafecc 100644
--- a/src/namestore/test_namestore_api_remove.c
+++ b/src/namestore/test_namestore_api_remove.c
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh;
38 38
39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
40 40
41static struct GNUNET_CRYPTO_EccPrivateKey *privkey; 41static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
42 42
43static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 43static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
44 44
45static struct GNUNET_HashCode derived_hash; 45static struct GNUNET_HashCode derived_hash;
46 46
@@ -244,10 +244,10 @@ run (void *cls,
244 DIR_SEPARATOR_STR, 244 DIR_SEPARATOR_STR,
245 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 245 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
246 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 246 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
247 privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); 247 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file);
248 GNUNET_free (hostkey_file); 248 GNUNET_free (hostkey_file);
249 GNUNET_assert (privkey != NULL); 249 GNUNET_assert (privkey != NULL);
250 GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); 250 GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey);
251 251
252 removed = GNUNET_NO; 252 removed = GNUNET_NO;
253 253
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c
index 86cf47e26..231d7b0bc 100644
--- a/src/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/namestore/test_namestore_api_remove_not_existing_record.c
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh;
38 38
39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
40 40
41static struct GNUNET_CRYPTO_EccPrivateKey *privkey; 41static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
42 42
43static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 43static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
44 44
45static int res; 45static int res;
46 46
@@ -148,10 +148,10 @@ run (void *cls,
148 DIR_SEPARATOR_STR, 148 DIR_SEPARATOR_STR,
149 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 149 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
150 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 150 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
151 privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); 151 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file);
152 GNUNET_free (hostkey_file); 152 GNUNET_free (hostkey_file);
153 GNUNET_assert (privkey != NULL); 153 GNUNET_assert (privkey != NULL);
154 GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); 154 GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey);
155 155
156 nsh = GNUNET_NAMESTORE_connect (cfg); 156 nsh = GNUNET_NAMESTORE_connect (cfg);
157 GNUNET_break (NULL != nsh); 157 GNUNET_break (NULL != nsh);
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c
index 69c47337f..133bf567f 100644
--- a/src/namestore/test_namestore_api_store.c
+++ b/src/namestore/test_namestore_api_store.c
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh;
38 38
39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 39static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
40 40
41static struct GNUNET_CRYPTO_EccPrivateKey *privkey; 41static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
42 42
43static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 43static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
44 44
45static int res; 45static int res;
46 46
@@ -181,10 +181,10 @@ run (void *cls,
181 DIR_SEPARATOR_STR, 181 DIR_SEPARATOR_STR,
182 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 182 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
184 privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); 184 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file);
185 GNUNET_free (hostkey_file); 185 GNUNET_free (hostkey_file);
186 GNUNET_assert (privkey != NULL); 186 GNUNET_assert (privkey != NULL);
187 GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); 187 GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey);
188 188
189 189
190 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; 190 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c
index 8b10763c0..91b8511c9 100644
--- a/src/namestore/test_namestore_api_store_update.c
+++ b/src/namestore/test_namestore_api_store_update.c
@@ -46,9 +46,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh;
46 46
47static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 47static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
48 48
49static struct GNUNET_CRYPTO_EccPrivateKey *privkey; 49static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
50 50
51static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 51static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
52 52
53static int res; 53static int res;
54 54
@@ -225,10 +225,10 @@ run (void *cls,
225 DIR_SEPARATOR_STR, 225 DIR_SEPARATOR_STR,
226 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 226 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
228 privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); 228 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file);
229 GNUNET_free (hostkey_file); 229 GNUNET_free (hostkey_file);
230 GNUNET_assert (privkey != NULL); 230 GNUNET_assert (privkey != NULL);
231 GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); 231 GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey);
232 232
233 rd.flags = GNUNET_NAMESTORE_RF_NONE; 233 rd.flags = GNUNET_NAMESTORE_RF_NONE;
234 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; 234 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index 94fd6d008..48671897e 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -34,9 +34,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
34 34
35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
36 36
37static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 37static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
38 38
39static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 39static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey2;
40 40
41static struct GNUNET_NAMESTORE_ZoneIterator *zi; 41static struct GNUNET_NAMESTORE_ZoneIterator *zi;
42 42
@@ -156,7 +156,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
156 156
157static void 157static void
158zone_proc (void *cls, 158zone_proc (void *cls,
159 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 159 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
160 const char *label, 160 const char *label,
161 unsigned int rd_count, 161 unsigned int rd_count,
162 const struct GNUNET_NAMESTORE_RecordData *rd) 162 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -181,7 +181,7 @@ zone_proc (void *cls,
181 } 181 }
182 else 182 else
183 { 183 {
184 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 184 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
185 { 185 {
186 if (0 == strcmp (label, s_name_1)) 186 if (0 == strcmp (label, s_name_1))
187 { 187 {
@@ -225,7 +225,7 @@ zone_proc (void *cls,
225 GNUNET_break (0); 225 GNUNET_break (0);
226 } 226 }
227 } 227 }
228 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 228 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
229 { 229 {
230 if (0 == strcmp (label, s_name_3)) 230 if (0 == strcmp (label, s_name_3))
231 { 231 {
@@ -345,7 +345,7 @@ create_record (unsigned int count)
345 */ 345 */
346static void 346static void
347empty_zone_proc (void *cls, 347empty_zone_proc (void *cls,
348 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 348 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
349 const char *label, 349 const char *label,
350 unsigned int rd_count, 350 unsigned int rd_count,
351 const struct GNUNET_NAMESTORE_RecordData *rd) 351 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -379,14 +379,14 @@ empty_zone_proc (void *cls,
379 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 379 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
380 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 380 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
381 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 381 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
382 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 382 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
383 GNUNET_free (hostkey_file); 383 GNUNET_free (hostkey_file);
384 GNUNET_assert (privkey != NULL); 384 GNUNET_assert (privkey != NULL);
385 385
386 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 386 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
387 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 387 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
388 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 388 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
389 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 389 privkey2 = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
390 GNUNET_free (hostkey_file); 390 GNUNET_free (hostkey_file);
391 GNUNET_assert (privkey2 != NULL); 391 GNUNET_assert (privkey2 != NULL);
392 392
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index a34e742f0..7707c418e 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -34,9 +34,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
34 34
35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
36 36
37static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 37static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
38 38
39static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 39static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey2;
40 40
41static struct GNUNET_NAMESTORE_ZoneIterator *zi; 41static struct GNUNET_NAMESTORE_ZoneIterator *zi;
42 42
@@ -156,7 +156,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
156 156
157static void 157static void
158zone_proc (void *cls, 158zone_proc (void *cls,
159 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 159 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
160 const char *label, 160 const char *label,
161 unsigned int rd_count, 161 unsigned int rd_count,
162 const struct GNUNET_NAMESTORE_RecordData *rd) 162 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -181,7 +181,7 @@ zone_proc (void *cls,
181 } 181 }
182 else 182 else
183 { 183 {
184 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 184 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
185 { 185 {
186 if (0 == strcmp (label, s_name_1)) 186 if (0 == strcmp (label, s_name_1))
187 { 187 {
@@ -225,7 +225,7 @@ zone_proc (void *cls,
225 GNUNET_break (0); 225 GNUNET_break (0);
226 } 226 }
227 } 227 }
228 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 228 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
229 { 229 {
230 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received data for not requested zone\n"); 230 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received data for not requested zone\n");
231 failed = GNUNET_YES; 231 failed = GNUNET_YES;
@@ -323,7 +323,7 @@ create_record (unsigned int count)
323 */ 323 */
324static void 324static void
325empty_zone_proc (void *cls, 325empty_zone_proc (void *cls,
326 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 326 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
327 const char *label, 327 const char *label,
328 unsigned int rd_count, 328 unsigned int rd_count,
329 const struct GNUNET_NAMESTORE_RecordData *rd) 329 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -357,14 +357,14 @@ empty_zone_proc (void *cls,
357 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 357 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
358 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 358 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
359 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 359 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
360 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 360 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
361 GNUNET_free (hostkey_file); 361 GNUNET_free (hostkey_file);
362 GNUNET_assert (privkey != NULL); 362 GNUNET_assert (privkey != NULL);
363 363
364 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 364 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
365 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 365 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
366 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 366 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
367 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 367 privkey2 = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
368 GNUNET_free (hostkey_file); 368 GNUNET_free (hostkey_file);
369 GNUNET_assert (privkey2 != NULL); 369 GNUNET_assert (privkey2 != NULL);
370 370
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index ebc26db79..e56559f96 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -34,9 +34,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
34 34
35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
36 36
37static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 37static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
38 38
39static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 39static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey2;
40 40
41static struct GNUNET_NAMESTORE_ZoneIterator *zi; 41static struct GNUNET_NAMESTORE_ZoneIterator *zi;
42 42
@@ -156,7 +156,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
156 156
157static void 157static void
158zone_proc (void *cls, 158zone_proc (void *cls,
159 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 159 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
160 const char *label, 160 const char *label,
161 unsigned int rd_count, 161 unsigned int rd_count,
162 const struct GNUNET_NAMESTORE_RecordData *rd) 162 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -178,7 +178,7 @@ zone_proc (void *cls,
178 } 178 }
179 else 179 else
180 { 180 {
181 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 181 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
182 { 182 {
183 if (0 == strcmp (label, s_name_1)) 183 if (0 == strcmp (label, s_name_1))
184 { 184 {
@@ -222,7 +222,7 @@ zone_proc (void *cls,
222 GNUNET_break (0); 222 GNUNET_break (0);
223 } 223 }
224 } 224 }
225 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 225 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
226 { 226 {
227 if (0 == strcmp (label, s_name_3)) 227 if (0 == strcmp (label, s_name_3))
228 { 228 {
@@ -357,7 +357,7 @@ create_record (unsigned int count)
357 */ 357 */
358static void 358static void
359empty_zone_proc (void *cls, 359empty_zone_proc (void *cls,
360 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 360 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
361 const char *label, 361 const char *label,
362 unsigned int rd_count, 362 unsigned int rd_count,
363 const struct GNUNET_NAMESTORE_RecordData *rd) 363 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -391,14 +391,14 @@ empty_zone_proc (void *cls,
391 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 391 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
392 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 392 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
393 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 393 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
394 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 394 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
395 GNUNET_free (hostkey_file); 395 GNUNET_free (hostkey_file);
396 GNUNET_assert (privkey != NULL); 396 GNUNET_assert (privkey != NULL);
397 397
398 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 398 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
399 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 399 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
400 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 400 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
401 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 401 privkey2 = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
402 GNUNET_free (hostkey_file); 402 GNUNET_free (hostkey_file);
403 GNUNET_assert (privkey2 != NULL); 403 GNUNET_assert (privkey2 != NULL);
404 404
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index 1eeed1001..973cc18a0 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -41,9 +41,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
41 41
42static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 42static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
43 43
44static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 44static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
45 45
46static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 46static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
47 47
48static struct GNUNET_TIME_Absolute expire; 48static struct GNUNET_TIME_Absolute expire;
49 49
@@ -53,7 +53,7 @@ static struct GNUNET_CRYPTO_ShortHashCode s_zone_value;
53 53
54static char * s_name; 54static char * s_name;
55 55
56static struct GNUNET_CRYPTO_EccSignature *s_signature; 56static struct GNUNET_CRYPTO_EcdsaSignature *s_signature;
57 57
58static int res; 58static int res;
59 59
@@ -96,12 +96,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
96 96
97static void 97static void
98zone_to_name_proc (void *cls, 98zone_to_name_proc (void *cls,
99 const struct GNUNET_CRYPTO_EccPublicSignKey *zone_key, 99 const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key,
100 struct GNUNET_TIME_Absolute expire, 100 struct GNUNET_TIME_Absolute expire,
101 const char *n, 101 const char *n,
102 unsigned int rd_count, 102 unsigned int rd_count,
103 const struct GNUNET_NAMESTORE_RecordData *rd, 103 const struct GNUNET_NAMESTORE_RecordData *rd,
104 const struct GNUNET_CRYPTO_EccSignature *signature) 104 const struct GNUNET_CRYPTO_EcdsaSignature *signature)
105{ 105{
106 int fail = GNUNET_NO; 106 int fail = GNUNET_NO;
107 107
@@ -123,7 +123,7 @@ zone_to_name_proc (void *cls,
123 fail = GNUNET_YES; 123 fail = GNUNET_YES;
124 GNUNET_break (0); 124 GNUNET_break (0);
125 } 125 }
126 if ((zone_key == NULL) || (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)))) 126 if ((zone_key == NULL) || (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))))
127 { 127 {
128 fail = GNUNET_YES; 128 fail = GNUNET_YES;
129 GNUNET_break (0); 129 GNUNET_break (0);
@@ -173,14 +173,14 @@ run (void *cls,
173 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 173 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
174 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 174 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
175 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 175 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
176 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 176 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
177 GNUNET_free (hostkey_file); 177 GNUNET_free (hostkey_file);
178 GNUNET_assert (privkey != NULL); 178 GNUNET_assert (privkey != NULL);
179 /* get public key */ 179 /* get public key */
180 GNUNET_CRYPTO_ecc_key_get_public_for_signature(privkey, &pubkey); 180 GNUNET_CRYPTO_ecdsa_key_get_public(privkey, &pubkey);
181 181
182 /* zone hash */ 182 /* zone hash */
183 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), &s_zone); 183 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey), &s_zone);
184 GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value); 184 GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value);
185 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_NAMESTORE_short_h2s (&s_zone_value)); 185 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_NAMESTORE_short_h2s (&s_zone_value));
186 186
diff --git a/src/namestore/test_plugin_namestore.c b/src/namestore/test_plugin_namestore.c
index 5274e8bca..7e77f4317 100644
--- a/src/namestore/test_plugin_namestore.c
+++ b/src/namestore/test_plugin_namestore.c
@@ -81,14 +81,14 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg)
81 81
82static void 82static void
83test_record (void *cls, 83test_record (void *cls,
84 const struct GNUNET_CRYPTO_EccPrivateKey *private_key, 84 const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key,
85 const char *label, 85 const char *label,
86 unsigned int rd_count, 86 unsigned int rd_count,
87 const struct GNUNET_NAMESTORE_RecordData *rd) 87 const struct GNUNET_NAMESTORE_RecordData *rd)
88{ 88{
89 int *idp = cls; 89 int *idp = cls;
90 int id = *idp; 90 int id = *idp;
91 struct GNUNET_CRYPTO_EccPrivateKey tzone_private_key; 91 struct GNUNET_CRYPTO_EcdsaPrivateKey tzone_private_key;
92 char tname[64]; 92 char tname[64];
93 unsigned int trd_count = 1 + (id % 1024); 93 unsigned int trd_count = 1 + (id % 1024);
94 unsigned int i; 94 unsigned int i;
@@ -104,7 +104,7 @@ test_record (void *cls,
104 } 104 }
105 memset (&tzone_private_key, (id % 241), sizeof (tzone_private_key)); 105 memset (&tzone_private_key, (id % 241), sizeof (tzone_private_key));
106 GNUNET_assert (0 == strcmp (label, tname)); 106 GNUNET_assert (0 == strcmp (label, tname));
107 GNUNET_assert (0 == memcmp (&tzone_private_key, private_key, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))); 107 GNUNET_assert (0 == memcmp (&tzone_private_key, private_key, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)));
108} 108}
109 109
110 110
@@ -119,11 +119,11 @@ get_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id)
119static void 119static void
120put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) 120put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id)
121{ 121{
122 struct GNUNET_CRYPTO_EccPrivateKey zone_private_key; 122 struct GNUNET_CRYPTO_EcdsaPrivateKey zone_private_key;
123 char label[64]; 123 char label[64];
124 unsigned int rd_count = 1 + (id % 1024); 124 unsigned int rd_count = 1 + (id % 1024);
125 struct GNUNET_NAMESTORE_RecordData rd[rd_count]; 125 struct GNUNET_NAMESTORE_RecordData rd[rd_count];
126 struct GNUNET_CRYPTO_EccSignature signature; 126 struct GNUNET_CRYPTO_EcdsaSignature signature;
127 unsigned int i; 127 unsigned int i;
128 128
129 GNUNET_snprintf (label, sizeof (label), 129 GNUNET_snprintf (label, sizeof (label),
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index b69a4a7fe..366770cad 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -199,7 +199,7 @@ struct GNUNET_NSE_FloodMessage
199 /** 199 /**
200 * Signature (over range specified in purpose). 200 * Signature (over range specified in purpose).
201 */ 201 */
202 struct GNUNET_CRYPTO_EccSignature signature; 202 struct GNUNET_CRYPTO_EddsaSignature signature;
203}; 203};
204GNUNET_NETWORK_STRUCT_END 204GNUNET_NETWORK_STRUCT_END
205 205
@@ -288,7 +288,7 @@ static struct GNUNET_TIME_Absolute current_timestamp;
288/** 288/**
289 * The private key of this peer. 289 * The private key of this peer.
290 */ 290 */
291static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 291static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
292 292
293/** 293/**
294 * The peer identity of this peer. 294 * The peer identity of this peer.
@@ -710,14 +710,14 @@ setup_flood_message (unsigned int slot,
710 fm->purpose.size = 710 fm->purpose.size =
711 htonl (sizeof (struct GNUNET_NSE_FloodMessage) - 711 htonl (sizeof (struct GNUNET_NSE_FloodMessage) -
712 sizeof (struct GNUNET_MessageHeader) - sizeof (uint32_t) - 712 sizeof (struct GNUNET_MessageHeader) - sizeof (uint32_t) -
713 sizeof (struct GNUNET_CRYPTO_EccSignature)); 713 sizeof (struct GNUNET_CRYPTO_EddsaSignature));
714 fm->matching_bits = htonl (matching_bits); 714 fm->matching_bits = htonl (matching_bits);
715 fm->timestamp = GNUNET_TIME_absolute_hton (ts); 715 fm->timestamp = GNUNET_TIME_absolute_hton (ts);
716 fm->origin = my_identity; 716 fm->origin = my_identity;
717 fm->proof_of_work = my_proof; 717 fm->proof_of_work = my_proof;
718 if (nse_work_required > 0) 718 if (nse_work_required > 0)
719 GNUNET_assert (GNUNET_OK == 719 GNUNET_assert (GNUNET_OK ==
720 GNUNET_CRYPTO_ecc_sign (my_private_key, &fm->purpose, 720 GNUNET_CRYPTO_eddsa_sign (my_private_key, &fm->purpose,
721 &fm->signature)); 721 &fm->signature));
722 else 722 else
723 memset (&fm->signature, 0, sizeof (fm->signature)); 723 memset (&fm->signature, 0, sizeof (fm->signature));
@@ -849,16 +849,16 @@ count_leading_zeroes (const struct GNUNET_HashCode *hash)
849 * @return #GNUNET_YES if valid, #GNUNET_NO if not 849 * @return #GNUNET_YES if valid, #GNUNET_NO if not
850 */ 850 */
851static int 851static int
852check_proof_of_work (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey, 852check_proof_of_work (const struct GNUNET_CRYPTO_EddsaPublicKey *pkey,
853 uint64_t val) 853 uint64_t val)
854{ 854{
855 char buf[sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 855 char buf[sizeof (struct GNUNET_CRYPTO_EddsaPublicKey) +
856 sizeof (val)] GNUNET_ALIGN; 856 sizeof (val)] GNUNET_ALIGN;
857 struct GNUNET_HashCode result; 857 struct GNUNET_HashCode result;
858 858
859 memcpy (buf, &val, sizeof (val)); 859 memcpy (buf, &val, sizeof (val));
860 memcpy (&buf[sizeof (val)], pkey, 860 memcpy (&buf[sizeof (val)], pkey,
861 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 861 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey));
862 pow_hash (buf, sizeof (buf), &result); 862 pow_hash (buf, sizeof (buf), &result);
863 return (count_leading_zeroes (&result) >= 863 return (count_leading_zeroes (&result) >=
864 nse_work_required) ? GNUNET_YES : GNUNET_NO; 864 nse_work_required) ? GNUNET_YES : GNUNET_NO;
@@ -898,7 +898,7 @@ find_proof (void *cls,
898{ 898{
899#define ROUND_SIZE 10 899#define ROUND_SIZE 10
900 uint64_t counter; 900 uint64_t counter;
901 char buf[sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 901 char buf[sizeof (struct GNUNET_CRYPTO_EddsaPublicKey) +
902 sizeof (uint64_t)] GNUNET_ALIGN; 902 sizeof (uint64_t)] GNUNET_ALIGN;
903 struct GNUNET_HashCode result; 903 struct GNUNET_HashCode result;
904 unsigned int i; 904 unsigned int i;
@@ -967,7 +967,7 @@ verify_message_crypto (const struct GNUNET_NSE_FloodMessage *incoming_flood)
967 } 967 }
968 if ((nse_work_required > 0) && 968 if ((nse_work_required > 0) &&
969 (GNUNET_OK != 969 (GNUNET_OK !=
970 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_NSE_SEND, 970 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_NSE_SEND,
971 &incoming_flood->purpose, 971 &incoming_flood->purpose,
972 &incoming_flood->signature, 972 &incoming_flood->signature,
973 &incoming_flood->origin.public_key))) 973 &incoming_flood->origin.public_key)))
@@ -1421,7 +1421,7 @@ run (void *cls,
1421 {NULL, 0, 0} 1421 {NULL, 0, 0}
1422 }; 1422 };
1423 char *proof; 1423 char *proof;
1424 struct GNUNET_CRYPTO_EccPrivateKey *pk; 1424 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
1425 1425
1426 cfg = c; 1426 cfg = c;
1427 srv = server; 1427 srv = server;
@@ -1474,10 +1474,10 @@ run (void *cls,
1474 1474
1475 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 1475 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
1476 NULL); 1476 NULL);
1477 pk = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); 1477 pk = GNUNET_CRYPTO_eddsa_key_create_from_configuration (cfg);
1478 GNUNET_assert (NULL != pk); 1478 GNUNET_assert (NULL != pk);
1479 my_private_key = pk; 1479 my_private_key = pk;
1480 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, 1480 GNUNET_CRYPTO_eddsa_key_get_public (my_private_key,
1481 &my_identity.public_key); 1481 &my_identity.public_key);
1482 if (GNUNET_OK != 1482 if (GNUNET_OK !=
1483 GNUNET_CONFIGURATION_get_value_filename (cfg, "NSE", "PROOFFILE", &proof)) 1483 GNUNET_CONFIGURATION_get_value_filename (cfg, "NSE", "PROOFFILE", &proof))
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index 67aeddbe7..e62df3047 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -628,7 +628,7 @@ static void
628run (void *cls, char *const *args, const char *cfgfile, 628run (void *cls, char *const *args, const char *cfgfile,
629 const struct GNUNET_CONFIGURATION_Handle *c) 629 const struct GNUNET_CONFIGURATION_Handle *c)
630{ 630{
631 struct GNUNET_CRYPTO_EccPrivateKey *priv; 631 struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
632 char *fn; 632 char *fn;
633 633
634 cfg = c; 634 cfg = c;
@@ -662,14 +662,14 @@ run (void *cls, char *const *args, const char *cfgfile,
662 "GNUNETD", "HOSTKEYFILE"); 662 "GNUNETD", "HOSTKEYFILE");
663 return; 663 return;
664 } 664 }
665 if (NULL == (priv = GNUNET_CRYPTO_ecc_key_create_from_file (fn))) 665 if (NULL == (priv = GNUNET_CRYPTO_eddsa_key_create_from_file (fn)))
666 { 666 {
667 FPRINTF (stderr, _("Loading hostkey from `%s' failed.\n"), fn); 667 FPRINTF (stderr, _("Loading hostkey from `%s' failed.\n"), fn);
668 GNUNET_free (fn); 668 GNUNET_free (fn);
669 return; 669 return;
670 } 670 }
671 GNUNET_free (fn); 671 GNUNET_free (fn);
672 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv, 672 GNUNET_CRYPTO_eddsa_key_get_public (priv,
673 &my_peer_identity.public_key); 673 &my_peer_identity.public_key);
674 GNUNET_free (priv); 674 GNUNET_free (priv);
675 } 675 }
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index d62e81eae..fe5094d79 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -575,7 +575,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname)
575 remove_garbage (fullname); 575 remove_garbage (fullname);
576 return GNUNET_OK; 576 return GNUNET_OK;
577 } 577 }
578 if (GNUNET_OK == GNUNET_CRYPTO_ecc_public_sign_key_from_string (filename, 578 if (GNUNET_OK == GNUNET_CRYPTO_eddsa_public_key_from_string (filename,
579 strlen (filename), 579 strlen (filename),
580 &identity.public_key)) 580 &identity.public_key))
581 { 581 {
@@ -654,7 +654,7 @@ update_friend_hello (const struct GNUNET_HELLO_Message *hello,
654{ 654{
655 struct GNUNET_HELLO_Message * res; 655 struct GNUNET_HELLO_Message * res;
656 struct GNUNET_HELLO_Message * tmp; 656 struct GNUNET_HELLO_Message * tmp;
657 struct GNUNET_CRYPTO_EccPublicSignKey pk; 657 struct GNUNET_CRYPTO_EddsaPublicKey pk;
658 658
659 if (NULL != friend_hello) 659 if (NULL != friend_hello)
660 { 660 {
diff --git a/src/psycstore/plugin_psycstore_sqlite.c b/src/psycstore/plugin_psycstore_sqlite.c
index adc52c254..356216998 100644
--- a/src/psycstore/plugin_psycstore_sqlite.c
+++ b/src/psycstore/plugin_psycstore_sqlite.c
@@ -621,7 +621,7 @@ database_shutdown (struct Plugin *plugin)
621 */ 621 */
622static int 622static int
623exec_channel (struct Plugin *plugin, sqlite3_stmt *stmt, 623exec_channel (struct Plugin *plugin, sqlite3_stmt *stmt,
624 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key) 624 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key)
625{ 625{
626 if (SQLITE_OK != sqlite3_bind_blob (stmt, 1, channel_key, 626 if (SQLITE_OK != sqlite3_bind_blob (stmt, 1, channel_key,
627 sizeof (*channel_key), SQLITE_STATIC)) 627 sizeof (*channel_key), SQLITE_STATIC))
@@ -721,7 +721,7 @@ transaction_rollback (struct Plugin *plugin)
721 721
722static int 722static int
723channel_key_store (struct Plugin *plugin, 723channel_key_store (struct Plugin *plugin,
724 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key) 724 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key)
725{ 725{
726 sqlite3_stmt *stmt = plugin->insert_channel_key; 726 sqlite3_stmt *stmt = plugin->insert_channel_key;
727 727
@@ -750,7 +750,7 @@ channel_key_store (struct Plugin *plugin,
750 750
751static int 751static int
752slave_key_store (struct Plugin *plugin, 752slave_key_store (struct Plugin *plugin,
753 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key) 753 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key)
754{ 754{
755 sqlite3_stmt *stmt = plugin->insert_slave_key; 755 sqlite3_stmt *stmt = plugin->insert_slave_key;
756 756
@@ -788,8 +788,8 @@ slave_key_store (struct Plugin *plugin,
788 */ 788 */
789static int 789static int
790membership_store (void *cls, 790membership_store (void *cls,
791 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 791 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
792 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 792 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
793 int did_join, 793 int did_join,
794 uint64_t announced_at, 794 uint64_t announced_at,
795 uint64_t effective_since, 795 uint64_t effective_since,
@@ -850,8 +850,8 @@ membership_store (void *cls,
850 */ 850 */
851static int 851static int
852membership_test (void *cls, 852membership_test (void *cls,
853 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 853 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
854 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 854 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
855 uint64_t message_id) 855 uint64_t message_id)
856{ 856{
857 struct Plugin *plugin = cls; 857 struct Plugin *plugin = cls;
@@ -897,7 +897,7 @@ membership_test (void *cls,
897 */ 897 */
898static int 898static int
899fragment_store (void *cls, 899fragment_store (void *cls,
900 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 900 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
901 const struct GNUNET_MULTICAST_MessageHeader *msg, 901 const struct GNUNET_MULTICAST_MessageHeader *msg,
902 uint32_t psycstore_flags) 902 uint32_t psycstore_flags)
903{ 903{
@@ -970,7 +970,7 @@ fragment_store (void *cls,
970 */ 970 */
971static int 971static int
972message_add_flags (void *cls, 972message_add_flags (void *cls,
973 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 973 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
974 uint64_t message_id, 974 uint64_t message_id,
975 uint64_t psycstore_flags) 975 uint64_t psycstore_flags)
976{ 976{
@@ -1045,7 +1045,7 @@ fragment_row (sqlite3_stmt *stmt, GNUNET_PSYCSTORE_FragmentCallback cb,
1045 */ 1045 */
1046static int 1046static int
1047fragment_get (void *cls, 1047fragment_get (void *cls,
1048 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1048 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1049 uint64_t fragment_id, 1049 uint64_t fragment_id,
1050 GNUNET_PSYCSTORE_FragmentCallback cb, 1050 GNUNET_PSYCSTORE_FragmentCallback cb,
1051 void *cb_cls) 1051 void *cb_cls)
@@ -1096,7 +1096,7 @@ fragment_get (void *cls,
1096 */ 1096 */
1097static int 1097static int
1098message_get (void *cls, 1098message_get (void *cls,
1099 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1099 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1100 uint64_t message_id, 1100 uint64_t message_id,
1101 uint64_t *returned_fragments, 1101 uint64_t *returned_fragments,
1102 GNUNET_PSYCSTORE_FragmentCallback cb, 1102 GNUNET_PSYCSTORE_FragmentCallback cb,
@@ -1160,7 +1160,7 @@ message_get (void *cls,
1160 */ 1160 */
1161static int 1161static int
1162message_get_fragment (void *cls, 1162message_get_fragment (void *cls,
1163 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1163 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1164 uint64_t message_id, 1164 uint64_t message_id,
1165 uint64_t fragment_offset, 1165 uint64_t fragment_offset,
1166 GNUNET_PSYCSTORE_FragmentCallback cb, 1166 GNUNET_PSYCSTORE_FragmentCallback cb,
@@ -1213,7 +1213,7 @@ message_get_fragment (void *cls,
1213 */ 1213 */
1214static int 1214static int
1215counters_message_get (void *cls, 1215counters_message_get (void *cls,
1216 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1216 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1217 uint64_t *max_fragment_id, 1217 uint64_t *max_fragment_id,
1218 uint64_t *max_message_id, 1218 uint64_t *max_message_id,
1219 uint64_t *max_group_generation) 1219 uint64_t *max_group_generation)
@@ -1266,7 +1266,7 @@ counters_message_get (void *cls,
1266 */ 1266 */
1267static int 1267static int
1268counters_state_get (void *cls, 1268counters_state_get (void *cls,
1269 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1269 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1270 uint64_t *max_state_message_id) 1270 uint64_t *max_state_message_id)
1271{ 1271{
1272 struct Plugin *plugin = cls; 1272 struct Plugin *plugin = cls;
@@ -1314,7 +1314,7 @@ counters_state_get (void *cls,
1314 */ 1314 */
1315static int 1315static int
1316state_set (struct Plugin *plugin, sqlite3_stmt *stmt, 1316state_set (struct Plugin *plugin, sqlite3_stmt *stmt,
1317 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1317 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1318 const char *name, const void *value, size_t value_size) 1318 const char *name, const void *value, size_t value_size)
1319{ 1319{
1320 int ret = GNUNET_SYSERR; 1320 int ret = GNUNET_SYSERR;
@@ -1354,7 +1354,7 @@ state_set (struct Plugin *plugin, sqlite3_stmt *stmt,
1354 1354
1355static int 1355static int
1356update_message_id (struct Plugin *plugin, sqlite3_stmt *stmt, 1356update_message_id (struct Plugin *plugin, sqlite3_stmt *stmt,
1357 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1357 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1358 uint64_t message_id) 1358 uint64_t message_id)
1359{ 1359{
1360 if (SQLITE_OK != sqlite3_bind_int64 (stmt, 1, message_id) 1360 if (SQLITE_OK != sqlite3_bind_int64 (stmt, 1, message_id)
@@ -1384,7 +1384,7 @@ update_message_id (struct Plugin *plugin, sqlite3_stmt *stmt,
1384 */ 1384 */
1385static int 1385static int
1386state_modify_begin (void *cls, 1386state_modify_begin (void *cls,
1387 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1387 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1388 uint64_t message_id, uint64_t state_delta) 1388 uint64_t message_id, uint64_t state_delta)
1389{ 1389{
1390 struct Plugin *plugin = cls; 1390 struct Plugin *plugin = cls;
@@ -1449,7 +1449,7 @@ state_modify_begin (void *cls,
1449 */ 1449 */
1450static int 1450static int
1451state_modify_set (void *cls, 1451state_modify_set (void *cls,
1452 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1452 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1453 const char *name, const void *value, size_t value_size) 1453 const char *name, const void *value, size_t value_size)
1454{ 1454{
1455 struct Plugin *plugin = cls; 1455 struct Plugin *plugin = cls;
@@ -1466,7 +1466,7 @@ state_modify_set (void *cls,
1466 */ 1466 */
1467static int 1467static int
1468state_modify_end (void *cls, 1468state_modify_end (void *cls,
1469 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1469 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1470 uint64_t message_id) 1470 uint64_t message_id)
1471{ 1471{
1472 struct Plugin *plugin = cls; 1472 struct Plugin *plugin = cls;
@@ -1487,7 +1487,7 @@ state_modify_end (void *cls,
1487 */ 1487 */
1488static int 1488static int
1489state_sync_begin (void *cls, 1489state_sync_begin (void *cls,
1490 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key) 1490 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key)
1491{ 1491{
1492 struct Plugin *plugin = cls; 1492 struct Plugin *plugin = cls;
1493 return exec_channel (plugin, plugin->delete_state_sync, channel_key); 1493 return exec_channel (plugin, plugin->delete_state_sync, channel_key);
@@ -1503,7 +1503,7 @@ state_sync_begin (void *cls,
1503 */ 1503 */
1504static int 1504static int
1505state_sync_set (void *cls, 1505state_sync_set (void *cls,
1506 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1506 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1507 const char *name, const void *value, size_t value_size) 1507 const char *name, const void *value, size_t value_size)
1508{ 1508{
1509 struct Plugin *plugin = cls; 1509 struct Plugin *plugin = cls;
@@ -1517,7 +1517,7 @@ state_sync_set (void *cls,
1517 */ 1517 */
1518static int 1518static int
1519state_sync_end (void *cls, 1519state_sync_end (void *cls,
1520 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1520 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1521 uint64_t message_id) 1521 uint64_t message_id)
1522{ 1522{
1523 struct Plugin *plugin = cls; 1523 struct Plugin *plugin = cls;
@@ -1547,7 +1547,7 @@ state_sync_end (void *cls,
1547 * @return #GNUNET_OK on success, else #GNUNET_SYSERR 1547 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
1548 */ 1548 */
1549static int 1549static int
1550state_reset (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key) 1550state_reset (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key)
1551{ 1551{
1552 struct Plugin *plugin = cls; 1552 struct Plugin *plugin = cls;
1553 return exec_channel (plugin, plugin->delete_state, channel_key); 1553 return exec_channel (plugin, plugin->delete_state, channel_key);
@@ -1563,7 +1563,7 @@ state_reset (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key
1563 */ 1563 */
1564static int 1564static int
1565state_update_signed (void *cls, 1565state_update_signed (void *cls,
1566 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key) 1566 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key)
1567{ 1567{
1568 struct Plugin *plugin = cls; 1568 struct Plugin *plugin = cls;
1569 return exec_channel (plugin, plugin->update_state_signed, channel_key); 1569 return exec_channel (plugin, plugin->update_state_signed, channel_key);
@@ -1578,7 +1578,7 @@ state_update_signed (void *cls,
1578 * @return #GNUNET_OK on success, else #GNUNET_SYSERR 1578 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
1579 */ 1579 */
1580static int 1580static int
1581state_get (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1581state_get (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1582 const char *name, GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls) 1582 const char *name, GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls)
1583{ 1583{
1584 struct Plugin *plugin = cls; 1584 struct Plugin *plugin = cls;
@@ -1629,7 +1629,7 @@ state_get (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1629 * @return #GNUNET_OK on success, else #GNUNET_SYSERR 1629 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
1630 */ 1630 */
1631static int 1631static int
1632state_get_prefix (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1632state_get_prefix (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1633 const char *name, GNUNET_PSYCSTORE_StateCallback cb, 1633 const char *name, GNUNET_PSYCSTORE_StateCallback cb,
1634 void *cb_cls) 1634 void *cb_cls)
1635{ 1635{
@@ -1697,7 +1697,7 @@ state_get_prefix (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channe
1697 */ 1697 */
1698static int 1698static int
1699state_get_signed (void *cls, 1699state_get_signed (void *cls,
1700 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1700 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1701 GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls) 1701 GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls)
1702{ 1702{
1703 struct Plugin *plugin = cls; 1703 struct Plugin *plugin = cls;
diff --git a/src/psycstore/psycstore.h b/src/psycstore/psycstore.h
index 61d4adc06..f28d1ba78 100644
--- a/src/psycstore/psycstore.h
+++ b/src/psycstore/psycstore.h
@@ -144,7 +144,7 @@ struct OperationRequest
144 */ 144 */
145 uint32_t op_id GNUNET_PACKED; 145 uint32_t op_id GNUNET_PACKED;
146 146
147 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 147 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
148 148
149}; 149};
150 150
@@ -167,12 +167,12 @@ struct MembershipStoreRequest
167 /** 167 /**
168 * Channel's public key. 168 * Channel's public key.
169 */ 169 */
170 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 170 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
171 171
172 /** 172 /**
173 * Slave's public key. 173 * Slave's public key.
174 */ 174 */
175 struct GNUNET_CRYPTO_EccPublicSignKey slave_key; 175 struct GNUNET_CRYPTO_EddsaPublicKey slave_key;
176 176
177 uint64_t announced_at GNUNET_PACKED; 177 uint64_t announced_at GNUNET_PACKED;
178 uint64_t effective_since GNUNET_PACKED; 178 uint64_t effective_since GNUNET_PACKED;
@@ -199,12 +199,12 @@ struct MembershipTestRequest
199 /** 199 /**
200 * Channel's public key. 200 * Channel's public key.
201 */ 201 */
202 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 202 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
203 203
204 /** 204 /**
205 * Slave's public key. 205 * Slave's public key.
206 */ 206 */
207 struct GNUNET_CRYPTO_EccPublicSignKey slave_key; 207 struct GNUNET_CRYPTO_EddsaPublicKey slave_key;
208 208
209 uint64_t message_id GNUNET_PACKED; 209 uint64_t message_id GNUNET_PACKED;
210 210
@@ -230,7 +230,7 @@ struct FragmentStoreRequest
230 /** 230 /**
231 * Channel's public key. 231 * Channel's public key.
232 */ 232 */
233 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 233 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
234 234
235 uint32_t psycstore_flags GNUNET_PACKED; 235 uint32_t psycstore_flags GNUNET_PACKED;
236}; 236};
@@ -254,7 +254,7 @@ struct FragmentGetRequest
254 /** 254 /**
255 * Channel's public key. 255 * Channel's public key.
256 */ 256 */
257 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 257 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
258 258
259 uint64_t fragment_id GNUNET_PACKED; 259 uint64_t fragment_id GNUNET_PACKED;
260}; 260};
@@ -278,7 +278,7 @@ struct MessageGetRequest
278 /** 278 /**
279 * Channel's public key. 279 * Channel's public key.
280 */ 280 */
281 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 281 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
282 282
283 uint64_t message_id GNUNET_PACKED; 283 uint64_t message_id GNUNET_PACKED;
284}; 284};
@@ -302,7 +302,7 @@ struct MessageGetFragmentRequest
302 /** 302 /**
303 * Channel's public key. 303 * Channel's public key.
304 */ 304 */
305 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 305 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
306 306
307 uint64_t message_id GNUNET_PACKED; 307 uint64_t message_id GNUNET_PACKED;
308 308
@@ -328,7 +328,7 @@ struct StateHashUpdateRequest
328 /** 328 /**
329 * Channel's public key. 329 * Channel's public key.
330 */ 330 */
331 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 331 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
332 332
333 struct GNUNET_HashCode hash; 333 struct GNUNET_HashCode hash;
334}; 334};
@@ -357,7 +357,7 @@ struct StateModifyRequest
357 /** 357 /**
358 * Channel's public key. 358 * Channel's public key.
359 */ 359 */
360 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 360 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
361 361
362 uint64_t message_id GNUNET_PACKED; 362 uint64_t message_id GNUNET_PACKED;
363 363
@@ -400,7 +400,7 @@ struct StateSyncRequest
400 /** 400 /**
401 * Channel's public key. 401 * Channel's public key.
402 */ 402 */
403 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 403 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
404 404
405 uint64_t message_id GNUNET_PACKED; 405 uint64_t message_id GNUNET_PACKED;
406 406
diff --git a/src/psycstore/psycstore_api.c b/src/psycstore/psycstore_api.c
index 0e72d9ca2..55d7f73ec 100644
--- a/src/psycstore/psycstore_api.c
+++ b/src/psycstore/psycstore_api.c
@@ -655,8 +655,8 @@ GNUNET_PSYCSTORE_operation_cancel (struct GNUNET_PSYCSTORE_OperationHandle *op)
655 */ 655 */
656struct GNUNET_PSYCSTORE_OperationHandle * 656struct GNUNET_PSYCSTORE_OperationHandle *
657GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, 657GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
658 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 658 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
659 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 659 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
660 int did_join, 660 int did_join,
661 uint64_t announced_at, 661 uint64_t announced_at,
662 uint64_t effective_since, 662 uint64_t effective_since,
@@ -721,8 +721,8 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
721 */ 721 */
722struct GNUNET_PSYCSTORE_OperationHandle * 722struct GNUNET_PSYCSTORE_OperationHandle *
723GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h, 723GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
724 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 724 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
725 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 725 const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
726 uint64_t message_id, 726 uint64_t message_id,
727 uint64_t group_generation, 727 uint64_t group_generation,
728 GNUNET_PSYCSTORE_ResultCallback rcb, 728 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -769,7 +769,7 @@ GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
769 */ 769 */
770struct GNUNET_PSYCSTORE_OperationHandle * 770struct GNUNET_PSYCSTORE_OperationHandle *
771GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h, 771GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h,
772 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 772 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
773 const struct GNUNET_MULTICAST_MessageHeader *message, 773 const struct GNUNET_MULTICAST_MessageHeader *message,
774 uint32_t psycstore_flags, 774 uint32_t psycstore_flags,
775 GNUNET_PSYCSTORE_ResultCallback rcb, 775 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -815,7 +815,7 @@ GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h,
815 */ 815 */
816struct GNUNET_PSYCSTORE_OperationHandle * 816struct GNUNET_PSYCSTORE_OperationHandle *
817GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h, 817GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
818 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 818 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
819 uint64_t fragment_id, 819 uint64_t fragment_id,
820 GNUNET_PSYCSTORE_FragmentCallback fcb, 820 GNUNET_PSYCSTORE_FragmentCallback fcb,
821 GNUNET_PSYCSTORE_ResultCallback rcb, 821 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -860,7 +860,7 @@ GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
860 */ 860 */
861struct GNUNET_PSYCSTORE_OperationHandle * 861struct GNUNET_PSYCSTORE_OperationHandle *
862GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, 862GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
863 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 863 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
864 uint64_t message_id, 864 uint64_t message_id,
865 GNUNET_PSYCSTORE_FragmentCallback fcb, 865 GNUNET_PSYCSTORE_FragmentCallback fcb,
866 GNUNET_PSYCSTORE_ResultCallback rcb, 866 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -907,7 +907,7 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
907 */ 907 */
908struct GNUNET_PSYCSTORE_OperationHandle * 908struct GNUNET_PSYCSTORE_OperationHandle *
909GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h, 909GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h,
910 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 910 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
911 uint64_t message_id, 911 uint64_t message_id,
912 uint64_t fragment_offset, 912 uint64_t fragment_offset,
913 GNUNET_PSYCSTORE_FragmentCallback fcb, 913 GNUNET_PSYCSTORE_FragmentCallback fcb,
@@ -955,7 +955,7 @@ GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h,
955 */ 955 */
956struct GNUNET_PSYCSTORE_OperationHandle * 956struct GNUNET_PSYCSTORE_OperationHandle *
957GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h, 957GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
958 struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 958 struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
959 GNUNET_PSYCSTORE_CountersCallback ccb, 959 GNUNET_PSYCSTORE_CountersCallback ccb,
960 void *mccb_cls) 960 void *mccb_cls)
961{ 961{
@@ -1001,7 +1001,7 @@ GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
1001 */ 1001 */
1002struct GNUNET_PSYCSTORE_OperationHandle * 1002struct GNUNET_PSYCSTORE_OperationHandle *
1003GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h, 1003GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
1004 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1004 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1005 uint64_t message_id, 1005 uint64_t message_id,
1006 uint64_t state_delta, 1006 uint64_t state_delta,
1007 size_t modifier_count, 1007 size_t modifier_count,
@@ -1070,7 +1070,7 @@ GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
1070 */ 1070 */
1071struct GNUNET_PSYCSTORE_OperationHandle * 1071struct GNUNET_PSYCSTORE_OperationHandle *
1072GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h, 1072GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
1073 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1073 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1074 uint64_t message_id, 1074 uint64_t message_id,
1075 size_t modifier_count, 1075 size_t modifier_count,
1076 const struct GNUNET_ENV_Modifier *modifiers, 1076 const struct GNUNET_ENV_Modifier *modifiers,
@@ -1132,7 +1132,7 @@ GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
1132 */ 1132 */
1133struct GNUNET_PSYCSTORE_OperationHandle * 1133struct GNUNET_PSYCSTORE_OperationHandle *
1134GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h, 1134GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h,
1135 const struct GNUNET_CRYPTO_EccPublicSignKey 1135 const struct GNUNET_CRYPTO_EddsaPublicKey
1136 *channel_key, 1136 *channel_key,
1137 GNUNET_PSYCSTORE_ResultCallback rcb, 1137 GNUNET_PSYCSTORE_ResultCallback rcb,
1138 void *rcb_cls) 1138 void *rcb_cls)
@@ -1174,7 +1174,7 @@ GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h,
1174 */ 1174 */
1175struct GNUNET_PSYCSTORE_OperationHandle * 1175struct GNUNET_PSYCSTORE_OperationHandle *
1176GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h, 1176GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h,
1177 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1177 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1178 uint64_t message_id, 1178 uint64_t message_id,
1179 const struct GNUNET_HashCode *hash, 1179 const struct GNUNET_HashCode *hash,
1180 GNUNET_PSYCSTORE_ResultCallback rcb, 1180 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -1218,7 +1218,7 @@ GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h,
1218 */ 1218 */
1219struct GNUNET_PSYCSTORE_OperationHandle * 1219struct GNUNET_PSYCSTORE_OperationHandle *
1220GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h, 1220GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
1221 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1221 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1222 const char *name, 1222 const char *name,
1223 GNUNET_PSYCSTORE_StateCallback scb, 1223 GNUNET_PSYCSTORE_StateCallback scb,
1224 GNUNET_PSYCSTORE_ResultCallback rcb, 1224 GNUNET_PSYCSTORE_ResultCallback rcb,
@@ -1265,7 +1265,7 @@ GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
1265 */ 1265 */
1266struct GNUNET_PSYCSTORE_OperationHandle * 1266struct GNUNET_PSYCSTORE_OperationHandle *
1267GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h, 1267GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h,
1268 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 1268 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
1269 const char *name_prefix, 1269 const char *name_prefix,
1270 GNUNET_PSYCSTORE_StateCallback scb, 1270 GNUNET_PSYCSTORE_StateCallback scb,
1271 GNUNET_PSYCSTORE_ResultCallback rcb, 1271 GNUNET_PSYCSTORE_ResultCallback rcb,
diff --git a/src/psycstore/test_plugin_psycstore.c b/src/psycstore/test_plugin_psycstore.c
index 0a8d4c2bc..ccd3751bf 100644
--- a/src/psycstore/test_plugin_psycstore.c
+++ b/src/psycstore/test_plugin_psycstore.c
@@ -50,11 +50,11 @@ static int ok;
50 */ 50 */
51static const char *plugin_name; 51static const char *plugin_name;
52 52
53static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; 53static struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key;
54static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; 54static struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key;
55 55
56static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key; 56static struct GNUNET_CRYPTO_EddsaPublicKey channel_pub_key;
57static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key; 57static struct GNUNET_CRYPTO_EddsaPublicKey slave_pub_key;
58 58
59/** 59/**
60 * Function called when the service shuts down. Unloads our psycstore 60 * Function called when the service shuts down. Unloads our psycstore
@@ -177,9 +177,9 @@ run (void *cls, char *const *args, const char *cfgfile,
177 channel_key = GNUNET_CRYPTO_ecc_key_create (); 177 channel_key = GNUNET_CRYPTO_ecc_key_create ();
178 slave_key = GNUNET_CRYPTO_ecc_key_create (); 178 slave_key = GNUNET_CRYPTO_ecc_key_create ();
179 179
180 GNUNET_CRYPTO_ecc_key_get_public_for_signature (channel_key, 180 GNUNET_CRYPTO_eddsa_key_get_public (channel_key,
181 &channel_pub_key); 181 &channel_pub_key);
182 GNUNET_CRYPTO_ecc_key_get_public_for_signature (slave_key, &slave_pub_key); 182 GNUNET_CRYPTO_eddsa_key_get_public (slave_key, &slave_pub_key);
183 183
184 GNUNET_assert (GNUNET_OK == db->membership_store (db->cls, &channel_pub_key, 184 GNUNET_assert (GNUNET_OK == db->membership_store (db->cls, &channel_pub_key,
185 &slave_pub_key, GNUNET_YES, 185 &slave_pub_key, GNUNET_YES,
@@ -218,7 +218,7 @@ run (void *cls, char *const *args, const char *cfgfile,
218 - sizeof (msg->hop_counter) 218 - sizeof (msg->hop_counter)
219 - sizeof (msg->signature)); 219 - sizeof (msg->signature));
220 msg->purpose.purpose = htonl (234); 220 msg->purpose.purpose = htonl (234);
221 GNUNET_CRYPTO_ecc_sign (slave_key, &msg->purpose, &msg->signature); 221 GNUNET_CRYPTO_eddsa_sign (slave_key, &msg->purpose, &msg->signature);
222 222
223 struct FragmentClosure fcls = { 0 }; 223 struct FragmentClosure fcls = { 0 };
224 fcls.n = 0; 224 fcls.n = 0;
diff --git a/src/psycstore/test_psycstore.c b/src/psycstore/test_psycstore.c
index bb6f88665..cca3c808d 100644
--- a/src/psycstore/test_psycstore.c
+++ b/src/psycstore/test_psycstore.c
@@ -56,11 +56,11 @@ static struct GNUNET_PSYCSTORE_OperationHandle *op;
56 */ 56 */
57static GNUNET_SCHEDULER_TaskIdentifier end_badly_task; 57static GNUNET_SCHEDULER_TaskIdentifier end_badly_task;
58 58
59static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; 59static struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key;
60static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; 60static struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key;
61 61
62static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key; 62static struct GNUNET_CRYPTO_EddsaPublicKey channel_pub_key;
63static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key; 63static struct GNUNET_CRYPTO_EddsaPublicKey slave_pub_key;
64 64
65static struct FragmentClosure 65static struct FragmentClosure
66{ 66{
@@ -436,7 +436,7 @@ membership_test_result (void *cls, int64_t result, const char *err_msg)
436 - sizeof (msg->hop_counter) 436 - sizeof (msg->hop_counter)
437 - sizeof (msg->signature)); 437 - sizeof (msg->signature));
438 msg->purpose.purpose = htonl (234); 438 msg->purpose.purpose = htonl (234);
439 GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_ecc_sign (slave_key, &msg->purpose, 439 GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (slave_key, &msg->purpose,
440 &msg->signature)); 440 &msg->signature));
441 441
442 op = GNUNET_PSYCSTORE_fragment_store (h, &channel_pub_key, msg, fcls.flags[0], 442 op = GNUNET_PSYCSTORE_fragment_store (h, &channel_pub_key, msg, fcls.flags[0],
@@ -498,8 +498,8 @@ run (void *cls,
498 channel_key = GNUNET_CRYPTO_ecc_key_create (); 498 channel_key = GNUNET_CRYPTO_ecc_key_create ();
499 slave_key = GNUNET_CRYPTO_ecc_key_create (); 499 slave_key = GNUNET_CRYPTO_ecc_key_create ();
500 500
501 GNUNET_CRYPTO_ecc_key_get_public_for_signature (channel_key, &channel_pub_key); 501 GNUNET_CRYPTO_eddsa_key_get_public (channel_key, &channel_pub_key);
502 GNUNET_CRYPTO_ecc_key_get_public_for_signature (slave_key, &slave_pub_key); 502 GNUNET_CRYPTO_eddsa_key_get_public (slave_key, &slave_pub_key);
503 503
504 op = GNUNET_PSYCSTORE_membership_store (h, &channel_pub_key, &slave_pub_key, 504 op = GNUNET_PSYCSTORE_membership_store (h, &channel_pub_key, &slave_pub_key,
505 GNUNET_YES, 4, 2, 1, 505 GNUNET_YES, 4, 2, 1,
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index bcb99aaf5..3efd769f1 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -98,7 +98,7 @@ static unsigned int rounds = 3;
98/** 98/**
99 * Private key for this peer. 99 * Private key for this peer.
100 */ 100 */
101static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 101static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
102 102
103 103
104 104
@@ -258,7 +258,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
258 258
259 cfg = cfg_; 259 cfg = cfg_;
260 260
261 my_private_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); 261 my_private_key = GNUNET_CRYPTO_eddsa_key_create_from_configuration (cfg);
262 GNUNET_assert (NULL != my_private_key); 262 GNUNET_assert (NULL != my_private_key);
263 if (GNUNET_OK != 263 if (GNUNET_OK !=
264 GNUNET_CONFIGURATION_get_value_number (cfg, "REGEXPROFILER", 264 GNUNET_CONFIGURATION_get_value_number (cfg, "REGEXPROFILER",
diff --git a/src/regex/gnunet-service-regex.c b/src/regex/gnunet-service-regex.c
index 620086b15..cc32c46de 100644
--- a/src/regex/gnunet-service-regex.c
+++ b/src/regex/gnunet-service-regex.c
@@ -102,7 +102,7 @@ static struct GNUNET_SERVER_NotificationContext *nc;
102/** 102/**
103 * Private key for this peer. 103 * Private key for this peer.
104 */ 104 */
105static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 105static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
106 106
107 107
108/** 108/**
@@ -362,7 +362,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
362 {NULL, NULL, 0, 0} 362 {NULL, NULL, 0, 0}
363 }; 363 };
364 364
365 my_private_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); 365 my_private_key = GNUNET_CRYPTO_eddsa_key_create_from_configuration (cfg);
366 if (NULL == my_private_key) 366 if (NULL == my_private_key)
367 { 367 {
368 GNUNET_SCHEDULER_shutdown (); 368 GNUNET_SCHEDULER_shutdown ();
diff --git a/src/regex/plugin_block_regex.c b/src/regex/plugin_block_regex.c
index 3d7b97725..1db1d0d5e 100644
--- a/src/regex/plugin_block_regex.c
+++ b/src/regex/plugin_block_regex.c
@@ -186,7 +186,7 @@ evaluate_block_regex_accept (void *cls, enum GNUNET_BLOCK_Type type,
186 return GNUNET_BLOCK_EVALUATION_OK_DUPLICATE; 186 return GNUNET_BLOCK_EVALUATION_OK_DUPLICATE;
187 } 187 }
188 if (GNUNET_OK != 188 if (GNUNET_OK !=
189 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT, 189 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT,
190 &rba->purpose, 190 &rba->purpose,
191 &rba->signature, 191 &rba->signature,
192 &rba->peer.public_key)) 192 &rba->peer.public_key))
diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c
index 55ca426cb..e87881902 100644
--- a/src/regex/regex_internal_dht.c
+++ b/src/regex/regex_internal_dht.c
@@ -62,7 +62,7 @@ struct REGEX_INTERNAL_Announcement
62 /** 62 /**
63 * Our private key. 63 * Our private key.
64 */ 64 */
65 const struct GNUNET_CRYPTO_EccPrivateKey *priv; 65 const struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
66 66
67 /** 67 /**
68 * Optional statistics handle to report usage. Can be NULL. 68 * Optional statistics handle to report usage. Can be NULL.
@@ -121,10 +121,10 @@ regex_iterator (void *cls,
121 ab.purpose.purpose = ntohl (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT); 121 ab.purpose.purpose = ntohl (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT);
122 ab.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_DHT_MAX_EXPIRATION)); 122 ab.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_DHT_MAX_EXPIRATION));
123 ab.key = *key; 123 ab.key = *key;
124 GNUNET_CRYPTO_ecc_key_get_public_for_signature (h->priv, 124 GNUNET_CRYPTO_eddsa_key_get_public (h->priv,
125 &ab.peer.public_key); 125 &ab.peer.public_key);
126 GNUNET_assert (GNUNET_OK == 126 GNUNET_assert (GNUNET_OK ==
127 GNUNET_CRYPTO_ecc_sign (h->priv, 127 GNUNET_CRYPTO_eddsa_sign (h->priv,
128 &ab.purpose, 128 &ab.purpose,
129 &ab.signature)); 129 &ab.signature));
130 130
@@ -179,7 +179,7 @@ regex_iterator (void *cls,
179 */ 179 */
180struct REGEX_INTERNAL_Announcement * 180struct REGEX_INTERNAL_Announcement *
181REGEX_INTERNAL_announce (struct GNUNET_DHT_Handle *dht, 181REGEX_INTERNAL_announce (struct GNUNET_DHT_Handle *dht,
182 const struct GNUNET_CRYPTO_EccPrivateKey *priv, 182 const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
183 const char *regex, 183 const char *regex,
184 uint16_t compression, 184 uint16_t compression,
185 struct GNUNET_STATISTICS_Handle *stats) 185 struct GNUNET_STATISTICS_Handle *stats)
diff --git a/src/regex/regex_internal_lib.h b/src/regex/regex_internal_lib.h
index 6b69d79eb..ec4e339d2 100644
--- a/src/regex/regex_internal_lib.h
+++ b/src/regex/regex_internal_lib.h
@@ -182,7 +182,7 @@ struct REGEX_INTERNAL_Search;
182 */ 182 */
183struct REGEX_INTERNAL_Announcement * 183struct REGEX_INTERNAL_Announcement *
184REGEX_INTERNAL_announce (struct GNUNET_DHT_Handle *dht, 184REGEX_INTERNAL_announce (struct GNUNET_DHT_Handle *dht,
185 const struct GNUNET_CRYPTO_EccPrivateKey *priv, 185 const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
186 const char *regex, 186 const char *regex,
187 uint16_t compression, 187 uint16_t compression,
188 struct GNUNET_STATISTICS_Handle *stats); 188 struct GNUNET_STATISTICS_Handle *stats);
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c
index 5f97a7112..6b2aa6180 100644
--- a/src/revocation/gnunet-revocation.c
+++ b/src/revocation/gnunet-revocation.c
@@ -193,12 +193,12 @@ struct RevocationData
193 /** 193 /**
194 * Public key. 194 * Public key.
195 */ 195 */
196 struct GNUNET_CRYPTO_EccPublicSignKey key; 196 struct GNUNET_CRYPTO_EcdsaPublicKey key;
197 197
198 /** 198 /**
199 * Revocation signature data. 199 * Revocation signature data.
200 */ 200 */
201 struct GNUNET_CRYPTO_EccSignature sig; 201 struct GNUNET_CRYPTO_EcdsaSignature sig;
202 202
203 /** 203 /**
204 * Proof of work (in NBO). 204 * Proof of work (in NBO).
@@ -310,7 +310,7 @@ ego_callback (void *cls,
310 const struct GNUNET_IDENTITY_Ego *ego) 310 const struct GNUNET_IDENTITY_Ego *ego)
311{ 311{
312 struct RevocationData *rd; 312 struct RevocationData *rd;
313 struct GNUNET_CRYPTO_EccPublicSignKey key; 313 struct GNUNET_CRYPTO_EcdsaPublicKey key;
314 314
315 el = NULL; 315 el = NULL;
316 if (NULL == ego) 316 if (NULL == ego)
@@ -334,7 +334,7 @@ ego_callback (void *cls,
334 { 334 {
335 if (0 != memcmp (&rd->key, 335 if (0 != memcmp (&rd->key,
336 &key, 336 &key,
337 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey))) 337 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)))
338 { 338 {
339 fprintf (stderr, 339 fprintf (stderr,
340 _("Error: revocation certificate in `%s' is not for `%s'\n"), 340 _("Error: revocation certificate in `%s' is not for `%s'\n"),
@@ -387,14 +387,14 @@ run (void *cls,
387 const char *cfgfile, 387 const char *cfgfile,
388 const struct GNUNET_CONFIGURATION_Handle *c) 388 const struct GNUNET_CONFIGURATION_Handle *c)
389{ 389{
390 struct GNUNET_CRYPTO_EccPublicSignKey pk; 390 struct GNUNET_CRYPTO_EcdsaPublicKey pk;
391 struct RevocationData rd; 391 struct RevocationData rd;
392 392
393 cfg = c; 393 cfg = c;
394 if (NULL != test_ego) 394 if (NULL != test_ego)
395 { 395 {
396 if (GNUNET_OK != 396 if (GNUNET_OK !=
397 GNUNET_CRYPTO_ecc_public_sign_key_from_string (test_ego, 397 GNUNET_CRYPTO_ecdsa_public_key_from_string (test_ego,
398 strlen (test_ego), 398 strlen (test_ego),
399 &pk)) 399 &pk))
400 { 400 {
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index c6e3152ba..5a7170de6 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -147,7 +147,7 @@ verify_revoke_message (const struct RevokeMessage *rm)
147 return GNUNET_NO; 147 return GNUNET_NO;
148 } 148 }
149 if (GNUNET_OK != 149 if (GNUNET_OK !=
150 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_REVOCATION, 150 GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_REVOCATION,
151 &rm->purpose, 151 &rm->purpose,
152 &rm->signature, 152 &rm->signature,
153 &rm->public_key)) 153 &rm->public_key))
@@ -177,7 +177,7 @@ handle_query_message (void *cls,
177 int res; 177 int res;
178 178
179 GNUNET_CRYPTO_hash (&qm->key, 179 GNUNET_CRYPTO_hash (&qm->key,
180 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 180 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
181 &hc); 181 &hc);
182 res = GNUNET_CONTAINER_multihashmap_contains (revocation_map, &hc); 182 res = GNUNET_CONTAINER_multihashmap_contains (revocation_map, &hc);
183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -240,7 +240,7 @@ publicize_rm (const struct RevokeMessage *rm)
240 struct GNUNET_SET_Element e; 240 struct GNUNET_SET_Element e;
241 241
242 GNUNET_CRYPTO_hash (&rm->public_key, 242 GNUNET_CRYPTO_hash (&rm->public_key,
243 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 243 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
244 &hc); 244 &hc);
245 if (GNUNET_YES == 245 if (GNUNET_YES ==
246 GNUNET_CONTAINER_multihashmap_contains (revocation_map, 246 GNUNET_CONTAINER_multihashmap_contains (revocation_map,
@@ -622,7 +622,7 @@ run (void *cls,
622 } 622 }
623 GNUNET_break (0 == ntohl (rm->reserved)); 623 GNUNET_break (0 == ntohl (rm->reserved));
624 GNUNET_CRYPTO_hash (&rm->public_key, 624 GNUNET_CRYPTO_hash (&rm->public_key,
625 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 625 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
626 &hc); 626 &hc);
627 GNUNET_break (GNUNET_OK == 627 GNUNET_break (GNUNET_OK ==
628 GNUNET_CONTAINER_multihashmap_put (revocation_map, 628 GNUNET_CONTAINER_multihashmap_put (revocation_map,
diff --git a/src/revocation/revocation.h b/src/revocation/revocation.h
index b13d79a37..48c284a4d 100644
--- a/src/revocation/revocation.h
+++ b/src/revocation/revocation.h
@@ -48,7 +48,7 @@ struct QueryMessage
48 /** 48 /**
49 * Key to check. 49 * Key to check.
50 */ 50 */
51 struct GNUNET_CRYPTO_EccPublicSignKey key; 51 struct GNUNET_CRYPTO_EcdsaPublicKey key;
52 52
53}; 53};
54 54
@@ -98,7 +98,7 @@ struct RevokeMessage
98 /** 98 /**
99 * Signature confirming revocation. 99 * Signature confirming revocation.
100 */ 100 */
101 struct GNUNET_CRYPTO_EccSignature signature; 101 struct GNUNET_CRYPTO_EcdsaSignature signature;
102 102
103 /** 103 /**
104 * Must have purpose #GNUNET_SIGNATURE_PURPOSE_REVOCATION, 104 * Must have purpose #GNUNET_SIGNATURE_PURPOSE_REVOCATION,
@@ -109,7 +109,7 @@ struct RevokeMessage
109 /** 109 /**
110 * Key to revoke. 110 * Key to revoke.
111 */ 111 */
112 struct GNUNET_CRYPTO_EccPublicSignKey public_key; 112 struct GNUNET_CRYPTO_EcdsaPublicKey public_key;
113 113
114}; 114};
115 115
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index ebf85a94e..82e905e09 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -49,7 +49,7 @@ struct GNUNET_REVOCATION_Query
49 /** 49 /**
50 * Key to check. 50 * Key to check.
51 */ 51 */
52 struct GNUNET_CRYPTO_EccPublicSignKey key; 52 struct GNUNET_CRYPTO_EcdsaPublicKey key;
53 53
54 /** 54 /**
55 * Function to call with the result. 55 * Function to call with the result.
@@ -146,7 +146,7 @@ send_revocation_query (void *cls,
146 */ 146 */
147struct GNUNET_REVOCATION_Query * 147struct GNUNET_REVOCATION_Query *
148GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg, 148GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg,
149 const struct GNUNET_CRYPTO_EccPublicSignKey *key, 149 const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
150 GNUNET_REVOCATION_Callback func, void *func_cls) 150 GNUNET_REVOCATION_Callback func, void *func_cls)
151{ 151{
152 struct GNUNET_REVOCATION_Query *q; 152 struct GNUNET_REVOCATION_Query *q;
@@ -210,12 +210,12 @@ struct GNUNET_REVOCATION_Handle
210 /** 210 /**
211 * Key to revoke. 211 * Key to revoke.
212 */ 212 */
213 struct GNUNET_CRYPTO_EccPublicSignKey key; 213 struct GNUNET_CRYPTO_EcdsaPublicKey key;
214 214
215 /** 215 /**
216 * Signature showing that we have the right to revoke. 216 * Signature showing that we have the right to revoke.
217 */ 217 */
218 struct GNUNET_CRYPTO_EccSignature sig; 218 struct GNUNET_CRYPTO_EcdsaSignature sig;
219 219
220 /** 220 /**
221 * Proof of work showing that we spent enough resources to broadcast revocation. 221 * Proof of work showing that we spent enough resources to broadcast revocation.
@@ -300,7 +300,7 @@ send_revoke (void *cls,
300 rm.proof_of_work = h->pow; 300 rm.proof_of_work = h->pow;
301 rm.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); 301 rm.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION);
302 rm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 302 rm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
303 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 303 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
304 rm.public_key = h->key; 304 rm.public_key = h->key;
305 rm.signature = h->sig; 305 rm.signature = h->sig;
306 memcpy (buf, &rm, sizeof (struct RevokeMessage)); 306 memcpy (buf, &rm, sizeof (struct RevokeMessage));
@@ -329,8 +329,8 @@ send_revoke (void *cls,
329 */ 329 */
330struct GNUNET_REVOCATION_Handle * 330struct GNUNET_REVOCATION_Handle *
331GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, 331GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg,
332 const struct GNUNET_CRYPTO_EccPublicSignKey *key, 332 const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
333 const struct GNUNET_CRYPTO_EccSignature *sig, 333 const struct GNUNET_CRYPTO_EcdsaSignature *sig,
334 uint64_t pow, 334 uint64_t pow,
335 GNUNET_REVOCATION_Callback func, void *func_cls) 335 GNUNET_REVOCATION_Callback func, void *func_cls)
336{ 336{
@@ -437,17 +437,17 @@ count_leading_zeroes (const struct GNUNET_HashCode *hash)
437 * @return #GNUNET_YES if the @a pow is acceptable, #GNUNET_NO if not 437 * @return #GNUNET_YES if the @a pow is acceptable, #GNUNET_NO if not
438 */ 438 */
439int 439int
440GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EccPublicSignKey *key, 440GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
441 uint64_t pow, 441 uint64_t pow,
442 unsigned int matching_bits) 442 unsigned int matching_bits)
443{ 443{
444 char buf[sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 444 char buf[sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
445 sizeof (pow)] GNUNET_ALIGN; 445 sizeof (pow)] GNUNET_ALIGN;
446 struct GNUNET_HashCode result; 446 struct GNUNET_HashCode result;
447 447
448 memcpy (buf, &pow, sizeof (pow)); 448 memcpy (buf, &pow, sizeof (pow));
449 memcpy (&buf[sizeof (pow)], key, 449 memcpy (&buf[sizeof (pow)], key,
450 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 450 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
451 pow_hash (buf, sizeof (buf), &result); 451 pow_hash (buf, sizeof (buf), &result);
452 return (count_leading_zeroes (&result) >= 452 return (count_leading_zeroes (&result) >=
453 matching_bits) ? GNUNET_YES : GNUNET_NO; 453 matching_bits) ? GNUNET_YES : GNUNET_NO;
@@ -461,17 +461,17 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EccPublicSignKey *key,
461 * @param sig where to write the revocation signature 461 * @param sig where to write the revocation signature
462 */ 462 */
463void 463void
464GNUNET_REVOCATION_sign_revocation (const struct GNUNET_CRYPTO_EccPrivateKey *key, 464GNUNET_REVOCATION_sign_revocation (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
465 struct GNUNET_CRYPTO_EccSignature *sig) 465 struct GNUNET_CRYPTO_EcdsaSignature *sig)
466{ 466{
467 struct RevokeMessage rm; 467 struct RevokeMessage rm;
468 468
469 rm.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); 469 rm.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION);
470 rm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 470 rm.purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
471 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)); 471 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
472 GNUNET_CRYPTO_ecc_key_get_public_for_signature (key, &rm.public_key); 472 GNUNET_CRYPTO_ecdsa_key_get_public (key, &rm.public_key);
473 GNUNET_assert (GNUNET_OK == 473 GNUNET_assert (GNUNET_OK ==
474 GNUNET_CRYPTO_ecc_sign (key, 474 GNUNET_CRYPTO_ecdsa_sign (key,
475 &rm.purpose, 475 &rm.purpose,
476 sig)); 476 sig));
477} 477}
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c
index 1cec948a2..a79e836c7 100644
--- a/src/testing/gnunet-testing.c
+++ b/src/testing/gnunet-testing.c
@@ -164,7 +164,7 @@ create_hostkeys (const unsigned int no)
164 struct GNUNET_TESTING_System *system; 164 struct GNUNET_TESTING_System *system;
165 struct GNUNET_PeerIdentity id; 165 struct GNUNET_PeerIdentity id;
166 struct GNUNET_DISK_FileHandle *fd; 166 struct GNUNET_DISK_FileHandle *fd;
167 struct GNUNET_CRYPTO_EccPrivateKey *pk; 167 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
168 168
169 system = GNUNET_TESTING_system_create ("testing", NULL, NULL, NULL); 169 system = GNUNET_TESTING_system_create ("testing", NULL, NULL, NULL);
170 pk = GNUNET_TESTING_hostkey_get (system, create_no, &id); 170 pk = GNUNET_TESTING_hostkey_get (system, create_no, &id);
@@ -182,7 +182,7 @@ create_hostkeys (const unsigned int no)
182 GNUNET_DISK_PERM_USER_WRITE); 182 GNUNET_DISK_PERM_USER_WRITE);
183 GNUNET_assert (fd != NULL); 183 GNUNET_assert (fd != NULL);
184 ret = GNUNET_DISK_file_write (fd, pk, 184 ret = GNUNET_DISK_file_write (fd, pk,
185 sizeof (struct GNUNET_CRYPTO_EccPrivateKey)); 185 sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey));
186 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd)); 186 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd));
187 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing", 187 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
188 "Wrote hostkey to file: `%s'\n", create_hostkey); 188 "Wrote hostkey to file: `%s'\n", create_hostkey);
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 89d4c0f50..cfca8ce9b 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -701,12 +701,12 @@ GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system,
701 * key; if NULL, GNUNET_SYSERR is returned immediately 701 * key; if NULL, GNUNET_SYSERR is returned immediately
702 * @return NULL on error (not enough keys) 702 * @return NULL on error (not enough keys)
703 */ 703 */
704struct GNUNET_CRYPTO_EccPrivateKey * 704struct GNUNET_CRYPTO_EddsaPrivateKey *
705GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system, 705GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system,
706 uint32_t key_number, 706 uint32_t key_number,
707 struct GNUNET_PeerIdentity *id) 707 struct GNUNET_PeerIdentity *id)
708{ 708{
709 struct GNUNET_CRYPTO_EccPrivateKey *private_key; 709 struct GNUNET_CRYPTO_EddsaPrivateKey *private_key;
710 710
711 if ((NULL == id) || (NULL == system->hostkeys_data)) 711 if ((NULL == id) || (NULL == system->hostkeys_data))
712 return NULL; 712 return NULL;
@@ -716,12 +716,12 @@ GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system,
716 _("Key number %u does not exist\n"), key_number); 716 _("Key number %u does not exist\n"), key_number);
717 return NULL; 717 return NULL;
718 } 718 }
719 private_key = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 719 private_key = GNUNET_new (struct GNUNET_CRYPTO_EddsaPrivateKey);
720 memcpy (private_key, 720 memcpy (private_key,
721 system->hostkeys_data + 721 system->hostkeys_data +
722 (key_number * GNUNET_TESTING_HOSTKEYFILESIZE), 722 (key_number * GNUNET_TESTING_HOSTKEYFILESIZE),
723 GNUNET_TESTING_HOSTKEYFILESIZE); 723 GNUNET_TESTING_HOSTKEYFILESIZE);
724 GNUNET_CRYPTO_ecc_key_get_public_for_signature (private_key, 724 GNUNET_CRYPTO_eddsa_key_get_public (private_key,
725 &id->public_key); 725 &id->public_key);
726 return private_key; 726 return private_key;
727} 727}
@@ -1137,7 +1137,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1137 char *config_filename; 1137 char *config_filename;
1138 char *libexec_binary; 1138 char *libexec_binary;
1139 char *emsg_; 1139 char *emsg_;
1140 struct GNUNET_CRYPTO_EccPrivateKey *pk; 1140 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
1141 uint16_t *ports; 1141 uint16_t *ports;
1142 struct SharedService *ss; 1142 struct SharedService *ss;
1143 struct SharedServiceInstance **ss_instances; 1143 struct SharedServiceInstance **ss_instances;
diff --git a/src/topology/friends.c b/src/topology/friends.c
index 5c074e941..d41ff1ec6 100644
--- a/src/topology/friends.c
+++ b/src/topology/friends.c
@@ -92,7 +92,7 @@ GNUNET_FRIENDS_parse (const struct GNUNET_CONFIGURATION_Handle *cfg,
92 while ((pos < fsize) && (! isspace ((int) data[pos]))) 92 while ((pos < fsize) && (! isspace ((int) data[pos])))
93 pos++; 93 pos++;
94 if (GNUNET_OK != 94 if (GNUNET_OK !=
95 GNUNET_CRYPTO_ecc_public_sign_key_from_string (&data[start], 95 GNUNET_CRYPTO_eddsa_public_key_from_string (&data[start],
96 pos - start, 96 pos - start,
97 &pid.public_key)) 97 &pid.public_key))
98 { 98 {
@@ -196,7 +196,7 @@ GNUNET_FRIENDS_write (struct GNUNET_FRIENDS_Writer *w,
196 char *ret; 196 char *ret;
197 size_t slen; 197 size_t slen;
198 198
199 ret = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&friend->public_key); 199 ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&friend->public_key);
200 GNUNET_asprintf (&buf, 200 GNUNET_asprintf (&buf,
201 "%s\n", 201 "%s\n",
202 ret); 202 ret);
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index d6be384bd..6d2e1831e 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -70,7 +70,7 @@ static struct GNUNET_SERVER_Handle *GST_server;
70/** 70/**
71 * Our private key. 71 * Our private key.
72 */ 72 */
73struct GNUNET_CRYPTO_EccPrivateKey *GST_my_private_key; 73struct GNUNET_CRYPTO_EddsaPrivateKey *GST_my_private_key;
74 74
75/** 75/**
76 * ATS handle. 76 * ATS handle.
@@ -738,7 +738,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
738 const struct GNUNET_CONFIGURATION_Handle *c) 738 const struct GNUNET_CONFIGURATION_Handle *c)
739{ 739{
740 char *keyfile; 740 char *keyfile;
741 struct GNUNET_CRYPTO_EccPrivateKey *pk; 741 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
742 long long unsigned int max_fd_cfg; 742 long long unsigned int max_fd_cfg;
743 int max_fd_rlimit; 743 int max_fd_rlimit;
744 int max_fd; 744 int max_fd;
@@ -763,14 +763,14 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
763 hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION; 763 hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION;
764 } 764 }
765 GST_server = server; 765 GST_server = server;
766 pk = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 766 pk = GNUNET_CRYPTO_eddsa_key_create_from_file (keyfile);
767 GNUNET_free (keyfile); 767 GNUNET_free (keyfile);
768 GNUNET_assert (NULL != pk); 768 GNUNET_assert (NULL != pk);
769 GST_my_private_key = pk; 769 GST_my_private_key = pk;
770 770
771 GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg); 771 GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg);
772 GST_peerinfo = GNUNET_PEERINFO_connect (GST_cfg); 772 GST_peerinfo = GNUNET_PEERINFO_connect (GST_cfg);
773 GNUNET_CRYPTO_ecc_key_get_public_for_signature (GST_my_private_key, 773 GNUNET_CRYPTO_eddsa_key_get_public (GST_my_private_key,
774 &GST_my_identity.public_key); 774 &GST_my_identity.public_key);
775 GNUNET_assert (NULL != GST_my_private_key); 775 GNUNET_assert (NULL != GST_my_private_key);
776 776
diff --git a/src/transport/gnunet-service-transport.h b/src/transport/gnunet-service-transport.h
index 9b68cb258..66da0163e 100644
--- a/src/transport/gnunet-service-transport.h
+++ b/src/transport/gnunet-service-transport.h
@@ -55,7 +55,7 @@ extern struct GNUNET_PEERINFO_Handle *GST_peerinfo;
55/** 55/**
56 * Our private key. 56 * Our private key.
57 */ 57 */
58extern struct GNUNET_CRYPTO_EccPrivateKey *GST_my_private_key; 58extern struct GNUNET_CRYPTO_EddsaPrivateKey *GST_my_private_key;
59 59
60/** 60/**
61 * ATS handle. 61 * ATS handle.
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index 8f45a19b8..87d753929 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -254,7 +254,7 @@ blacklist_cfg_iter (void *cls, const char *section,
254 char *plugs; 254 char *plugs;
255 char *pos; 255 char *pos;
256 256
257 if (GNUNET_OK != GNUNET_CRYPTO_ecc_public_sign_key_from_string (option, 257 if (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string (option,
258 strlen (option), 258 strlen (option),
259 &peer.public_key)) 259 &peer.public_key))
260 return; 260 return;
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index a53e26f95..6bf707755 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -74,7 +74,7 @@ struct OwnAddressList
74 /** 74 /**
75 * Signature for a 'struct TransportPongMessage' for this address. 75 * Signature for a 'struct TransportPongMessage' for this address.
76 */ 76 */
77 struct GNUNET_CRYPTO_EccSignature pong_signature; 77 struct GNUNET_CRYPTO_EddsaSignature pong_signature;
78 78
79}; 79};
80 80
@@ -307,7 +307,7 @@ GST_hello_modify_addresses (int addremove,
307 */ 307 */
308int 308int
309GST_hello_test_address (const struct GNUNET_HELLO_Address *address, 309GST_hello_test_address (const struct GNUNET_HELLO_Address *address,
310 struct GNUNET_CRYPTO_EccSignature **sig, 310 struct GNUNET_CRYPTO_EddsaSignature **sig,
311 struct GNUNET_TIME_Absolute **sig_expiration) 311 struct GNUNET_TIME_Absolute **sig_expiration)
312{ 312{
313 struct OwnAddressList *al; 313 struct OwnAddressList *al;
diff --git a/src/transport/gnunet-service-transport_hello.h b/src/transport/gnunet-service-transport_hello.h
index 2aefbe300..0c67cef4d 100644
--- a/src/transport/gnunet-service-transport_hello.h
+++ b/src/transport/gnunet-service-transport_hello.h
@@ -93,7 +93,7 @@ GST_hello_modify_addresses (int addremove,
93 */ 93 */
94int 94int
95GST_hello_test_address (const struct GNUNET_HELLO_Address *address, 95GST_hello_test_address (const struct GNUNET_HELLO_Address *address,
96 struct GNUNET_CRYPTO_EccSignature **sig, 96 struct GNUNET_CRYPTO_EddsaSignature **sig,
97 struct GNUNET_TIME_Absolute **sig_expiration); 97 struct GNUNET_TIME_Absolute **sig_expiration);
98 98
99 99
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 0cffe0aeb..d89aa2f32 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -329,14 +329,14 @@ struct SessionDisconnectMessage
329 /** 329 /**
330 * Public key of the sender. 330 * Public key of the sender.
331 */ 331 */
332 struct GNUNET_CRYPTO_EccPublicSignKey public_key; 332 struct GNUNET_CRYPTO_EddsaPublicKey public_key;
333 333
334 /** 334 /**
335 * Signature of the peer that sends us the disconnect. Only 335 * Signature of the peer that sends us the disconnect. Only
336 * valid if the timestamp is AFTER the timestamp from the 336 * valid if the timestamp is AFTER the timestamp from the
337 * corresponding 'CONNECT' message. 337 * corresponding 'CONNECT' message.
338 */ 338 */
339 struct GNUNET_CRYPTO_EccSignature signature; 339 struct GNUNET_CRYPTO_EddsaSignature signature;
340 340
341}; 341};
342 342
@@ -1195,7 +1195,7 @@ send_disconnect (struct NeighbourMapEntry *n)
1195 disconnect_msg.reserved = htonl (0); 1195 disconnect_msg.reserved = htonl (0);
1196 disconnect_msg.purpose.size = 1196 disconnect_msg.purpose.size =
1197 htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 1197 htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
1198 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 1198 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey) +
1199 sizeof (struct GNUNET_TIME_AbsoluteNBO)); 1199 sizeof (struct GNUNET_TIME_AbsoluteNBO));
1200 disconnect_msg.purpose.purpose = 1200 disconnect_msg.purpose.purpose =
1201 htonl (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT); 1201 htonl (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT);
@@ -1203,7 +1203,7 @@ send_disconnect (struct NeighbourMapEntry *n)
1203 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 1203 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
1204 disconnect_msg.public_key = GST_my_identity.public_key; 1204 disconnect_msg.public_key = GST_my_identity.public_key;
1205 GNUNET_assert (GNUNET_OK == 1205 GNUNET_assert (GNUNET_OK ==
1206 GNUNET_CRYPTO_ecc_sign (GST_my_private_key, 1206 GNUNET_CRYPTO_eddsa_sign (GST_my_private_key,
1207 &disconnect_msg.purpose, 1207 &disconnect_msg.purpose,
1208 &disconnect_msg.signature)); 1208 &disconnect_msg.signature));
1209 1209
@@ -3157,7 +3157,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
3157 return; 3157 return;
3158 } 3158 }
3159 GNUNET_CRYPTO_hash (&sdm->public_key, 3159 GNUNET_CRYPTO_hash (&sdm->public_key,
3160 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 3160 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey),
3161 &hc); 3161 &hc);
3162 if (0 != memcmp (peer, &hc, sizeof (struct GNUNET_PeerIdentity))) 3162 if (0 != memcmp (peer, &hc, sizeof (struct GNUNET_PeerIdentity)))
3163 { 3163 {
@@ -3166,7 +3166,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
3166 } 3166 }
3167 if (ntohl (sdm->purpose.size) != 3167 if (ntohl (sdm->purpose.size) !=
3168 sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 3168 sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
3169 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + 3169 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey) +
3170 sizeof (struct GNUNET_TIME_AbsoluteNBO)) 3170 sizeof (struct GNUNET_TIME_AbsoluteNBO))
3171 { 3171 {
3172 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 3172 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -3177,7 +3177,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
3177 return; 3177 return;
3178 } 3178 }
3179 if (GNUNET_OK != 3179 if (GNUNET_OK !=
3180 GNUNET_CRYPTO_ecc_verify 3180 GNUNET_CRYPTO_eddsa_verify
3181 (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT, &sdm->purpose, 3181 (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT, &sdm->purpose,
3182 &sdm->signature, &sdm->public_key)) 3182 &sdm->signature, &sdm->public_key))
3183 { 3183 {
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 6018e2c7b..f5f3d6d56 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -148,7 +148,7 @@ struct TransportPongMessage
148 /** 148 /**
149 * Signature. 149 * Signature.
150 */ 150 */
151 struct GNUNET_CRYPTO_EccSignature signature; 151 struct GNUNET_CRYPTO_EddsaSignature signature;
152 152
153 /** 153 /**
154 * GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN to confirm that this is a 154 * GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN to confirm that this is a
@@ -189,7 +189,7 @@ struct ValidationEntry
189 /** 189 /**
190 * Public key of the peer. 190 * Public key of the peer.
191 */ 191 */
192 struct GNUNET_CRYPTO_EccPublicSignKey public_key; 192 struct GNUNET_CRYPTO_EddsaPublicKey public_key;
193 193
194 /** 194 /**
195 * The identity of the peer. FIXME: duplicated (also in 'address') 195 * The identity of the peer. FIXME: duplicated (also in 'address')
@@ -199,7 +199,7 @@ struct ValidationEntry
199 /** 199 /**
200 * Cached PONG signature 200 * Cached PONG signature
201 */ 201 */
202 struct GNUNET_CRYPTO_EccSignature pong_sig_cache; 202 struct GNUNET_CRYPTO_EddsaSignature pong_sig_cache;
203 203
204 /** 204 /**
205 * ID of task that will clean up this entry if nothing happens. 205 * ID of task that will clean up this entry if nothing happens.
@@ -678,7 +678,7 @@ revalidate_address (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
678 * if we don't have an existing entry and no public key was given 678 * if we don't have an existing entry and no public key was given
679 */ 679 */
680static struct ValidationEntry * 680static struct ValidationEntry *
681find_validation_entry (const struct GNUNET_CRYPTO_EccPublicSignKey *public_key, 681find_validation_entry (const struct GNUNET_CRYPTO_EddsaPublicKey *public_key,
682 const struct GNUNET_HELLO_Address *address) 682 const struct GNUNET_HELLO_Address *address)
683{ 683{
684 struct ValidationEntryMatchContext vemc; 684 struct ValidationEntryMatchContext vemc;
@@ -701,7 +701,7 @@ find_validation_entry (const struct GNUNET_CRYPTO_EccPublicSignKey *public_key,
701 ve->public_key = *public_key; 701 ve->public_key = *public_key;
702 ve->pid = address->peer; 702 ve->pid = address->peer;
703 ve->pong_sig_valid_until = GNUNET_TIME_absolute_get_zero_(); 703 ve->pong_sig_valid_until = GNUNET_TIME_absolute_get_zero_();
704 memset (&ve->pong_sig_cache, '\0', sizeof (struct GNUNET_CRYPTO_EccSignature)); 704 memset (&ve->pong_sig_cache, '\0', sizeof (struct GNUNET_CRYPTO_EddsaSignature));
705 ve->latency = GNUNET_TIME_UNIT_FOREVER_REL; 705 ve->latency = GNUNET_TIME_UNIT_FOREVER_REL;
706 ve->challenge = 706 ve->challenge =
707 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX); 707 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX);
@@ -733,7 +733,7 @@ add_valid_address (void *cls, const struct GNUNET_HELLO_Address *address,
733 struct ValidationEntry *ve; 733 struct ValidationEntry *ve;
734 struct GNUNET_PeerIdentity pid; 734 struct GNUNET_PeerIdentity pid;
735 struct GNUNET_ATS_Information ats; 735 struct GNUNET_ATS_Information ats;
736 struct GNUNET_CRYPTO_EccPublicSignKey public_key; 736 struct GNUNET_CRYPTO_EddsaPublicKey public_key;
737 737
738 if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us) 738 if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us)
739 return GNUNET_OK; /* expired */ 739 return GNUNET_OK; /* expired */
@@ -855,7 +855,7 @@ GST_validation_stop ()
855 */ 855 */
856static void 856static void
857multicast_pong (void *cls, 857multicast_pong (void *cls,
858 const struct GNUNET_CRYPTO_EccPublicSignKey *public_key, 858 const struct GNUNET_CRYPTO_EddsaPublicKey *public_key,
859 struct GNUNET_TIME_Absolute valid_until, 859 struct GNUNET_TIME_Absolute valid_until,
860 struct GNUNET_TIME_Absolute validation_block, 860 struct GNUNET_TIME_Absolute validation_block,
861 const struct GNUNET_HELLO_Address *address) 861 const struct GNUNET_HELLO_Address *address)
@@ -901,7 +901,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
901 const struct TransportPingMessage *ping; 901 const struct TransportPingMessage *ping;
902 struct TransportPongMessage *pong; 902 struct TransportPongMessage *pong;
903 struct GNUNET_TRANSPORT_PluginFunctions *papi; 903 struct GNUNET_TRANSPORT_PluginFunctions *papi;
904 struct GNUNET_CRYPTO_EccSignature *sig_cache; 904 struct GNUNET_CRYPTO_EddsaSignature *sig_cache;
905 struct GNUNET_TIME_Absolute *sig_cache_exp; 905 struct GNUNET_TIME_Absolute *sig_cache_exp;
906 const char *addr; 906 const char *addr;
907 const char *addrend; 907 const char *addrend;
@@ -1022,7 +1022,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
1022 { 1022 {
1023 addrend = NULL; /* make gcc happy */ 1023 addrend = NULL; /* make gcc happy */
1024 slen = 0; 1024 slen = 0;
1025 static struct GNUNET_CRYPTO_EccSignature no_address_signature; 1025 static struct GNUNET_CRYPTO_EddsaSignature no_address_signature;
1026 static struct GNUNET_TIME_Absolute no_address_signature_expiration; 1026 static struct GNUNET_TIME_Absolute no_address_signature_expiration;
1027 1027
1028 sig_cache = &no_address_signature; 1028 sig_cache = &no_address_signature;
@@ -1063,7 +1063,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
1063 *sig_cache_exp = GNUNET_TIME_relative_to_absolute (PONG_SIGNATURE_LIFETIME); 1063 *sig_cache_exp = GNUNET_TIME_relative_to_absolute (PONG_SIGNATURE_LIFETIME);
1064 pong->expiration = GNUNET_TIME_absolute_hton (*sig_cache_exp); 1064 pong->expiration = GNUNET_TIME_absolute_hton (*sig_cache_exp);
1065 if (GNUNET_OK != 1065 if (GNUNET_OK !=
1066 GNUNET_CRYPTO_ecc_sign (GST_my_private_key, &pong->purpose, 1066 GNUNET_CRYPTO_eddsa_sign (GST_my_private_key, &pong->purpose,
1067 sig_cache)) 1067 sig_cache))
1068 { 1068 {
1069 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1069 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -1141,7 +1141,7 @@ struct ValidateAddressContext
1141 /** 1141 /**
1142 * Public key of the peer whose address is being validated. 1142 * Public key of the peer whose address is being validated.
1143 */ 1143 */
1144 struct GNUNET_CRYPTO_EccPublicSignKey public_key; 1144 struct GNUNET_CRYPTO_EddsaPublicKey public_key;
1145}; 1145};
1146 1146
1147 1147
@@ -1274,7 +1274,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
1274 { 1274 {
1275 /* We have a cached and valid signature for this peer, 1275 /* We have a cached and valid signature for this peer,
1276 * try to compare instead of verify */ 1276 * try to compare instead of verify */
1277 if (0 == memcmp (&ve->pong_sig_cache, &pong->signature, sizeof (struct GNUNET_CRYPTO_EccSignature))) 1277 if (0 == memcmp (&ve->pong_sig_cache, &pong->signature, sizeof (struct GNUNET_CRYPTO_EddsaSignature)))
1278 { 1278 {
1279 /* signatures are identical, we can skip verification */ 1279 /* signatures are identical, we can skip verification */
1280 sig_res = GNUNET_OK; 1280 sig_res = GNUNET_OK;
@@ -1290,7 +1290,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
1290 if (GNUNET_YES == do_verify) 1290 if (GNUNET_YES == do_verify)
1291 { 1291 {
1292 /* Do expensive verification */ 1292 /* Do expensive verification */
1293 sig_res = GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN, 1293 sig_res = GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN,
1294 &pong->purpose, &pong->signature, 1294 &pong->purpose, &pong->signature,
1295 &ve->public_key); 1295 &ve->public_key);
1296 if (sig_res == GNUNET_SYSERR) 1296 if (sig_res == GNUNET_SYSERR)
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index c935b97cf..3408f50bb 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -134,7 +134,7 @@ GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello);
134 */ 134 */
135typedef void (*GST_ValidationAddressCallback) (void *cls, 135typedef void (*GST_ValidationAddressCallback) (void *cls,
136 const struct 136 const struct
137 GNUNET_CRYPTO_EccPublicSignKey *public_key, 137 GNUNET_CRYPTO_EddsaPublicKey *public_key,
138 struct GNUNET_TIME_Absolute 138 struct GNUNET_TIME_Absolute
139 valid_until, 139 valid_until,
140 struct GNUNET_TIME_Absolute 140 struct GNUNET_TIME_Absolute
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index cbda8ac6e..ed47e29e1 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -809,7 +809,7 @@ testservice_task (void *cls,
809 } 809 }
810 810
811 if ( (NULL != cpid) && 811 if ( (NULL != cpid) &&
812 (GNUNET_OK != GNUNET_CRYPTO_ecc_public_sign_key_from_string (cpid, 812 (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string (cpid,
813 strlen (cpid), 813 strlen (cpid),
814 &pid.public_key))) 814 &pid.public_key)))
815 { 815 {
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 15a0be297..9e4e54e67 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1013,7 +1013,7 @@ server_parse_url (struct HTTP_Server_Plugin *plugin,
1013 return GNUNET_SYSERR; 1013 return GNUNET_SYSERR;
1014 } 1014 }
1015 if (GNUNET_OK != 1015 if (GNUNET_OK !=
1016 GNUNET_CRYPTO_ecc_public_sign_key_from_string (target_start, 1016 GNUNET_CRYPTO_eddsa_public_key_from_string (target_start,
1017 hash_length, 1017 hash_length,
1018 &target->public_key)) 1018 &target->public_key))
1019 { 1019 {
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index ba16d539d..98806fbb8 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -49,7 +49,7 @@ static struct GNUNET_PeerIdentity my_identity;
49/** 49/**
50 * Our private key. 50 * Our private key.
51 */ 51 */
52static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; 52static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
53 53
54/** 54/**
55 * Our configuration. 55 * Our configuration.
@@ -617,7 +617,7 @@ run (void *cls, char *const *args, const char *cfgfile,
617 617
618 618
619 max_connect_per_transport = (uint32_t) tneigh; 619 max_connect_per_transport = (uint32_t) tneigh;
620 my_private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 620 my_private_key = GNUNET_CRYPTO_eddsa_key_create_from_file (keyfile);
621 GNUNET_free (keyfile); 621 GNUNET_free (keyfile);
622 if (NULL == my_private_key) 622 if (NULL == my_private_key)
623 { 623 {
@@ -626,7 +626,7 @@ run (void *cls, char *const *args, const char *cfgfile,
626 end_badly_now (); 626 end_badly_now ();
627 return; 627 return;
628 } 628 }
629 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, &my_identity.public_key); 629 GNUNET_CRYPTO_eddsa_key_get_public (my_private_key, &my_identity.public_key);
630 630
631 hello = GNUNET_HELLO_create (&my_identity.public_key, NULL, NULL, GNUNET_NO); 631 hello = GNUNET_HELLO_create (&my_identity.public_key, NULL, NULL, GNUNET_NO);
632 632
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 564204862..a9b4e09da 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -7,7 +7,7 @@ libexecdir= $(pkglibdir)/libexec/
7pkgcfgdir= $(pkgdatadir)/config.d/ 7pkgcfgdir= $(pkgdatadir)/config.d/
8 8
9dist_pkgcfg_DATA = \ 9dist_pkgcfg_DATA = \
10 util.conf 10 util.conf
11 11
12pkgcfg_DATA = \ 12pkgcfg_DATA = \
13 resolver.conf 13 resolver.conf
@@ -19,7 +19,7 @@ libgnunetutilwin_la_SOURCES = \
19 win.c \ 19 win.c \
20 winproc.c 20 winproc.c
21libgnunetutilwin_la_LDFLAGS = \ 21libgnunetutilwin_la_LDFLAGS = \
22 -no-undefined -Wl,--export-all-symbols 22 -no-undefined -Wl,--export-all-symbols
23libgnunetutilwin_la_LIBADD = \ 23libgnunetutilwin_la_LIBADD = \
24 -lshell32 -liconv -lstdc++ \ 24 -lshell32 -liconv -lstdc++ \
25 -lcomdlg32 -lgdi32 -liphlpapi 25 -lcomdlg32 -lgdi32 -liphlpapi
@@ -47,7 +47,7 @@ noinst_PROGRAMS = \
47gnunet_config_diff_SOURCES = \ 47gnunet_config_diff_SOURCES = \
48 gnunet-config-diff.c 48 gnunet-config-diff.c
49gnunet_config_diff_LDADD = \ 49gnunet_config_diff_LDADD = \
50 $(top_builddir)/src/util/libgnunetutil.la 50 $(top_builddir)/src/util/libgnunetutil.la
51gnunet_config_diff_DEPENDENCIES = \ 51gnunet_config_diff_DEPENDENCIES = \
52 libgnunetutil.la 52 libgnunetutil.la
53 53
@@ -114,7 +114,7 @@ libgnunetutil_la_LIBADD = \
114 $(LIBGCRYPT_LIBS) \ 114 $(LIBGCRYPT_LIBS) \
115 $(LTLIBICONV) \ 115 $(LTLIBICONV) \
116 $(LTLIBINTL) \ 116 $(LTLIBINTL) \
117 -lltdl $(Z_LIBS) -lunistring $(XLIB) 117 -lltdl $(Z_LIBS) -lunistring $(XLIB)
118 118
119libgnunetutil_la_LDFLAGS = \ 119libgnunetutil_la_LDFLAGS = \
120 $(GN_LIB_LDFLAGS) \ 120 $(GN_LIB_LDFLAGS) \
@@ -126,17 +126,17 @@ endif
126 126
127 127
128libexec_PROGRAMS = \ 128libexec_PROGRAMS = \
129 gnunet-service-resolver 129 gnunet-service-resolver
130 130
131bin_PROGRAMS = \ 131bin_PROGRAMS = \
132 gnunet-resolver \ 132 gnunet-resolver \
133 gnunet-config \ 133 gnunet-config \
134 $(GNUNET_ECC) \ 134 $(GNUNET_ECC) \
135 gnunet-uri 135 gnunet-uri
136 136
137 137
138gnunet_service_resolver_SOURCES = \ 138gnunet_service_resolver_SOURCES = \
139 gnunet-service-resolver.c 139 gnunet-service-resolver.c
140gnunet_service_resolver_LDADD = \ 140gnunet_service_resolver_LDADD = \
141 $(top_builddir)/src/util/libgnunetutil.la \ 141 $(top_builddir)/src/util/libgnunetutil.la \
142 $(GN_LIBINTL) 142 $(GN_LIBINTL)
@@ -145,7 +145,7 @@ gnunet_service_resolver_DEPENDENCIES = \
145 145
146 146
147gnunet_resolver_SOURCES = \ 147gnunet_resolver_SOURCES = \
148 gnunet-resolver.c 148 gnunet-resolver.c
149gnunet_resolver_LDADD = \ 149gnunet_resolver_LDADD = \
150 $(top_builddir)/src/util/libgnunetutil.la \ 150 $(top_builddir)/src/util/libgnunetutil.la \
151 $(GN_LIBINTL) 151 $(GN_LIBINTL)
@@ -154,7 +154,7 @@ gnunet_resolver_DEPENDENCIES = \
154 154
155 155
156gnunet_ecc_SOURCES = \ 156gnunet_ecc_SOURCES = \
157 gnunet-ecc.c 157 gnunet-ecc.c
158gnunet_ecc_LDADD = \ 158gnunet_ecc_LDADD = \
159 $(top_builddir)/src/util/libgnunetutil.la \ 159 $(top_builddir)/src/util/libgnunetutil.la \
160 $(GN_LIBINTL) -lgcrypt 160 $(GN_LIBINTL) -lgcrypt
@@ -163,7 +163,7 @@ gnunet_ecc_DEPENDENCIES = \
163 163
164 164
165gnunet_config_SOURCES = \ 165gnunet_config_SOURCES = \
166 gnunet-config.c 166 gnunet-config.c
167gnunet_config_LDADD = \ 167gnunet_config_LDADD = \
168 $(top_builddir)/src/util/libgnunetutil.la \ 168 $(top_builddir)/src/util/libgnunetutil.la \
169 $(GN_LIBINTL) 169 $(GN_LIBINTL)
@@ -172,7 +172,7 @@ gnunet_config_DEPENDENCIES = \
172 172
173 173
174gnunet_uri_SOURCES = \ 174gnunet_uri_SOURCES = \
175 gnunet-uri.c 175 gnunet-uri.c
176gnunet_uri_LDADD = \ 176gnunet_uri_LDADD = \
177 $(top_builddir)/src/util/libgnunetutil.la \ 177 $(top_builddir)/src/util/libgnunetutil.la \
178 $(GN_LIBINTL) 178 $(GN_LIBINTL)
@@ -210,7 +210,9 @@ check_PROGRAMS = \
210 test_container_slist \ 210 test_container_slist \
211 test_crypto_symmetric \ 211 test_crypto_symmetric \
212 test_crypto_crc \ 212 test_crypto_crc \
213 test_crypto_ecc \ 213 test_crypto_ecdsa \
214 test_crypto_eddsa \
215 test_crypto_ecdhe \
214 test_crypto_hash \ 216 test_crypto_hash \
215 test_crypto_hkdf \ 217 test_crypto_hkdf \
216 test_crypto_random \ 218 test_crypto_random \
@@ -265,22 +267,22 @@ test_os_start_process_DEPENDENCIES = \
265test_client_SOURCES = \ 267test_client_SOURCES = \
266 test_client.c 268 test_client.c
267test_client_LDADD = \ 269test_client_LDADD = \
268 $(top_builddir)/src/util/libgnunetutil.la 270 $(top_builddir)/src/util/libgnunetutil.la
269 271
270test_common_allocation_SOURCES = \ 272test_common_allocation_SOURCES = \
271 test_common_allocation.c 273 test_common_allocation.c
272test_common_allocation_LDADD = \ 274test_common_allocation_LDADD = \
273 $(top_builddir)/src/util/libgnunetutil.la 275 $(top_builddir)/src/util/libgnunetutil.la
274 276
275test_common_endian_SOURCES = \ 277test_common_endian_SOURCES = \
276 test_common_endian.c 278 test_common_endian.c
277test_common_endian_LDADD = \ 279test_common_endian_LDADD = \
278 $(top_builddir)/src/util/libgnunetutil.la 280 $(top_builddir)/src/util/libgnunetutil.la
279 281
280test_common_logging_SOURCES = \ 282test_common_logging_SOURCES = \
281 test_common_logging.c 283 test_common_logging.c
282test_common_logging_LDADD = \ 284test_common_logging_LDADD = \
283 $(top_builddir)/src/util/libgnunetutil.la 285 $(top_builddir)/src/util/libgnunetutil.la
284 286
285test_common_logging_runtime_loglevels_SOURCES = \ 287test_common_logging_runtime_loglevels_SOURCES = \
286 test_common_logging_runtime_loglevels.c 288 test_common_logging_runtime_loglevels.c
@@ -290,12 +292,12 @@ test_common_logging_runtime_loglevels_LDADD = \
290test_configuration_SOURCES = \ 292test_configuration_SOURCES = \
291 test_configuration.c 293 test_configuration.c
292test_configuration_LDADD = \ 294test_configuration_LDADD = \
293 $(top_builddir)/src/util/libgnunetutil.la 295 $(top_builddir)/src/util/libgnunetutil.la
294 296
295test_container_bloomfilter_SOURCES = \ 297test_container_bloomfilter_SOURCES = \
296 test_container_bloomfilter.c 298 test_container_bloomfilter.c
297test_container_bloomfilter_LDADD = \ 299test_container_bloomfilter_LDADD = \
298 $(top_builddir)/src/util/libgnunetutil.la 300 $(top_builddir)/src/util/libgnunetutil.la
299 301
300test_container_meta_data_SOURCES = \ 302test_container_meta_data_SOURCES = \
301 test_container_meta_data.c 303 test_container_meta_data.c
@@ -320,83 +322,95 @@ test_container_multipeermap_LDADD = \
320test_container_heap_SOURCES = \ 322test_container_heap_SOURCES = \
321 test_container_heap.c 323 test_container_heap.c
322test_container_heap_LDADD = \ 324test_container_heap_LDADD = \
323 $(top_builddir)/src/util/libgnunetutil.la 325 $(top_builddir)/src/util/libgnunetutil.la
324 326
325test_container_slist_SOURCES = \ 327test_container_slist_SOURCES = \
326 test_container_slist.c 328 test_container_slist.c
327test_container_slist_LDADD = \ 329test_container_slist_LDADD = \
328 $(top_builddir)/src/util/libgnunetutil.la 330 $(top_builddir)/src/util/libgnunetutil.la
329 331
330test_crypto_symmetric_SOURCES = \ 332test_crypto_symmetric_SOURCES = \
331 test_crypto_symmetric.c 333 test_crypto_symmetric.c
332test_crypto_symmetric_LDADD = \ 334test_crypto_symmetric_LDADD = \
333 $(top_builddir)/src/util/libgnunetutil.la 335 $(top_builddir)/src/util/libgnunetutil.la
334 336
335test_crypto_crc_SOURCES = \ 337test_crypto_crc_SOURCES = \
336 test_crypto_crc.c 338 test_crypto_crc.c
337test_crypto_crc_LDADD = \ 339test_crypto_crc_LDADD = \
338 $(top_builddir)/src/util/libgnunetutil.la 340 $(top_builddir)/src/util/libgnunetutil.la
339 341
340test_crypto_ecc_SOURCES = \ 342test_crypto_ecdsa_SOURCES = \
341 test_crypto_ecc.c 343 test_crypto_ecdsa.c
342test_crypto_ecc_LDADD = \ 344test_crypto_ecdsa_LDADD = \
345 $(top_builddir)/src/util/libgnunetutil.la \
346 $(LIBGCRYPT_LIBS)
347
348test_crypto_eddsa_SOURCES = \
349 test_crypto_eddsa.c
350test_crypto_eddsa_LDADD = \
351 $(top_builddir)/src/util/libgnunetutil.la \
352 $(LIBGCRYPT_LIBS)
353
354test_crypto_ecdhe_SOURCES = \
355 test_crypto_ecdhe.c
356test_crypto_ecdhe_LDADD = \
343 $(top_builddir)/src/util/libgnunetutil.la \ 357 $(top_builddir)/src/util/libgnunetutil.la \
344 $(LIBGCRYPT_LIBS) 358 $(LIBGCRYPT_LIBS)
345 359
346test_crypto_hash_SOURCES = \ 360test_crypto_hash_SOURCES = \
347 test_crypto_hash.c 361 test_crypto_hash.c
348test_crypto_hash_LDADD = \ 362test_crypto_hash_LDADD = \
349 $(top_builddir)/src/util/libgnunetutil.la 363 $(top_builddir)/src/util/libgnunetutil.la
350 364
351test_crypto_hkdf_SOURCES = \ 365test_crypto_hkdf_SOURCES = \
352 test_crypto_hkdf.c 366 test_crypto_hkdf.c
353test_crypto_hkdf_LDADD = \ 367test_crypto_hkdf_LDADD = \
354 $(top_builddir)/src/util/libgnunetutil.la 368 $(top_builddir)/src/util/libgnunetutil.la
355 369
356test_crypto_random_SOURCES = \ 370test_crypto_random_SOURCES = \
357 test_crypto_random.c 371 test_crypto_random.c
358test_crypto_random_LDADD = \ 372test_crypto_random_LDADD = \
359 $(top_builddir)/src/util/libgnunetutil.la 373 $(top_builddir)/src/util/libgnunetutil.la
360 374
361test_disk_SOURCES = \ 375test_disk_SOURCES = \
362 test_disk.c 376 test_disk.c
363test_disk_LDADD = \ 377test_disk_LDADD = \
364 $(top_builddir)/src/util/libgnunetutil.la 378 $(top_builddir)/src/util/libgnunetutil.la
365 379
366test_getopt_SOURCES = \ 380test_getopt_SOURCES = \
367 test_getopt.c 381 test_getopt.c
368test_getopt_LDADD = \ 382test_getopt_LDADD = \
369 $(top_builddir)/src/util/libgnunetutil.la 383 $(top_builddir)/src/util/libgnunetutil.la
370 384
371test_connection_SOURCES = \ 385test_connection_SOURCES = \
372 test_connection.c 386 test_connection.c
373test_connection_LDADD = \ 387test_connection_LDADD = \
374 $(top_builddir)/src/util/libgnunetutil.la 388 $(top_builddir)/src/util/libgnunetutil.la
375 389
376test_connection_addressing_SOURCES = \ 390test_connection_addressing_SOURCES = \
377 test_connection_addressing.c 391 test_connection_addressing.c
378test_connection_addressing_LDADD = \ 392test_connection_addressing_LDADD = \
379 $(top_builddir)/src/util/libgnunetutil.la 393 $(top_builddir)/src/util/libgnunetutil.la
380 394
381test_connection_receive_cancel_SOURCES = \ 395test_connection_receive_cancel_SOURCES = \
382 test_connection_receive_cancel.c 396 test_connection_receive_cancel.c
383test_connection_receive_cancel_LDADD = \ 397test_connection_receive_cancel_LDADD = \
384 $(top_builddir)/src/util/libgnunetutil.la 398 $(top_builddir)/src/util/libgnunetutil.la
385 399
386test_connection_timeout_SOURCES = \ 400test_connection_timeout_SOURCES = \
387 test_connection_timeout.c 401 test_connection_timeout.c
388test_connection_timeout_LDADD = \ 402test_connection_timeout_LDADD = \
389 $(top_builddir)/src/util/libgnunetutil.la 403 $(top_builddir)/src/util/libgnunetutil.la
390 404
391test_connection_timeout_no_connect_SOURCES = \ 405test_connection_timeout_no_connect_SOURCES = \
392 test_connection_timeout_no_connect.c 406 test_connection_timeout_no_connect.c
393test_connection_timeout_no_connect_LDADD = \ 407test_connection_timeout_no_connect_LDADD = \
394 $(top_builddir)/src/util/libgnunetutil.la 408 $(top_builddir)/src/util/libgnunetutil.la
395 409
396test_connection_transmit_cancel_SOURCES = \ 410test_connection_transmit_cancel_SOURCES = \
397 test_connection_transmit_cancel.c 411 test_connection_transmit_cancel.c
398test_connection_transmit_cancel_LDADD = \ 412test_connection_transmit_cancel_LDADD = \
399 $(top_builddir)/src/util/libgnunetutil.la 413 $(top_builddir)/src/util/libgnunetutil.la
400 414
401test_mq_SOURCES = \ 415test_mq_SOURCES = \
402 test_mq.c 416 test_mq.c
@@ -411,7 +425,7 @@ test_mq_client_LDADD = \
411test_os_network_SOURCES = \ 425test_os_network_SOURCES = \
412 test_os_network.c 426 test_os_network.c
413test_os_network_LDADD = \ 427test_os_network_LDADD = \
414 $(top_builddir)/src/util/libgnunetutil.la 428 $(top_builddir)/src/util/libgnunetutil.la
415 429
416test_peer_SOURCES = \ 430test_peer_SOURCES = \
417 test_peer.c 431 test_peer.c
@@ -421,63 +435,63 @@ $(top_builddir)/src/util/libgnunetutil.la -lgcrypt
421test_plugin_SOURCES = \ 435test_plugin_SOURCES = \
422 test_plugin.c 436 test_plugin.c
423test_plugin_LDADD = \ 437test_plugin_LDADD = \
424 $(top_builddir)/src/util/libgnunetutil.la 438 $(top_builddir)/src/util/libgnunetutil.la
425 439
426test_program_SOURCES = \ 440test_program_SOURCES = \
427 test_program.c 441 test_program.c
428test_program_LDADD = \ 442test_program_LDADD = \
429 $(top_builddir)/src/util/libgnunetutil.la 443 $(top_builddir)/src/util/libgnunetutil.la
430 444
431test_resolver_api_SOURCES = \ 445test_resolver_api_SOURCES = \
432 test_resolver_api.c 446 test_resolver_api.c
433test_resolver_api_LDADD = \ 447test_resolver_api_LDADD = \
434 $(top_builddir)/src/util/libgnunetutil.la 448 $(top_builddir)/src/util/libgnunetutil.la
435 449
436test_scheduler_SOURCES = \ 450test_scheduler_SOURCES = \
437 test_scheduler.c 451 test_scheduler.c
438test_scheduler_LDADD = \ 452test_scheduler_LDADD = \
439 $(top_builddir)/src/util/libgnunetutil.la 453 $(top_builddir)/src/util/libgnunetutil.la
440 454
441test_scheduler_delay_SOURCES = \ 455test_scheduler_delay_SOURCES = \
442 test_scheduler_delay.c 456 test_scheduler_delay.c
443test_scheduler_delay_LDADD = \ 457test_scheduler_delay_LDADD = \
444 $(top_builddir)/src/util/libgnunetutil.la 458 $(top_builddir)/src/util/libgnunetutil.la
445 459
446test_server_mst_interrupt_SOURCES = \ 460test_server_mst_interrupt_SOURCES = \
447 test_server_mst_interrupt.c 461 test_server_mst_interrupt.c
448test_server_mst_interrupt_LDADD = \ 462test_server_mst_interrupt_LDADD = \
449 $(top_builddir)/src/util/libgnunetutil.la 463 $(top_builddir)/src/util/libgnunetutil.la
450 464
451test_server_SOURCES = \ 465test_server_SOURCES = \
452 test_server.c 466 test_server.c
453test_server_LDADD = \ 467test_server_LDADD = \
454 $(top_builddir)/src/util/libgnunetutil.la 468 $(top_builddir)/src/util/libgnunetutil.la
455 469
456test_server_disconnect_SOURCES = \ 470test_server_disconnect_SOURCES = \
457 test_server_disconnect.c 471 test_server_disconnect.c
458test_server_disconnect_LDADD = \ 472test_server_disconnect_LDADD = \
459 $(top_builddir)/src/util/libgnunetutil.la 473 $(top_builddir)/src/util/libgnunetutil.la
460 474
461test_server_with_client_SOURCES = \ 475test_server_with_client_SOURCES = \
462 test_server_with_client.c 476 test_server_with_client.c
463test_server_with_client_LDADD = \ 477test_server_with_client_LDADD = \
464 $(top_builddir)/src/util/libgnunetutil.la 478 $(top_builddir)/src/util/libgnunetutil.la
465 479
466test_server_with_client_unix_SOURCES = \ 480test_server_with_client_unix_SOURCES = \
467 test_server_with_client_unix.c 481 test_server_with_client_unix.c
468test_server_with_client_unix_LDADD = \ 482test_server_with_client_unix_LDADD = \
469 $(top_builddir)/src/util/libgnunetutil.la 483 $(top_builddir)/src/util/libgnunetutil.la
470 484
471 485
472test_service_SOURCES = \ 486test_service_SOURCES = \
473 test_service.c 487 test_service.c
474test_service_LDADD = \ 488test_service_LDADD = \
475 $(top_builddir)/src/util/libgnunetutil.la 489 $(top_builddir)/src/util/libgnunetutil.la
476 490
477test_strings_SOURCES = \ 491test_strings_SOURCES = \
478 test_strings.c 492 test_strings.c
479test_strings_LDADD = \ 493test_strings_LDADD = \
480 $(top_builddir)/src/util/libgnunetutil.la 494 $(top_builddir)/src/util/libgnunetutil.la
481 495
482 496
483test_strings_to_data_SOURCES = \ 497test_strings_to_data_SOURCES = \
@@ -489,27 +503,27 @@ test_strings_to_data_LDADD = \
489test_time_SOURCES = \ 503test_time_SOURCES = \
490 test_time.c 504 test_time.c
491test_time_LDADD = \ 505test_time_LDADD = \
492 $(top_builddir)/src/util/libgnunetutil.la 506 $(top_builddir)/src/util/libgnunetutil.la
493 507
494test_speedup_SOURCES = \ 508test_speedup_SOURCES = \
495 test_speedup.c 509 test_speedup.c
496test_speedup_LDADD = \ 510test_speedup_LDADD = \
497 $(top_builddir)/src/util/libgnunetutil.la 511 $(top_builddir)/src/util/libgnunetutil.la
498 512
499perf_crypto_hash_SOURCES = \ 513perf_crypto_hash_SOURCES = \
500 perf_crypto_hash.c 514 perf_crypto_hash.c
501perf_crypto_hash_LDADD = \ 515perf_crypto_hash_LDADD = \
502 $(top_builddir)/src/util/libgnunetutil.la 516 $(top_builddir)/src/util/libgnunetutil.la
503 517
504perf_crypto_symmetric_SOURCES = \ 518perf_crypto_symmetric_SOURCES = \
505 perf_crypto_symmetric.c 519 perf_crypto_symmetric.c
506perf_crypto_symmetric_LDADD = \ 520perf_crypto_symmetric_LDADD = \
507 $(top_builddir)/src/util/libgnunetutil.la 521 $(top_builddir)/src/util/libgnunetutil.la
508 522
509perf_malloc_SOURCES = \ 523perf_malloc_SOURCES = \
510 perf_malloc.c 524 perf_malloc.c
511perf_malloc_LDADD = \ 525perf_malloc_LDADD = \
512 $(top_builddir)/src/util/libgnunetutil.la 526 $(top_builddir)/src/util/libgnunetutil.la
513 527
514 528
515EXTRA_DIST = \ 529EXTRA_DIST = \
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 48a6724f7..582435651 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -1096,7 +1096,7 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid)
1096 static char buf[256]; 1096 static char buf[256];
1097 char *ret; 1097 char *ret;
1098 1098
1099 ret = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pid->public_key); 1099 ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key);
1100 strcpy (buf, ret); 1100 strcpy (buf, ret);
1101 GNUNET_free (ret); 1101 GNUNET_free (ret);
1102 buf[4] = '\0'; 1102 buf[4] = '\0';
@@ -1119,7 +1119,7 @@ GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid)
1119 static char buf[256]; 1119 static char buf[256];
1120 char *ret; 1120 char *ret;
1121 1121
1122 ret = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pid->public_key); 1122 ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key);
1123 strcpy (buf, ret); 1123 strcpy (buf, ret);
1124 GNUNET_free (ret); 1124 GNUNET_free (ret);
1125 return buf; 1125 return buf;
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 34edec3de..e2eaaa269 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -188,7 +188,7 @@ mpi_scan (gcry_mpi_t *result,
188 * @return NULL on error 188 * @return NULL on error
189 */ 189 */
190static gcry_sexp_t 190static gcry_sexp_t
191decode_private_key (const struct GNUNET_CRYPTO_EccPrivateKey *priv) 191decode_private_ecdsa_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv)
192{ 192{
193 gcry_sexp_t result; 193 gcry_sexp_t result;
194 gcry_mpi_t d; 194 gcry_mpi_t d;
@@ -218,6 +218,80 @@ decode_private_key (const struct GNUNET_CRYPTO_EccPrivateKey *priv)
218 218
219 219
220/** 220/**
221 * Convert the given private key from the network format to the
222 * S-expression that can be used by libgcrypt.
223 *
224 * @param priv private key to decode
225 * @return NULL on error
226 */
227static gcry_sexp_t
228decode_private_eddsa_key (const struct GNUNET_CRYPTO_EddsaPrivateKey *priv)
229{
230 gcry_sexp_t result;
231 gcry_mpi_t d;
232 int rc;
233
234 mpi_scan (&d,
235 priv->d,
236 sizeof (priv->d));
237 rc = gcry_sexp_build (&result, NULL,
238 "(private-key(ecdsa(curve \"" CURVE "\")(d %m)))", // FIXME: eddsa soon!
239 d);
240 gcry_mpi_release (d);
241 if (0 != rc)
242 {
243 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
244 GNUNET_assert (0);
245 }
246#if EXTRA_CHECKS
247 if (0 != (rc = gcry_pk_testkey (result)))
248 {
249 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_pk_testkey", rc);
250 GNUNET_assert (0);
251 }
252#endif
253 return result;
254}
255
256
257/**
258 * Convert the given private key from the network format to the
259 * S-expression that can be used by libgcrypt.
260 *
261 * @param priv private key to decode
262 * @return NULL on error
263 */
264static gcry_sexp_t
265decode_private_ecdhe_key (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv)
266{
267 gcry_sexp_t result;
268 gcry_mpi_t d;
269 int rc;
270
271 mpi_scan (&d,
272 priv->d,
273 sizeof (priv->d));
274 rc = gcry_sexp_build (&result, NULL,
275 "(private-key(ecdsa(curve \"" CURVE "\")(d %m)))", // FIXME: ecdh here?
276 d);
277 gcry_mpi_release (d);
278 if (0 != rc)
279 {
280 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
281 GNUNET_assert (0);
282 }
283#if EXTRA_CHECKS
284 if (0 != (rc = gcry_pk_testkey (result)))
285 {
286 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_pk_testkey", rc);
287 GNUNET_assert (0);
288 }
289#endif
290 return result;
291}
292
293
294/**
221 * Initialize public key struct from the respective point 295 * Initialize public key struct from the respective point
222 * on the curve. 296 * on the curve.
223 * 297 *
@@ -226,9 +300,9 @@ decode_private_key (const struct GNUNET_CRYPTO_EccPrivateKey *priv)
226 * @param ctx context to use for ECC operations 300 * @param ctx context to use for ECC operations
227 */ 301 */
228static void 302static void
229point_to_public_sign_key (gcry_mpi_point_t q, 303point_to_public_ecdsa_key (gcry_mpi_point_t q,
230 gcry_ctx_t ctx, 304 gcry_ctx_t ctx,
231 struct GNUNET_CRYPTO_EccPublicSignKey *pub) 305 struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
232{ 306{
233 gcry_mpi_t q_x; 307 gcry_mpi_t q_x;
234 gcry_mpi_t q_y; 308 gcry_mpi_t q_y;
@@ -257,9 +331,9 @@ point_to_public_sign_key (gcry_mpi_point_t q,
257 * @param ctx context to use for ECC operations 331 * @param ctx context to use for ECC operations
258 */ 332 */
259static void 333static void
260point_to_public_encrypt_key (gcry_mpi_point_t q, 334point_to_public_eddsa_key (gcry_mpi_point_t q,
261 gcry_ctx_t ctx, 335 gcry_ctx_t ctx,
262 struct GNUNET_CRYPTO_EccPublicEncryptKey *pub) 336 struct GNUNET_CRYPTO_EddsaPublicKey *pub)
263{ 337{
264 gcry_mpi_t q_x; 338 gcry_mpi_t q_x;
265 gcry_mpi_t q_y; 339 gcry_mpi_t q_y;
@@ -280,25 +354,81 @@ point_to_public_encrypt_key (gcry_mpi_point_t q,
280 354
281 355
282/** 356/**
357 * Initialize public key struct from the respective point
358 * on the curve.
359 *
360 * @param q point on curve
361 * @param pub public key struct to initialize
362 * @param ctx context to use for ECC operations
363 */
364static void
365point_to_public_ecdhe_key (gcry_mpi_point_t q,
366 gcry_ctx_t ctx,
367 struct GNUNET_CRYPTO_EcdhePublicKey *pub)
368{
369 gcry_mpi_t q_x;
370 gcry_mpi_t q_y;
371
372 q_x = gcry_mpi_new (256);
373 q_y = gcry_mpi_new (256);
374 if (gcry_mpi_ec_get_affine (q_x, q_y, q, ctx))
375 {
376 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "get_affine failed", 0);
377 return;
378 }
379
380 mpi_print (pub->q_x, sizeof (pub->q_x), q_x);
381 mpi_print (pub->q_y, sizeof (pub->q_y), q_y);
382 gcry_mpi_release (q_x);
383 gcry_mpi_release (q_y);
384}
385
386
387/**
388 * Extract the public key for the given private key.
389 *
390 * @param priv the private key
391 * @param pub where to write the public key
392 */
393void
394GNUNET_CRYPTO_ecdsa_key_get_public (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
395 struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
396{
397 gcry_sexp_t sexp;
398 gcry_ctx_t ctx;
399 gcry_mpi_point_t q;
400
401 sexp = decode_private_ecdsa_key (priv);
402 GNUNET_assert (NULL != sexp);
403 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, sexp, NULL));
404 gcry_sexp_release (sexp);
405 q = gcry_mpi_ec_get_point ("q", ctx, 0);
406 point_to_public_ecdsa_key (q, ctx, pub);
407 gcry_ctx_release (ctx);
408 gcry_mpi_point_release (q);
409}
410
411
412/**
283 * Extract the public key for the given private key. 413 * Extract the public key for the given private key.
284 * 414 *
285 * @param priv the private key 415 * @param priv the private key
286 * @param pub where to write the public key 416 * @param pub where to write the public key
287 */ 417 */
288void 418void
289GNUNET_CRYPTO_ecc_key_get_public_for_signature (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 419GNUNET_CRYPTO_eddsa_key_get_public (const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
290 struct GNUNET_CRYPTO_EccPublicSignKey *pub) 420 struct GNUNET_CRYPTO_EddsaPublicKey *pub)
291{ 421{
292 gcry_sexp_t sexp; 422 gcry_sexp_t sexp;
293 gcry_ctx_t ctx; 423 gcry_ctx_t ctx;
294 gcry_mpi_point_t q; 424 gcry_mpi_point_t q;
295 425
296 sexp = decode_private_key (priv); 426 sexp = decode_private_eddsa_key (priv);
297 GNUNET_assert (NULL != sexp); 427 GNUNET_assert (NULL != sexp);
298 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, sexp, NULL)); 428 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, sexp, NULL));
299 gcry_sexp_release (sexp); 429 gcry_sexp_release (sexp);
300 q = gcry_mpi_ec_get_point ("q", ctx, 0); 430 q = gcry_mpi_ec_get_point ("q", ctx, 0);
301 point_to_public_sign_key (q, ctx, pub); 431 point_to_public_eddsa_key (q, ctx, pub);
302 gcry_ctx_release (ctx); 432 gcry_ctx_release (ctx);
303 gcry_mpi_point_release (q); 433 gcry_mpi_point_release (q);
304} 434}
@@ -311,19 +441,19 @@ GNUNET_CRYPTO_ecc_key_get_public_for_signature (const struct GNUNET_CRYPTO_EccPr
311 * @param pub where to write the public key 441 * @param pub where to write the public key
312 */ 442 */
313void 443void
314GNUNET_CRYPTO_ecc_key_get_public_for_encryption (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 444GNUNET_CRYPTO_ecdhe_key_get_public (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv,
315 struct GNUNET_CRYPTO_EccPublicEncryptKey *pub) 445 struct GNUNET_CRYPTO_EcdhePublicKey *pub)
316{ 446{
317 gcry_sexp_t sexp; 447 gcry_sexp_t sexp;
318 gcry_ctx_t ctx; 448 gcry_ctx_t ctx;
319 gcry_mpi_point_t q; 449 gcry_mpi_point_t q;
320 450
321 sexp = decode_private_key (priv); 451 sexp = decode_private_ecdhe_key (priv);
322 GNUNET_assert (NULL != sexp); 452 GNUNET_assert (NULL != sexp);
323 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, sexp, NULL)); 453 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, sexp, NULL));
324 gcry_sexp_release (sexp); 454 gcry_sexp_release (sexp);
325 q = gcry_mpi_ec_get_point ("q", ctx, 0); 455 q = gcry_mpi_ec_get_point ("q", ctx, 0);
326 point_to_public_encrypt_key (q, ctx, pub); 456 point_to_public_ecdhe_key (q, ctx, pub);
327 gcry_ctx_release (ctx); 457 gcry_ctx_release (ctx);
328 gcry_mpi_point_release (q); 458 gcry_mpi_point_release (q);
329} 459}
@@ -336,10 +466,41 @@ GNUNET_CRYPTO_ecc_key_get_public_for_encryption (const struct GNUNET_CRYPTO_EccP
336 * @return string representing @a pub 466 * @return string representing @a pub
337 */ 467 */
338char * 468char *
339GNUNET_CRYPTO_ecc_public_sign_key_to_string (const struct GNUNET_CRYPTO_EccPublicSignKey *pub) 469GNUNET_CRYPTO_ecdsa_public_key_to_string (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
470{
471 char *pubkeybuf;
472 size_t keylen = (sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)) * 8;
473 char *end;
474
475 if (keylen % 5 > 0)
476 keylen += 5 - keylen % 5;
477 keylen /= 5;
478 pubkeybuf = GNUNET_malloc (keylen + 1);
479 end = GNUNET_STRINGS_data_to_string ((unsigned char *) pub,
480 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
481 pubkeybuf,
482 keylen);
483 if (NULL == end)
484 {
485 GNUNET_free (pubkeybuf);
486 return NULL;
487 }
488 *end = '\0';
489 return pubkeybuf;
490}
491
492
493/**
494 * Convert a public key to a string.
495 *
496 * @param pub key to convert
497 * @return string representing @a pub
498 */
499char *
500GNUNET_CRYPTO_eddsa_public_key_to_string (const struct GNUNET_CRYPTO_EddsaPublicKey *pub)
340{ 501{
341 char *pubkeybuf; 502 char *pubkeybuf;
342 size_t keylen = (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)) * 8; 503 size_t keylen = (sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)) * 8;
343 char *end; 504 char *end;
344 505
345 if (keylen % 5 > 0) 506 if (keylen % 5 > 0)
@@ -347,7 +508,7 @@ GNUNET_CRYPTO_ecc_public_sign_key_to_string (const struct GNUNET_CRYPTO_EccPubli
347 keylen /= 5; 508 keylen /= 5;
348 pubkeybuf = GNUNET_malloc (keylen + 1); 509 pubkeybuf = GNUNET_malloc (keylen + 1);
349 end = GNUNET_STRINGS_data_to_string ((unsigned char *) pub, 510 end = GNUNET_STRINGS_data_to_string ((unsigned char *) pub,
350 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), 511 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey),
351 pubkeybuf, 512 pubkeybuf,
352 keylen); 513 keylen);
353 if (NULL == end) 514 if (NULL == end)
@@ -369,11 +530,11 @@ GNUNET_CRYPTO_ecc_public_sign_key_to_string (const struct GNUNET_CRYPTO_EccPubli
369 * @return #GNUNET_OK on success 530 * @return #GNUNET_OK on success
370 */ 531 */
371int 532int
372GNUNET_CRYPTO_ecc_public_sign_key_from_string (const char *enc, 533GNUNET_CRYPTO_ecdsa_public_key_from_string (const char *enc,
373 size_t enclen, 534 size_t enclen,
374 struct GNUNET_CRYPTO_EccPublicSignKey *pub) 535 struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
375{ 536{
376 size_t keylen = (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)) * 8; 537 size_t keylen = (sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)) * 8;
377 538
378 if (keylen % 5 > 0) 539 if (keylen % 5 > 0)
379 keylen += 5 - keylen % 5; 540 keylen += 5 - keylen % 5;
@@ -383,7 +544,36 @@ GNUNET_CRYPTO_ecc_public_sign_key_from_string (const char *enc,
383 544
384 if (GNUNET_OK != GNUNET_STRINGS_string_to_data (enc, enclen, 545 if (GNUNET_OK != GNUNET_STRINGS_string_to_data (enc, enclen,
385 pub, 546 pub,
386 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey))) 547 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)))
548 return GNUNET_SYSERR;
549 return GNUNET_OK;
550}
551
552
553/**
554 * Convert a string representing a public key to a public key.
555 *
556 * @param enc encoded public key
557 * @param enclen number of bytes in @a enc (without 0-terminator)
558 * @param pub where to store the public key
559 * @return #GNUNET_OK on success
560 */
561int
562GNUNET_CRYPTO_eddsa_public_key_from_string (const char *enc,
563 size_t enclen,
564 struct GNUNET_CRYPTO_EddsaPublicKey *pub)
565{
566 size_t keylen = (sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)) * 8;
567
568 if (keylen % 5 > 0)
569 keylen += 5 - keylen % 5;
570 keylen /= 5;
571 if (enclen != keylen)
572 return GNUNET_SYSERR;
573
574 if (GNUNET_OK != GNUNET_STRINGS_string_to_data (enc, enclen,
575 pub,
576 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)))
387 return GNUNET_SYSERR; 577 return GNUNET_SYSERR;
388 return GNUNET_OK; 578 return GNUNET_OK;
389} 579}
@@ -397,7 +587,7 @@ GNUNET_CRYPTO_ecc_public_sign_key_from_string (const char *enc,
397 * @return NULL on error 587 * @return NULL on error
398 */ 588 */
399static gcry_sexp_t 589static gcry_sexp_t
400decode_public_sign_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pub) 590decode_public_ecdsa_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
401{ 591{
402 gcry_sexp_t pub_sexp; 592 gcry_sexp_t pub_sexp;
403 gcry_mpi_t q_x; 593 gcry_mpi_t q_x;
@@ -413,7 +603,7 @@ decode_public_sign_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pub)
413 gcry_mpi_release (q_y); 603 gcry_mpi_release (q_y);
414 604
415 /* initialize 'ctx' with 'q' */ 605 /* initialize 'ctx' with 'q' */
416 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, NULL, CURVE)); 606 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, NULL, CURVE)); // FIXME: need to say ECDSA?
417 gcry_mpi_ec_set_point ("q", q, ctx); 607 gcry_mpi_ec_set_point ("q", q, ctx);
418 gcry_mpi_point_release (q); 608 gcry_mpi_point_release (q);
419 609
@@ -425,15 +615,125 @@ decode_public_sign_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pub)
425 615
426 616
427/** 617/**
618 * Convert the given public key from the network format to the
619 * S-expression that can be used by libgcrypt.
620 *
621 * @param pub public key to decode
622 * @return NULL on error
623 */
624static gcry_sexp_t
625decode_public_eddsa_key (const struct GNUNET_CRYPTO_EddsaPublicKey *pub)
626{
627 gcry_sexp_t pub_sexp;
628 gcry_mpi_t q_x;
629 gcry_mpi_t q_y;
630 gcry_mpi_point_t q;
631 gcry_ctx_t ctx;
632
633 mpi_scan (&q_x, pub->q_x, sizeof (pub->q_x));
634 mpi_scan (&q_y, pub->q_y, sizeof (pub->q_y));
635 q = gcry_mpi_point_new (256);
636 gcry_mpi_point_set (q, q_x, q_y, GCRYMPI_CONST_ONE);
637 gcry_mpi_release (q_x);
638 gcry_mpi_release (q_y);
639
640 /* initialize 'ctx' with 'q' */
641 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, NULL, CURVE)); // FIXME: need to say EdDSA?
642 gcry_mpi_ec_set_point ("q", q, ctx);
643 gcry_mpi_point_release (q);
644
645 /* convert 'ctx' to 'sexp' */
646 GNUNET_assert (0 == gcry_pubkey_get_sexp (&pub_sexp, GCRY_PK_GET_PUBKEY, ctx));
647 gcry_ctx_release (ctx);
648 return pub_sexp;
649}
650
651
652/**
653 * @ingroup crypto
654 * Clear memory that was used to store a private key.
655 *
656 * @param pk location of the key
657 */
658void
659GNUNET_CRYPTO_ecdhe_key_clear (struct GNUNET_CRYPTO_EcdhePrivateKey *pk)
660{
661 memset (pk, 0, sizeof (struct GNUNET_CRYPTO_EcdhePrivateKey));
662}
663
664
665/**
428 * @ingroup crypto 666 * @ingroup crypto
429 * Clear memory that was used to store a private key. 667 * Clear memory that was used to store a private key.
430 * 668 *
431 * @param pk location of the key 669 * @param pk location of the key
432 */ 670 */
433void 671void
434GNUNET_CRYPTO_ecc_key_clear (struct GNUNET_CRYPTO_EccPrivateKey *pk) 672GNUNET_CRYPTO_ecdsa_key_clear (struct GNUNET_CRYPTO_EcdsaPrivateKey *pk)
435{ 673{
436 memset (pk, 0, sizeof (struct GNUNET_CRYPTO_EccPrivateKey)); 674 memset (pk, 0, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey));
675}
676
677
678/**
679 * @ingroup crypto
680 * Clear memory that was used to store a private key.
681 *
682 * @param pk location of the key
683 */
684void
685GNUNET_CRYPTO_eddsa_key_clear (struct GNUNET_CRYPTO_EddsaPrivateKey *pk)
686{
687 memset (pk, 0, sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey));
688}
689
690
691/**
692 * Create a new private key. Caller must free return value.
693 *
694 * @return fresh private key
695 */
696struct GNUNET_CRYPTO_EcdhePrivateKey *
697GNUNET_CRYPTO_ecdhe_key_create ()
698{
699 struct GNUNET_CRYPTO_EcdhePrivateKey *priv;
700 gcry_sexp_t priv_sexp;
701 gcry_sexp_t s_keyparam;
702 gcry_mpi_t d;
703 int rc;
704
705 if (0 != (rc = gcry_sexp_build (&s_keyparam, NULL,
706 "(genkey(ecdsa(curve \"" CURVE "\")))"))) // FIXME: ECDHE?
707 {
708 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
709 return NULL;
710 }
711 if (0 != (rc = gcry_pk_genkey (&priv_sexp, s_keyparam)))
712 {
713 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_pk_genkey", rc);
714 gcry_sexp_release (s_keyparam);
715 return NULL;
716 }
717 gcry_sexp_release (s_keyparam);
718#if EXTRA_CHECKS
719 if (0 != (rc = gcry_pk_testkey (priv_sexp)))
720 {
721 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_pk_testkey", rc);
722 gcry_sexp_release (priv_sexp);
723 return NULL;
724 }
725#endif
726 if (0 != (rc = key_from_sexp (&d, priv_sexp, "private-key", "d")))
727 {
728 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "key_from_sexp", rc);
729 gcry_sexp_release (priv_sexp);
730 return NULL;
731 }
732 gcry_sexp_release (priv_sexp);
733 priv = GNUNET_new (struct GNUNET_CRYPTO_EcdhePrivateKey);
734 mpi_print (priv->d, sizeof (priv->d), d);
735 gcry_mpi_release (d);
736 return priv;
437} 737}
438 738
439 739
@@ -442,10 +742,10 @@ GNUNET_CRYPTO_ecc_key_clear (struct GNUNET_CRYPTO_EccPrivateKey *pk)
442 * 742 *
443 * @return fresh private key 743 * @return fresh private key
444 */ 744 */
445struct GNUNET_CRYPTO_EccPrivateKey * 745struct GNUNET_CRYPTO_EcdsaPrivateKey *
446GNUNET_CRYPTO_ecc_key_create () 746GNUNET_CRYPTO_ecdsa_key_create ()
447{ 747{
448 struct GNUNET_CRYPTO_EccPrivateKey *priv; 748 struct GNUNET_CRYPTO_EcdsaPrivateKey *priv;
449 gcry_sexp_t priv_sexp; 749 gcry_sexp_t priv_sexp;
450 gcry_sexp_t s_keyparam; 750 gcry_sexp_t s_keyparam;
451 gcry_mpi_t d; 751 gcry_mpi_t d;
@@ -479,7 +779,55 @@ GNUNET_CRYPTO_ecc_key_create ()
479 return NULL; 779 return NULL;
480 } 780 }
481 gcry_sexp_release (priv_sexp); 781 gcry_sexp_release (priv_sexp);
482 priv = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 782 priv = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
783 mpi_print (priv->d, sizeof (priv->d), d);
784 gcry_mpi_release (d);
785 return priv;
786}
787
788/**
789 * Create a new private key. Caller must free return value.
790 *
791 * @return fresh private key
792 */
793struct GNUNET_CRYPTO_EddsaPrivateKey *
794GNUNET_CRYPTO_eddsa_key_create ()
795{
796 struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
797 gcry_sexp_t priv_sexp;
798 gcry_sexp_t s_keyparam;
799 gcry_mpi_t d;
800 int rc;
801
802 if (0 != (rc = gcry_sexp_build (&s_keyparam, NULL,
803 "(genkey(ecdsa(curve \"" CURVE "\")))"))) // FIXME: EdDSA?
804 {
805 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
806 return NULL;
807 }
808 if (0 != (rc = gcry_pk_genkey (&priv_sexp, s_keyparam)))
809 {
810 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_pk_genkey", rc);
811 gcry_sexp_release (s_keyparam);
812 return NULL;
813 }
814 gcry_sexp_release (s_keyparam);
815#if EXTRA_CHECKS
816 if (0 != (rc = gcry_pk_testkey (priv_sexp)))
817 {
818 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_pk_testkey", rc);
819 gcry_sexp_release (priv_sexp);
820 return NULL;
821 }
822#endif
823 if (0 != (rc = key_from_sexp (&d, priv_sexp, "private-key", "d")))
824 {
825 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "key_from_sexp", rc);
826 gcry_sexp_release (priv_sexp);
827 return NULL;
828 }
829 gcry_sexp_release (priv_sexp);
830 priv = GNUNET_new (struct GNUNET_CRYPTO_EddsaPrivateKey);
483 mpi_print (priv->d, sizeof (priv->d), d); 831 mpi_print (priv->d, sizeof (priv->d), d);
484 gcry_mpi_release (d); 832 gcry_mpi_release (d);
485 return priv; 833 return priv;
@@ -491,14 +839,14 @@ GNUNET_CRYPTO_ecc_key_create ()
491 * 839 *
492 * @return "anonymous" private key 840 * @return "anonymous" private key
493 */ 841 */
494const struct GNUNET_CRYPTO_EccPrivateKey * 842const struct GNUNET_CRYPTO_EcdsaPrivateKey *
495GNUNET_CRYPTO_ecc_key_get_anonymous () 843GNUNET_CRYPTO_ecdsa_key_get_anonymous ()
496{ 844{
497 /** 845 /**
498 * 'anonymous' pseudonym (global static, d=1, public key = G 846 * 'anonymous' pseudonym (global static, d=1, public key = G
499 * (generator). 847 * (generator).
500 */ 848 */
501 static struct GNUNET_CRYPTO_EccPrivateKey anonymous; 849 static struct GNUNET_CRYPTO_EcdsaPrivateKey anonymous;
502 static int once; 850 static int once;
503 851
504 if (once) 852 if (once)
@@ -542,10 +890,10 @@ short_wait ()
542 * @return new private key, NULL on error (for example, 890 * @return new private key, NULL on error (for example,
543 * permission denied) 891 * permission denied)
544 */ 892 */
545struct GNUNET_CRYPTO_EccPrivateKey * 893struct GNUNET_CRYPTO_EddsaPrivateKey *
546GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename) 894GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename)
547{ 895{
548 struct GNUNET_CRYPTO_EccPrivateKey *priv; 896 struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
549 struct GNUNET_DISK_FileHandle *fd; 897 struct GNUNET_DISK_FileHandle *fd;
550 unsigned int cnt; 898 unsigned int cnt;
551 int ec; 899 int ec;
@@ -581,7 +929,7 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename)
581 cnt = 0; 929 cnt = 0;
582 while (GNUNET_YES != 930 while (GNUNET_YES !=
583 GNUNET_DISK_file_lock (fd, 0, 931 GNUNET_DISK_file_lock (fd, 0,
584 sizeof (struct GNUNET_CRYPTO_EccPrivateKey), 932 sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey),
585 GNUNET_YES)) 933 GNUNET_YES))
586 { 934 {
587 short_wait (); 935 short_wait ();
@@ -595,14 +943,14 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename)
595 } 943 }
596 LOG (GNUNET_ERROR_TYPE_INFO, 944 LOG (GNUNET_ERROR_TYPE_INFO,
597 _("Creating a new private key. This may take a while.\n")); 945 _("Creating a new private key. This may take a while.\n"));
598 priv = GNUNET_CRYPTO_ecc_key_create (); 946 priv = GNUNET_CRYPTO_eddsa_key_create ();
599 GNUNET_assert (NULL != priv); 947 GNUNET_assert (NULL != priv);
600 GNUNET_assert (sizeof (*priv) == 948 GNUNET_assert (sizeof (*priv) ==
601 GNUNET_DISK_file_write (fd, priv, sizeof (*priv))); 949 GNUNET_DISK_file_write (fd, priv, sizeof (*priv)));
602 GNUNET_DISK_file_sync (fd); 950 GNUNET_DISK_file_sync (fd);
603 if (GNUNET_YES != 951 if (GNUNET_YES !=
604 GNUNET_DISK_file_unlock (fd, 0, 952 GNUNET_DISK_file_unlock (fd, 0,
605 sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 953 sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey)))
606 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); 954 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
607 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); 955 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd));
608 return priv; 956 return priv;
@@ -620,7 +968,7 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename)
620 { 968 {
621 if (GNUNET_YES != 969 if (GNUNET_YES !=
622 GNUNET_DISK_file_lock (fd, 0, 970 GNUNET_DISK_file_lock (fd, 0,
623 sizeof (struct GNUNET_CRYPTO_EccPrivateKey), 971 sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey),
624 GNUNET_NO)) 972 GNUNET_NO))
625 { 973 {
626 if (0 == ++cnt % 60) 974 if (0 == ++cnt % 60)
@@ -642,7 +990,7 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename)
642 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "stat", filename); 990 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "stat", filename);
643 if (GNUNET_YES != 991 if (GNUNET_YES !=
644 GNUNET_DISK_file_unlock (fd, 0, 992 GNUNET_DISK_file_unlock (fd, 0,
645 sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 993 sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey)))
646 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); 994 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
647 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd)); 995 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd));
648 996
@@ -650,36 +998,190 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename)
650 } 998 }
651 if (GNUNET_OK != GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES)) 999 if (GNUNET_OK != GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES))
652 fs = 0; 1000 fs = 0;
653 if (fs < sizeof (struct GNUNET_CRYPTO_EccPrivateKey)) 1001 if (fs < sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey))
654 { 1002 {
655 /* maybe we got the read lock before the key generating 1003 /* maybe we got the read lock before the key generating
656 * process had a chance to get the write lock; give it up! */ 1004 * process had a chance to get the write lock; give it up! */
657 if (GNUNET_YES != 1005 if (GNUNET_YES !=
658 GNUNET_DISK_file_unlock (fd, 0, 1006 GNUNET_DISK_file_unlock (fd, 0,
659 sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 1007 sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey)))
660 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); 1008 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
661 if (0 == ++cnt % 10) 1009 if (0 == ++cnt % 10)
662 { 1010 {
663 LOG (GNUNET_ERROR_TYPE_ERROR, 1011 LOG (GNUNET_ERROR_TYPE_ERROR,
664 _ 1012 _("When trying to read key file `%s' I found %u bytes but I need at least %u.\n"),
665 ("When trying to read key file `%s' I found %u bytes but I need at least %u.\n"),
666 filename, (unsigned int) fs, 1013 filename, (unsigned int) fs,
667 (unsigned int) sizeof (struct GNUNET_CRYPTO_EccPrivateKey)); 1014 (unsigned int) sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey));
1015 LOG (GNUNET_ERROR_TYPE_ERROR,
1016 _("This may be ok if someone is currently generating a key.\n"));
1017 }
1018 short_wait (); /* wait a bit longer! */
1019 continue;
1020 }
1021 break;
1022 }
1023 fs = sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey);
1024 priv = GNUNET_malloc (fs);
1025 GNUNET_assert (fs == GNUNET_DISK_file_read (fd, priv, fs));
1026 if (GNUNET_YES !=
1027 GNUNET_DISK_file_unlock (fd, 0,
1028 sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey)))
1029 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
1030 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd));
1031 return priv;
1032}
1033
1034
1035/**
1036 * Create a new private key by reading it from a file. If the
1037 * files does not exist, create a new key and write it to the
1038 * file. Caller must free return value. Note that this function
1039 * can not guarantee that another process might not be trying
1040 * the same operation on the same file at the same time.
1041 * If the contents of the file
1042 * are invalid the old file is deleted and a fresh key is
1043 * created.
1044 *
1045 * @param filename name of file to use to store the key
1046 * @return new private key, NULL on error (for example,
1047 * permission denied)
1048 */
1049struct GNUNET_CRYPTO_EcdsaPrivateKey *
1050GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename)
1051{
1052 struct GNUNET_CRYPTO_EcdsaPrivateKey *priv;
1053 struct GNUNET_DISK_FileHandle *fd;
1054 unsigned int cnt;
1055 int ec;
1056 uint64_t fs;
1057
1058 if (GNUNET_SYSERR == GNUNET_DISK_directory_create_for_file (filename))
1059 return NULL;
1060 while (GNUNET_YES != GNUNET_DISK_file_test (filename))
1061 {
1062 fd = GNUNET_DISK_file_open (filename,
1063 GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE
1064 | GNUNET_DISK_OPEN_FAILIFEXISTS,
1065 GNUNET_DISK_PERM_USER_READ |
1066 GNUNET_DISK_PERM_USER_WRITE);
1067 if (NULL == fd)
1068 {
1069 if (EEXIST == errno)
1070 {
1071 if (GNUNET_YES != GNUNET_DISK_file_test (filename))
1072 {
1073 /* must exist but not be accessible, fail for good! */
1074 if (0 != ACCESS (filename, R_OK))
1075 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", filename);
1076 else
1077 GNUNET_break (0); /* what is going on!? */
1078 return NULL;
1079 }
1080 continue;
1081 }
1082 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename);
1083 return NULL;
1084 }
1085 cnt = 0;
1086 while (GNUNET_YES !=
1087 GNUNET_DISK_file_lock (fd, 0,
1088 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey),
1089 GNUNET_YES))
1090 {
1091 short_wait ();
1092 if (0 == ++cnt % 10)
1093 {
1094 ec = errno;
1095 LOG (GNUNET_ERROR_TYPE_ERROR,
1096 _("Could not acquire lock on file `%s': %s...\n"), filename,
1097 STRERROR (ec));
1098 }
1099 }
1100 LOG (GNUNET_ERROR_TYPE_INFO,
1101 _("Creating a new private key. This may take a while.\n"));
1102 priv = GNUNET_CRYPTO_ecdsa_key_create ();
1103 GNUNET_assert (NULL != priv);
1104 GNUNET_assert (sizeof (*priv) ==
1105 GNUNET_DISK_file_write (fd, priv, sizeof (*priv)));
1106 GNUNET_DISK_file_sync (fd);
1107 if (GNUNET_YES !=
1108 GNUNET_DISK_file_unlock (fd, 0,
1109 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
1110 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
1111 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd));
1112 return priv;
1113 }
1114 /* key file exists already, read it! */
1115 fd = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ,
1116 GNUNET_DISK_PERM_NONE);
1117 if (NULL == fd)
1118 {
1119 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename);
1120 return NULL;
1121 }
1122 cnt = 0;
1123 while (1)
1124 {
1125 if (GNUNET_YES !=
1126 GNUNET_DISK_file_lock (fd, 0,
1127 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey),
1128 GNUNET_NO))
1129 {
1130 if (0 == ++cnt % 60)
1131 {
1132 ec = errno;
1133 LOG (GNUNET_ERROR_TYPE_ERROR,
1134 _("Could not acquire lock on file `%s': %s...\n"), filename,
1135 STRERROR (ec));
668 LOG (GNUNET_ERROR_TYPE_ERROR, 1136 LOG (GNUNET_ERROR_TYPE_ERROR,
669 _ 1137 _
670 ("This may be ok if someone is currently generating a key.\n")); 1138 ("This may be ok if someone is currently generating a private key.\n"));
1139 }
1140 short_wait ();
1141 continue;
1142 }
1143 if (GNUNET_YES != GNUNET_DISK_file_test (filename))
1144 {
1145 /* eh, what!? File we opened is now gone!? */
1146 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "stat", filename);
1147 if (GNUNET_YES !=
1148 GNUNET_DISK_file_unlock (fd, 0,
1149 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
1150 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
1151 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd));
1152
1153 return NULL;
1154 }
1155 if (GNUNET_OK != GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES))
1156 fs = 0;
1157 if (fs < sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))
1158 {
1159 /* maybe we got the read lock before the key generating
1160 * process had a chance to get the write lock; give it up! */
1161 if (GNUNET_YES !=
1162 GNUNET_DISK_file_unlock (fd, 0,
1163 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
1164 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
1165 if (0 == ++cnt % 10)
1166 {
1167 LOG (GNUNET_ERROR_TYPE_ERROR,
1168 _("When trying to read key file `%s' I found %u bytes but I need at least %u.\n"),
1169 filename, (unsigned int) fs,
1170 (unsigned int) sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey));
1171 LOG (GNUNET_ERROR_TYPE_ERROR,
1172 _("This may be ok if someone is currently generating a key.\n"));
671 } 1173 }
672 short_wait (); /* wait a bit longer! */ 1174 short_wait (); /* wait a bit longer! */
673 continue; 1175 continue;
674 } 1176 }
675 break; 1177 break;
676 } 1178 }
677 fs = sizeof (struct GNUNET_CRYPTO_EccPrivateKey); 1179 fs = sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey);
678 priv = GNUNET_malloc (fs); 1180 priv = GNUNET_malloc (fs);
679 GNUNET_assert (fs == GNUNET_DISK_file_read (fd, priv, fs)); 1181 GNUNET_assert (fs == GNUNET_DISK_file_read (fd, priv, fs));
680 if (GNUNET_YES != 1182 if (GNUNET_YES !=
681 GNUNET_DISK_file_unlock (fd, 0, 1183 GNUNET_DISK_file_unlock (fd, 0,
682 sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 1184 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
683 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); 1185 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
684 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); 1186 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd));
685 return priv; 1187 return priv;
@@ -694,16 +1196,16 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename)
694 * @return new private key, NULL on error (for example, 1196 * @return new private key, NULL on error (for example,
695 * permission denied) 1197 * permission denied)
696 */ 1198 */
697struct GNUNET_CRYPTO_EccPrivateKey * 1199struct GNUNET_CRYPTO_EddsaPrivateKey *
698GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg) 1200GNUNET_CRYPTO_eddsa_key_create_from_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg)
699{ 1201{
700 struct GNUNET_CRYPTO_EccPrivateKey *priv; 1202 struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
701 char *fn; 1203 char *fn;
702 1204
703 if (GNUNET_OK != 1205 if (GNUNET_OK !=
704 GNUNET_CONFIGURATION_get_value_filename (cfg, "PEER", "PRIVATE_KEY", &fn)) 1206 GNUNET_CONFIGURATION_get_value_filename (cfg, "PEER", "PRIVATE_KEY", &fn))
705 return NULL; 1207 return NULL;
706 priv = GNUNET_CRYPTO_ecc_key_create_from_file (fn); 1208 priv = GNUNET_CRYPTO_eddsa_key_create_from_file (fn);
707 GNUNET_free (fn); 1209 GNUNET_free (fn);
708 return priv; 1210 return priv;
709} 1211}
@@ -718,14 +1220,14 @@ GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATI
718 * @param cfg_name name of the configuration file to use 1220 * @param cfg_name name of the configuration file to use
719 */ 1221 */
720void 1222void
721GNUNET_CRYPTO_ecc_setup_key (const char *cfg_name) 1223GNUNET_CRYPTO_eddsa_setup_key (const char *cfg_name)
722{ 1224{
723 struct GNUNET_CONFIGURATION_Handle *cfg; 1225 struct GNUNET_CONFIGURATION_Handle *cfg;
724 struct GNUNET_CRYPTO_EccPrivateKey *priv; 1226 struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
725 1227
726 cfg = GNUNET_CONFIGURATION_create (); 1228 cfg = GNUNET_CONFIGURATION_create ();
727 (void) GNUNET_CONFIGURATION_load (cfg, cfg_name); 1229 (void) GNUNET_CONFIGURATION_load (cfg, cfg_name);
728 priv = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); 1230 priv = GNUNET_CRYPTO_eddsa_key_create_from_configuration (cfg);
729 if (NULL != priv) 1231 if (NULL != priv)
730 GNUNET_free (priv); 1232 GNUNET_free (priv);
731 GNUNET_CONFIGURATION_destroy (cfg); 1233 GNUNET_CONFIGURATION_destroy (cfg);
@@ -744,15 +1246,15 @@ int
744GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, 1246GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg,
745 struct GNUNET_PeerIdentity *dst) 1247 struct GNUNET_PeerIdentity *dst)
746{ 1248{
747 struct GNUNET_CRYPTO_EccPrivateKey *priv; 1249 struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
748 1250
749 if (NULL == (priv = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg))) 1251 if (NULL == (priv = GNUNET_CRYPTO_eddsa_key_create_from_configuration (cfg)))
750 { 1252 {
751 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1253 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
752 _("Could not load peer's private key\n")); 1254 _("Could not load peer's private key\n"));
753 return GNUNET_SYSERR; 1255 return GNUNET_SYSERR;
754 } 1256 }
755 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv, &dst->public_key); 1257 GNUNET_CRYPTO_eddsa_key_get_public (priv, &dst->public_key);
756 GNUNET_free (priv); 1258 GNUNET_free (priv);
757 return GNUNET_OK; 1259 return GNUNET_OK;
758} 1260}
@@ -766,7 +1268,35 @@ GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg,
766 * @return converted s-expression 1268 * @return converted s-expression
767 */ 1269 */
768static gcry_sexp_t 1270static gcry_sexp_t
769data_to_pkcs1 (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose) 1271data_to_eddsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose)
1272{
1273 struct GNUNET_HashCode hc;
1274 gcry_sexp_t data;
1275 int rc;
1276
1277 GNUNET_CRYPTO_hash (purpose, ntohl (purpose->size), &hc);
1278 if (0 != (rc = gcry_sexp_build (&data, NULL,
1279 "(data(flags rfc6979)(hash %s %b))", // FIXME: use EdDSA encoding!
1280 "sha512",
1281 sizeof (hc),
1282 &hc)))
1283 {
1284 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
1285 return NULL;
1286 }
1287 return data;
1288}
1289
1290
1291/**
1292 * Convert the data specified in the given purpose argument to an
1293 * S-expression suitable for signature operations.
1294 *
1295 * @param purpose data to convert
1296 * @return converted s-expression
1297 */
1298static gcry_sexp_t
1299data_to_ecdsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose)
770{ 1300{
771 struct GNUNET_HashCode hc; 1301 struct GNUNET_HashCode hc;
772 gcry_sexp_t data; 1302 gcry_sexp_t data;
@@ -795,9 +1325,9 @@ data_to_pkcs1 (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose)
795 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success 1325 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
796 */ 1326 */
797int 1327int
798GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 1328GNUNET_CRYPTO_ecdsa_sign (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
799 const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, 1329 const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
800 struct GNUNET_CRYPTO_EccSignature *sig) 1330 struct GNUNET_CRYPTO_EcdsaSignature *sig)
801{ 1331{
802 gcry_sexp_t priv_sexp; 1332 gcry_sexp_t priv_sexp;
803 gcry_sexp_t sig_sexp; 1333 gcry_sexp_t sig_sexp;
@@ -805,8 +1335,8 @@ GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
805 int rc; 1335 int rc;
806 gcry_mpi_t rs[2]; 1336 gcry_mpi_t rs[2];
807 1337
808 priv_sexp = decode_private_key (priv); 1338 priv_sexp = decode_private_ecdsa_key (priv);
809 data = data_to_pkcs1 (purpose); 1339 data = data_to_ecdsa_value (purpose);
810 if (0 != (rc = gcry_pk_sign (&sig_sexp, data, priv_sexp))) 1340 if (0 != (rc = gcry_pk_sign (&sig_sexp, data, priv_sexp)))
811 { 1341 {
812 LOG (GNUNET_ERROR_TYPE_WARNING, 1342 LOG (GNUNET_ERROR_TYPE_WARNING,
@@ -837,6 +1367,56 @@ GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
837 1367
838 1368
839/** 1369/**
1370 * Sign a given block.
1371 *
1372 * @param priv private key to use for the signing
1373 * @param purpose what to sign (size, purpose)
1374 * @param sig where to write the signature
1375 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
1376 */
1377int
1378GNUNET_CRYPTO_eddsa_sign (const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
1379 const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
1380 struct GNUNET_CRYPTO_EddsaSignature *sig)
1381{
1382 gcry_sexp_t priv_sexp;
1383 gcry_sexp_t sig_sexp;
1384 gcry_sexp_t data;
1385 int rc;
1386 gcry_mpi_t rs[2];
1387
1388 priv_sexp = decode_private_eddsa_key (priv);
1389 data = data_to_eddsa_value (purpose);
1390 if (0 != (rc = gcry_pk_sign (&sig_sexp, data, priv_sexp)))
1391 {
1392 LOG (GNUNET_ERROR_TYPE_WARNING,
1393 _("EdDSA signing failed at %s:%d: %s\n"), __FILE__,
1394 __LINE__, gcry_strerror (rc));
1395 gcry_sexp_release (data);
1396 gcry_sexp_release (priv_sexp);
1397 return GNUNET_SYSERR;
1398 }
1399 gcry_sexp_release (priv_sexp);
1400 gcry_sexp_release (data);
1401
1402 /* extract 'r' and 's' values from sexpression 'sig_sexp' and store in
1403 'signature' */
1404 if (0 != (rc = key_from_sexp (rs, sig_sexp, "sig-val", "rs")))
1405 {
1406 GNUNET_break (0);
1407 gcry_sexp_release (sig_sexp);
1408 return GNUNET_SYSERR;
1409 }
1410 gcry_sexp_release (sig_sexp);
1411 mpi_print (sig->r, sizeof (sig->r), rs[0]);
1412 mpi_print (sig->s, sizeof (sig->s), rs[1]);
1413 gcry_mpi_release (rs[0]);
1414 gcry_mpi_release (rs[1]);
1415 return GNUNET_OK;
1416}
1417
1418
1419/**
840 * Verify signature. 1420 * Verify signature.
841 * 1421 *
842 * @param purpose what is the purpose that the signature should have? 1422 * @param purpose what is the purpose that the signature should have?
@@ -846,11 +1426,10 @@ GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
846 * @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid 1426 * @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid
847 */ 1427 */
848int 1428int
849GNUNET_CRYPTO_ecc_verify (uint32_t purpose, 1429GNUNET_CRYPTO_ecdsa_verify (uint32_t purpose,
850 const struct GNUNET_CRYPTO_EccSignaturePurpose 1430 const struct GNUNET_CRYPTO_EccSignaturePurpose *validate,
851 *validate, 1431 const struct GNUNET_CRYPTO_EcdsaSignature *sig,
852 const struct GNUNET_CRYPTO_EccSignature *sig, 1432 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
853 const struct GNUNET_CRYPTO_EccPublicSignKey *pub)
854{ 1433{
855 gcry_sexp_t data; 1434 gcry_sexp_t data;
856 gcry_sexp_t sig_sexpr; 1435 gcry_sexp_t sig_sexpr;
@@ -876,8 +1455,70 @@ GNUNET_CRYPTO_ecc_verify (uint32_t purpose,
876 } 1455 }
877 gcry_mpi_release (r); 1456 gcry_mpi_release (r);
878 gcry_mpi_release (s); 1457 gcry_mpi_release (s);
879 data = data_to_pkcs1 (validate); 1458 data = data_to_ecdsa_value (validate);
880 if (! (pub_sexpr = decode_public_sign_key (pub))) 1459 if (! (pub_sexpr = decode_public_ecdsa_key (pub)))
1460 {
1461 gcry_sexp_release (data);
1462 gcry_sexp_release (sig_sexpr);
1463 return GNUNET_SYSERR;
1464 }
1465 rc = gcry_pk_verify (sig_sexpr, data, pub_sexpr);
1466 gcry_sexp_release (pub_sexpr);
1467 gcry_sexp_release (data);
1468 gcry_sexp_release (sig_sexpr);
1469 if (0 != rc)
1470 {
1471 LOG (GNUNET_ERROR_TYPE_INFO,
1472 _("ECDSA signature verification failed at %s:%d: %s\n"), __FILE__,
1473 __LINE__, gcry_strerror (rc));
1474 return GNUNET_SYSERR;
1475 }
1476 return GNUNET_OK;
1477}
1478
1479
1480
1481/**
1482 * Verify signature.
1483 *
1484 * @param purpose what is the purpose that the signature should have?
1485 * @param validate block to validate (size, purpose, data)
1486 * @param sig signature that is being validated
1487 * @param pub public key of the signer
1488 * @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid
1489 */
1490int
1491GNUNET_CRYPTO_eddsa_verify (uint32_t purpose,
1492 const struct GNUNET_CRYPTO_EccSignaturePurpose *validate,
1493 const struct GNUNET_CRYPTO_EddsaSignature *sig,
1494 const struct GNUNET_CRYPTO_EddsaPublicKey *pub)
1495{
1496 gcry_sexp_t data;
1497 gcry_sexp_t sig_sexpr;
1498 gcry_sexp_t pub_sexpr;
1499 int rc;
1500 gcry_mpi_t r;
1501 gcry_mpi_t s;
1502
1503 if (purpose != ntohl (validate->purpose))
1504 return GNUNET_SYSERR; /* purpose mismatch */
1505
1506 /* build s-expression for signature */
1507 mpi_scan (&r, sig->r, sizeof (sig->r));
1508 mpi_scan (&s, sig->s, sizeof (sig->s));
1509 if (0 != (rc = gcry_sexp_build (&sig_sexpr, NULL,
1510 "(sig-val(eddsa(r %m)(s %m)))",
1511 r, s)))
1512 {
1513 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
1514 gcry_mpi_release (r);
1515 gcry_mpi_release (s);
1516 return GNUNET_SYSERR;
1517 }
1518 gcry_mpi_release (r);
1519 gcry_mpi_release (s);
1520 data = data_to_eddsa_value (validate);
1521 if (! (pub_sexpr = decode_public_eddsa_key (pub)))
881 { 1522 {
882 gcry_sexp_release (data); 1523 gcry_sexp_release (data);
883 gcry_sexp_release (sig_sexpr); 1524 gcry_sexp_release (sig_sexpr);
@@ -890,7 +1531,7 @@ GNUNET_CRYPTO_ecc_verify (uint32_t purpose,
890 if (0 != rc) 1531 if (0 != rc)
891 { 1532 {
892 LOG (GNUNET_ERROR_TYPE_INFO, 1533 LOG (GNUNET_ERROR_TYPE_INFO,
893 _("ECC signature verification failed at %s:%d: %s\n"), __FILE__, 1534 _("EdDSA signature verification failed at %s:%d: %s\n"), __FILE__,
894 __LINE__, gcry_strerror (rc)); 1535 __LINE__, gcry_strerror (rc));
895 return GNUNET_SYSERR; 1536 return GNUNET_SYSERR;
896 } 1537 }
@@ -906,7 +1547,7 @@ GNUNET_CRYPTO_ecc_verify (uint32_t purpose,
906 * @return NULL on error 1547 * @return NULL on error
907 */ 1548 */
908static gcry_sexp_t 1549static gcry_sexp_t
909decode_public_encrypt_key (const struct GNUNET_CRYPTO_EccPublicEncryptKey *pub) 1550decode_public_ecdhe_key (const struct GNUNET_CRYPTO_EcdhePublicKey *pub)
910{ 1551{
911 gcry_sexp_t pub_sexp; 1552 gcry_sexp_t pub_sexp;
912 gcry_mpi_t q_x; 1553 gcry_mpi_t q_x;
@@ -934,7 +1575,7 @@ decode_public_encrypt_key (const struct GNUNET_CRYPTO_EccPublicEncryptKey *pub)
934 1575
935 1576
936/** 1577/**
937 * Derive key material from a public and a private ECC key. 1578 * Derive key material from a public and a private ECDHE key.
938 * 1579 *
939 * @param priv private key to use for the ECDH (x) 1580 * @param priv private key to use for the ECDH (x)
940 * @param pub public key to use for the ECDH (yG) 1581 * @param pub public key to use for the ECDH (yG)
@@ -942,8 +1583,8 @@ decode_public_encrypt_key (const struct GNUNET_CRYPTO_EccPublicEncryptKey *pub)
942 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success 1583 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
943 */ 1584 */
944int 1585int
945GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 1586GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv,
946 const struct GNUNET_CRYPTO_EccPublicEncryptKey *pub, 1587 const struct GNUNET_CRYPTO_EcdhePublicKey *pub,
947 struct GNUNET_HashCode *key_material) 1588 struct GNUNET_HashCode *key_material)
948{ 1589{
949 gcry_mpi_point_t result; 1590 gcry_mpi_point_t result;
@@ -956,7 +1597,7 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
956 unsigned char xbuf[256 / 8]; 1597 unsigned char xbuf[256 / 8];
957 1598
958 /* first, extract the q = dP value from the public key */ 1599 /* first, extract the q = dP value from the public key */
959 if (! (pub_sexpr = decode_public_encrypt_key (pub))) 1600 if (! (pub_sexpr = decode_public_ecdhe_key (pub)))
960 return GNUNET_SYSERR; 1601 return GNUNET_SYSERR;
961 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, pub_sexpr, NULL)); 1602 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, pub_sexpr, NULL));
962 gcry_sexp_release (pub_sexpr); 1603 gcry_sexp_release (pub_sexpr);
@@ -1003,7 +1644,7 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
1003 * @return h value 1644 * @return h value
1004 */ 1645 */
1005static gcry_mpi_t 1646static gcry_mpi_t
1006derive_h (const struct GNUNET_CRYPTO_EccPublicSignKey *pub, 1647derive_h (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub,
1007 const char *label, 1648 const char *label,
1008 const char *context) 1649 const char *context)
1009{ 1650{
@@ -1033,13 +1674,13 @@ derive_h (const struct GNUNET_CRYPTO_EccPublicSignKey *pub,
1033 * typically the name of the subsystem/application 1674 * typically the name of the subsystem/application
1034 * @return derived private key 1675 * @return derived private key
1035 */ 1676 */
1036struct GNUNET_CRYPTO_EccPrivateKey * 1677struct GNUNET_CRYPTO_EcdsaPrivateKey *
1037GNUNET_CRYPTO_ecc_key_derive (const struct GNUNET_CRYPTO_EccPrivateKey *priv, 1678GNUNET_CRYPTO_ecdsa_private_key_derive (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
1038 const char *label, 1679 const char *label,
1039 const char *context) 1680 const char *context)
1040{ 1681{
1041 struct GNUNET_CRYPTO_EccPublicSignKey pub; 1682 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
1042 struct GNUNET_CRYPTO_EccPrivateKey *ret; 1683 struct GNUNET_CRYPTO_EcdsaPrivateKey *ret;
1043 gcry_mpi_t h; 1684 gcry_mpi_t h;
1044 gcry_mpi_t x; 1685 gcry_mpi_t x;
1045 gcry_mpi_t d; 1686 gcry_mpi_t d;
@@ -1048,7 +1689,7 @@ GNUNET_CRYPTO_ecc_key_derive (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
1048 1689
1049 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, NULL, CURVE)); 1690 GNUNET_assert (0 == gcry_mpi_ec_new (&ctx, NULL, CURVE));
1050 n = gcry_mpi_ec_get_mpi ("n", ctx, 1); 1691 n = gcry_mpi_ec_get_mpi ("n", ctx, 1);
1051 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv, &pub); 1692 GNUNET_CRYPTO_ecdsa_key_get_public (priv, &pub);
1052 h = derive_h (&pub, label, context); 1693 h = derive_h (&pub, label, context);
1053 mpi_scan (&x, priv->d, sizeof (priv->d)); 1694 mpi_scan (&x, priv->d, sizeof (priv->d));
1054 d = gcry_mpi_new (256); 1695 d = gcry_mpi_new (256);
@@ -1057,7 +1698,7 @@ GNUNET_CRYPTO_ecc_key_derive (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
1057 gcry_mpi_release (x); 1698 gcry_mpi_release (x);
1058 gcry_mpi_release (n); 1699 gcry_mpi_release (n);
1059 gcry_ctx_release (ctx); 1700 gcry_ctx_release (ctx);
1060 ret = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 1701 ret = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
1061 mpi_print (ret->d, sizeof (ret->d), d); 1702 mpi_print (ret->d, sizeof (ret->d), d);
1062 gcry_mpi_release (d); 1703 gcry_mpi_release (d);
1063 return ret; 1704 return ret;
@@ -1075,10 +1716,10 @@ GNUNET_CRYPTO_ecc_key_derive (const struct GNUNET_CRYPTO_EccPrivateKey *priv,
1075 * @param result where to write the derived public key 1716 * @param result where to write the derived public key
1076 */ 1717 */
1077void 1718void
1078GNUNET_CRYPTO_ecc_public_key_derive (const struct GNUNET_CRYPTO_EccPublicSignKey *pub, 1719GNUNET_CRYPTO_ecdsa_public_key_derive (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub,
1079 const char *label, 1720 const char *label,
1080 const char *context, 1721 const char *context,
1081 struct GNUNET_CRYPTO_EccPublicSignKey *result) 1722 struct GNUNET_CRYPTO_EcdsaPublicKey *result)
1082{ 1723{
1083 gcry_ctx_t ctx; 1724 gcry_ctx_t ctx;
1084 gcry_mpi_t h; 1725 gcry_mpi_t h;
@@ -1113,7 +1754,7 @@ GNUNET_CRYPTO_ecc_public_key_derive (const struct GNUNET_CRYPTO_EccPublicSignKey
1113 gcry_mpi_release (n); 1754 gcry_mpi_release (n);
1114 gcry_mpi_point_release (q); 1755 gcry_mpi_point_release (q);
1115 /* convert point 'v' to public key that we return */ 1756 /* convert point 'v' to public key that we return */
1116 point_to_public_sign_key (v, ctx, result); 1757 point_to_public_ecdsa_key (v, ctx, result);
1117 gcry_mpi_point_release (v); 1758 gcry_mpi_point_release (v);
1118 gcry_ctx_release (ctx); 1759 gcry_ctx_release (ctx);
1119} 1760}
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c
index 23e562cbe..e76321e5e 100644
--- a/src/util/gnunet-ecc.c
+++ b/src/util/gnunet-ecc.c
@@ -20,7 +20,7 @@
20 20
21/** 21/**
22 * @file util/gnunet-ecc.c 22 * @file util/gnunet-ecc.c
23 * @brief tool to manipulate ECC key files 23 * @brief tool to manipulate EDDSA key files
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
@@ -52,7 +52,7 @@ static void
52create_keys (const char *fn) 52create_keys (const char *fn)
53{ 53{
54 FILE *f; 54 FILE *f;
55 struct GNUNET_CRYPTO_EccPrivateKey *pk; 55 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
56 56
57 if (NULL == (f = fopen (fn, "w+"))) 57 if (NULL == (f = fopen (fn, "w+")))
58 { 58 {
@@ -69,7 +69,7 @@ create_keys (const char *fn)
69 { 69 {
70 fprintf (stderr, 70 fprintf (stderr,
71 "."); 71 ".");
72 if (NULL == (pk = GNUNET_CRYPTO_ecc_key_create ())) 72 if (NULL == (pk = GNUNET_CRYPTO_eddsa_key_create ()))
73 { 73 {
74 GNUNET_break (0); 74 GNUNET_break (0);
75 break; 75 break;
@@ -109,12 +109,14 @@ static void
109run (void *cls, char *const *args, const char *cfgfile, 109run (void *cls, char *const *args, const char *cfgfile,
110 const struct GNUNET_CONFIGURATION_Handle *cfg) 110 const struct GNUNET_CONFIGURATION_Handle *cfg)
111{ 111{
112 struct GNUNET_CRYPTO_EccPrivateKey *pk; 112 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
113 struct GNUNET_CRYPTO_EccPublicSignKey pub; 113 struct GNUNET_CRYPTO_EddsaPublicKey pub;
114 114
115 if (NULL == args[0]) 115 if (NULL == args[0])
116 { 116 {
117 fprintf (stderr, _("No hostkey file specified on command line\n")); 117 FPRINTF (stderr,
118 "%s",
119 _("No hostkey file specified on command line\n"));
118 return; 120 return;
119 } 121 }
120 if (make_keys > 0) 122 if (make_keys > 0)
@@ -122,25 +124,27 @@ run (void *cls, char *const *args, const char *cfgfile,
122 create_keys (args[0]); 124 create_keys (args[0]);
123 return; 125 return;
124 } 126 }
125 pk = GNUNET_CRYPTO_ecc_key_create_from_file (args[0]); 127 pk = GNUNET_CRYPTO_eddsa_key_create_from_file (args[0]);
126 if (NULL == pk) 128 if (NULL == pk)
127 return; 129 return;
128 if (print_public_key) 130 if (print_public_key)
129 { 131 {
130 char *s; 132 char *s;
131 133
132 GNUNET_CRYPTO_ecc_key_get_public_for_signature (pk, &pub); 134 GNUNET_CRYPTO_eddsa_key_get_public (pk, &pub);
133 s = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pub); 135 s = GNUNET_CRYPTO_eddsa_public_key_to_string (&pub);
134 fprintf (stdout, "%s\n", s); 136 FPRINTF (stdout,
137 "%s\n",
138 s);
135 GNUNET_free (s); 139 GNUNET_free (s);
136 } 140 }
137 if (print_peer_identity) 141 if (print_peer_identity)
138 { 142 {
139 char *str; 143 char *str;
140 144
141 GNUNET_CRYPTO_ecc_key_get_public_for_signature (pk, &pub); 145 GNUNET_CRYPTO_eddsa_key_get_public (pk, &pub);
142 str = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pub); 146 str = GNUNET_CRYPTO_eddsa_public_key_to_string (&pub);
143 fprintf (stdout, 147 FPRINTF (stdout,
144 "%s\n", 148 "%s\n",
145 str); 149 str);
146 GNUNET_free (str); 150 GNUNET_free (str);
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c
index 5a35a0df5..a68fdc45b 100644
--- a/src/vpn/gnunet-vpn.c
+++ b/src/vpn/gnunet-vpn.c
@@ -226,7 +226,7 @@ run (void *cls, char *const *args, const char *cfgfile,
226 if (udp) 226 if (udp)
227 protocol = IPPROTO_UDP; 227 protocol = IPPROTO_UDP;
228 if (GNUNET_OK != 228 if (GNUNET_OK !=
229 GNUNET_CRYPTO_ecc_public_sign_key_from_string (peer_id, 229 GNUNET_CRYPTO_eddsa_public_key_from_string (peer_id,
230 strlen (peer_id), 230 strlen (peer_id),
231 &peer.public_key)) 231 &peer.public_key))
232 { 232 {