Re: [AVTCORE] Second WGLC on draft-ietf-avtcore-srtp-encrypted-header-ext

"David McGrew (mcgrew)" <mcgrew@cisco.com> Fri, 14 September 2012 17:01 UTC

Return-Path: <mcgrew@cisco.com>
X-Original-To: avt@ietfa.amsl.com
Delivered-To: avt@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DCEA321F8528 for <avt@ietfa.amsl.com>; Fri, 14 Sep 2012 10:01:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.598
X-Spam-Level:
X-Spam-Status: No, score=-110.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
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 yqDTbWHArFSU for <avt@ietfa.amsl.com>; Fri, 14 Sep 2012 10:01:46 -0700 (PDT)
Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by ietfa.amsl.com (Postfix) with ESMTP id B66F021F851C for <avt@ietf.org>; Fri, 14 Sep 2012 10:01:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=14018; q=dns/txt; s=iport; t=1347642105; x=1348851705; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=bAkg3ug2jnqDpG6YnCIp2zponlsPziAc1wAymsH7HNQ=; b=D2H34KiLVnLaLXN0/PO4k545CJXc9HW1axx6mKbw1PVQgkN5wamnQ/OW z8pBWxx8bLeEcunIUaxw9d5a3EjgbgQLz1H1LXehIGw/jd5F8gF2nvpWV +lb+ynYlFLngQjdTNHEY63qtdfi2rtemU4CdrRaXVL3UIa868Kt20fU4F A=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EAHdiU1CtJXG//2dsb2JhbABFgku5M4EHgiABAgQSAWYSAQgRAwECKCgRFAkIAgQOBSKHXAMMm0+WPA2JU4oyY4ZoA5QMgVWLF4MhgWmCZoFcIxg
X-IronPort-AV: E=Sophos; i="4.80,423,1344211200"; d="scan'208,217"; a="118697393"
Received: from rcdn-core2-4.cisco.com ([173.37.113.191]) by rcdn-iport-9.cisco.com with ESMTP; 14 Sep 2012 17:01:45 +0000
Received: from xhc-aln-x14.cisco.com (xhc-aln-x14.cisco.com [173.36.12.88]) by rcdn-core2-4.cisco.com (8.14.5/8.14.5) with ESMTP id q8EH1i1F003407 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 14 Sep 2012 17:01:44 GMT
Received: from xmb-rcd-x04.cisco.com ([169.254.8.159]) by xhc-aln-x14.cisco.com ([173.36.12.88]) with mapi id 14.02.0318.001; Fri, 14 Sep 2012 12:01:44 -0500
From: "David McGrew (mcgrew)" <mcgrew@cisco.com>
To: Jonathan Lennox <jonathan@vidyo.com>
Thread-Topic: [AVTCORE] Second WGLC on draft-ietf-avtcore-srtp-encrypted-header-ext
Thread-Index: AQHNkN9FPSdFfPNgyEirfdRzihGPdZeKYKqA///DlAA=
Date: Fri, 14 Sep 2012 17:01:43 +0000
Message-ID: <CC78D7BB.F5BF7%mcgrew@cisco.com>
In-Reply-To: <A50628D7-95F9-461E-A112-122EEC5EF7F0@vidyo.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.2.1.120420
x-originating-ip: [10.117.10.227]
x-tm-as-product-ver: SMEX-10.2.0.1135-7.000.1014-19182.004
x-tm-as-result: No--59.245600-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: multipart/alternative; boundary="_000_CC78D7BBF5BF7mcgrewciscocom_"
MIME-Version: 1.0
Cc: "avt@ietf.org" <avt@ietf.org>
Subject: Re: [AVTCORE] Second WGLC on draft-ietf-avtcore-srtp-encrypted-header-ext
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Audio/Video Transport Core Maintenance <avt.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/avt>, <mailto:avt-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/avt>
List-Post: <mailto:avt@ietf.org>
List-Help: <mailto:avt-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Sep 2012 17:01:47 -0000

