Re: [Perc] Question on diet Design?

"Paul E. Jones" <paulej@packetizer.com> Wed, 22 March 2017 00:35 UTC

Return-Path: <paulej@packetizer.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 79BBA129410 for <perc@ietfa.amsl.com>; Tue, 21 Mar 2017 17:35:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=packetizer.com
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 lfFiBjasSSkg for <perc@ietfa.amsl.com>; Tue, 21 Mar 2017 17:35:34 -0700 (PDT)
Received: from dublin.packetizer.com (dublin.packetizer.com [75.101.130.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 69EA7130A97 for <perc@ietf.org>; Tue, 21 Mar 2017 17:35:33 -0700 (PDT)
Received: from [192.168.1.20] (cpe-098-122-167-029.nc.res.rr.com [98.122.167.29] (may be forged)) (authenticated bits=0) by dublin.packetizer.com (8.15.2/8.15.2) with ESMTPSA id v2M0ZVAr020368 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Mar 2017 20:35:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packetizer.com; s=dublin; t=1490142932; bh=dUx49EjhmJkE7nl8c2aORQq9kmpjZWgQaZydaRgoOzw=; h=From:To:Subject:Cc:Date:In-Reply-To:References:Reply-To; b=onOI0fipu/tAtECR9gnBfX82E7+YIwf0C+zQfXLFBidp0Y50qrZ0rXyE856A9B19U 4vtXc0cqq/rLEjWGZ9sXj08SY8H1ivVZ44TXzvXOqhi2KEgFz9UBHRIRvrnmO7rS7y IQaxoDlvHsACbjrl/fF+ZIrYuAqKZdDgFwyF79m8=
From: "Paul E. Jones" <paulej@packetizer.com>
To: Eric Rescorla <ekr@rtfm.com>
Cc: perc@ietf.org
Date: Wed, 22 Mar 2017 00:35:32 +0000
Message-Id: <ema2355ca7-fc19-48f6-972e-7dd73ac7a9a9@sydney>
In-Reply-To: <CABcZeBNFSmM4VjKzKLmrTzTEMxke=gYzH7x9GuhPcv=gFqRvQQ@mail.gmail.com>
References: <CABcZeBPbFJYyCBUGhtryn1Z6W9feLUiS-sVB+HM7UUUR3-ZbQg@mail.gmail.com> <em918d187a-1839-494c-a969-b298d03965d7@sydney> <CABcZeBNFSmM4VjKzKLmrTzTEMxke=gYzH7x9GuhPcv=gFqRvQQ@mail.gmail.com>
Reply-To: "Paul E. Jones" <paulej@packetizer.com>
User-Agent: eM_Client/7.0.28492.0
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="------=_MB36F73331-2D13-4404-8F09-FDE6561E1A39"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (dublin.packetizer.com [10.165.122.250]); Tue, 21 Mar 2017 20:35:32 -0400 (EDT)
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/M7uB4fWribrc5NIPCuxhs7uvorE>
Subject: Re: [Perc] Question on diet Design?
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 22 Mar 2017 00:35:36 -0000

Ekr,

>>
>>Each endpoint then manufacturers a random SRTP master key E_i used for 
>>E2E encryption.  The endpoint then generates the various keys for RTP 
>>encryption, RTP authentication, RTCP encryption, and RTCP 
>>authentication using the KDF defined in RFC 3711 from the pair {E_i, 
>>S_g}.  This produces k_e, k_a, k_s (Section 4.3.1 of RFC 3711).  Since 
>>we will have these for both E2E and HBH, let's suffix whese with _e 
>>(for E2E).  So, we'll have K_e_e.
>>
>>The endpoint then generates the various keys for RTP encryption, RTP 
>>authentication, RTCP encryption, and RTCP authentication using the KDF 
>>defined in RFC 3711 from the pair {K_h, S_h}.  As above, we'll have 
>>k_e, k_a, k_s, which let's suffix as k_e_h (for HBH).
>>
>>The endpoint then performs these steps:
>>   1) encrypts the RTP packet using the keys derived via the KDF for 
>>E2E, K_e_e and salt k_s_e.
>>   2) encrypts the RTP packet using the keys derives via the KDF for 
>>HBH, namely K_e_h and k_s_h.
>>
>>The EKT field is then added to the end of the packet.  If it's the 
>>"short EKT field", it has no keying material inside. It would just be 
>>a single 0 octet.
>>
>>The long EKT field is used periodically to allow the endpoint to 
>>transmit E_i to other endpoints.  The plaintext of this field is 
>>constructed and then encrypted using AESKeyWrap(K_g, ekt_field).  The 
>>ciphertext is then appended to the packet, along with a few plaintext 
>>fields indicating the field type and length.
>
>I'm going to stop here, because I think this is the relevant point, 
>that I had misunderstood
>and I want to summarize looking just at the E2E portion.
>
>1. You start out with every agent i having a pairwise key K_d_i (the 
>DTLS traffic key) with the
>KD.

Yea, but the key is only used for DTLS exchanges, so independent of 
anything SRTP related (except for the DTLS-SRTP key derivation for HBH 
that you wanted to ignore for now).


>2. The KD then generates a single shared key K_g which it provides to 
>each agent i under
>K_d_i (in DTLS).

Correct.


>2. Each agent then generates its own transmission key E_i which it 
>transmits to everyone
>under K_g.
>
>Do I have this right?

Yes, that's correct.


>If so, my question is. Why? In particular, why can't we use K_g 
>directly to encrypt SRTP
>packets (i.e., as one ginormous SRTP session). I am assuming your 
>answer here is going
>to be that then if you have SSRC collisions then we get two-time pad 
>[0]? If not, then
>is there some other reason I am missing?

Avoiding the one-time pad is a primary concern, but not the only issue.  
A secondary issue is that in a conferencing environment where each 
sender is transmitting independently, endpoints need to be able to 
synchronize the crypto context of the sender.  The ROC value is conveyed 
in the EKT field, which facilitates this synchronization.  (The ROC for 
the HBH encryption always starts at 0, so no synchronization is 
required.  But, the ROC for any transmitted flow in an existing 
conferencing might be any value.  So, EKT carries the E2E cipher and the 
ROC for that flow.)


>[0] If so, I have another way to address this.
>

Assuming we could still convey the ROC in the clear (it's not really 
secret), then I'd like to hear your suggestion.

I'll note that there was an alternative some time ago 
(draft-mcgrew-srtp-aero), but that work did not progress.  Since I 
wasn't involved, I do not know why.  Perhaps because it moved away from 
SRTP and defining an SRTP replacement would have been a pretty high 
barrier?

Paul