4

The company I work for has a few OpenVPN servers used by over 200 employees. The servers were deployed a few years ago using the default easyrsa settings and now we want to upgrade to stronger encryption and authentication. Is it possible to change the 1024-bit CA seamlessly, like issuing a 2048-bit CA and sign it with the old one?

2

For the bits where RSA is used, OpenVPN actually uses SSL/TLS, in which the asymmetric keys are used as part of X.509 certificates. There is no intrinsic limitation(*) for key size in X.509 certificates, so switching to 2048-bit keys should "just work". Larger keys may hit some internal limitations in some implementations, but OpenVPN uses OpenSSL which is perfectly up to the task.

Arguably, SSL implementations which cannot use RSA keys larger than 1024 bits ought to be changed, because they are sloppy. 1024-bit RSA is not (yet) broken (current record is for a 768-bit key) but it seems to be within reach of current technology (using a substantial amount of millions of dollars, and a very specific to-be-built machine). Various bodies (e.g. NIST) have strongly recommended moving to larger keys for several years. Therefore, an implementation which does not support RSA keys larger than 1024 bits is likely to be unmaintained, which is never a good thing.

(*) Actually the length of a well-formed X.509 certificate is limited to 702223880805592151456759840151962786569522257399338504974336254522393264865238137237142489540654437582500444843247630303354647534431314931612685275935445798350655833690880801860555545317367555154113605281582053784524026102900245630757473088050106395169337932361665227499793929447186391815763110662594625664 bytes, which allows for a maximum RSA key length of less then 5617791046444737211654078721215702292556178059194708039794690036179146118921905097897139916325235500660003558745981042426837180275450519452901482207483566386805246669527046414884444362538940441232908842252656430276192208823201965046059784704400851161354703458893321819998351435577491134526104885300757005312 bits (you have to account for a few thousand bits for the other certificate fields).

| improve this answer | |
1

From some googling it seems you can use "stacked certificates" to achieve what you want. Basically you

  1. Generate your new CA
  2. Configure your server using stacked certicates so it accepts both the old and new CAs
  3. Replace client certificates with ones from the new CA
  4. After some grace period drop the old CA from your servers.

https://community.openvpn.net/openvpn/wiki/Using_Certificate_Chains

You probably also want to switch to stronger DH parameters (easy-rsa uses DH parameters the same size as the RSA keys, so if you have 1024 bit RSA you probably also have 1024 bit dh). Afaict you can just swap out the DH parameters on the server without interrupting service.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.