Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECDSA support #3

Closed
ChaoticMind opened this issue Feb 21, 2015 · 10 comments
Closed

ECDSA support #3

ChaoticMind opened this issue Feb 21, 2015 · 10 comments

Comments

@ChaoticMind
Copy link

Are there any plans for ecdsa support?

@mscdex
Copy link
Owner

mscdex commented Feb 21, 2015

Sure, provided node/iojs's crypto interface supports them.

@elbertcastaneda
Copy link

I need your help, i have this error when try to connect :

ERROR:nw_shell.cc(335)] Error: Bad packet length
at SSH2Stream._transform

I am using nw 0.12.1 and ssh2 library, this error is showed when the script try connect to ssh server

@mscdex
Copy link
Owner

mscdex commented May 15, 2015

@elbertcastaneda Your issue is unrelated to the original issue, please file a new issue here.

@appsforartists
Copy link

@mscdex Should I be able to use ecdsa keys with ssh-agent? I've got these two keys:

[email protected]
ecdsa-sha2-nistp256

that result in "Agent key #1 failed" (and #2). These are the handshake protocols I see if I put a logger in DEBUG_NOOP:

diffie-hellman-group-exchange-sha256
ssh-rsa
aes256-ctr
hmac-sha1
none

@mscdex
Copy link
Owner

mscdex commented Dec 16, 2015

@appsforartists No, not currently.

@appsforartists
Copy link

@mscdex Thanks and 😢

You mentioned earlier that the blocker was a lack of support in Node's crypto library. I see references to EDSCA in crypto's setEngine method. There's also this library based on the work of Node.js core member @indutny. Do either of those pave the way for ecdsa support in ssh2.js?

@mscdex
Copy link
Owner

mscdex commented Dec 16, 2015

@appsforartists The problem is that node does support ECDSA and other algorithms that might be useful for ssh2, but it's supported at the TLS level. The crypto module itself has to be provide access to those algorithms, which is not always automatic and sometimes requires manual changes to accommodate newer algorithms. I haven't looked recently to see if crypto now provides this kind of access in node v4+ or not.

There are a number of node addons that provide various algorithm implementations, but the problem is just that: they're addons, meaning they require a compiler. One of the goals is to remain "pure js," but this topic has been discussed before. I probably wouldn't mind adding such addons as _optionalDependency_s and possibly falling back to a pure js implementation. The benefit there being that compiled addons would be faster. However, these kinds of changes wouldn't come until configurable algorithms are supported (right now the algorithms and their order are more or less hard coded).

@mscdex
Copy link
Owner

mscdex commented Feb 27, 2016

After further research it looks like ECDSA support has existed in node since the node v0.11.x days. I have added (working) support for it in ssh2/ssh2-streams, but it needs actual tests yet.

@moderndeveloperllc
Copy link

Just as a note, EdDSA is now supported with this commit. Not exactly what OP was looking for, but close.

@mscdex
Copy link
Owner

mscdex commented Apr 9, 2019

ECDSA is different than EdDSA. ECDSA has been supported for awhile now. EdDSA will require at least node v12.x (not released as of this writing) for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants