module Matter::Crypto::ECDH

Overview

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

Extended Modules

Defined in:

matter/crypto/ecdh.cr

Instance Method Summary

Instance Method Detail

def 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)


[View source]
def generate_key_pair : Key #

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


[View source]