Re: [TLS] TLS renegotiation issue

Martin Rex <> Fri, 06 November 2009 03:14 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id CE28B3A681F for <>; Thu, 5 Nov 2009 19:14:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -6.04
X-Spam-Status: No, score=-6.04 tagged_above=-999 required=5 tests=[AWL=0.209, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id gttreWXgM7OS for <>; Thu, 5 Nov 2009 19:14:11 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id C30783A6783 for <>; Thu, 5 Nov 2009 19:14:10 -0800 (PST)
Received: from by (26) with ESMTP id nA63EVNS026856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Nov 2009 04:14:32 +0100 (MET)
From: Martin Rex <>
Message-Id: <>
To: (Nicolas Williams)
Date: Fri, 6 Nov 2009 04:14:30 +0100 (MET)
In-Reply-To: <20091106001259.GR1105@Sun.COM> from "Nicolas Williams" at Nov 5, 9 06:12:59 pm
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal06
X-SAP: out
Subject: Re: [TLS] TLS renegotiation issue
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: Fri, 06 Nov 2009 03:14:12 -0000

Nicolas Williams wrote:
> > I would not mind if those TLS implementers with the GGF and SSPI
> > use the terminology and function parameters they formerly called
> > "channel bindings" (AFAIK SSPI doesn't have channel bindings)
> > to pass along the finished messages described in Erics document.
> Neither would I.  Except that they _can't_ with Eric's proposal, not
> without violating abstractions and interpreting the contents of the
> channel bindings input, which is why I object.

The security context iterators (InitializeSecurityContext
and AcceptSecurityContext  or gss_init_sec_context/gss_accept_sec_context)
are designed to exchange opaque tokens between the peers (client
and server  / initiator and acceptor ) 

What you are looking for is a token exchange between two security
contexts, old and new.  Ultimately you could create full blown
iterator calls to do this.  Or a "cheap" one-token hack like this:

GetCarryOverData ( oldsecuritycontext, &opaque_buffer );
CreateSecurityContextWithCarryOver( opaque_buffer, &newsecuritycontext );
ReleaseBuffer( &opaque_buffer );

Or with just a single call:

CreateRenegoContext(oldcontext, flags, &newcontext);

with a little modification of the init and accept iterators so that
they can start with a context handle created by this new call
instead of a NULL handle.

The latter single-call approach seems the cleanest to me,
because it is the most flexible in case we ever find another
need to transfer information between an original and renegotiated
session -- without having to change apps that use a GSS-API style
architecture.  And it is the one which is the most difficult
to break by careless applications.  :)

Limiting the evolution of the TLS protocol and the interaction
between current and pending session states seems like an
unjustified restriction to me.  If a particular API has
a problem with a useful evolutionary change of TLS,
then this might be a design shortcoming in the API
and should be fixed there.  I don't think we should deny
in a very useful way just it might have an impact on
certain esoteric API architectures.  

Comparing the amout of work to (a) technically block
the renegotiation in the TLS implementation and 
(b) replace/update the renegotion with a secure
renegotiation for the OpenSSL-style architecture
and for the SSPI architecture, it seems that
the OpenSSL architecture is not so bad after all.

I have never looked at GGF.  Does it really create two
seperate, unrelated contexts similar to what SSPI does?

A while back, a vendor had his GSS-API mechanism certified
for interoperability with out application, and he told me
that this mechanism was built on top of OpenSSL.  I don't
know whether they have implemented renegotiation (I doubt it,
since that mechanism is not wire-compatible with native SSL
due to the GSS-API token framing.  But I could conceive
a renegotiation architecture without a seperate context

Maybe apps shouldn't be sitting straight on top of SSPI?
I'm glad we have our thin gsskrb5.dll between our own apps
and SSPI, because I had to work around several bugs and
backwards incompatible changes during the last 9 years,
and that additional abstraction helped me significantly
in the logistics of getting updates or workarounds
out to the customers.  Since we provide gsskrb5.dll
as OpenSource, customers could even do that themselves...