Subject: [Perc] Being explicit about E2E extensions

From: Richard Barnes <[email-masked]>
Date: Mon, 12 Jun 2017 16:01:45 -0400

Hey all,

I've just posted a PR for -double that proposes that rather than relying on
the position of the OHB in the extensions block to signal which extensions
are E2E and which aren't , we have an explicit "E2E Extensions Length"
extension that says how long the E2E extensions are.

https://github.com/ietf/perc-wg/pull/117

Being explicit in this way is necessary if we're going to allow -double to
be implemented internally to SRTP libraries.  Those libraries typically
don't know which extensions have which IDs (they've never had a reason to),
so if the OHB is in an unpredictable place, then the SRTP library can't
find it.  Instead, we need to put the OHB in a predictable place -- as the
first extension if there are no E2E extensions, or after the E2E (with a
signaled length) if there are.

-----

As an aside, the way I came across this issue was that I was implementing
-double in libsrtp:

https://github.com/cisco/libsrtp/pull/311

The interesting stuff is all in the AAD handling, which is where you run
into the difference between inner and outer, locating the OHB, etc.:

https://github.com/cisco/libsrtp/pull/311/files#diff-da888ab5c58ee201661c2dcca58a0022R404

That code hasn't landed in libsrtp yet (since the spec isn't stable yet),
but this should provide a good foundation for proving out ideas in -double.

It also provides a nice way to get PERC deployed in browsers quickly.
Since both Chrome and Firefox depend on libsrtp, once we have -double in
libsrtp, the browsers only things the browser need to do are (1) update
libsrtp, and (2) advertise support for -double and OHB.

Cheers,
--Richard