twisted / twisted

Event-driven networking engine written in Python.
https://twisted.org
Other
5.58k stars 1.17k forks source link

KEX algorithm preferences is outdated with EC #9155

Open twisted-trac opened 7 years ago

twisted-trac commented 7 years ago
the0id's avatar @the0id reported
Trac ID trac#9155
Type defect
Created 2017-06-01 13:50:26Z

_kex.getSupportedKeyExchanges() works by ordering each algorithm by it's preference. This has worked until the addition of Elliptic Curves.

Curves are assigned to a class based on the size of their hash processor. Because different curves use the same hash it causes them to be grouped together with other curves of that preference.

The result of this is that each of the algorithms are still sorted by their assigned preferences, but with EC the order of the curves within their preference group is random.

I'm assigning this a low priority because while it is a bug the impact its small. The most preferred algorithms are still offered first, but there will be some variation within some of the preferred groups.

A fix to this would to be to redesign how preferences are given to the algorithms, or change getSupportedKeyExchanges() to order preference groups before adding them to the final list.

Searchable metadata ``` trac-id__9155 9155 type__defect defect reporter__the0id the0id priority__low low milestone__None None branch__ branch_author__ status__new new resolution__None None component__conch conch keywords__None None time__1496325026958019 1496325026958019 changetime__1616616109615262 1616616109615262 version__None None owner__None None ```
twisted-trac commented 3 years ago
wiml's avatar @wiml commented

This seems closely related to ticket:8958, but probably not the same?