Skip to content

refactor: use EVP_MAC in gost_tls12_additional_kdftree#522

Merged
chipitsine merged 2 commits intogost-engine:masterfrom
Mironenko:refactor-hmac-ctx
Apr 2, 2026
Merged

refactor: use EVP_MAC in gost_tls12_additional_kdftree#522
chipitsine merged 2 commits intogost-engine:masterfrom
Mironenko:refactor-hmac-ctx

Conversation

@VladGud
Copy link
Copy Markdown
Contributor

@VladGud VladGud commented Apr 1, 2026

resolve: #498

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the TLS 1.2 additional KDF tree implementation to stop using deprecated HMAC_* APIs and instead compute the per-iteration MAC using OpenSSL’s EVP_MAC interface, aligning the code with modern/provider-based OpenSSL usage.

Changes:

  • Replaced HMAC_CTX flow with EVP_MAC / EVP_MAC_CTX and OSSL_PARAM-driven digest selection.
  • Updated includes to support EVP_MAC configuration (core_names.h, params.h) and removed hmac.h usage.
  • Added output-length verification for EVP_MAC_final() results (out_len == 32).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chipitsine chipitsine merged commit 94181b0 into gost-engine:master Apr 2, 2026
12 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.

Migrate HMAC_* to EVP_MAC interface

3 participants