Skip to content

handle group capsule tag collisions#10

Merged
mcjkula merged 8 commits into
mainfrom
group-capsule-collisions
Jun 7, 2026
Merged

handle group capsule tag collisions#10
mcjkula merged 8 commits into
mainfrom
group-capsule-collisions

Conversation

@mcjkula

@mcjkula mcjkula commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 0x15 group decrypt treated a one-byte capsule view-tag match as authoritative, so a tag collision could stop on the wrong capsule and return decryption failure.
  • Rust, Python, TypeScript, and Go now try every matching capsule and return plaintext only after AEAD authentication succeeds.
  • Removed private first-match capsule scanners in Rust, TypeScript, and Go so production decrypt has one capsule-selection path.
  • Added deterministic collision regressions in all four SDKs for both known member count and trial parsing.

Test plan

  • cargo test — 252 Rust tests passed
  • cargo clippy --tests -- -D warnings — Rust warnings denied
  • pytest tests/ — 207 Python tests passed after rebuilding samp-crypto in the root .venv
  • npm test — 206 TypeScript tests passed
  • go test ./... — Go test suite passed

@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mcjkula
mcjkula merged commit fdfea24 into main Jun 7, 2026
9 checks passed
@mcjkula
mcjkula deleted the group-capsule-collisions branch June 7, 2026 12:48
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