3 Commits

Author SHA1 Message Date
Brian Smith
6f6a150185 Limit HKDF to SHA-{256,384,512} and remove HKDF-SHA-1 tests. 2019-07-07 16:32:46 -10:00
Brian Smith
f1d85e614b HKDF: Avoid an unnecessary loop iteration.
When `out` is the same length as the digest output an extra iteration
of HMAC was executed and then thrown away. Avoid that extra iteration.

Note that an extra iteration is still done in the degenerate case where
`out` is empty, because it's better to optimize for the case where `out`
isn't empty.

The output is exactly the same as before.
2019-03-29 14:31:32 -10:00
Brian Smith
5884ed3149 Move HKDF functional tests to tests/. 2017-06-08 12:01:34 -10:00