YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.pairing.CodePairingClient Class Reference

The client's side (role B) of the code-based pairing (issue #325, task 11.1): the player is asked to pair with a code, holds back until its operator opened the pairing window, and then either shows the code of the attempt (dynamic) or uses its fixed code (static); a CPace run authenticates both sides, and the client delivers a new long-term PSK sealed under the key of the run. More...

Collaboration diagram for de.yaacc.sendspin.pairing.CodePairingClient:
Collaboration graph

Classes

interface  Emitter
 Where the code goes to the operator: the display (digits or a QR code). More...
 
class  Offer
 What the client offers: the formats of the dynamic flow and the fixed code of the static flow (null: none).
 
enum  State
 

Public Member Functions

 CodePairingClient (NoiseSuite suite, byte[] h, SecureRandom random, PairingPort port, Offer offer, PairingWindow window, Emitter emitter)
 
synchronized State state ()
 
synchronized byte[] takePsk ()
 The new long-term PSK once, after State#DONE; then null.
 
synchronized void onActivate (int index, String method, String format) throws IOException
 The server's pairing activation names a method: the client holds back until its window is open, or declines the method.
 
synchronized void windowOpened () throws IOException
 The operator's gesture opened the window while an attempt waited for it.
 
synchronized void onMessage (String type, JSONObject payload) throws IOException, ProtocolException
 One message of the server.
 

Detailed Description

The client's side (role B) of the code-based pairing (issue #325, task 11.1): the player is asked to pair with a code, holds back until its operator opened the pairing window, and then either shows the code of the attempt (dynamic) or uses its fixed code (static); a CPace run authenticates both sides, and the client delivers a new long-term PSK sealed under the key of the run.

A pure state machine like CodePairingServer. The code is shown only during an attempt that the window gates (spec, "Forged emission").

Member Function Documentation

◆ takePsk()

synchronized byte[] de.yaacc.sendspin.pairing.CodePairingClient.takePsk ( )

The new long-term PSK once, after State#DONE; then null.

The caller zeroes it.

Referenced by de.yaacc.sendspin.client.CodePairingSlot.finish().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: