From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: A couple of questions and concerns about Emacs network security Date: Sun, 08 Jul 2018 16:06:39 +0200 Message-ID: <878t6lom8g.fsf@mouse.gnus.org> References: <83o9g2uhju.fsf@gnu.org> <20180705115826.73c1d95e@jabberwock.cb.piermont.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531058755 10821 195.159.176.226 (8 Jul 2018 14:05:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2018 14:05:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Emacs-Devel devel To: Jimmy Yuen Ho Wong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 08 16:05:51 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcAJz-0002jF-5d for ged-emacs-devel@m.gmane.org; Sun, 08 Jul 2018 16:05:51 +0200 Original-Received: from localhost ([::1]:37133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcAM6-0008Vh-0C for ged-emacs-devel@m.gmane.org; Sun, 08 Jul 2018 10:08:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcAKt-0008C2-Mz for emacs-devel@gnu.org; Sun, 08 Jul 2018 10:06:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcAKp-0006wD-OR for emacs-devel@gnu.org; Sun, 08 Jul 2018 10:06:47 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:34645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcAKp-0006vX-Gk for emacs-devel@gnu.org; Sun, 08 Jul 2018 10:06:43 -0400 Original-Received: from cm-84.212.221.165.getinternet.no ([84.212.221.165] helo=marnie) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fcAKm-0003hH-7A; Sun, 08 Jul 2018 16:06:42 +0200 In-Reply-To: (Jimmy Yuen Ho Wong's message of "Fri, 6 Jul 2018 07:42:22 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227100 Archived-At: Geez! So many emails in this thread all of a sudden... I think it sounds like Jimmy is very much on the right track, so that's great. (I haven't actually looked at the code yet.) Batching up the warnings so you don't get double-prompting sounds very nice, for instance, and handling the certificate things and the encryption primitives warnings in "one batch" sounds good. But here's some comments after reading all the 5000 messages in this thread: 1) I don't think the `paranoid' setting is security theatre. It's not a useful setting for general browsing, but if your use case is that you only use Emacs for, say, talking with your IMAP server, and that's it, and you're worried that you may somehow end up talking with the wrong server, and you're, er, paranoid (perhaps with good reason), then that's the setting for you. But, yes, as Eli says, `paranoid' should perhaps do more for non-TLS connections. The question is "what", though, because there's no fingerprint (beyond the host/port number) that we can use to verify that a non-TLS connection is to a previously seen host. 2) The `gnutls-min-prime-bits' documentation is unclear: --- This function sets the number of bits, for use in a Diffie-Hellman key exchange. This is used both in DH ephemeral and DH anonymous cipher suites. This will set the minimum size of the prime that will be used for the handshake. In the client side it sets the minimum accepted number of bits. --- I thought that it set the minimum number of bits (like it says in the last sentence), but it would use however many bits the server allows. The first sentence seems to contradict this, and that this sets an upper as well as lower bound on the number of bits, which is pretty horrific, if that's the case... But I don't think it is, because I get ":diffie-hellman-prime-bits 2047" when connecting to a DH host. So there's no need to worry about the `gnutls-min-prime-bits' setting. The NSM handles the problem. 3) emacs -Q should ignore the NSM settings (and not save anything) Other than that, I'm just waiting for Jimmy's code to show up in an Emacs branch, and I'll probably have more comments. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no