- dont resend useless channel_destroy messages
[oweals/gnunet.git] / src / util / crypto_kdf.c
index cd665ad23818caec0b8c5d5acbe9af7bb7f2cb96..9424c235085aee2a3d63764fd53f96fe26891f9c 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
 #include "platform.h"
 #include "gnunet_crypto_lib.h"
 
 #include "platform.h"
 #include "gnunet_crypto_lib.h"
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
 /**
  * @brief Derive key
  * @param result buffer for the derived key, allocated by caller
  * @param out_len desired length of the derived key
  * @param xts salt
 /**
  * @brief Derive key
  * @param result buffer for the derived key, allocated by caller
  * @param out_len desired length of the derived key
  * @param xts salt
- * @param xts_len length of xts
+ * @param xts_len length of @a xts
  * @param skm source key material
  * @param skm source key material
- * @param skm_len length of skm
+ * @param skm_len length of @a skm
  * @param argp va_list of void * & size_t pairs for context chunks
  * @param argp va_list of void * & size_t pairs for context chunks
- * @return GNUNET_YES on success
+ * @return #GNUNET_YES on success
  */
 int
 GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
  */
 int
 GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
@@ -53,7 +55,7 @@ GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
    * setting. Second, as shown in Section 6, using HMAC with a truncated output as an extractor
    * allows to prove the security of HKDF under considerably weaker assumptions on the underlying
    * hash function."
    * setting. Second, as shown in Section 6, using HMAC with a truncated output as an extractor
    * allows to prove the security of HKDF under considerably weaker assumptions on the underlying
    * hash function."
-   * 
+   *
    * http://eprint.iacr.org/2010/264
    */
 
    * http://eprint.iacr.org/2010/264
    */
 
@@ -66,11 +68,11 @@ GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
  * @param result buffer for the derived key, allocated by caller
  * @param out_len desired length of the derived key
  * @param xts salt
  * @param result buffer for the derived key, allocated by caller
  * @param out_len desired length of the derived key
  * @param xts salt
- * @param xts_len length of xts
+ * @param xts_len length of @a xts
  * @param skm source key material
  * @param skm source key material
- * @param skm_len length of skm
+ * @param skm_len length of @a skm
  * @param ... void * & size_t pairs for context chunks
  * @param ... void * & size_t pairs for context chunks
- * @return GNUNET_YES on success
+ * @return #GNUNET_YES on success
  */
 int
 GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
  */
 int
 GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,