Re: [Perc] Review of needed information for inner security

"Roni Even" <ron.even.tlv@gmail.com> Mon, 12 October 2015 14:09 UTC

Return-Path: <ron.even.tlv@gmail.com>
X-Original-To: perc@ietfa.amsl.com
Delivered-To: perc@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EA8041B32DA for <perc@ietfa.amsl.com>; Mon, 12 Oct 2015 07:09:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
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 GuH6fXXhjf8l for <perc@ietfa.amsl.com>; Mon, 12 Oct 2015 07:09:11 -0700 (PDT)
Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 934101B32D7 for <perc@ietf.org>; Mon, 12 Oct 2015 07:09:10 -0700 (PDT)
Received: by wicgb1 with SMTP id gb1so51972124wic.1 for <perc@ietf.org>; Mon, 12 Oct 2015 07:09:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:thread-index :content-language; bh=BOXYbUcAWCuq7VGa+p6X7fOQsiNmkVkdAcCytKZ1VnI=; b=0rQQRruFl5jdD4h2GHGh4Usj0m2EXqboNQ72rd0UL/DGy8NgCHj8Qhcft5ZMi0EzGi Dx/P/eRMPgiQlA3FtbiRv1tMnWDeePgpyjOJfc9Z7VupjTttjyDV6ZQzl/5BkZmKAQUl RlDFhiiyaajY8vtB1zmZ3mey1HHzV/tqpw5ZTYKyH+8PW9CqS4x8wks9uVqjE5159Oza iCtq7cVWcySi4BQwvFN/cx+45PD9JTkWAJ/yAHn2UGPXejsGzUSjgqNnp0kalg8cNviE 8KXjkhI6/TEHZKYzn4pGcl+fcCiW3D6l0u/qugWVXEKYk3IcrzE4sxj1pS03GnXKxcnp 8yww==
X-Received: by 10.180.105.234 with SMTP id gp10mr13556623wib.51.1444658948946; Mon, 12 Oct 2015 07:09:08 -0700 (PDT)
Received: from RoniPC (bzq-109-65-15-14.red.bezeqint.net. [109.65.15.14]) by smtp.gmail.com with ESMTPSA id bf8sm20078198wjc.22.2015.10.12.07.09.06 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Oct 2015 07:09:07 -0700 (PDT)
From: Roni Even <ron.even.tlv@gmail.com>
To: 'Cullen Jennings' <fluffy@iii.ca>, 'Magnus Westerlund' <magnus.westerlund@ericsson.com>
References: <52E4A8FC978E0241AE652516E24CAF00DADF30@ESESSMB309.ericsson.se> <D9F8A59D-94F4-46C0-A96D-F1F292C681C7@iii.ca>
In-Reply-To: <D9F8A59D-94F4-46C0-A96D-F1F292C681C7@iii.ca>
Date: Mon, 12 Oct 2015 17:09:05 +0300
Message-ID: <031e01d104f7$8eb5fe20$ac21fa60$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQHqP37iO9Fj1UVhlHDD6Ayu6ezwawD7Q9vani2VbyA=
Content-Language: he
Archived-At: <http://mailarchive.ietf.org/arch/msg/perc/QVLnwJuTGh5c5dc9CLLR6GJpJVg>
Cc: perc@ietf.org, 'Mats Näslund' <mats.naslund@ericsson.com>, 'John Mattsson' <john.mattsson@ericsson.com>
Subject: Re: [Perc] Review of needed information for inner security
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.15
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: Mon, 12 Oct 2015 14:09:17 -0000

Hi,
Quick question about finding the original SSRC in the CSRC, what will happen
if going through cascaded media switching mixers? 

Roni

-----Original Message-----
From: Perc [mailto:perc-bounces@ietf.org] On Behalf Of Cullen Jennings
Sent: Monday, October 12, 2015 4:29 PM
To: Magnus Westerlund
Cc: perc@ietf.org; Mats Näslund; John Mattsson
Subject: Re: [Perc] Review of needed information for inner security


