Skip to content

Client algorithm prioritization  #683

Closed

Description

@msvprogs

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 .

Activity

  1. drieseng commented on May 23, 2020

    @drieseng
    Member

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

  2. msvprogs commented on May 23, 2020

    @msvprogs
    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.

  3. adibradfield commented on Aug 18, 2020

    @adibradfield

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

  4. lifeincha0s commented on Sep 15, 2022

    @lifeincha0s

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions