Skip to content

Keep the dynamic pairing code stable across retries within an attempt #201

Closed

Description

@balloob

In the Dynamic Pairing Code Flow one attempt is one PAKE round. A wrong entry ends the attempt, and the retry draws new nonces, so the device shows a different code.

Failure mode:

  1. Speaker says "four eight three, nine two one".
  2. Operator types 483912.
  3. pair/abort pairing_code_mismatch. Attempt over.
  4. Server sends a new pairing server/activate. Speaker says "two zero five, six six eight".
  5. Operator listens again and types again. Five of these and the method is in backoff.

The code should not change when the operator mistypes.

Proposed change: allow multiple PAKE rounds within one attempt, code fixed.

  • After pairing_code_mismatch the attempt stays open. Server sends a fresh server/pair-auth, client answers client/pair-auth, round continues as before.
  • h, nonce_A, nonce_B, commit_B unchanged, so the code is unchanged. Client keeps showing it or re-speaks it.
  • sid gains a round counter: "sendspin-pair-pake-v1" || h || counter || round (uint32, from 0, +1 per server/pair-auth). K_wrap follows.
  • Failure counter still increments per failed round. Brute-force cost unchanged.
  • Attempt timeout still bounds the whole attempt.
  • Either pairing_code_mismatch becomes "round failed, attempt continues", or add a round_failed reason. Open.

nonce_B is only revealed after server_kc verifies, so a failed round never exposes it. Static code already retries with a fixed code inside a window; this aligns the two flows.

Activity

  1. marcelveldt commented on Sep 2, 2026

    @marcelveldt
    Contributor

    accepted

  2. added this to the 1.0.0 milestone on Sep 2, 2026
  3. arturpragacz commented on Sep 3, 2026

    @arturpragacz
    Contributor

    Right, I had this change locally at some point, but I wasn't sure if it's worth the added complexity.

    The only difference: I made it its own message pair/retry to keep pair/abort meaning of attempt aborted.

  4. self-assigned this
    on Sep 7, 2026
  5. added a commit that references this issue on Sep 9, 2026
    a09b2c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions