Crypto Lib
    Preparing search index...

    Function x25519AesKwWrap

    • Wrap a key using X25519 ECDH to derive a KEK, then AES-KW.

      An ephemeral X25519 key pair is generated; the shared secret is derived via HKDF-SHA256. The ephemeral public key is returned so the recipient can recompute the KEK.

      Parameters

      • recipientPublicKey: string | Uint8Array<ArrayBufferLike>

        Recipient's X25519 public key (hex, 32 bytes).

      • keyToWrap: string | Uint8Array<ArrayBufferLike>

        Key material to wrap (>= 16 bytes, multiple of 8).

      Returns X25519AesKwWrapResult