-
-
Notifications
You must be signed in to change notification settings - Fork 947
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
Comments
I was actually thinking using a builder pattern, and give the developer complete control over what algorithms are enabled and in which order. |
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. |
@drieseng Has anyone picked up this issue to implement the builder pattern, or is it free to work on? |
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. |
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 .
The text was updated successfully, but these errors were encountered: