obfs4 for Android, part 1: Elligator2 #104

Merged
paulhitt merged 7 commits from feat/obfs4-kotlin-elligator2 into main 2026-09-06 18:09:37 +00:00
paulhitt commented 2026-09-06 16:46:27 +00:00 (Migrated from gitlab.com)

Nine defects, all of them in the test, none in the app. These
suites were written before the tab split, the age gate and the two
sign-out doors, and had not run since. Each staleness hid behind the one
before it, and every error message blamed the wrong thing.

  1. The age gate was never filled. submit is enabled = … && (!registering || birthYear.length == 4), and performClick() on a
    disabled Compose node does not throw — it does nothing.
  2. submit was below the fold. Adding that field pushed the button
    off a 1080x2400 screen. An off-screen node still reports ENABLED —
    that is a state check, not a visibility one — so the gesture reached
    nothing. Proved by logging inside the app: signIn was never called,
    through 450 seconds of waiting.
  3. The peer's name was typed into a button. new-contact is the
    FIELD; lookup-contact is the Look-up button.
  4. The lookup step was skipped, so confirm-contact never appeared —
    the app refuses to turn a typed string straight into a contact,
    because a typo would silently become a stranger.
  5. buddy-<id> vs buddy-circle-<id>. Home shows the circles row.
    The suite reported "never became a contact" about a contact on screen.
  6. RECORD_AUDIO was never granted. The mic dialog is not in the app's
    Compose tree, so the failure read "No compose hierarchies found" — as
    though the app had died rather than a dialog covering it.
  7. Sign-out was a no-op: the row needed scrolling to, AND the
    destructive rows confirm in place, so one tap only armed it.
  8. It used the wrong door. A plain sign-out KEEPS the device and
    credential by design — right for a person, wrong for a suite whose
    next test wants a different account. sign-out-erase is the one that
    clears the vault.
  9. Groups and stories are on their own tabs, and stories is the
    strip on Home, not the Stories tab, which carries new-story.

signOutIfSignedIn no longer wraps itself in runCatching. Swallowing
that failure is what made the damage appear three screens later in a
different test.

The two waits that span a relay POLL — a contact reaching the roster,
a group reaching the list — are 150s. They are the only two that flake,
because neither is refreshed by the response to its own write.

All four tests pass. Not yet all in one run: the add-contact lookup is
throttled per window, and four tests share it.

**Nine defects, all of them in the test, none in the app.** These suites were written before the tab split, the age gate and the two sign-out doors, and had not run since. Each staleness hid behind the one before it, and every error message blamed the wrong thing. 1. **The age gate was never filled.** `submit` is `enabled = … && (!registering || birthYear.length == 4)`, and `performClick()` on a disabled Compose node does not throw — it does nothing. 2. **`submit` was below the fold.** Adding that field pushed the button off a 1080x2400 screen. An off-screen node still reports ENABLED — that is a state check, not a visibility one — so the gesture reached nothing. Proved by logging inside the app: `signIn` was never called, through 450 seconds of waiting. 3. **The peer's name was typed into a button.** `new-contact` is the FIELD; `lookup-contact` is the Look-up button. 4. **The lookup step was skipped**, so `confirm-contact` never appeared — the app refuses to turn a typed string straight into a contact, because a typo would silently become a stranger. 5. **`buddy-<id>` vs `buddy-circle-<id>`.** Home shows the circles row. The suite reported "never became a contact" about a contact on screen. 6. **RECORD_AUDIO was never granted.** The mic dialog is not in the app's Compose tree, so the failure read "No compose hierarchies found" — as though the app had died rather than a dialog covering it. 7. **Sign-out was a no-op**: the row needed scrolling to, AND the destructive rows confirm in place, so one tap only armed it. 8. **It used the wrong door.** A plain sign-out KEEPS the device and credential by design — right for a person, wrong for a suite whose next test wants a different account. `sign-out-erase` is the one that clears the vault. 9. **Groups and stories are on their own tabs**, and `stories` is the strip on Home, not the Stories tab, which carries `new-story`. `signOutIfSignedIn` no longer wraps itself in `runCatching`. Swallowing that failure is what made the damage appear three screens later in a different test. The two waits that span a relay POLL — a contact reaching the roster, a group reaching the list — are 150s. They are the only two that flake, because neither is refreshed by the response to its own write. All four tests pass. Not yet all in one run: the add-contact lookup is throttled per window, and four tests share it.
paulhitt commented 2026-09-06 16:46:27 +00:00 (Migrated from gitlab.com)

