From 33a50a0010510321ce14fefae297b7618c18b5dd Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 4 Nov 2016 09:47:28 +0000 Subject: - use timing macro instead of log --- src/cadet/gnunet-service-cadet_tunnel.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index e47d0bc96..5b07e42c0 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -734,7 +734,6 @@ t_ax_encrypt (struct CadetTunnel *t, void *dst, const void *src, size_t size) CADET_TIMING_START; - LOG (GNUNET_ERROR_TYPE_DEBUG, " t_ax_encrypt start\n"); ax = t->ax; ax->ratchet_counter++; if (GNUNET_YES == ax->ratchet_allowed @@ -810,7 +809,7 @@ t_ax_decrypt (struct CadetTunnel *t, void *dst, const void *src, size_t size) struct CadetTunnelAxolotl *ax; size_t out_size; - LOG (GNUNET_ERROR_TYPE_DEBUG, " t_ax_decrypt start\n"); + CADET_TIMING_START; ax = t->ax; @@ -830,7 +829,7 @@ t_ax_decrypt (struct CadetTunnel *t, void *dst, const void *src, size_t size) t_hmac_derive_key (&ax->CKr, &ax->CKr, "1", 1); - LOG (GNUNET_ERROR_TYPE_DEBUG, " t_ax_decrypt end\n"); + CADET_TIMING_END; return out_size; } @@ -849,8 +848,7 @@ t_h_encrypt (struct CadetTunnel *t, struct GNUNET_CADET_Encrypted *msg) struct CadetTunnelAxolotl *ax; size_t out_size; - LOG (GNUNET_ERROR_TYPE_DEBUG, " t_h_encrypt start\n"); - + CADET_TIMING_START; ax = t->ax; GNUNET_CRYPTO_symmetric_derive_iv (&iv, &ax->HKs, NULL, 0, NULL); @@ -863,8 +861,7 @@ t_h_encrypt (struct CadetTunnel *t, struct GNUNET_CADET_Encrypted *msg) &ax->HKs, &iv, &msg->Ns); GNUNET_assert (AX_HEADER_SIZE == out_size); - - LOG (GNUNET_ERROR_TYPE_DEBUG, " t_ax_encrypt end\n"); + CADET_TIMING_END; } @@ -883,7 +880,7 @@ t_h_decrypt (struct CadetTunnel *t, const struct GNUNET_CADET_Encrypted *src, struct CadetTunnelAxolotl *ax; size_t out_size; - LOG (GNUNET_ERROR_TYPE_DEBUG, " t_h_decrypt start\n"); + CADET_TIMING_START; ax = t->ax; GNUNET_CRYPTO_symmetric_derive_iv (&iv, &ax->HKr, NULL, 0, NULL); @@ -898,7 +895,7 @@ t_h_decrypt (struct CadetTunnel *t, const struct GNUNET_CADET_Encrypted *src, GNUNET_assert (AX_HEADER_SIZE == out_size); - LOG (GNUNET_ERROR_TYPE_DEBUG, " t_h_decrypt end\n"); + CADET_TIMING_END; } -- cgit v1.2.3