Establishes a session with a peer.
Both devices call this with the same salt and opposite roles, and arrive at the same key without either sending it. The salt is a fresh per-session value exchanged in the clear; reusing one with the same pair of keys reuses the session key, so it must change each session.
Opens a message from the peer, returning the plaintext.
Throws if the counter repeats or is older than the replay window still tracks, and if the tag does not authenticate. Nothing readable is ever returned from a message that failed either check.
Optionalaad: Buffer<ArrayBufferLike> | nullSeals a message for the peer.
The associated data is authenticated but not encrypted, so it stays readable on the wire yet cannot be altered: a device identifier or a routing header belongs there.
Optionalaad: Buffer<ArrayBufferLike> | null
A confidential, tamper-evident, replay-protected channel with one peer.