Module Net::SSH::Transport::Kex
In: lib/net/ssh/transport/kex/dh-gex.rb
lib/net/ssh/transport/kex/dh.rb
lib/net/ssh/transport/kex/services.rb

Methods

Classes and Modules

Class Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1
Class Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA1

Public Instance methods

Register the services that perform key-exchanges.

[Source]

    # File lib/net/ssh/transport/kex/services.rb, line 25
25:         def register_services( container )
26:           container.namespace_define :kex do |b|
27: 
28:             # The :dh service is a standard Diffie-Hellman key exchange
29:             # algorithm using Group-1 and SHA-1.
30:             b.dh :model => :singleton_deferred do
31:               require 'net/ssh/transport/kex/dh'
32:               dh = DiffieHellmanGroup1SHA1.new( b.bns, b.digesters )
33:               dh.keys = b.keys
34:               dh.buffers = b.buffers
35:               dh
36:             end
37: 
38:             # The :dh_gex service is a standard Diffie-Hellman key exchange
39:             # algorithm using SHA-1 and a negotiated group.
40:             b.dh_gex :model => :singleton_deferred do
41:               require 'net/ssh/transport/kex/dh-gex'
42:               dh = DiffieHellmanGroupExchangeSHA1.new( b.bns, b.digesters )
43:               dh.keys = b.keys
44:               dh.buffers = b.buffers
45:               dh
46:             end
47: 
48:             # Add these services to the hash of available kex algorithms.
49:             b.kex_names.update(
50:               "diffie-hellman-group-exchange-sha1" => b.dh_gex,
51:               "diffie-hellman-group1-sha1" => b.dh
52:             )
53:           end
54:         end

[Validate]