rweather / arduinolibs

Arduino Cryptography Library
444 stars 212 forks source link

HKDF support #11

Closed mlaz closed 2 years ago

mlaz commented 8 years ago

Hi!

It would be nice to have HMAC Key Derivation Function ( RFC5869: https://tools.ietf.org/html/rfc5869 ) support for Crypto's Hash classes. I wrote (and tested) an implementation which works with the SHA256 module and might also work with other Hash classes. If you are interested I would be glad to contribute to this project.

Best regards,

Miguel A.

rweather commented 8 years ago

Sure - that would be useful. Easiest may be to make it a template like CTR/CTRCommon, so that the programmer can instantiate HKDF<SHA256>, HKDF<BLAKE2s>, etc.

mlaz commented 8 years ago

I just made a pull request with the implementation according with what you suggested. Thanks.