Matter::Crypto::StandardCrypto
Inherits Matter::Crypto::CryptoBase < Reference < Object
Standard OpenSSL-based implementation
Instance methods
Build SEC1 DER format for EC private key
Derive key using HKDF with SHA-256 @param secret Input key material @param salt Salt value @param info Context/application specific info @param length Desired output length (default 32 bytes) @return Derived key
Derive key using PBKDF2 with SHA-256 @param secret Secret/password @param salt Salt value @param iterations Iteration count @param key_length Desired key length @return Derived key
Decrypt using AES-128-CCM with Matter-specific parameters @param key 16-byte AES key @param data Ciphertext with authentication tag @param nonce 13-byte nonce @param aad Additional authenticated data (optional) @return Plaintext @raise Exception if authentication fails
Encrypt using AES-128-CCM with Matter-specific parameters @param key 16-byte AES key @param data Plaintext to encrypt @param nonce 13-byte nonce @param aad Additional authenticated data (optional) @return Ciphertext with 16-byte authentication tag appended
Compute shared secret using ECDH @param private_key Local private key @param peer_public_key Peer's public key @return Shared secret (32 bytes for P-256)
Generate cryptographically secure random bytes @param length Number of bytes to generate @return Random bytes
Create HMAC-SHA256 signature @param key HMAC key @param data Data to sign @return HMAC signature
Verify ECDSA signature using P-256 @param public_key EC public key @param data Data that was signed @param signature Signature to verify @param dsa_encoding Signature encoding format @raise Exception if verification fails