Cryptography

See this site for the key length recommendations of various organizations.

RSA

  • Use key sizes of at least 2048 bits, and 4096 bits for CAs or other security-critical use cases.
  • Note that many hardware devices, such as TPMs, cannot store keys longer than 2048 bits.
  • With TLS and OpenVPN, the key sizes affect the performance of only the negotiation handshake at the start of the connection and during renegotiation, which for OpenVPN happens once per hour.

Diffie-Hellman parameters

Elliptic Curve Diffie-Hellman (ECDH)

Hashing

  • MS-CHAPv2
    • Based on NTLMv1 (not NTLMv2!) and is therefore broken and should not be used. Can be cracked in less than a day on modern hardware. However, its use is often necessary in e.g. Wi-Fi authentication for compatibility reasons. If using MS-CHAPv2 for e.g. Wi-Fi authentication, you must have proper certificate configuration! Otherwise, your clients are effectively broadcasting their passwords.
  • NTLMv1
    • Totally broken and should not be used. Based on MD4 and DES. Susceptible to offline cracking, replay attacks and hash reuse.
  • NTLMv2
    • Vulnerable and should not be used. Replaces the DES in NTLMv1 with HMAC-MD5 and includes timestamps, which helps with replay attacks and hash reuse. However, the algorithm is still weak for offline cracking.
  • SHA-1
  • SHA-256
  • SHA-512