module

Matter::Crypto::ECDH

ECDH (Elliptic Curve Diffie-Hellman) implementation for Matter Uses OpenSSL for EC operations on P-256 curve

Instance methods

compute_shared_secret(private_key : Bytes, peer_public_key : Bytes) : Bytes

Compute shared secret using ECDH on P-256 @param private_key Local EC private key (32 bytes) @param peer_public_key Peer's EC public key (65 bytes uncompressed: 0x04 || x || y) @return Shared secret (32 bytes - the x-coordinate of the computed point)

Source
generate_key_pair

Generate a P-256 EC key pair @return Key with both private and public components

Source