Re: [TLS] PR#625: Change alert requirements

Ilari Liusvaara <ilariliusvaara@welho.com> Sat, 10 September 2016 14:53 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2240312B0E8 for <tls@ietfa.amsl.com>; Sat, 10 Sep 2016 07:53:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.408
X-Spam-Level:
X-Spam-Status: No, score=-3.408 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-1.508] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F2VUEYPfR_hR for <tls@ietfa.amsl.com>; Sat, 10 Sep 2016 07:53:25 -0700 (PDT)
Received: from welho-filter1.welho.com (welho-filter1.welho.com [83.102.41.23]) by ietfa.amsl.com (Postfix) with ESMTP id 0B9BF128E18 for <tls@ietf.org>; Sat, 10 Sep 2016 07:53:24 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter1.welho.com (Postfix) with ESMTP id 4C066E086; Sat, 10 Sep 2016 17:53:23 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp2.welho.com ([IPv6:::ffff:83.102.41.85]) by localhost (welho-filter1.welho.com [::ffff:83.102.41.23]) (amavisd-new, port 10024) with ESMTP id dS5xXjmDphfz; Sat, 10 Sep 2016 17:53:23 +0300 (EEST)
Received: from LK-Perkele-V2 (87-100-237-87.bb.dnainternet.fi [87.100.237.87]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp2.welho.com (Postfix) with ESMTPSA id 1246D21C; Sat, 10 Sep 2016 17:53:23 +0300 (EEST)
Date: Sat, 10 Sep 2016 17:53:21 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Martin Thomson <martin.thomson@gmail.com>
Message-ID: <20160910145320.vefzs6s4uqf6dcqo@LK-Perkele-V2.elisa-laajakaista.fi>
References: <CABcZeBMeLgqjvr2cjWL=AHTQJbS9siNBB6U2=0654yigbBGkYA@mail.gmail.com> <9c28d7a9-4a21-799d-00d8-24ddb7f151b8@gmx.net> <CABkgnnUtKdMC7xhy0rS+88Y37PX6GFs8RLcGZQN3msda81kdBQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CABkgnnUtKdMC7xhy0rS+88Y37PX6GFs8RLcGZQN3msda81kdBQ@mail.gmail.com>
User-Agent: NeoMutt/ (1.7.0)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/qaVPrQwfv5n9Emkztph_I2W5Ctc>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] PR#625: Change alert requirements
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Sep 2016 14:53:27 -0000

On Sat, Sep 10, 2016 at 08:43:33PM +1000, Martin Thomson wrote:
> 
> I wouldn't say that this is a great argument, but it's one that could
> be made.  Generally, I've given up on TLS error codes being useful, or
> even making them useful; we've been stung in the past by being overly
> specific about what went wrong.

Well, regarding usefulness of TLS error codes, the error codes don't
even come close to useful-for-debugging. This isn't because of
information leaking (which AFAICT can only happen in very few places),
but because error codes just are not expressive enough.

Also, if you have a place where you worry about alerts leaking 
information to attacker, watch out, you might very well also have a
timing attack.

The places of TLS 1.3 that I can quickly name that are sensitive,
and so one should take care to only send one kind of alert for
each:

- Deprotect failures (bad_record_mac)
- MAC (finished) failures (decrypt_error)
- key agreement failure (???, my code uses illegal_parameter[1])
- signature failures (internal_error)

Also, note that with some bad cryptographic algorithms, one can't
even let the other side know operation failed. So even just
resetting the connection leaks too much information.


[1] Logic being: It is likely provoked by peer sending invalid
share -> invalid field value -> illegal_parameter.