Tls.c defines a 512bit DH parameter (unless #NO_DH is defined, which I gather it normally isn't, e.g. for ActiveState's builds).
This should be replaced with a static 2048 bit key, given small keys are no longer deemed secure enough for use; see e.g. https://weakdh.org/sysadmin.html
I would suggest an option be added to supply an external DH params file as well, so that this can be changed without recompiling.
I agree with Mark, the dhparam should be broken out as an option.
For some time now I've replaced the 512bit dhparam with a 4096 bit one on my builds and it works well, but a command line option would be best, perhaps it would override a default 2048bit built-in dhparam.
Steve Redler IV
SR Technology
I agree as well to
- having an option, and
- a better default
Are either of you willing to supply a patch I can apply ?
Andreas, I’ve posted a patch which both changes the default and adds a new option to specify the DH file. I’d greatly appreciate if when you get a chance you could take a look and perhaps get it incorporated.
Thanks!
Mark
in a bit of a hurry, but here at least is a patch to give a better default..
Had a chance to get back to this. This patch both changes the default compiled-in key to 2048 bits, and also adds a "-dhparams" option which allows you to specify an external file containing the parameters.
Notes:
I've made a few small corrections.
Thanks very much for the corrections Jeremy.
I made a test build last night using Jeremy's patch.
The package built fine on all my platforms.
After updating the Tcl installation on https://www.tcl.tk with that build (*) and restarting the tclhttpd serving it the logjam page () now tells me that our server is "safe from the logjam attack" (finally). Thanks for that work.
() The https://weakdh.org/sysadmin.html
(*) Currently labeled as v1.6.6.1. On official commit I will make this v1.6.7
Patch committed. Version is 1.6.7 now.
IMHO this ticket can now be closed.