[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32565 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32565 - gnunet/src/mesh |
Date: |
Thu, 6 Mar 2014 14:12:59 +0100 |
Author: bartpolot
Date: 2014-03-06 14:12:58 +0100 (Thu, 06 Mar 2014)
New Revision: 32565
Modified:
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
- encrypt-then-MAC
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2014-03-06 10:50:52 UTC
(rev 32564)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2014-03-06 13:12:58 UTC
(rev 32565)
@@ -802,7 +802,7 @@
msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED);
msg->iv = iv;
GNUNET_assert (t_encrypt (t, &msg[1], message, size, iv) == size);
- t_hmac (t, message, size, iv, GNUNET_YES, &msg->hmac);
+ t_hmac (t, &msg[1], size, iv, GNUNET_YES, &msg->hmac);
msg->header.size = htons (sizeof (struct GNUNET_MESH_Encrypted) + size);
if (NULL == c)
@@ -1652,11 +1652,11 @@
struct GNUNET_HashCode hmac;
decrypted_size = t_decrypt (t, cbuf, &msg[1], payload_size, msg->iv);
- t_hmac (t, cbuf, payload_size, msg->iv, GNUNET_NO, &hmac);
+ t_hmac (t, &msg[1], payload_size, msg->iv, GNUNET_NO, &hmac);
if (0 != memcmp (&hmac, &msg->hmac, sizeof (struct GNUNET_HashCode)))
{
/* checksum failed */
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Failed checksum validation for a message on tunnel `%s'\n",
GMT_2s (t));
GNUNET_STATISTICS_update (stats, "# wrong HMAC", 1, GNUNET_NO);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32565 - gnunet/src/mesh,
gnunet <=