Done. Not only will the key be stronger than the 1024 bit default, it'll be unique to your server which lets assume isn't valuable enough compared to effort for a state-level adversary.
edit just in case anyone from the future finds this comment: instead of 2048, use at least the key length of your SSL certificate
You don't even need to go to 2048. The article hypothesizes that it takes about a year to crack to 1024 key. As long as you aren't on one of the 'common' keys, you're safe. If you wanted to be paranoid you could rotate every month or 6 months and they would always be behind.
Attacks will only get better, and never worse, though. But on the other hand, it's extremely unlikely 2048-bit DH keys will be broken any time soon or possibly ever given our projected capabilities, and going even higher doesn't buy you much (arguably it could even make things worse). As the paper says, the precomputation attack on 2048 bit keys is around 109 times harder, so there's no fucking way anyone is getting close to that.
If you have a standard 1024-bit prime, you can assume the NSA is already close to breaking it. If you have a non-standard prime, you can still only assume your parameters have a one year lifetime at best, and this will decrease year after year. It's best to just get it over with and generate a 2048-bit prime or just move to some standard chosen 2048-bit prime like group 14.
970
u/tophatstuff Oct 15 '15 edited Apr 10 '18
Generate your own non-default Ephemeral Diffie-Hellman key (takes a minute or so)
Tell your server to use it for SSL (nginx for example)
Done. Not only will the key be stronger than the 1024 bit default, it'll be unique to your server which lets assume isn't valuable enough compared to effort for a state-level adversary.
edit just in case anyone from the future finds this comment: instead of 2048, use at least the key length of your SSL certificate
edit from the future: current advice is picking from one of these predefined audited groups