<div dir="ltr"><div dir="ltr">Hi all,<div><br></div><div>I just checked the OpenSSL 1.0.2, I don't think pkcs5_pbkdf2_hmac_sha1 (Jeff T mentioned during Apr 3's NFD call) is exposed in 1.0.2. </div><div>Instead, I found this KDF in 1.0.2: EVP_BytesToKey (<a href="https://www.openssl.org/docs/man1.0.2/man3/EVP_BytesToKey.html">https://www.openssl.org/docs/man1.0.2/man3/EVP_BytesToKey.html</a>)</div><div>However, this website (<a href="https://www.cryptopp.com/wiki/OPENSSL_EVP_BytesToKey">https://www.cryptopp.com/wiki/OPENSSL_EVP_BytesToKey</a>) says </div><div>"</div><div><span style="font-family:"Helvetica Neue";font-size:12px">Early versions of EVP_BytesToKey used MD5, and later versions use SHA. MD5 is used in OpenSSL 1.0.2 and earlier. OpenSSL 1.1.0c and later use SHA-256 as the hash. Unless you have a specific need, you should not use OPENSSL_EVP_BytesToKey. Rather, you should use a password derivation function like HKDF or PBKDF2.</span></div><div>"</div><div>As we all know, MD5 has been deprecated as a crypto hash func, so my personal opinion is not to use this EVP_BytesToKey as NDNCERT's KDF.</div><div><br></div><div>As pointed out here (<a href="https://crypto.stackexchange.com/questions/50135/is-sha-2-suitable-for-key-derivation">https://crypto.stackexchange.com/questions/50135/is-sha-2-suitable-for-key-derivation</a>), I think using a raw SHA256 should be fine for our NDNCERT's KDF purpose, give the AES key will only be used in one cert request "session".</div><div><br></div><div>This will also avoid the OpenSSL version issue temporarily. When our NDN Testbed adopts a newer version of OpenSSL. We can bring the HKDF back.</div><div><br></div><div>Best,</div><div>Zhiyi</div></div></div>