> On Oct 8, 2015, at 5:18 AM, Magnus Westerlund
<magnus.westerlund@ericsson.com> wrote:
> 
> Hi,
>  
> John, Mats and I have spent some time reviewing what information we 
> see as needed for the RTP payload security, hence called inner 
> security. We also in the end have a proposal for how to include that
information.
>  
> So we have considered the three topologies that are relevant for PERC.
> These three as named in
>
https://datatracker.ietf.org/doc/draft-ietf-avtcore-rtp-topologies-update/:
>  
> 1. Relay - Transport Translator (Section 3.5.1) 2. Media Switching 
> Mixer (Section 3.6.2) 3. Selective Forwarding Middlebox (Section 3.7)
>  
> First we look how the SSRCs are handled by these middleboxes. This is 
> important as it affects how one can track the media streams flowing 
> through the system.
>  
> So the Relay (1) performs no manipulation on the RTP level. Thus, a 
> packet being sent will arrive at the receiver except for transport 
> losses. This results in constant SSRCs end to end between sender and 
> receiver.
>  
>  
> The Media Switching Mixer (2) has some important properties. As the 
> SSRCs used towards the receiver from the RTP mixer (MDD) is task/role 
> based, rather than related to original source, the inner security 
> context identification can't be made based on the SSRC, rather an 
> additional field has to be used. It is important to note that the 
> sequence of payloads for this stream is created by switching between 
> the available incoming streams. At any given point in time one 
> specific stream of inner payloads are forwarded for each task/role. 
> Which it is can be changed at almost any point. The CSRC would be the 
> normal method for identifying the original media contributor in a non 
> PERC context. In a PERC context it seems reasonable to also use CSRC. 
> Especially, as there can't be any media mixing due to the protected 
> inner payloads, there can only be one CSRC for any payload. So in this 
> case the SSRC has no relation to the media sources, and instead it is 
> CSRC (or equivalent) that would have a relation with the media source.
>  
> The SFM (3) although selectively forwarding media, it does have a one 
> to one handling of SSRCs, one SSRC arriving at a SFM will have its own 
> SSRC going out. Note that remapping may occur so that incoming and 
> outgoing SSRC is different.
>  
> The remapping of SSRC could occur also in the switching RTP mixer, 
> although it is not a recommended behaviour.
>  
> What was discussed last design team meeting was the view that we want 
> to enable the remapping of SSRC when needed. It is a simple way of 
> dealing with SSRC collisions in SFMs for example. However, one need to 
> be aware of the potential downside. First, by allowing re-mapping we 
> don't have a global stable identifier towards the originating 
> end-point and its identification of the media stream. This is 
> something that at least on a higher layer is needed to prevent 
> substitution attacks, where the MDD attempts to replace one endpoint's 
> media streams with another endpoints stream.
>  
> We also note that if end-to-end protected RTCP messages are used, not 
> having a global coordinated SSRC space within a conference, there will 
> be identification issues, and likely some other id space would be needed.
>  
> The next RTP header field that we considered was the RTP sequence 
> number. At the sender side, the RTP sequence number will be directly 
> related to the inner payload. However, that relation is not retained 
> across an MDD. An RTP switching mixer, will create an RTP sequence 
> number solely related to the out going created stream. As that is a 
> switched combined stream the corresponding inner sequence number will 
> jump back and forth at each switch, and the relative offset will 
> change with each switch.
>  
> For the SFM the outer RTP sequence number for an outgoing stream will 
> be counting the inner payloads selected to be sent (forwarded). Thus, 
> the offset changes at each time a decision to forward or not forward is
made.
>  
> The Payload Type field is dependent on the signalling, and likely have 
> local assignment only. Each joining endpoint will negotiate common 
> sets of payload types with the signaling server representing the
conference.
> However, the signalling server when using offer/answer not force an 
> endpoint to use a particular PT field value to represent a commonly 
> used codec configuration. Thus, PT rewriting will occur at the MDDs, 
> independently of the topology.
>  
> The RTP marker bit is actually a field owned by the payload format, 
> and thus are tightly connected to the inner payload. We see that this 
> field is not possible to modify by the MDD, instead it should be 
> included part of the payload's integrity protected data.
>  
> The padding flag is tightly connected to the inner payload and should 
> not be modified by the MDD, instead it should be included part of the 
> payload's integrity protected data.
>  
> The Timestamp field also relates to the presentation timeline for the 
> outgoing stream. Here there is a difference between the SFM, which 
> maintains the original senders timeline, and the RTP switching mixer 
> that needs to create its outgoing streams timeline in a consistent way.
> This requires rewriting the timestamp, but maintain the inter spacing 
> between media frames within the inner payload.

I agree with above and let me summarize as requirements are the MDD can
optionally modify

SSRC, Seq_no, PT, timestamp, CC, CSRC

But can not modify: (M) Marker, (P) Padding. 

I'm never clear on the many different meanings the M bit has been used for
so bit harder for me to decide but we can figure that out and ditto for
padding but what you are proposing sounds like it would work for me. 

We should probably make sure we know what we want for V, X,

I would propose V is that as a future extensibility we might allow V to
modified by MDD but I don't really care. 

I think the X bit we need to be modified by MDD so that it can insert things
like mixer to client levels. 


>  
>  
> Proposal for how to structure information
> -----------------------------------------
> Our proposal for how the above information should be handled and 
> maintained are the following.
>  
> The inner payload's crypto context is looked up based on the CSRC if 
> that field is present (for RTP switching mixers), else the SSRC.