assigned to @paulhitt

assigned to @paulhitt
paulhitt commented 2026-09-06 17:06:45 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 44e06adf - obfs4 for Android, part 2: the cofactor-dirty scalar multiplication

Compare with previous version

added 1 commit <ul><li>44e06adf - obfs4 for Android, part 2: the cofactor-dirty scalar multiplication</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/77/diffs?diff_id=2007612444&start_sha=db35c7ce55f424ca5c7aca5e2f3ac8fe4ccbfd6c)
paulhitt commented 2026-09-06 17:13:05 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 430f167f - obfs4 for Android, part 3: SipHash, the length DRBG, and ntor

Compare with previous version

added 1 commit <ul><li>430f167f - obfs4 for Android, part 3: SipHash, the length DRBG, and ntor</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/77/diffs?diff_id=2007615494&start_sha=44e06adf92b00a6aa405b3afdc0262b60c53f79f)
paulhitt commented 2026-09-06 17:16:12 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 799886f3 - obfs4 for Android, part 4: framing

Compare with previous version

added 1 commit <ul><li>799886f3 - obfs4 for Android, part 4: framing</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/77/diffs?diff_id=2007617064&start_sha=430f167fc0d97f12579d706f82299f7a7ba07472)
paulhitt commented 2026-09-06 17:26:55 +00:00 (Migrated from gitlab.com)

added 1 commit

  • ac5802a8 - obfs4 for Android, part 5: handshake messages, packets, and the connection

Compare with previous version

added 1 commit <ul><li>ac5802a8 - obfs4 for Android, part 5: handshake messages, packets, and the connection</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/77/diffs?diff_id=2007622854&start_sha=799886f35c9d34a0e19db718614a76beea74db8b)
paulhitt commented 2026-09-06 17:33:46 +00:00 (Migrated from gitlab.com)

added 1 commit

  • a7ce0104 - obfs4 for Android, part 6: live interop with real lyrebird, both directions

Compare with previous version

added 1 commit <ul><li>a7ce0104 - obfs4 for Android, part 6: live interop with real lyrebird, both directions</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/77/diffs?diff_id=2007625974&start_sha=ac5802a8390e7e87c3d0b07178e6d3e3931554e9)
paulhitt commented 2026-09-06 17:39:26 +00:00 (Migrated from gitlab.com)

added 1 commit

  • dd412b86 - obfs4 for Android, part 7: the OkHttp seam, off by default

Compare with previous version

added 1 commit <ul><li>dd412b86 - obfs4 for Android, part 7: the OkHttp seam, off by default</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/77/diffs?diff_id=2007628392&start_sha=a7ce01040376542ab8c1399213c01d8876b2c5fd)
paulhitt commented 2026-09-06 18:09:38 +00:00 (Migrated from gitlab.com)

mentioned in commit 9bc7dcf762

mentioned in commit 9bc7dcf762bd2a2d0ea2ed4b373442c4ce7c7178
paulhitt (Migrated from gitlab.com) merged commit 9bc7dcf762 into main 2026-09-06 18:09:38 +00:00
paulhitt commented 2026-09-06 19:12:18 +00:00 (Migrated from gitlab.com)

mentioned in commit 6cd7a0d5dc

mentioned in commit 6cd7a0d5dc20d49f0753db36d073ca4d8ffd0929
paulhitt commented 2026-09-06 19:16:28 +00:00 (Migrated from gitlab.com)

mentioned in commit 902e16cf92

mentioned in commit 902e16cf92ec52122b021b59902dada4abb6bbc2
paulhitt commented 2026-09-06 19:16:29 +00:00 (Migrated from gitlab.com)

mentioned in merge request !79

mentioned in merge request !79
paulhitt commented 2026-09-09 19:01:14 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
Sign in to join this conversation.