Re: [TLS] Inclusion of OCB mode in TLS 1.3

Jack Lloyd <lloyd@randombit.net> Tue, 20 January 2015 17:10 UTC

Return-Path: <lloyd@randombit.net>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9E5511B2ACC for <tls@ietfa.amsl.com>; Tue, 20 Jan 2015 09:10:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.511
X-Spam-Level:
X-Spam-Status: No, score=-1.511 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, GUARANTEED_100_PERCENT=2.699, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=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 pyaHqUt795Cm for <tls@ietfa.amsl.com>; Tue, 20 Jan 2015 09:10:10 -0800 (PST)
Received: from maple.randombit.net (maple.randombit.net [66.228.45.112]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5AAD91ACE2F for <tls@ietf.org>; Tue, 20 Jan 2015 09:09:56 -0800 (PST)
Received: by maple.randombit.net (Postfix, from userid 1000) id 4E11CA08FC; Tue, 20 Jan 2015 12:09:54 -0500 (EST)
Date: Tue, 20 Jan 2015 12:09:54 -0500
From: Jack Lloyd <lloyd@randombit.net>
To: tls@ietf.org
Message-ID: <20150120170954.GA9731@randombit.net>
Mail-Followup-To: tls@ietf.org
References: <54B5501A.4070402@azet.org> <D0DA96DB.58455%paul@marvell.com> <54B58F5B.2010704@cs.tcd.ie> <54B6815A.7060102@azet.org> <CABcZeBOkabo85Hv73MM1koeGnVYDJtPHc6uwk5b1BkPDRu=RGg@mail.gmail.com> <54B9352C.70203@azet.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <54B9352C.70203@azet.org>
X-PGP-Fingerprint: 3F69 2E64 6D92 3BBE E7AE 9258 5C0F 96E8 4EC1 6D6B
X-PGP-Key: http://www.randombit.net/pgpkey.html
User-Agent: Mutt/1.5.23 (2014-03-12)
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/qeX3VLrXGMySJgTGMfEWP6C-hV4>
Subject: Re: [TLS] Inclusion of OCB mode in TLS 1.3
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Tue, 20 Jan 2015 17:10:11 -0000

On Fri, Jan 16, 2015 at 04:58:36PM +0100, Aaron Zauner wrote:
> Hi,
> 
> I came up with the following list of cipher-suites applicable to >= TLS 1.2:
> 
> (EC)DHE:
> TLS_DHE_RSA_WITH_AES_128_OCB	
> TLS_DHE_RSA_WITH_AES_256_OCB
> TLS_ECDHE_RSA_WITH_AES_128_OCB
> TLS_ECDHE_RSA_WITH_AES_256_OCB
> TLS_ECDHE_ECDSA_WITH_AES_128_OCB
> TLS_ECDHE_ECDSA_WITH_AES_256_OCB
> 
> PSK:
> TLS_DHE_PSK_WITH_AES_128_OCB
> TLS_DHE_PSK_WITH_AES_256_OCB	
> TLS_ECDHE_PSK_WITH_AES_128_OCB
> TLS_ECDHE_PSK_WITH_AES_256_OCB
> 
> As for the nonce, would it make sense to use a 128bit nonce for both
> AES128 and AES256 instead of 64/128 (see:
> https://www.imperialviolet.org/2014/05/25/strengthmatching.html)?

OCB mode as defined in RFC 7253 supports nonces of at most 120 bits.

When used in TLS both GCM and CCM use 96 bit nonces, 32 from key
exchange and 64 explicit in the message. Given the 2^64 message limit
(and that any sensible implementation just uses the sequence number
for the 64 nonce bits included in each message) I don't see why OCB
should require anything different. A 128 bit nonce isn't increasing
the security level when it is already 100% guaranteed that the nonce
will never repeat using just 96.

Another option would be to avoid explicit nonces entirely and
following ChaCha20 define the nonce to always be exactly the sequence
number in network order. This value is known to be unique for protocol
reasons, and it avoids the wire bytes taken for any explicit value.

Cheers,
  Jack