Skip to content

Secure session HKDF transcript and compatibility tests - #40

Open
Anupam-USP wants to merge 1 commit into
ethical-buddy:mainfrom
Anupam-USP:fix/30-add_hkdf_test
Open

Secure session HKDF transcript and compatibility tests#40
Anupam-USP wants to merge 1 commit into
ethical-buddy:mainfrom
Anupam-USP:fix/30-add_hkdf_test

Conversation

@Anupam-USP

@Anupam-USP Anupam-USP commented Jul 13, 2026

Copy link
Copy Markdown

This PR adds regression coverage for the secure-session migration by validating HKDF-based key derivation and compatibility behavior. It introduces tests that confirm:

  • both peers derive the same session key from a canonical transcript
  • changing the protocol kind, peer identity, or ephemeral keys changes the derived key
  • unsupported secure-session versions fail with a clear error

The implementation now derives session keys from a canonical transcript using HKDF and enforces a secure-session version gate during the handshake, preserving compatibility expectations while protecting the migration path.

Resolves #38

@Anupam-USP
Anupam-USP marked this pull request as ready for review July 13, 2026 18:43
@ethical-buddy

Copy link
Copy Markdown
Owner

Thanks for putting this together. The direction is good: moving secure-session key derivation to HKDF, adding transcript-based key separation, and testing version mismatch behavior are all the right areas to focus on.

We are going with PR #35 for this issue because that PR resolves the same problem more completely. In particular, PR #35 binds the transcript to the full static Ed25519 public keys instead of truncated node IDs, includes the explicit version-gated migration path, and has broader focused coverage for transcript canonicalization, key separation, public-key binding, and mixed-version behavior.

Your PR still had some good ideas. In particular, including the secure-session version in the signed handshake payload was a useful hardening detail, and we carried that idea into the final cleanup before merging PR #35.

If you want to help next, useful follow-up areas would be:

  • add or improve compatibility tests around old/new secure-session peers
  • help clean up the existing go test ./... failures from non-constant fmt.Errorf calls
  • help fix the current Linux stable-gate dependency gap for libXxf86vm
  • review the secure-session docs or add a short protocol note explaining the v2 transcript format and migration behavior

Appreciate the contribution. This PR was close, but PR #35 covers the same fix with the stronger transcript binding we need.

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.

secure: add HKDF transcript and compatibility tests

2 participants