Skip to content
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

Up the default DH param size to 2048 bits #453

Closed
wants to merge 1 commit into from
Closed

Up the default DH param size to 2048 bits #453

wants to merge 1 commit into from

Conversation

Tenzer
Copy link

@Tenzer Tenzer commented Dec 13, 2018

This is what the documentation states is needed in order to set up a secure VPN
server, so let's make it the default:
https://docs.pritunl.com/docs/securing-pritunl

This is what the documentation states is needed in order to set up a secure VPN
server, so let's make it the default:
https://docs.pritunl.com/docs/securing-pritunl
@Tenzer Tenzer changed the title Up the default DH param size to 2048 bites Up the default DH param size to 2048 bits Dec 13, 2018
@zachhuff386
Copy link
Member

This is set to 1536 because some servers can take 10-15 minutes to generate larger parameters. This may have improved with recent performance improvements on cloud servers, I will need to do testing on different servers before increasing it.

@zachhuff386
Copy link
Member

This pull request has a force push in it so I'm not going to merge it but the default param size has been increased to 2048.

@Tenzer
Copy link
Author

Tenzer commented Dec 14, 2018

Thanks! The force push was in order to fix a typo in the commit message, from "bites" to "bits".

@Tenzer Tenzer deleted the 2048-dh-param-default-size branch December 14, 2018 08:39
@Tenzer
Copy link
Author

Tenzer commented Dec 14, 2018

@zachhuff386 https://security.stackexchange.com/a/95184 mentions adding the -dsaparam flag to the openssl dhparam operation as a way to speed it up massively while maintaining the same level of security.

It takes the average time (across 5 runs) for generating a 2048 bit DH parameter from an average of 42 seconds down to 0.6 seconds on my laptop.

Might be worth considering?

@jeremygaither
Copy link

Haveged may also help, especially on virtual machines: http://www.issihosts.com/haveged/

@Tenzer
Copy link
Author

Tenzer commented Dec 16, 2018

Haveged only helps generate random bits, but that's not what takes the time here. It's instead calculating prime numbers, so it's all CPU bound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants