diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-10 14:38:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-10 14:38:55 +0000 |
commit | 9351b1e9bdf2b067b6db06562c26ba658cff42b8 (patch) | |
tree | 68dc4ab447e7e8b6a20a706858cd36238c1c7c5f /src/psycstore | |
parent | 8beabcd96c0cf1e1873c0b5ff96e537f1beb0b34 (diff) | |
download | gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.tar.gz gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.zip |
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA
Diffstat (limited to 'src/psycstore')
-rw-r--r-- | src/psycstore/plugin_psycstore_sqlite.c | 54 | ||||
-rw-r--r-- | src/psycstore/psycstore.h | 24 | ||||
-rw-r--r-- | src/psycstore/psycstore_api.c | 30 | ||||
-rw-r--r-- | src/psycstore/test_plugin_psycstore.c | 14 | ||||
-rw-r--r-- | src/psycstore/test_psycstore.c | 14 |
5 files changed, 68 insertions, 68 deletions
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 | */ |
622 | static int | 622 | static int |
623 | exec_channel (struct Plugin *plugin, sqlite3_stmt *stmt, | 623 | exec_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 | ||
722 | static int | 722 | static int |
723 | channel_key_store (struct Plugin *plugin, | 723 | channel_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 | ||
751 | static int | 751 | static int |
752 | slave_key_store (struct Plugin *plugin, | 752 | slave_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 | */ |
789 | static int | 789 | static int |
790 | membership_store (void *cls, | 790 | membership_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 | */ |
851 | static int | 851 | static int |
852 | membership_test (void *cls, | 852 | membership_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 | */ |
898 | static int | 898 | static int |
899 | fragment_store (void *cls, | 899 | fragment_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 | */ |
971 | static int | 971 | static int |
972 | message_add_flags (void *cls, | 972 | message_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 | */ |
1046 | static int | 1046 | static int |
1047 | fragment_get (void *cls, | 1047 | fragment_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 | */ |
1097 | static int | 1097 | static int |
1098 | message_get (void *cls, | 1098 | message_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 | */ |
1161 | static int | 1161 | static int |
1162 | message_get_fragment (void *cls, | 1162 | message_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 | */ |
1214 | static int | 1214 | static int |
1215 | counters_message_get (void *cls, | 1215 | counters_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 | */ |
1267 | static int | 1267 | static int |
1268 | counters_state_get (void *cls, | 1268 | counters_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 | */ |
1315 | static int | 1315 | static int |
1316 | state_set (struct Plugin *plugin, sqlite3_stmt *stmt, | 1316 | state_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 | ||
1355 | static int | 1355 | static int |
1356 | update_message_id (struct Plugin *plugin, sqlite3_stmt *stmt, | 1356 | update_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 | */ |
1385 | static int | 1385 | static int |
1386 | state_modify_begin (void *cls, | 1386 | state_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 | */ |
1450 | static int | 1450 | static int |
1451 | state_modify_set (void *cls, | 1451 | state_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 | */ |
1467 | static int | 1467 | static int |
1468 | state_modify_end (void *cls, | 1468 | state_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 | */ |
1488 | static int | 1488 | static int |
1489 | state_sync_begin (void *cls, | 1489 | state_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 | */ |
1504 | static int | 1504 | static int |
1505 | state_sync_set (void *cls, | 1505 | state_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 | */ |
1518 | static int | 1518 | static int |
1519 | state_sync_end (void *cls, | 1519 | state_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 | */ |
1549 | static int | 1549 | static int |
1550 | state_reset (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key) | 1550 | state_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 | */ |
1564 | static int | 1564 | static int |
1565 | state_update_signed (void *cls, | 1565 | state_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 | */ |
1580 | static int | 1580 | static int |
1581 | state_get (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, | 1581 | state_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 | */ |
1631 | static int | 1631 | static int |
1632 | state_get_prefix (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, | 1632 | state_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 | */ |
1698 | static int | 1698 | static int |
1699 | state_get_signed (void *cls, | 1699 | state_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 | */ |
656 | struct GNUNET_PSYCSTORE_OperationHandle * | 656 | struct GNUNET_PSYCSTORE_OperationHandle * |
657 | GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, | 657 | GNUNET_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 | */ |
722 | struct GNUNET_PSYCSTORE_OperationHandle * | 722 | struct GNUNET_PSYCSTORE_OperationHandle * |
723 | GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h, | 723 | GNUNET_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 | */ |
770 | struct GNUNET_PSYCSTORE_OperationHandle * | 770 | struct GNUNET_PSYCSTORE_OperationHandle * |
771 | GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h, | 771 | GNUNET_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 | */ |
816 | struct GNUNET_PSYCSTORE_OperationHandle * | 816 | struct GNUNET_PSYCSTORE_OperationHandle * |
817 | GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h, | 817 | GNUNET_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 | */ |
861 | struct GNUNET_PSYCSTORE_OperationHandle * | 861 | struct GNUNET_PSYCSTORE_OperationHandle * |
862 | GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, | 862 | GNUNET_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 | */ |
908 | struct GNUNET_PSYCSTORE_OperationHandle * | 908 | struct GNUNET_PSYCSTORE_OperationHandle * |
909 | GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h, | 909 | GNUNET_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 | */ |
956 | struct GNUNET_PSYCSTORE_OperationHandle * | 956 | struct GNUNET_PSYCSTORE_OperationHandle * |
957 | GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h, | 957 | GNUNET_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 | */ |
1002 | struct GNUNET_PSYCSTORE_OperationHandle * | 1002 | struct GNUNET_PSYCSTORE_OperationHandle * |
1003 | GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h, | 1003 | GNUNET_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 | */ |
1071 | struct GNUNET_PSYCSTORE_OperationHandle * | 1071 | struct GNUNET_PSYCSTORE_OperationHandle * |
1072 | GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h, | 1072 | GNUNET_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 | */ |
1133 | struct GNUNET_PSYCSTORE_OperationHandle * | 1133 | struct GNUNET_PSYCSTORE_OperationHandle * |
1134 | GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h, | 1134 | GNUNET_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 | */ |
1175 | struct GNUNET_PSYCSTORE_OperationHandle * | 1175 | struct GNUNET_PSYCSTORE_OperationHandle * |
1176 | GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h, | 1176 | GNUNET_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 | */ |
1219 | struct GNUNET_PSYCSTORE_OperationHandle * | 1219 | struct GNUNET_PSYCSTORE_OperationHandle * |
1220 | GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h, | 1220 | GNUNET_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 | */ |
1266 | struct GNUNET_PSYCSTORE_OperationHandle * | 1266 | struct GNUNET_PSYCSTORE_OperationHandle * |
1267 | GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h, | 1267 | GNUNET_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 | */ |
51 | static const char *plugin_name; | 51 | static const char *plugin_name; |
52 | 52 | ||
53 | static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; | 53 | static struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key; |
54 | static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; | 54 | static struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key; |
55 | 55 | ||
56 | static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key; | 56 | static struct GNUNET_CRYPTO_EddsaPublicKey channel_pub_key; |
57 | static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key; | 57 | static 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 | */ |
57 | static GNUNET_SCHEDULER_TaskIdentifier end_badly_task; | 57 | static GNUNET_SCHEDULER_TaskIdentifier end_badly_task; |
58 | 58 | ||
59 | static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; | 59 | static struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key; |
60 | static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; | 60 | static struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key; |
61 | 61 | ||
62 | static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key; | 62 | static struct GNUNET_CRYPTO_EddsaPublicKey channel_pub_key; |
63 | static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key; | 63 | static struct GNUNET_CRYPTO_EddsaPublicKey slave_pub_key; |
64 | 64 | ||
65 | static struct FragmentClosure | 65 | static 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, |