Skip to content

Latest commit

 

History

History
119 lines (95 loc) · 7.56 KB

ALGORITHMS.md

File metadata and controls

119 lines (95 loc) · 7.56 KB

Supported SSH Algorithms

This document lists the authentication methods, cryptographic algorithms, and compression options supported by the ConnectBot SSH library.

Algorithms labeled legacy opt-in are implemented for compatibility but are not offered by the default SshClientConfig. Applications must add them explicitly to the corresponding algorithm string.

The lists below enumerate support, not negotiation preference order. Configure the ordered, comma-separated kexAlgorithms, hostKeyAlgorithms, encryptionAlgorithms, and macAlgorithms strings in SshClientConfig to override the defaults.

Authentication

  • keyboard-interactive
  • password
  • publickey (including FIDO2 / Security Key algorithms sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com)

Security Key authentication requires a caller-provided FIDO2/CTAP2 stack; the library supplies SSH encoding helpers. See Security Key authentication.

RSA public key authentication selects rsa-sha2-512 or rsa-sha2-256 from the server's server-sig-algs extension and the configured hostKeyAlgorithms. Legacy ssh-rsa (RSA/SHA-1) authentication requires explicit opt-in through hostKeyAlgorithms; without server-sig-algs, only that explicitly enabled base-key algorithm is used.

Host Keys

ML-DSA requires a capable installed JCA provider. On Android, call Google Play Services' ProviderInstaller.installIfNeeded before creating SshClientConfig to use its updated security provider. Composite host keys are offered by default when available; pure ML-DSA host keys require an explicit hostKeyAlgorithms setting.

For ssh-mldsa87-p384 private keys, use PEM; OpenSSH private-key format is not supported.

Pure ML-DSA does not have a defined OpenSSH private-key layout; use PKCS#8 PEM. ML-DSA PEM imports require an embedded public key or an appended PUBLIC KEY PEM block.

Key Exchange

ML-KEM and SNTRUP761 key exchanges are available on Android and JVM 17 without installing additional cryptographic providers. Pure ML-KEM methods require explicit opt-in through kexAlgorithms.

The default key exchange list also advertises kex-strict-c-v00@openssh.com (strict key exchange) and ext-info-c (extension negotiation). These are protocol negotiation markers, not cryptographic key exchange algorithms.

Encryption

MACs

Only hmac-sha2-256-etm@openssh.com and hmac-sha2-512-etm@openssh.com are offered by default. The AEAD ciphers (ChaCha20-Poly1305 and AES-GCM) provide their own authentication and do not use a separate packet MAC.

Compression

  • none — default; no compression
  • zlib@openssh.com — compression activated after successful authentication
  • zlib (RFC 4253) — compression activated with the negotiated keys

Set SshClientConfig.enableCompression = true to offer zlib@openssh.com,zlib,none, in that preference order. Compression is disabled by default.