Derive bytes from this key using HKDF. Used for encryption key derivation and ratcheting.
Derive a new CryptographyKey from this key using HKDF. Used for key ratcheting.
Get raw bytes from this key for intermediate operations like concatenation. Uses deriveBits with empty salt/info to extract the key material. This is needed for X3DH handshake where multiple DH secrets are concatenated.
Get the underlying CryptoKey object.
StaticfromCreate a CryptographyKey from raw bytes. The key will be imported as a non-extractable HKDF key.
StaticfromCreate a CryptographyKey from an existing CryptoKey.
A wrapper around CryptoKey that uses non-extractable keys for security. Keys are stored as HKDF base keys to enable ratcheting via deriveBits.