aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-tng.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-tng.c')
-rw-r--r--src/transport/gnunet-service-tng.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index e55491990..bb1656876 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -3257,9 +3257,9 @@ struct BackchannelKeyState
3257 3257
3258 3258
3259static void 3259static void
3260setup_key_state_from_km (const struct GNUNET_HashCode *km, 3260bc_setup_key_state_from_km (const struct GNUNET_HashCode *km,
3261 const struct GNUNET_HashCode *iv, 3261 const struct GNUNET_ShortHashCode *iv,
3262 struct BackchannelKeyState *key) 3262 struct BackchannelKeyState *key)
3263{ 3263{
3264 /* must match #dh_key_derive_eph_pub */ 3264 /* must match #dh_key_derive_eph_pub */
3265 GNUNET_assert (GNUNET_YES == 3265 GNUNET_assert (GNUNET_YES ==
@@ -3292,7 +3292,7 @@ dh_key_derive_eph_pid (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv_ephemera
3292 struct GNUNET_HashCode km; 3292 struct GNUNET_HashCode km;
3293 3293
3294 GNUNET_assert (GNUNET_YES == 3294 GNUNET_assert (GNUNET_YES ==
3295 GNUNET_CRYPTO_ecdsa_ecdh (priv_ephemeral, 3295 GNUNET_CRYPTO_ecdh_eddsa (priv_ephemeral,
3296 &target->public_key, 3296 &target->public_key,
3297 &km)); 3297 &km));
3298 bc_setup_key_state_from_km (&km, 3298 bc_setup_key_state_from_km (&km,
@@ -3318,7 +3318,7 @@ dh_key_derive_eph_pub (const struct GNUNET_CRYPTO_EcdhePublicKey *pub_ephemeral,
3318 struct GNUNET_HashCode km; 3318 struct GNUNET_HashCode km;
3319 3319
3320 GNUNET_assert (GNUNET_YES == 3320 GNUNET_assert (GNUNET_YES ==
3321 GNUNET_CRYPTO_ecdsa_ecdh (GST_my_private_key, 3321 GNUNET_CRYPTO_eddsa_ecdh (GST_my_private_key,
3322 pub_ephemeral, 3322 pub_ephemeral,
3323 &km)); 3323 &km));
3324 bc_setup_key_state_from_km (&km, 3324 bc_setup_key_state_from_km (&km,
@@ -3357,8 +3357,8 @@ bc_hmac (const struct BackchannelKeyState *key,
3357 */ 3357 */
3358static void 3358static void
3359bc_encrypt (struct BackchannelKeyState *key, 3359bc_encrypt (struct BackchannelKeyState *key,
3360 void *dst,
3361 const void *in, 3360 const void *in,
3361 void *dst,
3362 size_t in_size) 3362 size_t in_size)
3363{ 3363{
3364 // FIXME! 3364 // FIXME!
@@ -3376,8 +3376,8 @@ bc_encrypt (struct BackchannelKeyState *key,
3376 */ 3376 */
3377static void 3377static void
3378bc_decrypt (struct BackchannelKeyState *key, 3378bc_decrypt (struct BackchannelKeyState *key,
3379 const void *ciph,
3380 void *out, 3379 void *out,
3380 const void *ciph,
3381 size_t out_size) 3381 size_t out_size)
3382{ 3382{
3383 // FIXME! 3383 // FIXME!
@@ -3429,10 +3429,10 @@ handle_communicator_backchannel (void *cls,
3429 GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, 3429 GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
3430 &enc->iv, 3430 &enc->iv,
3431 sizeof (enc->iv)); 3431 sizeof (enc->iv));
3432 dh_key_derive (&private_key, 3432 dh_key_derive_eph_pid (&private_key,
3433 &cb->pid, 3433 &cb->pid,
3434 &enc->iv, 3434 &enc->iv,
3435 &key); 3435 &key);
3436 ppay.ephemeral_validity = GNUNET_TIME_absolute_hton (ephemeral_validity); 3436 ppay.ephemeral_validity = GNUNET_TIME_absolute_hton (ephemeral_validity);
3437 ppay.monotonic_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (GST_cfg)); 3437 ppay.monotonic_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (GST_cfg));
3438 mpos = (char *) &enc[1]; 3438 mpos = (char *) &enc[1];
@@ -4281,7 +4281,7 @@ handle_backchannel_encapsulation (void *cls,
4281 struct BackchannelKeyState key; 4281 struct BackchannelKeyState key;
4282 struct GNUNET_HashCode hmac; 4282 struct GNUNET_HashCode hmac;
4283 const char *hdr; 4283 const char *hdr;
4284 size_t hrd_len; 4284 size_t hdr_len;
4285 4285
4286 if (0 != GNUNET_memcmp (&be->target, 4286 if (0 != GNUNET_memcmp (&be->target,
4287 &GST_my_identity)) 4287 &GST_my_identity))