Re: [TLS] What would make TLS cryptographically better for TLS 1.3

Robert Ransom <> Sat, 02 November 2013 21:51 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C7C8C21E80E8 for <>; Sat, 2 Nov 2013 14:51:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, NO_RELAYS=-0.001]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Fkzl2UJyplzJ for <>; Sat, 2 Nov 2013 14:51:19 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:400d:c02::22a]) by (Postfix) with ESMTP id 1674521E80B7 for <>; Sat, 2 Nov 2013 14:51:18 -0700 (PDT)
Received: by with SMTP id gc15so3363471qeb.15 for <>; Sat, 02 Nov 2013 14:51:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wkK1eyiH/lR3FVOCRC4t/02vOGjzslmpXGKYo4DZ0Uo=; b=d6a0HTltuMU/SS4Y+vlKpT92ILS7oTz5dnNe7DDNxlmgrbNIPWnacvs39q8XCgOWKa Ouju7nF/useCyDojdeApUJ6i65tliwiTLtfsaPq7jsIYmDHgBiZIuQIl7BmWsKf4azlO ApeIQLZwyRA6hq2+IzXttK7SJpppsWALeLb0QlG3Mx7CMz0aBzJopPSa++wvvRc4E6Z/ lZNQLAeXpmw9WG1AX2nldkXcWd0Dd/9gHUc6nufhmmCMMJUnqBqLtgljJqjsi5VwkQ0B iqL/bX3IVRULy9iDpLKJFz7cnr0+UlO4fWRUdgga9ov5xCiHR0gYF4AKZJ9MsWw5Tc4Q SI9w==
MIME-Version: 1.0
X-Received: by with SMTP id dk7mr12647131qeb.3.1383429078396; Sat, 02 Nov 2013 14:51:18 -0700 (PDT)
Received: by with HTTP; Sat, 2 Nov 2013 14:51:18 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <> <> <> <> <> <> <>
Date: Sat, 2 Nov 2013 14:51:18 -0700
Message-ID: <>
From: Robert Ransom <>
To: Nico Williams <>
Content-Type: text/plain; charset=UTF-8
Cc: "" <>
Subject: Re: [TLS] What would make TLS cryptographically better for TLS 1.3
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 02 Nov 2013 21:51:19 -0000

On 11/2/13, Nico Williams <> wrote:
> On Fri, Nov 01, 2013 at 08:53:13PM -0700, Robert Ransom wrote:
>> Nico Williams proposed omitting all nonces from (EC)DHE handshakes and
>> shared secrets in a future version of TLS.  My objection to that
>> proposal was that servers need to ensure that *something* in the
>> handshake is fresh, and if that is not a nonce, they will need to
>> ensure that at least one of the DH keypairs is new.  I thought it was
>> obvious that the reason for that was to prevent an attacker from
>> replaying the client DH public key and causing the server to reuse a
>> session key.  (It was obvious to Nico.)
> If either party wants to reuse a DH key then all they have to do to make
> it safe is also send a counter for salting.  The counter would reveal
> some information, so it may have to look random -- like a nonce -- and
> anyways, the other party can't validate anything about that counter.
> BUT, a) it's optional (if you don't reuse DH keys, you don't reuse
> session keys), b) it's *small*, much smaller than 32 bytes.
> Large nonces and explicit random IVs form a great subliminal channel.
> Taking direct outputs from a Dual_EC DRBG-style RNG for 32 byte nonces
> in TLS handshake messages makes you vulnerable to attack via the RNG.
> While having tiny nonces (or no nonces if not reusing your DH key) and
> random-IV-free cipher modes makes such attacks much harder to mount
> because the total number of bits of subliminal channel becomes fixed and
> is way less than the number needed for that sort of attack.
> Clearly there's a trade-off here:
>  - no nonces -> no DH key reuse
>  - large nonces -> no constraints on DH key reuse
>  - small nonces -> limited number of DH key reuses
> And:
>  - large nonces facilitate some attacks via subliminal channels and RNG
>    attacks
>  - no nonces (and no explicit random IVs) -> no subliminal channels
>  - small nonces -> lower subliminal channel bandwidth
> There's no reason to pick one for all implementations.  And there's
> reason to avoid large nonces.

If your implementation is backdoored, you're screwed no matter what.
Avoiding nonces won't help you.

As for the nonce size tradeoff:

* no nonce: no DH keypair reuse, or a replay-detection cache
* 32-byte nonce: server can use a PRNG, or can use a keyed hash to
hide its key-use counter
* 16-byte nonce: server must disclose its key-use counter or use a
block cipher to hide it
* 8-byte nonce: server must disclose its key-use counter or use a
64-bit block cipher (e.g. 3DES or TEA) to hide it

32-byte nonces must be allowed.  There's no downside to using a
32-byte nonce field in all cases; the server can pad with zero bytes
(or PRNG output, or whatever it wants) if it uses AES to hide its

>> In any case, for the sake of security, performance, and simplicity,
>> ciphersuites should be able to rely on the handshake layer to not
>> generate the same session key twice.
> Then GCM and friends are out.  They fail catastrophically with key
> reuse.  But I think your concern is misplaced -- see above.

No.  The reason that ciphersuites should be able to rely on the
handshake layer to not generate the same session key twice is to
*allow* GCM and other stream-cipher-based constructions.

Robert Ransom