Re: [TLS] Wrapping up cached info (and PRF WTF)

Martin Rex <> Mon, 17 May 2010 20:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D47083A6B38 for <>; Mon, 17 May 2010 13:18:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -7.769
X-Spam-Status: No, score=-7.769 tagged_above=-999 required=5 tests=[AWL=-0.120, BAYES_50=0.001, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-8]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Q1mIEbVbAocQ for <>; Mon, 17 May 2010 13:18:47 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id D29C33A6BA2 for <>; Mon, 17 May 2010 13:18:33 -0700 (PDT)
Received: from by (26) with ESMTP id o4HKINK3010683 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 May 2010 22:18:23 +0200 (MEST)
From: Martin Rex <>
Message-Id: <>
To: (Kemp David P.)
Date: Mon, 17 May 2010 22:18:22 +0200 (MEST)
In-Reply-To: <> from "Kemp, David P." at May 17, 10 03:45:19 pm
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal07
X-SAP: out
Subject: Re: [TLS] Wrapping up cached info (and PRF WTF)
X-Mailman-Version: 2.1.9
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: Mon, 17 May 2010 20:18:48 -0000

Kemp, David P. wrote:
> And on a different topic, What is This Function?
> RFC 5246 section 4.3 defines the notation for two types of vectors:
>   Fixed length:     T T'[n];
>   Variable length:  T T'<floor..ceiling>;
> and section 7.4.9 defines the structure of the Finished message:
>       struct {
>           opaque verify_data[verify_data_length];
>       } Finished;
>       verify_data
>          PRF(master_secret, finished_label, Hash(handshake_messages))
>             [0..verify_data_length-1];
> What sort of notation is a function PRF() followed by a floor and
> ceiling expression enclosed in square brackets []?

The output of the PRF() is substantially larger than the size
of the finished message.  The notation is probbly meant to
refer to the initial verify_data_length octets from the
opaque result of PRF().

The "verify_data" vector in the finished message has a fixed size,
which means that it is encoded without a seperate length field.

But since the verify_data is also the only content of the finished
handshake message, the size of verify_data is the same as the
sized handshake message body given in the handshake message header.

> Assuming it means that the PRF output is truncated to some variable
> number of bytes, why is the floor 0 bytes and the ceiling 11 bytes when
> all verify_data vectors MUST be either exactly 12 (current ciphersuites)
> or at least 12 (future ciphersuites) bytes???

The existing spec does not allow verify_data to be of variable size.
(variable size objects would require an additional length field
 preceding the value).

verify_data must always be fixed size, but that fixed size can be defined
in the specification of a cipher suite to be larger than 12 octets.