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

The messages of the code-based pairing (issue #325, task 11.1; spec, "Pairing", "Messages"): server/activate for a method, client/pair-pending, client/pair-init with the commitment, server/pair-init, server/pair-auth, client/pair-auth, server/pair-confirm, client/pair-confirm, client/pair-retry and the wrapped client/pair-finalize. More...

Collaboration diagram for de.yaacc.sendspin.session.CodePairingMessages:
Collaboration graph

Classes

class  ClientConfirm
 A client/pair-confirm.
 
class  PairInit
 The pairing index and the commitment of a client/pair-init.
 
class  Pending
 A client/pair-pending: the index and the sentence for the operator (from an unauthenticated peer: shown as the device's).
 

Static Public Member Functions

static String serverActivate (String method, String format)
 server/activate that starts a code-based attempt: the pairing activity, no roles, the method and its format.
 
static String clientPairPending (int pairingIndex, String message)
 
static String clientPairInit (int pairingIndex, byte[] commit)
 client/pair-init; commit (32 bytes) is the commitment of the dynamic flow, null in the static flow.
 
static String serverPairInit (byte[] nonceA)
 server/pair-init; nonceA (32 bytes) in the first round, null in the later ones.
 
static String serverPairAuth (byte[] share)
 
static String clientPairAuth (byte[] share)
 
static String serverPairConfirm (byte[] tag)
 
static String clientPairConfirm (byte[] tag, byte[] wrappedNonceB)
 client/pair-confirm; wrappedNonceB (48 bytes) only in the dynamic flow.
 
static String clientPairRetry ()
 
static String clientPairFinalizeWrapped (byte[] wrappedPsk)
 client/pair-finalize of the code-based flows: the long-term PSK wrapped under the key of the run (48 bytes).
 
static String serverPairFinalize ()
 
static PairInit parsePairInit (JSONObject p) throws ProtocolException
 
static Pending parsePending (JSONObject p) throws ProtocolException
 
static byte[] parseServerPairInit (JSONObject p) throws ProtocolException
 
static byte[] parseShare (JSONObject p, String key) throws ProtocolException
 A share (pake_msg_1 or pake_msg_2), 32 bytes.
 
static byte[] parseTag (JSONObject p, String key) throws ProtocolException
 A confirmation tag (server_kc), 64 bytes.
 
static ClientConfirm parseClientConfirm (JSONObject p) throws ProtocolException
 
static byte[] parseWrappedPsk (JSONObject p) throws ProtocolException
 The 48 bytes of wrapped_psk.
 
static JSONObject pairMethods (de.yaacc.sendspin.pairing.CodePairingClient.Offer codes)
 The supported_pair_methods of a client/hello: the Pairing PSK, which every client offers, and the code-based methods of codes (the formats of the dynamic flow, the static flow); null: the Pairing PSK only.
 

Detailed Description

The messages of the code-based pairing (issue #325, task 11.1; spec, "Pairing", "Messages"): server/activate for a method, client/pair-pending, client/pair-init with the commitment, server/pair-init, server/pair-auth, client/pair-auth, server/pair-confirm, client/pair-confirm, client/pair-retry and the wrapped client/pair-finalize.

Both directions in one place, strict on what is read (lengths of the encoded values, ranges): the peer is not trusted. Pure.

Member Function Documentation

◆ parseServerPairInit()

static byte[] de.yaacc.sendspin.session.CodePairingMessages.parseServerPairInit ( JSONObject p) throws ProtocolException
static
Returns
the 32 byte nonce of a server/pair-init, or null in a round that has none

Referenced by de.yaacc.sendspin.pairing.CodePairingClient.onMessage().

Here is the caller graph for this function:

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