Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-763

Add support for reading ECDSA PUTTY key files

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.7.0

    Description

      See if can use Ruby code example - specifically the openssl.rb part:

      when /\Aecdsa-sha2-(nistp(?:256|384|521))\z/
                  curve = OPENSSL_CURVES[$1]
      
                  # jruby-openssl doesn't include an EC class (version 0.9.16)
                  ec_class = (::OpenSSL::PKey::EC rescue raise ArgumentError, "Unsupported algorithm: #{ppk.algorithm}")
      
                  ec_class.new(curve).tap do |pkey|
                    _, _, point = Util.ssh_unpack(ppk.public_blob, :string, :string, :mpint)
                    pkey.public_key = ::OpenSSL::PKey::EC::Point.new(pkey.group, point)
                    pkey.private_key = Util.ssh_unpack(ppk.private_blob, :mpint).first
                  end
      

      Attachments

        1. ecdsa-nistp256-public.pub
          0.2 kB
          Lyor Goldstein
        2. ecdsa-nistp256-private.ppk
          0.4 kB
          Lyor Goldstein

        Issue Links

          Activity

            People

              lgoldstein Lyor Goldstein
              lgoldstein Lyor Goldstein
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 4h
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified