Method SSL.Cipher.compute_key_share_secret()


Method compute_key_share_secret

string(8bit)|zero compute_key_share_secret(int group, Gmp.mpz|string(8bit) secret, string(8bit) peer_key)

Description

RFC 8446 4.2.8: Compute the ECDHE shared secret from our ephemeral secret (as returned by generate_key_share()) and the peer's encoded key share.

Returns

The raw shared secret (the X-coordinate of the shared point), or 0 (zero) if peer_key doesn't decode to a valid point on group's curve.