Skip to content

Implement node crypto HKDF, except for KeyObject inputs#865

Merged
fhanau merged 1 commit intomainfrom
felix/node-crypto-hkdf
Jul 17, 2023
Merged

Implement node crypto HKDF, except for KeyObject inputs#865
fhanau merged 1 commit intomainfrom
felix/node-crypto-hkdf

Conversation

@fhanau
Copy link
Contributor

@fhanau fhanau commented Jul 14, 2023

No description provided.

@fhanau fhanau requested review from jasnell and vickykont July 14, 2023 16:48
createHash,
createHmac,
getHashes,
// Hkdf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit; Indentation seems a little odd here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thank you

@@ -0,0 +1,153 @@
// Copyright (c) 2017-2022 Cloudflare, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this copyright need adjusting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the copyright years

@fhanau fhanau force-pushed the felix/node-crypto-hkdf branch from 69f91a4 to 2040fb0 Compare July 17, 2023 17:39
@fhanau
Copy link
Contributor Author

fhanau commented Jul 17, 2023

Corrected the copyright messages, also switched to a different approach to do HKDF that works with older bssl versions. It turns out that this approach is also much simpler as bssl's HKDF() function handles edge cases that OpenSSL does not, which allows us to greatly simplify the C++ code ☺️
@jasnell Feel free to take another look, although the fixes should be pretty straightforward.

Copy link
Collaborator

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM

@fhanau fhanau force-pushed the felix/node-crypto-hkdf branch from 2040fb0 to cc16f77 Compare July 17, 2023 19:22
@fhanau fhanau merged commit 30f053b into main Jul 17, 2023
@fhanau fhanau deleted the felix/node-crypto-hkdf branch July 28, 2023 13:01
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.

3 participants