Skip to content
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 doc for 'label' and 'context' params in HKDF #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patrickfav
Copy link

@patrickfav patrickfav commented Jun 12, 2018

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)

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)
@patrickfav
Copy link
Author

Any chance this will be merged?

@LiraNuna
Copy link

LiraNuna commented Mar 7, 2019

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 #54

@patrickfav
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants