matter_pase.h
PASE message codec (the five commissioning messages).
Overview
PASE message codec (the five commissioning messages). PASE is how a commissioner proves it knows the setup passcode. Five messages, all Matter TLV structures on the Secure Channel protocol: PBKDFParamRequest initiatorRandom, initiatorSessionId, passcodeId, hasPBKDFParameters, [initiatorSessionParams] PBKDFParamResponse initiatorRandom, responderRandom, responderSessionId, [pbkdfParameters{iterations, salt}], [responderSessionParams] Pake1 pA Pake2 pB, cB Pake3 cA This file is the codec only. The SPAKE2+ arithmetic that produces pA/pB/cA/cB is separate, and on this part it comes from nrf_oberon (nrfxlib/crypto/nrf_oberon/include/ocrypto_spake2p_p256.h), which already ships in every image here.
depends on matter_status.h · used by matter_pase_sm.h matter_pase.c
API
Cstruct matter_session_params
MRP parameters a peer advertises for itself. Absent means "use the defaults", which is why presence is tracked rather than defaulted here.
Cstruct matter_pase_pbkdf_req
PASE PBKDFParamRequest message holding initiator random, session ID, passcode ID, and optional PBKDF session parameters.
Cstruct matter_pase_pbkdf_resp
PASE PBKDFParamResponse message holding initiator and responder randoms, session ID, and optional PBKDF parameters (iterations and salt) if the initiator did not already have them.
Cstruct matter_pase_pake1
PASE Sigma1 message payload holding the initiator's ephemeral public key point.
Cstruct matter_pase_pake2
PASE Sigma2 message payload holding the responder's ephemeral public key point and hash.
Cstruct matter_pase_pake3
PASE Sigma3 message payload holding the initiator's hash for mutual authentication.
##define MATTER_PASE_RANDOM_LEN 32u
PASESession.h:53.
##define MATTER_PASE_POINT_LEN 65u
Uncompressed P-256 point, 2*32+1 (crypto.py:23-24).
##define MATTER_PASE_HASH_LEN 32u
SHA-256 confirmation value.
##define MATTER_PASE_SALT_MIN 16u
##define MATTER_PASE_SALT_MAX 32u
##define MATTER_PASE_ITER_MIN 1000u
##define MATTER_PASE_ITER_MAX 100000u
##define MATTER_PASE_PASSCODE_ID 0u
The only passcode ID commissioning uses. CHIP refuses anything else (PASESession.cpp:433) and so does this.
##define MATTER_PASE_OP_PBKDF_REQ 0x20u
Secure Channel opcodes for the five messages.