gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35589 - gnunet/src/cadet


From: gnunet
Subject: [GNUnet-SVN] r35589 - gnunet/src/cadet
Date: Mon, 27 Apr 2015 21:14:28 +0200

Author: bartpolot
Date: 2015-04-27 21:14:28 +0200 (Mon, 27 Apr 2015)
New Revision: 35589

Modified:
   gnunet/src/cadet/gnunet-service-cadet_tunnel.c
Log:
- doxygen

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2015-04-27 19:14:27 UTC 
(rev 35588)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2015-04-27 19:14:28 UTC 
(rev 35589)
@@ -849,6 +849,14 @@
 }
 
 
+/**
+ * Generate a new key with a HMAC mechanism from the existing chain key.
+ *
+ * @param ax Axolotl context.
+ * @param key[out] Derived key.
+ * @param source Source key material (data to HMAC).
+ * @param len Length of @a source.
+ */
 void
 t_ax_hmac_hash (struct CadetTunnelAxolotl *ax,
                 struct GNUNET_CRYPTO_SymmetricSessionKey *key,
@@ -867,6 +875,7 @@
                      &hash, sizeof (hash));
 }
 
+
 /**
  * Encrypt daforce_newest_keyta with the tunnel key.
  *
@@ -897,17 +906,17 @@
   t_ax_hmac_hash (ax, &MK, "0", 1);
   GNUNET_CRYPTO_symmetric_derive_iv (&iv, &MK, NULL, 0, NULL);
 
-
   #if DUMP_KEYS_TO_STDERR
   LOG (GNUNET_ERROR_TYPE_INFO, "  ENC with key %s\n",
        GNUNET_h2s ((struct GNUNET_HashCode *) &MK));
   #endif
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "  t_encrypt IV derived\n");
+
   out_size = GNUNET_CRYPTO_symmetric_encrypt (src, size, &MK, &iv, dst);
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "  t_encrypt end\n");
 
   t_ax_hmac_hash (ax, &ax->CKs, "1", 1);
 
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "  t_ax_encrypt end\n");
+
   return out_size;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]