[Perc] Review of draft-ietf-perc-srtp-ekt-diet-01

Russ Housley <housley@vigilsec.com> Fri, 26 August 2016 14:54 UTC

Return-Path: <housley@vigilsec.com>
X-Original-To: perc@ietfa.amsl.com
Delivered-To: perc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A817A12D0A3 for <perc@ietfa.amsl.com>; Fri, 26 Aug 2016 07:54:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.9
X-Spam-Level:
X-Spam-Status: No, score=-101.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, USER_IN_WHITELIST=-100] autolearn=ham autolearn_force=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 796DJzTlD-CZ for <perc@ietfa.amsl.com>; Fri, 26 Aug 2016 07:53:59 -0700 (PDT)
Received: from mail.smeinc.net (mail.smeinc.net [209.135.209.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F0BAC12D0C7 for <perc@ietf.org>; Fri, 26 Aug 2016 07:53:57 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.smeinc.net (Postfix) with ESMTP id D09B2300499 for <perc@ietf.org>; Fri, 26 Aug 2016 10:53:55 -0400 (EDT)
X-Virus-Scanned: amavisd-new at mail.smeinc.net
Received: from mail.smeinc.net ([127.0.0.1]) by localhost (mail.smeinc.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rC3djpE9WB3U for <perc@ietf.org>; Fri, 26 Aug 2016 10:53:54 -0400 (EDT)
Received: from [192.168.2.100] (pool-108-51-128-219.washdc.fios.verizon.net [108.51.128.219]) by mail.smeinc.net (Postfix) with ESMTPSA id 579B630040F for <perc@ietf.org>; Fri, 26 Aug 2016 10:53:54 -0400 (EDT)
From: Russ Housley <housley@vigilsec.com>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: quoted-printable
Message-Id: <D899D34F-DE41-4BC0-AA74-E92554F6B460@vigilsec.com>
Date: Fri, 26 Aug 2016 10:54:02 -0400
To: perc@ietf.org
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
X-Mailer: Apple Mail (2.1878.6)
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/y5b2wJPYoAOke4wAEZno5clQaMw>
Subject: [Perc] Review of draft-ietf-perc-srtp-ekt-diet-01
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Aug 2016 14:54:01 -0000

In Berlin, I agreed to d a review of draft-ietf-perc-srtp-ekt-diet-01 by the end of August.  Here is my review.

I have sent a more complete review to the authors.  I have included editorial comments in the review sent to the authors.  I stick to technical comments in this posting.


Figure 1 is incomplete.  I think that the “2” in the right margin is supposed to represent the EKT_Msg_Type_Full.


Section 2.1 says:

   EKT_Ciphertext:  The data that is output from the EKT encryption
      operation, described in Section 2.3.  This field is included in
      SRTP packets when EKT is in use.  The length of this field is
      variable, and is equal to the ciphertext size N defined in
      Section 2.3.  Note that the length of the field is inferable from
      the SPI field, since the SPI will indicate the cipher being used
      and thus the size.

This is not correct!  Two things neet to be known to figure out the length.  First, the cipher being used to encrypt the EKT_Plaintext, and second the size of the SRTP master key. RFC 3771 says that the master key can be 128, 192, or 256 bits.  I think that the SPI only tells one of these.


Section 2.1 says:

   Time to Live (TTL):  The maximum amount of time that this key can be
      used.  A unsigned 16 bit integer representing duration in seconds.
      The SRTP Master key in this message MUST NOT be used for
      encrypting or decrypting information after this time.  Open Issue:
      does this need to be absolute time not duration?  TODO: discuss in
      security section.

If a new participant joins, do they need to know when the start time for the TTL.  This might not be a problem is the sender is the only party doing the enforcement.  If a recipient is expected to discard any traffic after the TTL expires, then the recipient will need to know the absolute time as well as the TTL.


Section 2.1 says:

   Security Parameter Index (SPI):  This field indicates the appropriate
      EKT Key and other parameters for the receiver to use when
      processing the packet.  Each time a different EKT Key is received,
      it will have a larger SPI than the previous key (after taking
      rollover into account).  The length of this field is 16 bits.  The
      parameters identified by this field are:

I am confused here.  I thought the SPI identified the cipher, key, and associated parameters needed to decrypt the EKT_Ciphertext. Two different SRTP sources can use the same SPI value, and the will identify two different keys.

Why does the SPI value monotonically increase?  Since it is assigned by the SRTP source, we have no idea when any given participant will see it for a long-lived conference.


Section 2.2 says:

   All SRTP master keys MUST NOT be re-used, MUST be randomly generated
   according to [RFC4086], and MUST NOT be equal to or derived from
   other SRTP master keys.

You do not really want people to write code to check that the randomly generated makter key does not match a previously generated master key.  I suggest:

   SRTP master keys MUST be randomly generated, and [RFC4086] offers
   some guidance about random number generation.
   SRTP master keys MUST NOT be re-used for any other purpose, and
   SRTP master keys MUST NOT be derived from other SRTP master keys.

That said, this text is out of place.  It does not belong in the discussion of packet processing and the state machine.


Section 2.2.2 says:

   Inbound EKT processing MUST take place prior to the usual SRTP or
   SRTCP processing.  The following steps show processing as packets are
   received in order.

Will an implementation ever be doing SRTP with EKT with some sessions and SRTP without EKT for other sessions at the same time? If so, how does the inbound processing determine whether an EKT is present or not?


Section 2.3.1 says:

   The default EKT Cipher is the Advanced Encryption Standard (AES) Key
   Wrap with Padding [RFC5649] algorithm.  It requires a plaintext
   length M that is at least one octet, and it returns a ciphertext with
   a length of N = M + 8 octets.  

This only true if len(M) is a multiple of 64 bits.  Both examples in Section 6 of RFC 5649 show cases where this equation is incorrect. Figure 4 also shows that this equation is incorrect.

The equation should be: N = M + (M mod 8) + 8


Section 2.1 does not agree with Figure 4.  Section 2.1 says that the length field and the following message type are counted.  The values in Figure 4 only accommodates the SPI of 2 octets.


Section 2.3.2 says:

   Other specifications may extend this one by defining other EKT
   ciphers per Section 7.  This section defines how those ciphers
   interact with this specification.

Section 7 does not tell how to register more EKT ciphers.


Section 2.6 says:

   Rekey: By sending EKT over SRTP, the rekeying event shares fate with
   the SRTP packets protected with that new SRTP master key.

Yes, but packet loss is possible here too.  Should the first three packets using the new key contain the EKT?


Figure 6 (Handshake Message Flow) goes beyond the handshake messages.


Section 5 says:

   An attacker could send packets containing a Full EKT Field, in an
   attempt to consume additional CPU resources of the receiving system
   by causing the receiving system will decrypt the EKT ciphertext and
   detect an authentication failure

Since you recommend sending the EKT on more than one consecutive packet, is there an easy way to avoid processing the same EKT on the subsequent packets without doing all of the work?


Section 5 says:

   The confidentiality, integrity, and authentication of the EKT cipher
   MUST be at least as strong as the SRTP cipher.

Yes. But, there is more to say.  If DTLS-SRTP is used, then there is another ciphersuite that must be at least this strong as well.


Section 6 asks:

   Do we need AES-192?

No.


Section 7 needs to cover two things: IANA registry for Message Type and IANA registry EKT ciphers.

Russ