Hi Jonathan,

From: Jonathan Lennox <jonathan@vidyo.com<mailto:jonathan@vidyo.com>>
Date: Friday, September 14, 2012 12:37 PM
To: Cisco Employee <mcgrew@cisco.com<mailto:mcgrew@cisco.com>>
Cc: Ron Even <ron.even.tlv@gmail.com<mailto:ron.even.tlv@gmail.com>>, "avt@ietf.org<mailto:avt@ietf.org>" <avt@ietf.org<mailto:avt@ietf.org>>
Subject: Re: [AVTCORE] Second WGLC on draft-ietf-avtcore-srtp-encrypted-header-ext

Hi, David -- thanks for your comments!

On Sep 12, 2012, at 8:08 AM, David McGrew (mcgrew) wrote:

I've read the new version.   I think this is a good idea, and the draft is well written.   I have only a few specific suggestions.   Most importantly, it is not clear (to me, anyway) how the mask is generated.   It will be essential for interoperability that all of the participants in the session use identical values for the mask, but the draft doesn't describe how a receiver would know the mask value that the sender has selected.  I had expected that the mask value would be sent as a part of "urn:ietf:params:rtp-hdrext:encrypt", or something like that.  I think this point needs to be clarified in the draft.

Since the header extension elements' header bytes are sent in the clear, the mask can be calculated for each packet.  You know from the SDP which header extension IDs correspond to encrypted elements.  When you parse a header extension, you see the ID and length for each header extension element, and calculate the mask accordingly.

That makes sense.   I went back for a second look at the draft, and I realized that this was my stumbling block: I did not keep in mind the fact that "The encryption mask corresponds to the entire payload of each header extension element that is encrypted."   I was (incorrectly) thinking that a mask might cover only part of a payload for a particular header extension.


The mask can differ on a packet-by-packet basis, since different header extension elements (either encrypted or plaintext) can be sent in different packets.

I can clarify this in the text, if you think it would be helpful.

That might be useful (though I am the only person that got confused on this point :-)


The header encryption operation is described in a way that would change the CTR (or f8) encryption operation ("The SRTP participant bitwise-ANDs the encryption mask with the keystream to produce a masked keystream").   However, what I hope/expect that implementations will do is implement header encryption in a way that does not change any of the crypto functions.    The header encryption can be described in terms of manipulations of the plaintext and ciphertext, like this:

    EncryptedHeader = (Encrypt(Key, Plaintext)  AND MASK)  OR (Plaintext AND (NOT MASK))

Many implementations would prefer this approach, because it enables them to use their encryption functions in a way that is unchanged.   For instance, the crypto function might be implemented in a separate software library, or provided by a hardware function; the encryption function might be part of a validated crypto module, and thus there would be strong motivation not to alter it (and undo the validation).    The current text in the draft is clear, so I don't recommend changing it.   But I suggest providing an alternative description of the algorithm in a separate paragraph that follows the current description.

That's a good idea.  I think an earlier version of the draft may have presented it in the alternate way you suggest; but I agree, giving both descriptions, and making it clear that they're equivalent, would probably be helpful.


The security of the mask-based mechanism is sound, when used with the existing SRTP crypto transforms, as described in Section 3.   However, if the mechanism is applied to other encryption methods, like ECB or CBC, then it would not be a sound approach.   The alternative way of describing the encryption scheme in terms of plaintext manipulations might make it look like the scheme could be applied to ECB or CBC.   So I suggest putting a statement in the security considerations saying "This technique can only be applied to encryption transforms that work by generating a pseudorandom keystream and bitwise exclusive-oring it with the plaintext, such as CTR or f8; it MUST NOT be used with ECB, CBC, or any other encryption method that does not use a keystream, or a loss of security will entail."

I agree, good idea.

Sounds good.   Let's make this an RFC.

David


Thanks!

--
Jonathan Lennox
jonathan@vidyo.com<mailto:jonathan@vidyo.com>