3

According to Wikipedia, ECIES requires a key derivation function. I already have an implementation of PBKDF2-HMAC-SHA256 in my library, so I could use this.

Is PBKDF2-HMAC-SHA256 (salted of course) sufficient as KDF? Or should I use another KDF?

K. Biermann
  • 364
  • 2
  • 11
  • You could use unsalted PBKDF2-HMAC-SHA256 with a single iteration. Personally I'd rather use HKDF or even a plain hash. – CodesInChaos May 24 '15 at 10:47
  • @CodesInChaos I would prefer KDF1 or KDF2 for the simple reason that you can claim you used an actual KDF. It's not much more than a hash anyway - creating & including a 4 byte counter is not *that* much work. Makes it easier to derive more keys later too. – Maarten Bodewes May 24 '15 at 12:07

1 Answers1

2

Why would you do that? It's the Password-Based Key Derivation Function 2, and ECIES doesn't work with a password but with a DH shared secret, thus not suffering from the same issues that plague passwords (such as low entropy-density).

Not to say it wouldn't suffice, but if you need something a straight hash or HMAC doesn't provide, KDF1 and KDF2 are your friends.