Re: com php-src: Add hash_hkdf(): NEWS UPGRADING ext/hash/hash.c ext/hash/php_hash.h ext/hash/tests/hash_hkdf_basic.phpt
ext/hash/tests/hash_hkdf_edges.phpt ext/hash/tests/hash_hkdf_error.phpt ext/hash/tests/hash_hkdf_rfc5869.phpt

From: Date: Sun, 15 Jan 2017 17:46:08 +0000
Subject: Re: com php-src: Add hash_hkdf(): NEWS UPGRADING ext/hash/hash.c ext/hash/php_hash.h ext/hash/tests/hash_hkdf_basic.phpt
ext/hash/tests/hash_hkdf_edges.phpt ext/hash/tests/hash_hkdf_error.phpt ext/hash/tests/hash_hkdf_rfc5869.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96733@lists.php.net to get a copy of this message
Hi Nikita, I guess discussion was done in IRC and I'm not on IRC. What was the discussion result for salt usage? Merged function signature has salt as the last option which encourages users to use weaker value. https://tools.ietf.org/rfc/rfc5869.txt Section 3.1 3.1. To Salt or not to Salt HKDF is defined to operate with and without random salt. This is done to accommodate applications where a salt value is not available.* We stress, however, that the use of salt adds significantly to the strength of HKDF*, ensuring independence between different uses of the hash function, supporting "source-independent" extraction, and strengthening the analytical results that back the HKDF design. Random salt differs fundamentally from the initial keying material in two ways: it is non-secret and can be re-used. As such, salt values are available to many applications. For example, a pseudorandom number generator (PRNG) that continuously produces outputs by applying HKDF to renewable pools of entropy (e.g., sampled system events) can fix a salt value and use it for multiple applications of Krawczyk & Eronen Informational [Page 4] RFC 5869 Extract-and-Expand HKDF May 2010 HKDF without having to protect the secrecy of the salt. In a different application domain, a key agreement protocol deriving cryptographic keys from a Diffie-Hellman exchange can derive a salt value from public nonces exchanged and authenticated between communicating parties as part of the key agreement (this is the approach taken in [IKEv2]). Ideally, the salt value is a random (or pseudorandom) string of the length HashLen. Yet, even a salt value of less quality (shorter in size or with limited entropy) may still make a significant contribution to the security of the output keying material; designers of applications are therefore encouraged to provide salt values to HKDF if such values can be obtained by the application. *It is worth noting that, while not the typical case, some applications may even have a secret salt value available for use; in such a case, HKDF provides an even stronger security guarantee.* An example of such application is IKEv1 in its "public-key encryption mode", where the "salt" to the extractor is computed from nonces that are secret; similarly, the pre-shared mode of IKEv1 uses a secret salt derived from the pre-shared key. -- Yasuo Ohgaki yohgaki@ohgaki.net On Sat, Jan 14, 2017 at 9:28 PM, Nikita Popov <nikic@php.net> wrote: > Commit: 4bf7ef08061720586cb0a2f410720e26719d97f3 > Author: Andrey Andreev <narf@devilix.net> Wed, 11 Jan 2017 > 21:54:38 +0200 > Committer: Nikita Popov <nikita.ppv@gmail.com> Sat, 14 Jan 2017 > 13:28:21 +0100 > Parents: 687b02789e3bad3137eba4bff74273c6eb6f1aba > Branches: PHP-7.1 master > > Link: http://git.php.net/?p=php-src.git;a=commitdiff;h= > 4bf7ef08061720586cb0a2f410720e26719d97f3 > > Log: > Add hash_hkdf() > > Changed paths: > M NEWS > M UPGRADING > M ext/hash/hash.c > M ext/hash/php_hash.h > A ext/hash/tests/hash_hkdf_basic.phpt > A ext/hash/tests/hash_hkdf_edges.phpt > A ext/hash/tests/hash_hkdf_error.phpt > A ext/hash/tests/hash_hkdf_rfc5869.phpt > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.cvs (#96733) next »