EcdhP256.sharedSecret
ubyte[] sharedSecret(const(ubyte)[] peerX, const(ubyte)[] peerY)Compute the ECDH shared secret with a peer's public key.
The shared secret is the x-coordinate of d * Q_peer, as a 32-byte big-endian unsigned integer.
Parameters
peerX | Peer public key x-coordinate (32 bytes). |
peerY | Peer public key y-coordinate (32 bytes). |
Returns
The 32-byte shared secret.