New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
increase from 2048 to 4096 bits #38
Conversation
This sounds great. Exactly what I was trying to do with my install. 2048 bits is waaaay too small for modern standards. |
@dylanmtaylor nice work, might be worth taking a look #23. |
I could easily write a bit of code to prompt for the bit size, it's not overly complicated to do, but I definitely think 4096 should be the default. 8192 seems a bit overkill in my opinion. Is there much demand for the feature? |
New versions use 2048 by default
@Stsosz and @dylanmtaylor I'm NOT the maintainer but it seems to me that this community has differing ideas RE: a safe key-bit length. I think that a prompt would be a good addition, but that may just be me. From my point of view it would be a nessisity to add a section in the README about key length. Here's a few links I've found, it's not at all complete but just a little research I've done today.
Obviously this is just a start and we can draw our own conclusions, but it seemed like a good unbiased set of data to me. |
@stefancrain you would be correct. The idea of this script is to provide users with a quick and easy way to setup a VPN server. The security customizations are sometying that the end user can do after everything is installed should they choose. Adding an additional option during the install while a good idea for the advance users add more complexity to the script which may discourage some new users. Keeping it simple and easy is what this script is setup to do. |
I feel it should stay simple but use hardened security. 4096 bits isn't too much overhead, and is more secure. There is little downside for personal use and use with a small number of clients |
@jamesrascal totally agree with you - maybe this could be solved with a set of instructions? Here's another source, this time from the EU.
|
Prove why.
Just a quick test on a DigitalOcean VPS:
Convince the OpenVPN devs about it and the script will use it by default in its current form. |
Uh... That second quote was not by me... @Nyr |
2048 is the minimum that should be acceptable anywhere. Debian is forbidding 1024 bit keys for instance (source: https://lists.debian.org/debian-devel-announce/2010/09/msg00003.html) If a way to crack 2048 bit keys is discovered, it will still take a sufficiently long time to crack a 4096 bit key. I do not find 20 minutes to generate the primary key on a low-end VPS completely unacceptable. It only has to be done once, and after that, adding user certs takes only a few seconds (tested on bare metal). I strongly feel that your security is worth 15 minutes of your time. |
@Stsosz sorry, fixed.
I agree, that's why it's the default currently.
Neither do I, but DigitalOcean is not a low-end service, more like middle class. On low-end OpenVZ services with a slow CPU, users could even be suspended during setup if I switched to generating 4096 bit keys and if not, it could still take more than an hour. Not to mention a Raspberry Pi or something like that.
I do too, but I feel like shorter keys provide a good balance between performance and security, which is the same position held by the OpenVPN developers. And remember, longer key lengths do not only affect performance during key generation. |
What if I were to code in an option that the user selects? For instance
|
No, because:
TL;DR: longer keys have little/no benefits for the OPSEC of the users. I understand there are differing opinions on this matter, but I prefer to respect the default OpenVPN settings which were selected by very capable people and will probably be considered secure for the next 10+ years. Forks about this are welcome but will not be merged at this point. |
You might want to cherry pick out the README change, but I feel 2048 might be too weak for today's crypto standards