class Net::SSH::Transport::Kex::Curve25519Sha256
key-exchange algorithm. (defined in tools.ietf.org/html/draft-ietf-curdle-ssh-curves-06)
A key-exchange service implementing the “curve25519-sha256@libssh.org”
def compute_shared_secret(server_ecdh_pubkey)
def compute_shared_secret(server_ecdh_pubkey) pk = ::X25519::MontgomeryU.new(server_ecdh_pubkey) OpenSSL::BN.new(ecdh.diffie_hellman(pk).to_bytes, 2) end
def digester
def digester OpenSSL::Digest::SHA256 end
def ecdh_public_key_bytes
def ecdh_public_key_bytes ecdh.public_key.to_bytes end
def generate_key # :nodoc:
def generate_key # :nodoc: ::X25519::Scalar.generate end