Re: [rtcweb] Retransmit: Summary of Alternatives for media keying

Matthew Kaufman <matthew.kaufman@skype.net> Thu, 28 July 2011 11:52 UTC

Return-Path: <matthew.kaufman@skype.net>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CE8F221F88DD for <rtcweb@ietfa.amsl.com>; Thu, 28 Jul 2011 04:52:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.47
X-Spam-Level:
X-Spam-Status: No, score=-2.47 tagged_above=-999 required=5 tests=[AWL=0.129, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ws0E-tfv-rAw for <rtcweb@ietfa.amsl.com>; Thu, 28 Jul 2011 04:52:56 -0700 (PDT)
Received: from mx.skype.net (mx.skype.net [78.141.177.88]) by ietfa.amsl.com (Postfix) with ESMTP id AE91421F869C for <rtcweb@ietf.org>; Thu, 28 Jul 2011 04:52:55 -0700 (PDT)
Received: from mx.skype.net (localhost [127.0.0.1]) by mx.skype.net (Postfix) with ESMTP id 3143316F0; Thu, 28 Jul 2011 13:52:54 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=skype.net; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=mx; bh=HD Q5I49TEd1lHLg0j+fDaCGqfl8=; b=HJlTKqcGTDdnzh6fNsqtQILMsa1IRa1Lit ilesK4ja44yRjsig0/ltZdFb1daBWEW/5hpGvxBcNycQ8BhyQG1CcsXKwXa/zlRM 9Yos5KeaC7rB+wgZ6H85n9IPE8TxbjMCk4tF9J+da9j6Znp4bmdsXCuLqoUlYv6v 6xbFwm8QA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=skype.net; h=subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; q=dns; s=mx; b=LIwIqOPNv86a+YmOTS+fwu A1k7WE/Yy8apJOjkjg/1AdnXVtVWKX4W9s7aqysfKPnE79zD3pVmbnwl/yBI6LFc bP+pSX/XQ07tFiYZWLMt+KgkF5dW7dhebhulG53D4Ir/rJAcdCqplAJCnhFPESms 19f7MbqV1db2e2LgrRwR0=
Received: from zimbra.skype.net (zimbra.skype.net [78.141.177.82]) by mx.skype.net (Postfix) with ESMTP id 2FD1B7F8; Thu, 28 Jul 2011 13:52:54 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by zimbra.skype.net (Postfix) with ESMTP id 12C323508071; Thu, 28 Jul 2011 13:52:54 +0200 (CEST)
X-Virus-Scanned: amavisd-new at lu2-zimbra.skype.net
Received: from zimbra.skype.net ([127.0.0.1]) by localhost (zimbra.skype.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UE7J7QGZqWx7; Thu, 28 Jul 2011 13:52:53 +0200 (CEST)
Received: from dhcp-4649.meeting.ietf.org (dhcp-4649.meeting.ietf.org [130.129.70.73]) by zimbra.skype.net (Postfix) with ESMTPSA id 97D40350805C; Thu, 28 Jul 2011 13:52:52 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset="us-ascii"
From: Matthew Kaufman <matthew.kaufman@skype.net>
In-Reply-To: <12BF9E55-662F-4762-9E47-2BBD3FA5FD93@acmepacket.com>
Date: Thu, 28 Jul 2011 07:52:50 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <CEA7B87B-9910-4977-AD20-EA2B4CB4BA0E@skype.net>
References: <12BF9E55-662F-4762-9E47-2BBD3FA5FD93@acmepacket.com>
To: Hadriel Kaplan <HKaplan@acmepacket.com>
X-Mailer: Apple Mail (2.1082)
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Retransmit: Summary of Alternatives for media keying
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Jul 2011 11:52:56 -0000

On Jul 28, 2011, at 2:17 AM, Hadriel Kaplan wrote:

> 
> Well gee that doesn't sound like too hard a choice set to choose from, though I guess it depends on whether there's a requirement/desire to interop with existing VoIP devices and the PSTN, or not.

There is a requirement to interop with existing VoIP devices and the PSTN, however other requirements (like ICE for consent to send media) will impose additional requirements that limit which existing VoIP devices are or can be made compatible.

> 
> If we don't expect/desire RTCWEB clients to communicate with existing VoIP devices or PSTN, then sure we can start with a clean slate.

There is a desire for the media to be transported in RTP for a variety of reasons, including the ability to easily terminate the traffic in PSTN gateways, reuse of existing RTP stacks for building both browsers and interoperable devices, and middlebox awareness of what the traffic might be.

>  In fact, you could also create a whole new version of SIP for inter-server, since there's no need to use SIP v2.0 between RTCWEB domains and we've learned things we could have done better, and for a pure inter-domain server-to-server signaling protocol it could be a lot simpler. 
> 

You could. In fact, for inter-domain federation you are probably free to use whatever you and the other domain agree to use.

However, again for software reuse reasons, you're likely to pick SIP.

> But anyway... with regards to your alternatives below, you seem to imply that using DTLS-SRTP is by itself "secure", such that the UI could display a lock-icon for example.  I was under the impression that DTLS-SRTP provided no guarantee of anything without the humans on both ends verifying they're using the same keying material/SAS/etc.  Is that not the case? (okay yes it requires being a MitM to subvert, but that's not a high enough bar to claim anything)

Plain RTP - can be intercepted by both MitM attackers and passive observers. No perfect forward secrecy (in fact, no secrecy at all). 

SRTP w/SDES-style keying - both MitM attackers and passive observers can record the traffic but not play it out until they obtain key. The key is provided by the server and is likely recorded in server logs. Protection of the key on the wire requires HTTPS or similar signaling. Impossible to provide perfect forward secrecy.

DTLS-SRTP (or any other end-to-end keying) - assuming the use of DH key agreement, both MitM attackers and passive observers can record the traffic, however ONLY MitM attackers are able to participate in the key agreement algorithm, and so ONLY MitM attackers would ever be able to play out the contents. The key agreement occurs between the two endpoints (assuming no MitM attacker, of course) and is not recorded anywhere else and is not available to the signaling server. Provides perfect forward secrecy. MitM attacks be avoided if you trust the signaling service and exchange fingerprints between the two ends for authentication OR if you use a user interface that lets you examine the fingerprints and verify them out-of-band OR if you use additional software that you trust (along with a 3rd party that you trust) to examine the fingerprints automatically and alert you in the case of mismatch.

All of these statements of course only apply between you and whatever is terminating the session. If it is a gateway to another protocol, the security provided stops at that point and is only continued if the far end of the gateway is also secure *and* you trust both that security and the gateway.



> 
> Assuming that's true, and given how few humans would actually know to perform manual verification of dtls-srtp, I think this topic isn't as cut-and-dried as choosing between "secure" vs. "insecure".  Both alternatives are capable of being secure or insecure, and it's up to the human to do something to figure it out in either case.  There is no real alternative which is inherently "secure", afaict.

There are gradations of security that are provided by default, depending on the choices made.

If the browser is able to send plain RTP at all, then you need a way for the user to tell if it is sending plain RTP or encrypted RTP. If it can only send encrypted RTP, then this requirement goes away. For some threat models (for instance passive observers watching your unencrypted wifi traffic), any encryption at all is better than plain RTP. For others (passive observers that can record the traffic and also have future access to the server logs), encryption + end-to-end keying is far superior to any of the other choices.

But, like all security arguments, you are correct. It is never black and white, so you can never say "this is secure". But you can certainly say "this ISN'T secure" for some of them (like plain RTP, or even the ability for the browser to switch you from SRTP to RTP without making it clear to the user).

Think of the threat models you are likely to experience yourself... then tell me which level of protection YOU want.

Matthew Kaufman