[
https://issues.apache.org/jira/browse/SSHD-763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on SSHD-763 started by Goldstein Lyor.
-------------------------------------------
> 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
> 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)