Skip to content

Make relay blindness proof deterministic - #47

Merged
frahlg merged 1 commit into
mainfrom
fix/relay-blindness-flake
Aug 12, 2026
Merged

Make relay blindness proof deterministic#47
frahlg merged 1 commit into
mainfrom
fix/relay-blindness-flake

Conversation

@frahlg

@frahlg frahlg commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • stop treating one coincidental four-byte int32 pattern in ciphertext as a plaintext disclosure
  • retain int32 coverage by searching adjacent readings as one eight-byte pattern, while keeping single float64 coverage at eight bytes
  • require repeated occurrences for short protocol words such as snap and tick
  • strengthen the positive controls so both repeated protocol plaintext and packed int32 plaintext must still be detected

This is CI-only and does not need a changeset.

Verification

  • npx vitest run tests/relay-blindness.test.ts tests/end-to-end-encrypted.test.ts (17 passed)
  • npm run verify (865 passed, 1 skipped)
  • npm run check after the final detector control assertion

@frahlg
frahlg marked this pull request as ready for review August 12, 2026 12:34
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp eb01a4a Commit Preview URL

Branch Preview URL
Aug 12 2026, 12:34 PM

@frahlg
frahlg merged commit d1cbb0a into main Aug 12, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb01a4af78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

for (const s of KNOWN_STRINGS) {
const bytes = new TextEncoder().encode(s)
const occurrences = countBytes(dump, bytes)
if (occurrences >= (bytes.length >= MIN_NEEDLE_BYTES ? 1 : 2)) found.push(`string:${s}`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep single plaintext frames detectable

When only one control frame is exposed—for example, a normal { t: 'tick' } or { t: 'delta' } frame—its known protocol word occurs once and is shorter than eight bytes, while its ordinary CBOR integers are also filtered out, so leaks() returns no finding. The positive control now conceals this false negative by concatenating the same frame twice; a relay regression that logs, retains, or otherwise exposes one decrypted frame would therefore pass this security proof.

Useful? React with 👍 / 👎.

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