Skip to content

Client algorithm prioritization #683

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

Closed
msvprogs opened this issue May 23, 2020 · 4 comments · Fixed by #1611
Closed

Client algorithm prioritization #683

msvprogs opened this issue May 23, 2020 · 4 comments · Fixed by #1611

Comments

@msvprogs
Copy link

Now the client algorithm for encryption, message integrity etc. is chosen randomly (in fact, the first one from the dictionary) among server supported ones, without considering the characteristics such as cryptographic strength.

Add priorities for all algorithms to make the algorithm selection more deterministic and safe.

Implemented in #682 .

@drieseng
Copy link
Member

I was actually thinking using a builder pattern, and give the developer complete control over what algorithms are enabled and in which order.

@msvprogs
Copy link
Author

Ok, this is not bad too. But there should be at least some default priority order which is based on algorithms' strength. For example, prioritize EC-DH, then DH with sha-256 and at last sha-1 for key exchange.

@adibradfield
Copy link

@drieseng Has anyone picked up this issue to implement the builder pattern, or is it free to work on?

@lifeincha0s
Copy link

A simple solution would be to reorder the algorithms in ConnectionInfo. I removed the antiquated algorithms and reordered the compliant ones based on relative strength. The rest I leave up to the server's disgression. Providing the option for developers to have complete control over algorithm selection could open a can of worms for those not fully versed in library implementation. I do like the idea of using a builder pattern, but keep a subset of algorithms enabled by default and allow the developer to (optionally) enable older variants, similar to OpenSSH.

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

Successfully merging a pull request may close this issue.

4 participants