Skip to content

feat(server): add V3 HMAC framing - #821

Open
gijzelaerr wants to merge 1 commit into
fix-tls-layering-v2from
feat/803-server-v3-hmac
Open

feat(server): add V3 HMAC framing#821
gijzelaerr wants to merge 1 commit into
fix-tls-layering-v2from
feat/803-server-v3-hmac

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Summary

  • verify HMAC-SHA256 on incoming V3 server requests and sign every V3 response
  • validate V3 response HMACs in the sync client, including reassembled Explore frames
  • carry V3 response IntegrityIds without exposing them to response parsers
  • add end-to-end SessionKey tests covering connect, read, write, and Explore

The emulator accepts an explicit 24-byte-or-longer session_key. It cannot derive the client random key from material encrypted for a real Siemens PLC without the corresponding private key, so this gives tests and emulator users matching negotiated key material.

Dependency

This is stacked on #775 and currently targets its branch. After #775 merges, this PR can be retargeted to master; any required update will merge master into this branch rather than rebase it.

Validation

  • uv run --frozen pre-commit run --all-files
  • uv run --frozen pytest -q (1764 passed, 82 skipped)
  • uv build

Fixes #803

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.

1 participant