File: ecdh_sha2_nistp521.rb

package info (click to toggle)
ruby-net-ssh 1%3A6.1.0-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,884 kB
  • sloc: ruby: 15,997; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'net/ssh/transport/kex/ecdh_sha2_nistp256'

module Net
  module SSH
    module Transport
      module Kex
        # A key-exchange service implementing the "ecdh-sha2-nistp521"
        # key-exchange algorithm. (defined in RFC 5656)
        class EcdhSHA2NistP521 < EcdhSHA2NistP256
          def digester
            OpenSSL::Digest::SHA512
          end

          def curve_name
            OpenSSL::PKey::EC::CurveNameAlias['nistp521']
          end
        end
      end
    end
  end
end