X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fcrypto_kdf.c;h=242fbf29690f8bfa386630e5f5740a241f6be221;hb=265d10682af1afce58988be998d62e1849a3e545;hp=d8fcbd8665d739be44bd719e6a6bf93339ba4ec5;hpb=d9d94d0e53d26af75ec8241383d166544ebd79f3;p=oweals%2Fgnunet.git diff --git a/src/util/crypto_kdf.c b/src/util/crypto_kdf.c index d8fcbd866..242fbf296 100644 --- a/src/util/crypto_kdf.c +++ b/src/util/crypto_kdf.c @@ -1,10 +1,10 @@ /* This file is part of GNUnet. - (C) 2010 Christian Grothoff (and other contributing authors) + Copyright (C) 2010 GNUnet e.V. 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 @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /** @@ -36,16 +36,16 @@ * @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_len length of skm + * @param skm_len length of @a skm * @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, - size_t xts_len, const void *skm, size_t skm_len, - va_list argp) + size_t xts_len, const void *skm, size_t skm_len, + va_list argp) { /* * "Finally, we point out to a particularly advantageous instantiation using @@ -59,32 +59,31 @@ GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts, * http://eprint.iacr.org/2010/264 */ - return GNUNET_CRYPTO_hkdf_v (result, out_len, GCRY_MD_SHA512, - GCRY_MD_SHA256, xts, xts_len, skm, skm_len, - argp); + return GNUNET_CRYPTO_hkdf_v (result, out_len, GCRY_MD_SHA512, GCRY_MD_SHA256, + xts, xts_len, skm, skm_len, argp); } + /** * @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_len length of skm + * @param skm_len length of @a skm * @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, - size_t xts_len, const void *skm, size_t skm_len, ...) + size_t xts_len, const void *skm, size_t skm_len, ...) { va_list argp; int ret; va_start (argp, skm_len); - ret = - GNUNET_CRYPTO_kdf_v (result, out_len, xts, xts_len, skm, skm_len, argp); + ret = GNUNET_CRYPTO_kdf_v (result, out_len, xts, xts_len, skm, skm_len, argp); va_end (argp); return ret;