You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: elliptic_curve_diffie_hellman.rb
    path of file: ./repos/hrr_rb_ssh/lib/hrr_rb_ssh/transport/kex_algorithms
    
    the code of the file until where you have to start completion: module HrrRbSsh
  class Transport
    class KexAlgorithms
      module EllipticCurveDiffieHellman
        include Loggable
        include IvComputable

        def initialize logger: nil
          self.logger = logger
          @dh = OpenSSL::PKey::EC.new(self.class::CURVE_NAME)
          @dh.generate_key
          @public_key = @dh.public_key.to_bn.to_i
        end

        def start transport
          case transport.mode
          when Mode::SERVER
            @k_s = transport.server_host_key_algorithm.server_public_host_key
            @q_s = @public_key
            message = receive_kexecdh_init t
    
        def start transport
          case transport.mode
          when Mode::SERVER
            @k_s = transport.server_host_key_algorithm.server_public_host_key
            @q_s = @public_key
            message = receive_kexecdh_init transport.receive
            @q_c = message[:'Q_C']
            @shared_secret = OpenSSL::BN.new(@dh.dh_compute_key(OpenSSL::PKey::EC::Point.new(OpenSSL::PKey::EC.new(self.class::CURVE_NAME).group, OpenSSL::BN.new(@q_c))), 2).to_i
            send_kexecdh_reply transport
          when Mode::CLIENT
            @q_c = @public_key
            send_kexecdh_init transport
            message = receive_kexecdh_reply transport.receive
            @k_s = message[:'K_S']
            @q_s = message[:'Q_S']
            @shared_secret = OpenSSL::BN.new(@dh.dh_compute_key(OpenSSL::PKey::EC::Point.new(OpenSSL::PKey::EC.new(self.class::CURVE_NAME).group, OpenSSL::BN.new(@q_s))), 2).to_i
          end