mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SSHD-763) Add support for reading ECDSA PUTTY key files
Date Sun, 17 Sep 2017 09:28:00 GMT

     [ https://issues.apache.org/jira/browse/SSHD-763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Goldstein Lyor resolved SSHD-763.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.7.0

> Add support for reading ECDSA PUTTY key files
> ---------------------------------------------
>
>                 Key: SSHD-763
>                 URL: https://issues.apache.org/jira/browse/SSHD-763
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 1.7.0
>            Reporter: Goldstein Lyor
>            Assignee: Goldstein Lyor
>              Labels: ecdsa, putty
>             Fix For: 1.7.0
>
>         Attachments: ecdsa-nistp256-private.ppk, ecdsa-nistp256-public.pub
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> See if can use [Ruby code example|https://github.com/philr/putty-key] - specifically
the [openssl.rb|https://github.com/philr/putty-key/blob/master/lib/putty/key/openssl.rb] part:
> {noformat}
> 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
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message