class Net::SSH::Transport::Kex::EcdhSHA2NistP256
def compute_shared_secret(server_ecdh_pubkey)
def compute_shared_secret(server_ecdh_pubkey) pk = OpenSSL::PKey::EC::Point.new(OpenSSL::PKey::EC.new(curve_name).group, OpenSSL::BN.new(server_ecdh_pubkey, 2)) OpenSSL::BN.new(ecdh.dh_compute_key(pk), 2) end