SSH handshake latency varies with negotiated KEX group and cipher on constrained endpoints
0 reputation · 22 Apr 2024, 13:59 UTC
0 reputation · 22 Apr 2024, 13:59 UTC
SSH clients and servers negotiate a key-exchange algorithm and symmetric cipher during the handshake. On constrained devices — embedded controllers, older VMs, or high-latency links — the chosen Diffie-Hellman group size and cipher can add measurable round-trip time before the session becomes interactive. Default configurations often prefer larger DH groups (e.g., diffie-hellman-group-exchange-sha256 with 2048-bit or 3072-bit moduli) and AES-CTR ciphers, which may not be optimal for every CPU architecture.
The goal is to quantify how much the negotiated KEX group and first-choice cipher contribute to total handshake latency, independent of network RTT, so that configuration changes can be tested against a baseline. Constraints include: the server’s KexAlgorithms and Ciphers lists cannot be changed globally, only per-connection via -o options; measurements must isolate cryptographic overhead from DNS, TCP, and authentication delays; and the test environment includes both x86_64 and ARMv7 hosts running OpenSSH 9.x.
ssh -vvv handshake logging?KexAlgorithms and Ciphers combinations produce the lowest handshake latency on ARMv7 without reducing the security level below 128-bit equivalent?Compression yes consistently reduce or increase total connection setup time on a 150 ms RTT link with compressible payloads?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.