Hide Forgot
Created attachment 1151933 [details] screenshot of the (IMHO) correct connection in Firefox Description of problem: When connecting with emacs to https://melpa.org/packages/ (most common repository of Emacs third-party packages) I get the error message: gnutls.c: [1] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data That sounds like a very bad idea to me. Version-Release number of selected component (if applicable): emacs-24.3-18.el7.x86_64 gnutls-3.3.22-1.el7.x86_64 How reproducible: 100% (2 out of 2) Steps to Reproduce: 1. Follow http://melpa.org/#/getting-started and to ~/.emacs (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) 2. Restart Emacs 3. Meta-[X]package-list-packages[ENTER] Actual results: Error log shows the above shown error message, however, then Emacs connects and the list of packages shows up. Expected results: Firefox on the same URL is pretty happy with the connection settings shown in the attached screenshot and it seems to be happy. Additional info:
Melpa seems to advertise DH keys with more than 256 (Emacs default) prime number bits. The following makes the connection work without warnings: (setq gnutls-min-prime-bits 1024) I'm not sure if this is something to "fix", though. Even with the latest Emacs (25.0.93), the option is still set to 256 by default. I would suggest putting the workaround above into a KB article and close this bug.
This is not about getting rid of a warning. A low value such as 256 bits by default puts users at risk. We are in the process of harmonizing the crypto rules across the distribution and having each software apply its own (and in that case also insecure) default settings is against that effort.
As Nikos said there is no point in Emacs changing the value from the default at all. Or at least it should not change it without explicit configuration modification by user.
@Jan Synacek: I think Tomáš is talking about https://fedoraproject.org/wiki/Changes/CryptoPolicy ... the point is that applications should not deal with the crypto policy at all, but rather should use (hopefully sensible) system defaults.
Will be fixed together with bz#1403643.