Default SSH cipher capped SFTP speeds at 1.2 MB/s until a one-line config fix
Developers at Termphin discovered that every SFTP file transfer was locked at exactly 1.2 MB/s regardless of server, network, or file size. Investigation revealed the culprit was AES-GCM, the default cipher in the dartssh2 library, which relies on hardware acceleration unavailable in pure Dart environments. Without CPU-level AES and carry-less multiplication instructions, GCM's authentication component (GHASH) ran entirely in software, bottlenecking throughput. Benchmarks showed chacha20-poly1305 achieving 51 MB/s versus AES-256-GCM's 1.2 MB/s — a roughly 43x difference. The fix was to override the library's default cipher order, placing chacha20-poly1305 first and demoting AES-GCM to a last-resort fallback.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in