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

doc,lib,test: rename HKDF 'key' argument #39474

Closed
wants to merge 1 commit into from

Conversation

tniessen
Copy link
Member

HKDF is a key derivation function, which, as the name implies, can be used to produce a key. However, the input is usually not a cryptographic key. (Internally, HKDF passes the "key" to HMAC, but not as a key, but as data to be hashed. The salt argument is actually used as the key internally.)

To avoid confusion and the ambiguity of having two (or three) "keys" (input keying material and output keying material, and internally the pseudorandom key), this renames the argument in documentation and error messages.

I'd be happy about alternatives to the name ikm, which is not exactly self-explanatory. Is inputKeyingMaterial (or inputKeyMaterial) too verbose?

Refs: #39471

@tniessen tniessen added the crypto Issues and PRs related to the crypto subsystem. label Jul 20, 2021
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jul 20, 2021
@tniessen tniessen added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 21, 2021
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 21, 2021
@nodejs-github-bot
Copy link
Collaborator

@panva panva added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed needs-ci PRs that need a full CI run. labels Jul 21, 2021
@nodejs-github-bot
Copy link
Collaborator

@jasnell
Copy link
Member

jasnell commented Jul 26, 2021

Landed in 1229d49

@jasnell jasnell closed this Jul 26, 2021
jasnell pushed a commit that referenced this pull request Jul 26, 2021
PR-URL: #39474
Refs: #39471
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Aug 2, 2021
PR-URL: #39474
Refs: #39471
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targos targos mentioned this pull request Aug 2, 2021
@tniessen tniessen deleted the doc-rename-hkdf-key-arg branch October 7, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants