Skip to content

peer: the device challenge, and 0.5.4 - #56

Merged
richlegrand merged 5 commits into
mainfrom
device-challenge
Nov 24, 2026
Merged

richlegrand merged 5 commits into
mainfrom
device-challenge

Conversation

@richlegrand

Copy link
Copy Markdown
Owner

Four commits: the device challenge, two e2e changes for the device-origins
runtime, and the version bump for 0.5.4.

The device challenge

Every offer carries 16 fresh random bytes. The answer's payload that names
them -- with the fingerprint as its 32 bytes, so it fits RSA-2048 OAEP -- is
good for that connection only, and the challenge is spent on the first
answer. The older payload is still accepted and logged as replayable; a mix
of the two forms is rejected. bitbang connect answers a challenge when the
offer has one. See bitbang-docs/device-origins.md, "The device challenge".

e2e

  • Under device origins the device's page is #device-frame inside
    #bb-connection, the connection frame. tests/e2e/frames.py names the
    layout once and every test goes through it.
  • test_a_reader_that_stops_stops_the_target waited a fixed 8 s for the
    read-ahead to fill; across the internet the target was still climbing. It
    now samples every 2 s until two samples agree (up to 60 s), stops early
    past the bound, and prints what it saw.

Tested

Merged onto main (with #55) and built:

  • go vet ./... and go test ./... pass.
  • The e2e suite against bitba.ng, which runs the device-origins server:
    Chromium (with the Firefox tests) 81 passed, 1 skipped; WebKit 80 passed,
    1 skipped, 1 xfailed (flow control, expected in WebKit).

Rich LeGrand added 5 commits November 10, 2026 08:30
Every offer carries 16 fresh random bytes; the answer's payload that
names them (with the fingerprint as its 32 bytes, so it fits RSA-2048
OAEP) is good for that connection only, and the challenge is spent on
the first answer. The older payload is still accepted, logged as
replayable; a mix of the two is rejected. bitbang connect answers a
challenge when the offer has one. See bitbang-docs/device-origins.md.
Under device origins the device's page is #device-frame inside
#bb-connection, the connection frame, which also holds the status area.
tests/e2e/frames.py names the layout once; every test goes through it.
Passes against test.bitba.ng in Chromium (with the Firefox tests) and
WebKit.
Against bitba.ng the target was still climbing toward the bound after the
fixed 8 s wait. Sample every 2 s until two samples agree (up to 60 s), stop
early past READ_AHEAD_BOUND, and print the samples.
…pto/rand

govulncheck flags GO-2026-6278 in v1.5.3, the latest tag: the client's
mask key comes from a weak PRNG. The fix is untagged, 14 commits past
v1.5.3. We use gorilla only as a client (signaling, and the WebSocket
bridge to targets); the e2e suite passes against bitba.ng in Chromium
and WebKit.
@richlegrand
richlegrand merged commit 4c4121e into main Nov 24, 2026
5 checks passed
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