pase

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package pase implements the device (responder) side of Matter PASE — the Secure Channel exchange that turns the setup passcode into an encrypted session, using SPAKE2+ (spec §4.13 / §3.10):

commissioner → PBKDFParamRequest    →  we reply PBKDFParamResponse (salt, iter)
commissioner → Pake1 (pA)           →  we reply Pake2 (pB, cB)
commissioner → Pake3 (cA)           →  we verify and reply StatusReport

On success both sides hold the shared secret Ke, from which the session keys are derived. Those keys then encrypt the operational exchanges.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Established

type Established struct {
	I2R                  []byte
	R2I                  []byte
	AttestationChallenge []byte
	LocalSessionID       uint16 // our responder session id
	PeerSessionID        uint16 // the commissioner's session id
}

Established carries the outcome of a successful PASE handshake: the session keys and the two session ids, for the secure (encrypted) session layer.

type Responder

type Responder struct {
	// contains filtered or unexported fields
}

Responder runs one PASE handshake at a time (a commissioning window admits a single commissioner).

func New

func New(log *logger.Logger, passcode uint32) (*Responder, error)

New builds a responder and precomputes the SPAKE2+ verifier (w0, L) from the passcode with a fresh salt — exactly what a device stores when its commissioning window opens.

func (*Responder) Handle

func (r *Responder) Handle(in *message.Inbound) []message.Outbound

Handle processes one inbound Secure Channel message and returns the messages to send back (already with the right exchange id and a piggybacked ack).

func (*Responder) TakeEstablished

func (r *Responder) TakeEstablished() (*Established, bool)

TakeEstablished returns (and clears) the session established by the last successful Pake3, if any.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL