{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/io.js/issues/2144","labels_url":"https://api.github.com/repos/nodejs/io.js/issues/2144/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/io.js/issues/2144/comments","events_url":"https://api.github.com/repos/nodejs/io.js/issues/2144/events","html_url":"https://github.com/nodejs/io.js/issues/2144","id":94117798,"number":2144,"title":"io.js crypto lacks standard ed25519 crypto support for ssh, etc.","user":{"login":"pgnd","id":5993465,"avatar_url":"https://avatars.githubusercontent.com/u/5993465?v=3","gravatar_id":"","url":"https://api.github.com/users/pgnd","html_url":"https://github.com/pgnd","followers_url":"https://api.github.com/users/pgnd/followers","following_url":"https://api.github.com/users/pgnd/following{/other_user}","gists_url":"https://api.github.com/users/pgnd/gists{/gist_id}","starred_url":"https://api.github.com/users/pgnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgnd/subscriptions","organizations_url":"https://api.github.com/users/pgnd/orgs","repos_url":"https://api.github.com/users/pgnd/repos","events_url":"https://api.github.com/users/pgnd/events{/privacy}","received_events_url":"https://api.github.com/users/pgnd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/io.js/labels/crypto","name":"crypto","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-09T18:22:15Z","updated_at":"2015-07-09T20:56:01Z","closed_at":null,"body":"I'm currently running\r\n```\r\n\tnode -v\r\n\t\tv0.12.6\r\n\tnpm -v\r\n\t\t2.11.2\r\n```\r\nI've built/usr 'atom' editor, v1.0.0\r\n\r\nI've installed an SFTP connector pacakge in 'atom' editor (https://github.com/mgrenier/remote-ftp).\r\n\r\nIt fails to connect when using an off-the-shelf, OpenSSH-generated ed25519 key for for authentication,\r\n```\r\n\tUncaught Error: Cannot parse privateKey: Unsupported key format\r\n```\r\nPer the stack trace, that error originates with the used 'ssh2' lib,\r\n```\r\n\tAt /home/pgnd/.atom/packages/Remote-FTP/node_modules/ssh2/lib/client.js:147\r\n\r\n\t    Error: Cannot parse privateKey: Unsupported key format\r\n\t      at Client.connect (/home/pgnd/.atom/packages/Remote-FTP/node_modules/ssh2/lib/client.js:147:13)\r\n\t      at ConnectorSFTP.module.exports.ConnectorSFTP.connect (/home/pgnd/.atom/packages/Remote-FTP/lib/connectors/sftp.js:78:13)\r\n\t      at Client.module.exports.Client.connect (/home/pgnd/.atom/packages/Remote-FTP/lib/client.js:198:18)\r\n\t      at Client.<anonymous> (/home/pgnd/.atom/packages/Remote-FTP/lib/views/tree-view.js:178:28)\r\n\t      at /home/pgnd/.atom/packages/Remote-FTP/lib/client.js:87:14\r\n\t      at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:379:3)\r\n```\r\nwhich, in turn,\r\n\r\n\t\"... does not support ed25519 keys because node.js/io.js currently only supports RSA and DSA keys for the purposes of its crypto API (especially signing and verifying). ...\"\r\n\r\nAs per the current OpenSSH 6.9p1 ChangeLog, ed25519 support has been fully supported for quite awhile, and is in fact being used as default crypto in some cases,\r\n```\r\n\tcommit d1958793a0072c22be26d136dbda5ae263e717a0\r\n\tAuthor: djm@openbsd.org <djm@openbsd.org>\r\n\tDate:   Thu May 28 04:40:13 2015 +0000\r\n\r\n\t    upstream commit\r\n\t    \r\n!!\t    make ssh-keygen default to ed25519 keys when compiled\r\n\t     without OpenSSL; bz#2388, ok dtucker@\r\n\t    \r\n\t    Upstream-ID: 85a471fa6d3fa57a7b8e882d22cfbfc1d84cdc71\r\n\r\n\tcommit 1195f4cb07ef4b0405c839293c38600b3e9bdb46\r\n\tAuthor: djm@openbsd.org <djm@openbsd.org>\r\n\tDate:   Thu Jan 8 10:14:08 2015 +0000\r\n\r\n\t    upstream commit\r\n\t    \r\n\t    deprecate key_load_private_pem() and\r\n\t     sshkey_load_private_pem() interfaces. Refactor the generic key loading API to\r\n\t     not require pathnames to be specified (they weren't really used).\r\n\t    \r\n\t    Fixes a few other things en passant:\r\n\t    \r\n!!\t    Makes ed25519 keys work for hostbased authentication (ssh-keysign\r\n\t    previously used the PEM-only routines).\r\n\t    \r\n\t    Fixes key comment regression bz#2306: key pathnames were being lost as\r\n\t    comment fields.\r\n\t    \r\n\t    ok markus@\r\n\r\n\tcommit 1f0311c7c7d10c94ff7f823de9c5b2ed79368b14\r\n\tAuthor: Damien Miller <djm@mindrot.org>\r\n\tDate:   Thu May 15 14:24:09 2014 +1000\r\n\r\n\t       - markus@cvs.openbsd.org 2014/04/29 18:01:49\r\n\t         [auth.c authfd.c authfile.c bufaux.c cipher.c cipher.h hostfile.c]\r\n\t         [kex.c key.c mac.c monitor.c monitor_wrap.c myproposal.h packet.c]\r\n\t         [roaming_client.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c]\r\n\t         [ssh-pkcs11.h ssh.c sshconnect.c sshconnect2.c sshd.c]\r\n!!\t         make compiling against OpenSSL optional (make OPENSSL=no);\r\n\t         reduces algorithms to curve25519, aes-ctr, chacha, ed25519;\r\n\t         allows us to explore further options; with and ok djm\r\n\r\n\tcommit 9c36698ca2f554ec221dc7ef29c7a89e97c88705\r\n\tAuthor: Tim Rice <tim@multitalents.net>\r\n\tDate:   Fri Mar 14 12:45:01 2014 -0700\r\n\r\n\t    20140314\r\n!!\t     - (tim) [opensshd.init.in] Add support for ed25519\r\n```\r\n\r\ned25519 (http://ed25519.cr.yp.to/) is both fully supported & keys are widely used in openssh deployments.\r\n\r\nWithout like support in node.js/io.js, downstram pacakges/apps based on its crypto will not be able to connect to these now standard deployments using ed25519 keys."},"comment":{"url":"https://api.github.com/repos/nodejs/io.js/issues/comments/120141731","html_url":"https://github.com/nodejs/io.js/issues/2144#issuecomment-120141731","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/2144","id":120141731,"user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T20:56:01Z","updated_at":"2015-07-09T20:56:01Z","body":"Maybe the [ssh](https://www.npmjs.com/package/ssh) package works for you?  It's either that or wait until openssl grows ed25519 support.  That probably won't be anytime soon, it's a pretty conservative project."}}