Skip to content
TheChatArchiveThe Chat Archive
o3-mini· OpenAIHugging Face LMArena Human Preference 140K

What's better for SSH keys? RSA or ed25519?

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with DeepSeekdeepseek-r1-0528’s answer.
  1. User

    What's better for SSH keys? RSA or ed25519?

  2. Assistant

    When choosing between RSA and ed25519 for SSH keys, consider the following points:

    1. Security and Key Size:

      • RSA: To achieve a high level of security with RSA, you need to use larger key sizes (at least 2048 bits, but many now recommend 3072 or 4096 bits for long-term security). Larger keys mean increased computational costs during key generation, authentication, and handshakes.
      • ed25519: This algorithm is based on elliptic curve cryptography and offers strong security with a fixed, relatively small key size. It’s generally considered to provide a better security-to-key-size ratio.
    2. Performance:

      • RSA: Larger RSA keys result in slower operations, especially for signing and key exchange in large-scale or high-frequency scenarios.
      • ed25519: Ed25519 is designed for speed and efficiency. It offers faster key generation and signature operations, which can be beneficial for both servers and clients.
    3. Implementation and Robustness:

      • RSA: RSA is widely supported and well understood. However, its security depends heavily on proper key size selection and safe padding schemes (e.g., using OAEP or PSS for signatures in other contexts).
      • ed25519: Ed25519 includes many design features to avoid common implementation pitfalls (such as side-channel attacks) and is less prone to misconfiguration. However, because it’s newer than RSA, it might run into compatibility issues with very old systems or software.
    4. Key Length and Data Size:

      • RSA: When using a 4096-bit RSA key, the public key and corresponding signatures are much larger than those of ed25519. This might have implications when bandwidth or storage is limited.
      • ed25519: Produces smaller, fixed-size keys and signatures, which is generally an advantage.
    5. Compatibility:

      • RSA: Almost universally supported across all SSH implementations and platforms, making it a safe choice in environments where compatibility is critical.
      • ed25519: While support for ed25519 is common in modern systems, some legacy systems might not support it.

    Conclusion:
    For most new deployments, ed25519 is typically the better choice due to its high security, performance benefits, and smaller key size. However, if you require maximum compatibility with older systems or a more widely recognized algorithm, RSA (using a sufficiently large key size, like 3072 or 4096 bits) might be preferable.

    In summary, if your environment supports it, go with ed25519 for its advantages in security and performance.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.