I view this as for the E3E, we need to be able to find all the bits that are
used in normal E2E crypto from some new place in the packet. I'm fine with
finding the original SSRC in CSRC. 

>  
> The inner crypto context includes the necessary key (called transport 
> key below) and other crypto information. To prevent attacks we also 
> need a identifier for this particular inner media stream. For this we 
> want to have two parts, one part identifying the endpoint, and another 
> identifying the media stream.
> The endpoint identifier can either be globally unique and assigned by 
> the master key server, thus enabling a compact field scaled to planned 
> maximum participation in a conference. Alternatively if significant 
> longer randomly picked. An endpoint id assigned by the master key 
> server seems preferable as that enables mapping between the endpoint 
> id and other identifiers meant for humans. The stream id is managed by 
> the endpoint. We foresee that these two IDs are carried by EKT to
establish this context.
> The field lengths can be configurable and the used values provided in 
> the key-management protocol for the EKT master key. Thus enabling that 
> most conference to use 1 + 1 byte enabling 256 endpoints which each 
> can have 256 streams. Sufficient for most use cases, and for those use 
> cases that requires more participants or streams one can use longer 
> fields within the conference.
>  
> The Inner Payload gets an explicit sequence number. We propose 32 bits 
> that counts the number of sent packets using a specific transport key 
> used to protect this inner payload. It is part of the inner payload to 
> keep these close, and minimize the overhead. Using an RTP header 
> extension will in many case have more overhead.
>  
> We foresee that PERC systems will perform transport re-keying quite 
> frequently, that is why 32-bits will be sufficient, and if that is on 
> its way to wrap, the sending end-point will have to rekey its 
> transport key for this media stream. We note that 32-bits are 
> sufficient also for really high bit-rates. At 3 Gbps using 1200 bytes 
> of payload one need to rekey approximately every 3 hours. Using 24 
> bits would result in rekeying every 53 seconds for this case.
>  
> To ensure that replay protection is present, and to prevent MDD 
> reordering of packets, one will need to have a sequence number also 
> for the used transport key. That way when one starts using a new 
> transport key, one can reset the inner payload sequence number, thus 
> enabling long lived sessions.
>  
> For the cases where one wants to prevent joining and leaving 
> participant to decrypt media prior or after joining and leaving 
> respectively then we forsee the need for master key rekeying. Also 
> that needs to be tracked, to prevent replay attacks. Thus also on this 
> level one needs to have a associated sequence number with the master 
> key. When one starts using a new master transport key, the transport 
> key sequence number is reset.
>  
> The inner payload identification will thus basically be 
> "Master_Key_seq_nr : Transport_Key_Seq_nr : Inner_Payload_Seq_nr". The 
> first two will determined through the key management protocol and EKT.
> Enabling the receiver to determine if a payload is less recent then 
> the latest received one. This enables one to have a short window for 
> accepting older packets to deal with re-order events thus preventing 
> replays. We note that the MDD will be able to delay packets. Thus when 
> switching back to a source select any point between the previous sent 
> and the latest received by the MDD, as the point of continuing 
> transmission. We likely need to discuss if that is a sufficient level 
> of protection. We need to deal with expected levels of transport delay.
>  
>  
> To summarize our proposal:
>  
> As part of the inner RTP payload for a particular media stream:
> - Explicit 32-bit sequence number
> - Use CSRC/SSRC for context lookup on packet reception.
>  
> Use EKT for context population per media stream of the following
> information:
> -   Endpoint ID + Endpoint specific stream ID
> -   Transport key used to protect payload
> -   Transport key sequence number
>  
> Stream specific context also contain:
> Highest seen inner payload identifier "Master Sequence nr : Transport 
> Sequence nr. : Packet Sequence nr" and replay window.
>  
> Key-management for EKT master key
> - EKT Master key
> - Master Key sequence number
> - Field lengths for Endpoint Id and Endpoint Stream ID
> - Endpoint ID
>  
> IV includes:
> - Endpoint ID + Endpoint specific stream ID
> - Master_Key_seq_nr : Transport_Key_Seq_nr : Inner_Payload_Seq_nr e2e 
> integrity protected information
> - padding flag
> - marker bit
> - payload + padding + pad count (also encrypted)
> - IV (only Inner_Payload_Seq_nr sent in each packet)
>  
>  
> Looking forward to feedback on this.

This is inventing a new security scheme for the HBH. My questions is first
can we just use SRTP for HBH? Any reason it would not work?  It seems to me
that it will work and if it does, then I get a bit antsy about it inventing
something new will have any significant advantages. 





_______________________________________________
Perc mailing list
Perc@ietf.org
https://www.ietf.org/mailman/listinfo/perc