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

handshake: validate HKDF-Expand-Label against crypto/tls implementation #4311

Merged
merged 2 commits into from Feb 5, 2024

Conversation

marten-seemann
Copy link
Member

The interesting bit here is that go:linkname also works for methods defined on struct. We're using it here to access cipherSuiteTLS13.expandLabel:

func (c *cipherSuiteTLS13) expandLabel(secret []byte, label string, context []byte, length int) []byte {

This works since methods defined on a type are really just functions that take that type as their first parameter.

Copy link

codecov bot commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dc49f56) 84.13% compared to head (10b7020) 84.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4311      +/-   ##
==========================================
+ Coverage   84.13%   84.17%   +0.04%     
==========================================
  Files         150      150              
  Lines       15368    15368              
==========================================
+ Hits        12929    12935       +6     
+ Misses       1940     1935       -5     
+ Partials      499      498       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marten-seemann marten-seemann merged commit c22a3c8 into master Feb 5, 2024
34 checks passed
@marten-seemann marten-seemann deleted the hkdf-improve-tests branch February 5, 2024 06:08
mgjeong pushed a commit to mgjeong/quic-go that referenced this pull request Feb 13, 2024
…on (quic-go#4311)

* handshake: validate HKDF-Expand-Label against crypto/tls implementation

* handshake: add a benchmark for HKDF-Expand-Label
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.

None yet

2 participants