Matter::Crypto::Spake2p
Inherits Reference < Object
SPAKE2+ implementation for Matter protocol Based on https://datatracker.ietf.org/doc/html/draft-bar-cfrg-spake2plus
SPAKE2+ is a password-authenticated key exchange protocol used during Matter commissioning This is a wrapper around the spake2_plus library configured for Matter's requirements
Constants
M and N constants for P-256 curve From SPAKE2+ specification
Constructors
Create SPAKE2+ instance with context and w0
Alternative constructor for testing with specific random values This allows test vectors to specify exact random values for reproducibility
Class methods
Compute the passcode verifier used by AdministratorCommissioning OpenCommissioningWindow.
This is 97 bytes: w0 (32-byte big-endian) || L (65-byte uncompressed EC point).
Compute w0 and L from PIN L = w1 * G (where G is the generator point)
Compute w0 and w1 from PIN using PBKDF2
Instance methods
Compute shared secret and verifiers from X (verifier side)
Compute shared secret and verifiers from Y (prover side)