aboutsummaryrefslogtreecommitdiff
path: root/src/regex
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/regex
parent8beabcd96c0cf1e1873c0b5ff96e537f1beb0b34 (diff)
downloadgnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.tar.gz
gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.zip
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA
Diffstat (limited to 'src/regex')
-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
5 files changed, 10 insertions, 10 deletions
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);