class

Beryl::TLS::KeyExchange

Inherits Reference < Object

One side of an ephemeral (EC)DHE exchange on a supported group.

Constructors

generate(group : NamedGroup, randomness : HandshakeRandomness) : KeyExchange

Returns a fresh exchange on group.

Source
new(group : NamedGroup)
Source

Instance methods

group
Source
public_key_bytes

The public key as it goes in a key_share entry.

Source
shared_secret(peer_key_exchange : Bytes) : Bytes

Returns the shared secret with the peer's peer_key_exchange, or raises illegal_parameter for a key that is malformed or of small order (§4.2.8.2, RFC 7748 §6.1).

Source