class Net::SSH::Transport::Kex::EcdhSHA2NistP256

  1. lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb
Parent: Kex

A key-exchange service implementing the "ecdh-sha2-nistp256" key-exchange algorithm. (defined in RFC 5656)

Methods

Public Class

  1. new

Public Instance

  1. curve_name
  2. digester
  3. ecdh

Included modules

  1. Constants
  2. Loggable

Attributes

ecdh [R]

Public Class methods

new (algorithms, connection, data)
[show source]
# File lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb, line 21
def initialize(algorithms, connection, data)
  @algorithms = algorithms
  @connection = connection

  @digester = digester
  @data = data.dup
  @ecdh = generate_key
  @logger = @data.delete(:logger)
end

Public Instance methods

curve_name ()
[show source]
# File lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb, line 17
def curve_name
  OpenSSL::PKey::EC::CurveNameAlias['nistp256']
end
digester ()
[show source]
# File lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb, line 13
def digester
  OpenSSL::Digest::SHA256
end