Skip to content

Backport TLS13-KDF/Extract fixes to 1.24 support branch #276

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

Merged

Conversation

nicholasberlin
Copy link
Contributor

@nicholasberlin nicholasberlin commented May 1, 2025

Relevant issue: #277

There's two three commits here:

The first is a cherry-pick of b488d85, but it wasn't clean. After handling the merge conflicts (and not adding const.go), I merged it.

The second commit is dealing with const.go not being there, and ossl package not being there.

The third commit is a clean cherry-pick of #260

Hopefully, it's clear.

@qmuntal
Copy link
Collaborator

qmuntal commented May 5, 2025

I've fixed the CI issues, pleaser rebase.

@qmuntal
Copy link
Collaborator

qmuntal commented May 5, 2025

Grr, rebase again please. I hadn't fixed all failures.

nicholasberlin and others added 3 commits May 5, 2025 09:08
* Add support for the TLS13-KDF algorithm

* Change to opt-in

* Code review suggestions

- Don't panic if there's no support
- Don't export the parse function
  - Move unit tests to hkdf_interal_test.go which use the same package
- Rework the parse function to return a boolean at the end

* Purge parsing

Reduce to only an Expand function based on TLS13-KDF
Remove associated cruft
Add new unit tests

* Update hkdf.go

Co-authored-by: Quim Muntal <quimmuntal@gmail.com>

* Update hkdf.go

Co-authored-by: Quim Muntal <quimmuntal@gmail.com>

* Be explicit, not clever.

* Do not ignore testdata/

* panic for unknown openssl versions

---------

Co-authored-by: Quim Muntal <quimmuntal@gmail.com>
golang-fips#260)

* hkdf: Replace nil salt with a slice of a preallocated all zeros buffer. This fixes HKDF when using KeyPair FIPS Provider for OpenSSL 3

* hkdf: fixed PR review comments

* hkdf: second round of PR comment fixes

* hkdf: third round of PR comment fixes
@qmuntal qmuntal merged commit 6020143 into golang-fips:ms-go1.24-support May 5, 2025
27 checks passed
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