Re: [TICTOC] [ntpwg] security ID submitted for review

Greg Dowd <gdowd@symmetricom.com> Mon, 11 November 2013 16:46 UTC

Return-Path: <btv1==027f196924e==gdowd@symmetricom.com>
X-Original-To: tictoc@ietfa.amsl.com
Delivered-To: tictoc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 477DF21E820B for <tictoc@ietfa.amsl.com>; Mon, 11 Nov 2013 08:46:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.89
X-Spam-Level:
X-Spam-Status: No, score=-3.89 tagged_above=-999 required=5 tests=[AWL=-1.625, BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a452iL44yZli for <tictoc@ietfa.amsl.com>; Mon, 11 Nov 2013 08:46:16 -0800 (PST)
Received: from mail5.symmetricom.com (mail5.symmetricom.com [69.25.98.10]) by ietfa.amsl.com (Postfix) with ESMTP id 73ED421E8209 for <tictoc@ietf.org>; Mon, 11 Nov 2013 08:46:15 -0800 (PST)
X-ASG-Debug-ID: 1384188374-05bdbc0700534270001-4wH9i1
Received: from SJC-HUB-01.symmetricom.com ([192.168.10.171]) by mail5.symmetricom.com with ESMTP id pcDFyCt2cmzOohis (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Mon, 11 Nov 2013 08:46:14 -0800 (PST)
X-Barracuda-Envelope-From: gdowd@symmetricom.com
X-ASG-Whitelist: Client
Received: from SJC-MBX-01.symmetricom.com ([169.254.1.121]) by SJC-HUB-01.symmetricom.com ([::1]) with mapi id 14.01.0289.001; Mon, 11 Nov 2013 08:46:13 -0800
From: Greg Dowd <gdowd@symmetricom.com>
To: "mayer@ntp.org" <mayer@ntp.org>, "David L. Mills" <mills@udel.edu>, Kurt Roeckx <kurt@roeckx.be>
Thread-Topic: [TICTOC] [ntpwg] security ID submitted for review
X-ASG-Orig-Subj: RE: [TICTOC] [ntpwg] security ID submitted for review
Thread-Index: AQHOjve3DDY/37uOv0mOl0PDW6QZcpmEOGcAgAUyY4CAlqCIAIAAz/iw
Date: Mon, 11 Nov 2013 16:46:13 +0000
Message-ID: <26FBD265CD8D234EAF41115A180F92BB6ED74663@SJC-MBX-01.symmetricom.com>
References: <51FAC820.3090401@udel.edu> <20130803174008.GA17578@roeckx.be> <52019C7B.9070602@udel.edu> <527FE956.1050107@ntp.org>
In-Reply-To: <527FE956.1050107@ntp.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [192.168.3.9]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Barracuda-Connect: UNKNOWN[192.168.10.171]
X-Barracuda-Start-Time: 1384188374
X-Barracuda-Encrypted: AES128-SHA
X-Barracuda-URL: http://192.168.10.96:80/cgi-mod/mark.cgi
X-Virus-Scanned: by bsmtpd at symmetricom.com
X-Barracuda-BRTS-Status: 1
Cc: NTP Working Group <ntpwg@lists.ntp.org>, "tictoc@ietf.org" <tictoc@ietf.org>
Subject: Re: [TICTOC] [ntpwg] security ID submitted for review
X-BeenThere: tictoc@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Timing over IP Connection and Transfer of Clock BOF <tictoc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tictoc>, <mailto:tictoc-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tictoc>
List-Post: <mailto:tictoc@ietf.org>
List-Help: <mailto:tictoc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tictoc>, <mailto:tictoc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Nov 2013 16:46:41 -0000

I agree.  After the last thread about MAC recognition and extensions, I took a look back through the source of various versions and saw that the length check is being worked to keep up with digest mechanisms and is about to be capped by the extension draft minimum at 28.  I even went as far as looking up the ASN.1 encoding of hash OID and blob and it is reasonably efficient, adding less than a dozen bytes for mac'd frames in addition to the hmac IIRC.  If we do this, we need to consider as well the "keepouts" presented by Autokey's current implementation.  If the next autokey rev is not backwards compatible, it would be nice to update the autokey packets to use a TLV structure more amenable to sharing the association.


-----Original Message-----
From: tictoc-bounces@ietf.org [mailto:tictoc-bounces@ietf.org] On Behalf Of Danny Mayer
Sent: Sunday, November 10, 2013 12:15 PM
To: David L. Mills; Kurt Roeckx
Cc: NTP Working Group; tictoc@ietf.org
Subject: Re: [TICTOC] [ntpwg] security ID submitted for review

Dave,

I'm of the opinion that we should retire the MAC altogether and create a
MAC extension field instead. A lot of logic has been going into working
out whether or not we have an extension field or the MAC. The MAC
extension field could be REQUIRED to be the last extension field. That
way you know the length of each extension field and you could put
additional information in the MAC extension field indicating the type of
computation needed for the MAC. This makes a MAC easily extensible.

I'm not convinced that a server needs to authenticate a client except in
the context of an autokey dance. Then you only need to recognized the
key type presented and process according to that key type. I don't think
it's practical for the server to maintain state unless in the context of
an association. Drive-by NTP packets just are not worth the effort involved.

Danny

On 8/6/2013 9:01 PM, David L. Mills wrote:
> The more I think of it, the better I like a design where the existing
> MAC is replaced by a single extension field computed as the signature of
> the header.  I previously suggested this for broadcast mode, but I think
> this could be useful in other modes as well.  It would be hightly
> interesting to determine the overhead for such a signature using modern
> processors.  An experiment could be designed for the current NTP
> implementation.  It would consist of an adaptor routine that matches an
> OpenSSL signature routine to the authencrypt/authdecrypt interface
> routine.  I would do this myself, but with my current vision condition,
> it would not be practical.  For someone with knowledge of the NTP
> programming style, this would be an interesting weekend project.
> 
> In theis proposed design a busy server could be presented with thousands
> of signed client requests, each requiring  a signed server response. 
> However, the server might ignore the client request signature on the
> expectation that the  server response could be reliably determined. 
> Actually, the NTP on-wire protocol is very good for this.  As an aside,
> the protocol analysis and simulation described in the white paper at the
> NTP project page could be done for PTP as well.
> 
> Dave
> 
> Kurt Roeckx wrote:
>> On Thu, Aug 01, 2013 at 08:42:08PM +0000, David L. Mills wrote:
>>   
>>> Guys,
>>>
>>> Here are some general comments on the ID.  I apologize if they are a
>>> little rough as I have to dictate this message instead of my usual
>>> polished wordsmithing.
>>>
>>> format.
>>> The ID does not specify an extension field format.
>>>     
>>
>> The draft only seems to specify the the general idea of how it
>> should work and doesn't seem to go into detail how this should
>> work at the protocol level.  I assume he first wants to know if
>> the solution is something that can work and that others see
>> as a good solution before he works out the details.
>>
>>   
>>> In particular, the private key for the message
>>> authentication code (MAC) , if used, must be known beforehand.  This
>>> is where the "cookie snatcher" issue comes up as described in
>>> previous messages.  In particular, an important constraint for
>>> normal operation is that extension fields are not used unless
>>> required for cookie determination.
>>>     
>>
>> I'm not sure I understand your remark.  As far as I know the
>> "cookie snatcher" you talk about is the normal "man in the middle"
>> attack.  As I understand we would change the verification by
>> replacing it by the normal X.509 verification as done for instance
>> SSL/TLS.
>>
>> I assume you meant public key and note private key.
>>
>>   
>>> Glaring vulnerability exists when using extension fields, as the key
>>> value is public and must be known in advance.  This invites a
>>> cut-and-paste attack, as well as header changes, even if
>>> subsequently detected by the on-wire protocol.
>>>     
>>
>> I've seen this cut-and-paste attack mentioned before, but I've
>> never really understood it.  As I understand things, the MAC
>> is generated over the NTP + extensions.  I don't see how you
>> can take the extension from 1 packet into an other and still
>> have a valid MAC.  Or are you saying that you do something
>> with a packet even when it doesn't have a valid MAC?
>>
>>   
>>> certificate.
>>> Both RFC 5906 and the ID require the server certificate.  The server
>>> certificate can be conveyed, either off-line, or directly or
>>> indirectly via a certificate trail as described in RFC 5906 or the
>>> ID.  If obtained via the trail, there is a hazzard due to a
>>> middle-man attack and masquerade.
>>>     
>>
>> I really don't understand how such a man in the middle attack
>> can work.  Either the certificate + the chain validate, or they
>> don't.  It is of course important to you check that the CommonName
>> in the certificate matches the server you're trying to reach,
>> and that the root CA is in your list of trusted CAs.  But there
>> really isn't anything new or hard about this.
>>
>>   
>>> In broadcast mode, the protocols described in RFC 5906 and the ID
>>> are messy and with several possible vulnerabilities.  Here is a
>>> suggestion that might be useful.  Define a new broadcast packet
>>> format as the NTP header followed by one extension field
>>> representing the MAC.  The extension field represents the signature
>>> of the header computed using the private key of the server and can
>>> be verified by the client using the public key in the server
>>> certificate.  Originally, this was considered an unacceptable
>>> dilution of accuracy due to the variability of the signature
>>> computing time and the length of the signature.  However, at least
>>> in modern NTP, the interleaved broadcast mode can be used to correct
>>> for this overhead.  This assumes that the overhead for either the
>>> server or client is reduced using fast modern processors.
>>>     
>>
>> I think that in all cases where it's no problem to keep track of
>> all clients you should use the interleaved mode, and we can use
>> something like the Diffie-Hellman key agreement for those.
>>
>> But there clearly is also a need for servers that can't keep
>> the state of each client, and we need something else for that.
>> So maybe we need to define 2 ways of working.
>>
>>
>>
>> Kurt
>>
>>   
> 
> 
> 
> _______________________________________________
> ntpwg mailing list
> ntpwg@lists.ntp.org
> http://lists.ntp.org/listinfo/ntpwg
> 

_______________________________________________
TICTOC mailing list
TICTOC@ietf.org
https://www.ietf.org/mailman/listinfo/tictoc