Computes the raw X25519 shared secret between this party's Ed25519
private key and the peer's Ed25519 public key (both converted to the
Montgomery form, RFC 7748). ECDH is symmetric, so the result is
order-independent — and byte-identical on both peers.
This is only the raw ECDH output. The protocol derivation
(Handle.deriveSharedSecret) additionally binds both peers'
public keys into the HKDF salt and expands with the P2P info string;
never encrypt with the raw output alone.
Parameters
myPrivateKey: Uint8Array
This party's 32-byte Ed25519 private key.
otherPublicKey: Uint8Array
The peer's 32-byte Ed25519 public key.
Returns Uint8Array
The 32-byte raw ECDH output — the HKDF IKM of the P2P
derivation.
Computes the raw X25519 shared secret between this party's Ed25519 private key and the peer's Ed25519 public key (both converted to the Montgomery form, RFC 7748). ECDH is symmetric, so the result is order-independent — and byte-identical on both peers.
This is only the raw ECDH output. The protocol derivation (Handle.deriveSharedSecret) additionally binds both peers' public keys into the HKDF salt and expands with the P2P info string; never encrypt with the raw output alone.