-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HKDF #94
Add HKDF #94
Conversation
in analogy to cose_crypto_is_aead
There is no need for a selector on this branch, but one is coming up.
I've now managed to use this from within libOSCORE, and it's working alright and produces correct values. (The sodium implementation fails to implement larger seeds, though). Things I've observed:
With the streaming situation becoming complex, it may really be the better idea to implement HMAC streaming-ready (which is tricky on its own), and then to experiment with an HKDF API built on that, probably based on splitting the extract and expand steps. That's all the streaming roadmap, anyway. If we're good with a v1 stream-free API, what's can be good enough. (Especially considering that cose_crypto_* is not really part of the public API but rather something I've coopted for my devious uses). So far, I'm getting away doing upper-bounds estimates all around. |
Otherwise, just no algorithms will ever be shown as supported; the ifdefs are necessary while HKDF support in libcose is not upstreamed yet (see bergzand/libcose#94)
#120 is in so this can be closed |
This is a cleaned-up version of what @marcovr did last year on HKDF support: Tests were moved into the test framework, components moved around a bit to match the conventional structure, a
cose_crypto_is_hkdf
function added.Marco's implementation executes the the HKDF steps based on sodium's HMAC.
It does not attempt to be drivable over a scatter-gather IKM or salt; the used sodium API calls don't support it. While that would be desirable, neither is it implemented for other parts of libcose.
Closes: #90
ToDo (and thus marked WIP):