webcrypto-examples
webcrypto-examples copied to clipboard
Add doc for 'label' and 'context' params in HKDF
These are according to the HKDF spec: https://tools.ietf.org/html/rfc5869
There is a extract and a expand phase. The salt (aka label) is used in
the extract phase:
HKDF-Extract(salt, IKM) -> PRK
salt optional salt value (a non-secret random value);
if not provided, it is set to a string of HashLen zeros.
and the info (aka context) is used in the expand phase:
HKDF-Expand(PRK, info, L) -> OKM
info optional context and application specific information
(can be a zero-length string)
Any chance this will be merged?
Please note that salt and info are required as per webcrypto spec: https://www.w3.org/TR/WebCryptoAPI/#hkdf-params
In addition, HKDF-CRT was replaced with HKDF, and I already addressed it with https://github.com/diafygi/webcrypto-examples/pull/54
Thanks for the heads up. Thats interesting as the the RFC defines it as optional. Your PR is probably better then. Unfortunately it seems the maintainer has no interest in merging these PRs anytime soon.