Draft: draft-ietf-perc-private-media-framework

Commentary:  provided a number of review comments . I tried to address all of them , but I still have these outstanding and would like input . I a few words , but we can not say “ forwards the active stream without modification ” since what gets forwarded is not specified ( i.e. , the box decides which of any number of streams to forward per its logic ) and since the RTP packets are certainly subject to modification . ( The media content itself can not be altered , but the RTP packet is . ) How can we better satisfy this comment ? considered trusted , the call processing function MUST ensure the integrity of received messages before forwarding to other entities . ” It ’s not more or less important , and irrelevant to PERC , per se . I can not think of why this sentence was . Should we remove this paragraph ? What is this ? Note that there was another suggestion to move some non - normative test that talks about key retention into the main body . I did that . But , I 'm not sure what the disagreement is here . ability to change certain RTP header values . ” That ’s not really a true statement . It ’s the lack of  authentication that enables that . It seems like the real point is that , since we ca n’t use E2E authentication , HBH authentication is better than nothing . Actually , we have E2E auth , too . Perhaps this is n’t clearly stated ? There is a section titled “ End - to - End and  - by - Hop Authenticated Encryption ” that intended to make that clear . hop , ... ” : Is that optional ? I would say “ yes ” since most endpoints today do not encrypt header extensions ( in spite of the fact there are procedures defined for it . ) And , that language is compatible with the Double draft . This would require some agreement between hops , but I assume that is outside the scope of this document ( as it ’s a call signaling matter ) . Any change needed here ? generated E2E key for transmission or MAY generate a fresh E2E key . ” : They have to do one or the other , right ? That wording allows then to do neither . I changed this text quite a bit and an editor ’s note . Would like opinions . A SIP proxy could certainly be untrusted . It ’s just important that the endpoint can verify the signature of messages received . I ’m not sure what else we need to say here . I think it is important to understand that a malicious MD could crash an endpoint if precautions are not taken . But , the point about merely discarding packets is entirely correct . That ’s the simplest method . I made a few changes in this section . I ’m not sure what we should do with this one . Previously , much of the material in the appendix was in the main body . A decision was made by others to move it and the verbosity of the main text was reduced in the process . I 'm not sure what we would want to move , though the key table might be a target . It was there once and folks wanted it moved to an appendix . And it has since changed . The format shown in Double is largely sufficient , but missing the EKT Tag . So , I stole that and an EKT Tag . What do you think ? 
 , last paragraph : I believe we can just remove that paragraph . I memory is sketchy at this point , but I think we had a requirement for hybrid cloud - private deployments of call control in the original proposal that has since lost its need for inclusion . 
 Regarding the appendices . Yes , I agree with  that Apendix A should be in the body of the draft , which should come as no surprise since that where we originally had all of that . However ,   , the PERC packet should continue as an appendix , IMHO .
Paragraph (version A):
Switched conferencing is an increasingly popular model for multimedia
conferences with multiple participants using a combination of audio,
video, text, and other media types.  With this model, real-time media
flows from conference participants are not mixed, transcoded,
transrated, recomposed, or otherwise manipulated by a Media
Distributor, as might be the case with a traditional media server or
multipoint control unit (MCU).  Instead, media flows transmitted by
conference participants are simply forwarded by the Media Distributor
to each of the other participants, often forwarding only a subset of
flows based on voice activity detection or other criteria.  In some
instances, the Media Distributors may make limited modifications to
RTP RFC3550 headers, for example, but the actual media content (e.g.,
voice or video data) is unaltered.
Paragraph (version A):
An advantage of switched conferencing is that Media Distributors can
be more easily deployed on general-purpose computing hardware,
including virtualized environments in private and public clouds.
Deploying conference resources in a public cloud environment might
introduce a higher security risk.  Whereas traditional conference
resources were usually deployed in private networks that were
protected, cloud-based conference resources might be viewed as less
secure since they are not always physically controlled by those who
use them.  Additionally, there are usually several ports open to the
public in cloud deployments, such as for remote administration, and
so on.
Paragraph (version B):
Switched conferencing is an increasingly popular model for multimedia
conferences with multiple participants using a combination of audio,
video, text, and other media types.  With this model, real-time media
flows from conference participants are not mixed, transcoded,
transrated, recomposed, or otherwise manipulated by a Media
Distributor, as might be the case with a traditional media server or
multipoint control unit (MCU).  Instead, media flows transmitted by
conference participants are simply forwarded by Media Distributors to
each of the other participants.  Media Distributors often forward
only a subset of flows based on voice activity detection or other
criteria.  In some instances, Media Distributors may make limited
modifications to RTP RFC3550 headers, for example, but the actual
media content (e.g., voice or video data) is unaltered.
Paragraph (version B):
An advantage of switched conferencing is that Media Distributors can
be more easily deployed on general-purpose computing hardware,
including virtualized environments in private and public clouds.
While virutalized public cloud environments have been viewed as less
secure since resources are not always physically controlled by those
who use them and since there are usually several ports open to the
public, this draft aims to improve security so as to lower the
barrier to taking advantage of those environments.
Paragraph (version A):
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC2119 when they
appear in ALL CAPS.  These words may also appear in this document in
lower case as plain English words, absent their normative meanings.
Paragraph (version B):
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 RFC2119 RFC8174 when, and only when, they appear in all capitals,
as shown here.
Paragraph (version A):
Media Distributor (MD): An RTP middlebox that is not allowed to to
have access to E2E encryption keys.  It operates according to the
Selective Forwarding Middlebox RTP topologies RFC7667 per the
constraints defined by the PERC system, which includes, but not
limited to, having no access to RTP media unencrypted and having
limits on what RTP header field it can alter.
Paragraph (version B):
Media Distributor (MD): An RTP middlebox that forwards endpoint media
content (e.g., voice or video data) unaltered, either a subset or all
of the flows at any given time, and is never allowed have access to
E2E encryption keys.  It operates according to the Selective
Forwarding Middlebox RTP topologies RFC7667 per the constraints
defined by the PERC system, which includes, but not limited to,
having no access to RTP media unencrypted and having limits on what
RTP header field it can alter.
Paragraph (version A):
Please note that some entities classified as untrusted in the simple,
general deployment scenario used most commonly in this document might
be considered trusted in other deployments.  This document does not
preclude such scenarios, but will keep the definitions and examples
focused by only using the the simple, most general deployment
scenario.
Paragraph (version B):
Please note that some entities classified as untrusted in the simple,
general deployment scenario used most commonly in this document might
be considered trusted in other deployments.  This document does not
preclude such scenarios, but keeps the definitions and examples
focused by only using the the simple, most general deployment
scenario.
Paragraph (version A):
The architecture described in this framework document enables
conferencing infrastructure to be hosted in domains, such as in a
cloud conferencing provider's facilities, where the trustworthiness
is below the level needed to assume the privacy of participant's
media will not be compromised.  The conferencing infrastructure in
such a domain is still trusted with reliably connecting the
participants together in a conference, but not trusted with keying
material needed to decrypt any of the participant's media.  Entities
in such lower trustworthiness domains will simply be referred to as
untrusted entities from this point forward.
Paragraph (version B):
The architecture described in this framework document enables
conferencing infrastructure to be hosted in domains, such as in a
cloud conferencing provider's facilities, where the trustworthiness
is below the level needed to assume the privacy of participant's
media is not compromised.  The conferencing infrastructure in such a
domain is still trusted with reliably connecting the participants
together in a conference, but not trusted with keying material needed
to decrypt any of the participant's media.  Entities in such lower
trustworthiness domains are referred to as untrusted entities from
this point forward.
Paragraph (version A):
A Media Distributor forwards RTP flows between endpoints in the
conference while performing per-hop authentication of each RTP
packet.  The Media Distributor may need access to one or more RTP
headers or header extensions, potentially adding or modifying a
certain subset.  The Media Distributor will also relay secured
messaging between the endpoints and the Key Distributor and will
acquire per-hop key information from the Key Distributor.  The actual
media content MUST NOT not be decryptable by a Media Distributor, so
it is untrusted to have access to the E2E media encryption keys.  The
key exchange mechanisms specified in this framework will prevent the
Media Distributor from gaining access to the E2E media encryption
keys.
Paragraph (version A):
An endpoint's ability to join a conference hosted by a Media
Distributor MUST NOT alone be interpreted as being authorized to have
access to the E2E media encryption keys, as the Media Distributor
does not have the ability to determine whether an endpoint is
authorized.  Instead, the Key Distributor is responsible for
authenticating endpoints (e.g., using WebRTC Identity I-D.ietf-
rtcweb-security-arch) and determining their authorization to receive
E2E media encryption keys.
Paragraph (version A):
A Media Distributor MUST perform its role in properly forwarding
media packets while taking measures to mitigate the adverse effects
of denial of service attacks (refer to attacks), etc, to a level
equal to or better than traditional conferencing (i.e. non-PERC)
deployments.
Paragraph (version B):
A Media Distributor forwards RTP flows between endpoints in the
conference while performing per-hop authentication of each RTP
packet.  The Media Distributor may need access to one or more RTP
headers or header extensions, potentially adding or modifying a
certain subset.  The Media Distributor also relays secured messaging
between the endpoints and the Key Distributor and acquires per-hop
key information from the Key Distributor.  The actual media content
must not be decryptable by a Media Distributor, as it is untrusted to
have access to the E2E media encryption keys.  The key exchange
mechanisms specified in this framework prevents the Media Distributor
from gaining access to the E2E media encryption keys.
Paragraph (version B):
An endpoint's ability to connect to a conference serviced by a Media
Distributor does imply that the endpoint is authorized to have access
to the E2E media encryption keys, as the Media Distributor does not
have the ability to determine whether an endpoint is authorized.
Instead, the Key Distributor is responsible for authenticating the
endpoint (e.g., using WebRTC Identity I-D.ietf-rtcweb-security-arch)
and determining its authorization to receive E2E and HBH media
encryption keys.
Paragraph (version B):
A Media Distributor must perform its role in properly forwarding
media packets while taking measures to mitigate the adverse effects
of denial of service attacks (refer to attacks) to a level equal to
or better than traditional conferencing (i.e. non-PERC) deployments.
Paragraph (version A):
In any deployment scenario where the call processing function is
considered trusted, the call processing function MUST ensure the
integrity of received messages before forwarding to other entities.
Paragraph (version A):
An endpoint is considered trusted and will have access to E2E key
information.  While it is possible for an endpoint to be compromised,
subsequently performing in undesired ways, defining endpoint
resistance to compromise is outside the scope of this document.
Endpoints will take measures to mitigate the adverse effects of
denial of service attacks (refer to attacks) from other entities,
including from other endpoints, to a level equal to or better than
traditional conference (i.e., non-PERC) deployments.
Paragraph (version A):
The Key Distributor, which may be colocated with an endpoint or exist
standalone, is responsible for providing key information to endpoints
for both end-to-end and hop-by-hop security and for providing key
information to Media Distributors for the hop-by-hop security.
Paragraph (version B):
An endpoint is considered trusted and has access to E2E key
information.  While it is possible for an endpoint to be compromised,
subsequently performing in undesired ways, defining endpoint
resistance to compromise is outside the scope of this document.
Endpoints take measures to mitigate the adverse effects of denial of
service attacks (refer to attacks) from other entities, including
from other endpoints, to a level equal to or better than traditional
conference (i.e., non-PERC) deployments.
Paragraph (version B):
The Key Distributor, which may be colocated with an endpoint or exist
standalone, is responsible for providing key information to endpoints
for both end-to-end (E2E) and hop-by-hop (HBH) security and for
providing key information to Media Distributors for the hop-by-hop
security.
Paragraph (version A):
The purpose for this framework is to define a means through which
media privacy can be ensured when communicating within a conferencing
environment consisting of one or more Media Distributors that only
switch, hence not terminate, media.  It does not otherwise attempt to
hide the fact that a conference between endpoints is taking place.
Paragraph (version A):
This framework reuses several specified RTP security technologies,
including SRTP RFC3711, PERC EKT I-D.ietf-perc-srtp-ekt-diet, and
DTLS-SRTP RFC5764.
Paragraph (version A):
This solution framework focuses on the end-to-end privacy and
integrity of the participant's media by limiting access of the end-
to-end key information to trusted entities.  However, this framework
does give a Media Distributor access to RTP headers and all or most
header extensions, as well as the ability to modify a certain subset
of those headers and to add header extensions.  Packets received by a
Media Distributor or an endpoint are authenticated hop-by-hop.
Paragraph (version A):
The PERC Double transform I-D.ietf-perc-double enables endpoints to
perform encryption using both the E2E and HBH contexts while still
preserving the same overall interface as other SRTP transforms.  The
Media Distributor simply uses the corresponding normal (single) AES-
GCM transform, keyed with the appropriate HBH keys.  See keyinventory
for a description of the keys used in PERC and packetformat for an
overview of how the packet appears on the wire.
Paragraph (version A):
RTCP can only be encrypted hop-by-hop, not end-to-end.  This
framework introduces no additional step for RTCP authenticated
encryption, so the procedures needed are specified in RFC3711 and use
the same outer, hop-by-hop cryptographic context chosen in the Double
operation described above.
Paragraph (version A):
To ensure the confidentiality of E2E keys shared between endpoints,
endpoints will make use of a common Key Encryption Key (KEK) that is
known only by the trusted entities in a conference.  That KEK,
defined in the PERC EKT I-D.ietf-perc-srtp-ekt-diet as the EKT Key,
will be used to subsequently encrypt the SRTP master key used for E2E
authenticated encryption of media sent by a given endpoint.  Each
endpoint in the conference will create a random SRTP master key for
E2E authenticated encryption, thus participants in the conference
MUST keep track of the E2E keys received via the Full EKT Field for
each distinct SSRC in the conference so that it can properly decrypt
received media.  Note, too, that an endpoint may change its E2E key
at any time and advertise that new key to the conference as specified
in I-D.ietf-perc-srtp-ekt-diet.
Paragraph (version A):
Any given RTP media flow can be identified by its SSRC, and endpoints
might send more than one at a time and change the mix of media flows
transmitted during the life of a conference.
Paragraph (version A):
Thus, endpoints MUST maintain a list of SSRCs from received RTP flows
and each SSRC's associated E2E key information.  Following a change
in an E2E key, prior E2E keys SHOULD be retained by receivers for a
period long enough to ensure that late-arriving or out-of-order
packets from the endpoint can be successfully decrypted.  Receiving
endpoints MUST discard old E2E keys no later than when it leaves the
conference.
Paragraph (version A):
If there is a need to encrypt one or more RTP header extensions end-
to-end, an encryption key is derived from the end-to-end SRTP master
key to encrypt header extensions as per RFC6904.  The Media
Distributor will not be able use the information contained in those
header extensions encrypted with an E2E key.
Paragraph (version A):
To ensure the integrity of transmitted media packets, this framework
requires that every packet be authenticated hop-by-hop (HBH) between
an endpoint and a Media Distributor, as well between Media
Distributors.  The authentication key used for hop-by-hop
authentication is derived from an SRTP master key shared only on the
respective hop.  Each HBH key is distinct per hop and no two hops
ever use the same SRTP master key.
Paragraph (version A):
Using hop-by-hop authentication gives the Media Distributor the
ability to change certain RTP header values.  Which values the Media
Distributor can change in the RTP header are defined in I-D.ietf-
perc-double.  RTCP can only be encrypted HBH, giving the Media
Distributor the flexibility to forward RTCP content unchanged,
transmit compound RTCP packets or to initiate RTCP packets for
reporting statistics or conveying other information.  Performing hop-
by-hop authentication for all RTP and RTCP packets also helps provide
replay protection (see attacks).
Paragraph (version A):
If there is a need to encrypt one or more RTP header extensions hop-
by-hop, an encryption key is derived from the hop-by-hop SRTP master
key to encrypt header extensions as per RFC6904.  This will still
give the Media Distributor visibility into header extensions, such as
the one used to determine audio level RFC6464 of conference
participants.  Note that when RTP header extensions are encrypted,
all hops - in the untrusted domain at least - will need to decrypt
and re-encrypt these encrypted header extensions.
Paragraph (version B):
The purpose for this framework is to define a means through which
media privacy is ensured when communicating within a conferencing
environment consisting of one or more Media Distributors that only
switch, hence not terminate, media.  It does not otherwise attempt to
hide the fact that a conference between endpoints is taking place.
Paragraph (version B):
This framework reuses several specified RTP security technologies,
including SRTP RFC3711, EKT I-D.ietf-perc-srtp-ekt-diet, and DTLS-
SRTP RFC5764.
Paragraph (version B):
This solution framework focuses on the end-to-end privacy and
integrity of the participant's media by limiting access to only
trusted entities to the E2E key used for authenticated end-to-end
encryption.  However, this framework does give a Media Distributor
access to RTP headers and all or most header extensions, as well as
the ability to modify a certain subset of those headers and to add
header extensions.  Packets received by a Media Distributor or an
endpoint are authenticated hop-by-hop.
Paragraph (version B):
The Double transform I-D.ietf-perc-double enables endpoints to
perform encryption using both the end-to-end and hop-by-hop contexts
while still preserving the same overall interface as other SRTP
transforms.  The Media Distributor simply uses the corresponding
normal (single) AES-GCM transform, keyed with the appropriate HBH
keys.  See keyinventory for a description of the keys used in PERC
and packetformat for diagram of how encrypted RTP packets appear on
the wire.
Paragraph (version B):
RTCP is only encrypted hop-by-hop, not end-to-end.  This framework
introduces no additional step for RTCP authenticated encryption, so
the procedures needed are specified in RFC3711 and use the same
outer, hop-by-hop cryptographic context chosen in the Double
operation described above.
Paragraph (version B):
To ensure the confidentiality of E2E keys shared between endpoints,
endpoints use a common Key Encryption Key (KEK) that is known only by
the trusted entities in a conference.  That KEK, defined in the EKT
I-D.ietf-perc-srtp-ekt-diet specification as the EKT Key, is used to
subsequently encrypt the SRTP master key used for E2E authenticated
encryption of media sent by a given endpoint.  Each endpoint in the
conference creates an SRTP master key for E2E authenticated
encryption and keep track of the E2E keys received via the Full EKT
Tag for each distinct synchronization source (SSRC) in the conference
so that it can properly decrypt received media.  An endpoint may
change its E2E key at any time and advertise that new key to the
conference as specified in I-D.ietf-perc-srtp-ekt-diet.
Paragraph (version B):
Any given RTP media flow is identified by its SSRC, and an endpoint
might send more than one at a time and change the mix of media flows
transmitted during the life of a conference.
Paragraph (version B):
Thus, an endpoint MUST maintain a list of SSRCs from received RTP
flows and each SSRC's associated E2E key information.  An endpoint
MUST discard old E2E keys no later than when it leaves the conference
(see keyexchange).
Paragraph (version B):
If there is a need to encrypt one or more RTP header extensions end-
to-end, the endpoint derives an encryption key from the E2E SRTP
master key to encrypt header extensions as per RFC6904.  The Media
Distributor is unable use the information contained in those header
extensions encrypted with an E2E key.
Paragraph (version B):
To ensure the integrity of transmitted media packets, it is REQUIRED
that every packet be authenticated hop-by-hop between an endpoint and
a Media Distributor, as well between Media Distributors.  The
authentication key used for hop-by-hop authentication is derived from
an SRTP master key shared only on the respective hop.  Each HBH key
is distinct per hop and no two hops ever use the same SRTP master
key.
Paragraph (version B):
While endpoints also perform HBH authentication, the ability of the
endpoints to reconstruct the original RTP header also enables the
endpoints to authenticate RTP packets E2E.  This design yields
flexibility to the Media Distributor to change certain RTP header
values as packets are forwarded.  Which values the Media Distributor
can change in the RTP header are defined in I-D.ietf-perc-double.
RTCP can only be encrypted hop-by-hop, giving the Media Distributor
the flexibility to forward RTCP content unchanged, transmit compound
RTCP packets or to initiate RTCP packets for reporting statistics or
conveying other information.  Performing hop-by-hop authentication
for all RTP and RTCP packets also helps provide replay protection
(see attacks).
Paragraph (version B):
If there is a need to encrypt one or more RTP header extensions hop-
by-hop, the endpoint derives an encryption key from the HBH SRTP
master key to encrypt header extensions as per RFC6904.  This still
gives the Media Distributor visibility into header extensions, such
as the one used to determine audio level RFC6464 of conference
participants.  Note that when RTP header extensions are encrypted,
all hops need to decrypt and re-encrypt these encrypted header
extensions.
Paragraph (version A):
The Media Distributor maintains a tunnel with the Key Distrubutor
(e.g., using I-D.ietf-perc-dtls-tunnel), making it possible for the
Media Distributor to facilitate the establishment of a secure DTLS
association between each endpoint and the Key Distributor as shown
the following figure.  The DTLS association between endpoints and the
Key Distributor will enable each endpoint to generate E2E and HBH
keys and receive the Key Encryption Key (KEK) (i.e., EKT Key).  At
the same time, the Key Distributor can securely provide the HBH key
information to the Media Distributor.  The key information summarized
here may include the SRTP master key, SRTP master salt, and the
negotiated cryptographic transform.
Paragraph (version A):
Endpoints will establish a DTLS-SRTP RFC5764 association over the RTP
session's media ports for the purposes of key information exchange
with the Key Distributor.  The Media Distributor will not terminate
the DTLS signaling, but will instead forward DTLS packets received
from an endpoint on to the Key Distributor (and vice versa) via a
tunnel established between Media Distributor and the Key Distributor.
This tunnel is used to encapsulate the DTLS-SRTP signaling between
the Key Distributor and endpoints will also be used to convey HBH key
information from the Key Distributor to the Media Distributor, so no
additional protocol or interface is required.
Paragraph (version A):
In establishing the DTLS association between endpoints and the Key
Distributor, the endpoint MUST act as the DTLS client and the Key
Distributor MUST act as the DTLS server.  The Key Encryption Key
(KEK) (i.e., EKT Key) is conveyed by the Key Distributor over the
DTLS association to endpoints via procedures defined in PERC EKT I-
D.ietf-perc-srtp-ekt-diet via the EKTKey message.
Paragraph (version A):
Note that following DTLS-SRTP procedures for the I-D.ietf-perc-double
cipher, the endpoint will generate both E2E and HBH encryption keys
and salt values.  Endpoints MAY use the DTLS-SRTP generated E2E key
for transmission or MAY generate a fresh E2E key.  In either case,
the generated SRTP master salt for E2E encryption MUST be replaced
with the salt value provided by the Key Distributor via the EKTKey
message.  That is because every endpoint in the conference uses the
same SRTP master salt.  The endpoint only transmits the SRTP master
key (not the salt) used for E2E encryption to other endpoints in RTP/
RTCP packets per I-D.ietf-perc-srtp-ekt-diet.
Paragraph (version B):
The Media Distributor maintains a tunnel with the Key Distributor
(e.g., using I-D.ietf-perc-dtls-tunnel), making it possible for the
Media Distributor to facilitate the establishment of a secure DTLS
association between each endpoint and the Key Distributor as shown
the following figure.  The DTLS association between endpoints and the
Key Distributor enables each endpoint to generate E2E and HBH keys
and receive the Key Encryption Key (KEK) (i.e., EKT Key).  At the
same time, the Key Distributor securely provides the HBH key
information to the Media Distributor.  The key information summarized
here may include the SRTP master key, SRTP master salt, and the
negotiated cryptographic transform.
Paragraph (version B):
In addition to the secure tunnel between the Media Distributor and
the Key Distributor, there are two additional types of security
associations utilized as a part of the key exchange as discussed in
the following paragraphs.  One is a DTLS-SRTP association between an
endpoint and the Key Distributor (with packets passing through the
Media Distributor) and the other is a DTLS-SRTP association between
peer Media Distributors.
Paragraph (version B):
Endpoints establish a DTLS-SRTP RFC5764 association over the RTP
session's media ports for the purposes of key information exchange
with the Key Distributor.  The Media Distributor does not terminate
the DTLS signaling, but instead forwards DTLS packets received from
an endpoint on to the Key Distributor (and vice versa) via a tunnel
established between Media Distributor and the Key Distributor.
Paragraph (version B):
In establishing the DTLS association between endpoints and the Key
Distributor, the endpoint MUST act as the DTLS client and the Key
Distributor MUST act as the DTLS server.  The Key Encryption Key
(KEK) (i.e., EKT Key) is conveyed by the Key Distributor over the
DTLS association to endpoints via procedures defined in EKT I-D.ietf-
perc-srtp-ekt-diet via the EKTKey message.
Paragraph (version B):
The Key Distributor MUST NOT establish DTLS-SRTP associations with
endpoints without first authenticating the Media Distributor
tunneling the DTLS-SRTP packets from the endpoint.
Paragraph (version B):
Note that following DTLS-SRTP procedures for the I-D.ietf-perc-double
cipher, the endpoint generates both E2E and HBH encryption keys and
salt values.  Endpoints MUST either use the DTLS-SRTP generated E2E
key for transmission or generate a fresh E2E key.  In either case,
the generated SRTP master salt for E2E encryption MUST be replaced
with the salt value provided by the Key Distributor via the EKTKey
message.  That is because every endpoint in the conference uses the
same SRTP master salt.  The endpoint only transmits the SRTP master
key (not the salt) used for E2E encryption to other endpoints in RTP/
RTCP packets per I-D.ietf-perc-srtp-ekt-diet.
Paragraph (version A):
Following the initial key information exchange with the Key
Distributor, an endpoint will be able to encrypt media end-to-end
with an E2E key, sending that E2E key to other endpoints encrypted
with the KEK, and will be able to encrypt and authenticate RTP
packets using a HBH key.  The procedures defined do not allow the
Media Distributor to gain access to the KEK information, preventing
it from gaining access to any endpoint's E2E key and subsequently
decrypting media.
Paragraph (version B):
Following the initial key information exchange with the Key
Distributor, an endpoint is able to encrypt media end-to-end with an
E2E key, sending that E2E key to other endpoints encrypted with the
KEK, and is able to encrypt and authenticate RTP packets using a HBH
key.  The procedures defined do not allow the Media Distributor to
gain access to the KEK information, preventing it from gaining access
to any endpoint's E2E key and subsequently decrypting media.
Paragraph (version A):
When a Key Distributor decides to re-key a conference, it transmits a
specific message defined in PERC EKT I-D.ietf-perc-srtp-ekt-diet to
each of the conference participants.  The endpoint MUST create a new
SRTP master key and prepare to send that key inside a Full EKT Field
using the new EKTKey.  Since it may take some time for all of the
endpoints in conference to finish re-keying, senders MUST delay a
short period of time before sending media encrypted with the new
master key, but it MUST be prepared to make use of the information
from a new inbound EKT Key immediately.  See Section 2.2.2 of I-
D.ietf-perc-srtp-ekt-diet.
Paragraph (version A):
Endpoints MAY follow the procedures in section 5.2 of RFC5764 to re-
negotiate HBH keys as desired.  If new HBH keys are generated, the
new keys are also delivered to the Media Distributor following the
procedures defined in I-D.ietf-perc-dtls-tunnel.
Paragraph (version A):
Endpoints are at liberty to change the E2E encryption key used at any
time.  Endpoints MUST generate a new E2E encryption key whenever it
receives a new EKT Key.  After switching to a new key, the new key
will be conveyed to other endpoints in the conference in RTP/RTCP
packets per I-D.ietf-perc-srtp-ekt-diet.
Paragraph (version B):
When a Key Distributor decides to re-key a conference, it transmits a
new EKTKey message I-D.ietf-perc-srtp-ekt-diet to each of the
conference participants containing the new EKT Key.  Upon receipt of
the new EKT Key, the endpoint MUST create a new SRTP master key and
prepare to send that key inside a Full EKT Field using the new EKT
Key as per Section 4.5 of I-D.ietf-perc-srtp-ekt-diet.  In order to
allow time for all endpoints in the conference to receive the new
keys, the sender should follow the recommendations in Section 4.7 of
[I-D.ietf-perc-srtp-ekt-diet].  On receiving a new EKT Key, endpoints
MUST be prepared to decrypt EKT tags using the new key.  The EKT SPI
field is used to differentiate between tags encrypted with the old
and new keys.
Paragraph (version B):
After re-keying, an endpoint SHOULD retain prior SRTP master keys and
EKT Key for a period of time sufficient for the purpose of ensuring
it can decrypt late-arriving or out-of-order packets or packets sent
by other endpoints that used the prior keys for a period of time
after re-keying began.  An endpoint MAY retain old keys until the end
of the conference.
Paragraph (version B):
Endpoints MAY follow the procedures in section 5.2 of RFC5764 to
renegotiate HBH keys as desired.  If new HBH keys are generated, the
new keys are also delivered to the Media Distributor following the
procedures defined in I-D.ietf-perc-dtls-tunnel as one possible
method.
Paragraph (version B):
Endpoints MAY change the E2E encryption key used at any time.
Endpoints MUST generate a new E2E encryption key whenever it receives
a new EKT Key.  After switching to a new key, the new key is conveyed
to other endpoints in the conference in RTP/RTCP packets per I-
D.ietf-perc-srtp-ekt-diet.
Paragraph (version A):
It is important to this solution framework that the entities can
validate the authenticity of other entities, especially the Key
Distributor and endpoints.  The details of this are outside the scope
of specification but a few possibilities are discussed in the
following sections.  The key requirements is that endpoints can
verify they are connected to the correct Key Distributor for the
conference and the Key Distributor can verify the endpoints are the
correct endpoints for the conference.
Paragraph (version A):
WebRTC Identity assertion I-D.ietf-rtcweb-security-arch can be used
to bind the identity of the user of the endpoint to the fingerprint
of the DTLS-SRTP certificate used for the call.  This certificate is
unique for a given call and a conference.  This allows the Key
Distributor to ensure that only authorized users participate in the
conference.  Similarly the Key Distributor can create a WebRTC
Identity assertion to bind the fingerprint of the unique certificate
used by the Key Distributor for this conference so that the endpoint
can validate it is talking to the correct Key Distributor.  Such a
setup requires an Identity Provider (Idp) trusted by the endpoints
and the Key Distributor.
Paragraph (version B):
It is important to this solution framework that the entities can
validate the authenticity of other entities, especially the Key
Distributor and endpoints.  The details of this are outside the scope
of specification but a few possibilities are discussed in the
following sections.  The key requirements are that an endpoint can
verify it is connected to the correct Key Distributor for the
conference and the Key Distributor can verify the endpoint is the
correct endpoint for the conference.
Paragraph (version B):
WebRTC Identity assertion I-D.ietf-rtcweb-security-arch is used to
bind the identity of the user of the endpoint to the fingerprint of
the DTLS-SRTP certificate used for the call.  This certificate is
unique for a given call and a conference.  This allows the Key
Distributor to ensure that only authorized users participate in the
conference.  Similarly the Key Distributor can create a WebRTC
Identity assertion to bind the fingerprint of the unique certificate
used by the Key Distributor for this conference so that the endpoint
can validate it is talking to the correct Key Distributor.  Such a
setup requires an Identity Provider (Idp) trusted by the endpoints
and the Key Distributor.
Paragraph (version A):
As a concrete example, SIP RFC3261 and SDP RFC4566 can be used to
convey the fingerprint information per RFC5763.  An endpoint's SIP
User Agent would send an INVITE message containing SDP for the media
session along with the endpoint's certificate fingerprint, which can
be signed using the procedures described in RFC4474 for the benefit
of forwarding the message to other entities by the Focus RFC4353.
Other entities can now verify the fingerprints match the certificates
found in the DTLS-SRTP connections to find the identity of the far
end of the DTLS-SRTP connection and check that is the authorized
entity.
Paragraph (version B):
As a concrete example, SIP RFC3261 and SDP RFC4566 can be used to
convey the fingerprint information per RFC5763.  An endpoint's SIP
User Agent would send an INVITE message containing SDP for the media
session along with the endpoint's certificate fingerprint, which can
be signed using the procedures described in RFC8224 for the benefit
of forwarding the message to other entities by the Focus RFC4353.
Other entities can verify the fingerprints match the certificates
found in the DTLS-SRTP connections to find the identity of the far
end of the DTLS-SRTP connection and verify that is the authorized
entity.
Paragraph (version A):
The Key Distributor needs to know what endpoints are being added to a
given conference.  Thus, the Key Distributor and the Media
Distributor will need to know endpoint-to-conference mappings, which
is enabled by exchanging a conference-specific unique identifier as
defined in I-D.ietf-perc-dtls-tunnel.  How this unique identifier is
assigned is outside the scope of this document.
Paragraph (version A):
This framework, and the individual protocols defined to support it,
must take care to not increase the exposure to Denial of Service
(DoS) attacks by untrusted or third-party entities and should take
measures to mitigate, where possible, more serious DoS attacks from
on-path and off-path attackers.
Paragraph (version A):
The following section enumerates the kind of attacks that will be
considered in the development of this framework's solution.
Paragraph (version A):
On-path attacks are mitigated by HBH integrity protection and
encryption.  The integrity protection mitigates packet modification
and encryption makes selective blocking of packets harder, but not
impossible.
Paragraph (version A):
Off-path attackers may try connecting to different PERC entities and
send specifically crafted packets.  A successful attacker might be
able to get the Media Distributor to forward such packets.  If not
making use of HBH authentication on the Media Distributor, such an
attack could only be detected in the receiving endpoints where the
forged packets would finally be dropped.
Paragraph (version B):
The Key Distributor needs to know what endpoints are being added to a
given conference.  Thus, the Key Distributor and the Media
Distributor need to know endpoint-to-conference mappings, which is
enabled by exchanging a conference-specific unique identifier defined
in I-D.ietf-perc-dtls-tunnel.  How this unique identifier is assigned
is outside the scope of this document.
Paragraph (version B):
This section describes the various keys employed by PERC, how they
are derived, conveyed, and so forth.
Paragraph (version B):
This section summarizes the several different keys used in the PERC
framework, how they are generated, and what purpose they serve.
Paragraph (version B):
The keys are described in the order in which they would typically be
acquired.
Paragraph (version B):
The various keys used in PERC are shown in key-inventory-table below.
Paragraph (version B):
While the number key types is very small, it should be understood
that the actual number of distinct keys can be large as the
conference grows in size.
Paragraph (version B):
As an example, with 1,000 participants in a conference, there would
be at least 1,000 distinct SRTP master keys, all of which share the
same master salt.  Each of those keys are passed through the KDF
defined in RFC3711 to produce the actual encryption and
authentication keys.
Paragraph (version B):
Complicating key management is the fact that the KEK can change and,
when it does, the endpoints generate new SRTP master keys that are
associated with a new EKT SPI.  Endpoints have to retain old keys for
a period of time to ensure they can properly decrypt late-arriving or
out-of-order packets.
Paragraph (version B):
A more detailed explanation of each of the keys follows.
Paragraph (version B):
The first set of keys acquired are for hop-by-hop encryption and
decryption.  Per the Double I-D.ietf-perc-double procedures, the
endpoint performs DTLS-SRTP exchange with the key distributor and
receives a key that is, in fact, "double" the size that is needed.
The end-to-end part is the first half of the key, so the endpoint
discards that information when generating its own key.  The second
half of the key material is for hop-by-hop operations, so that half
of the key (corresponding to the least significant bits) is assigned
internally as the HBH key.
Paragraph (version B):
The Key Distributor informs the Media Distributor of the HBH key.
Specifically, the Key Distributor sends the least significant bits
corresponding to the half of the keying material determined through
DTLS-SRTP with the endpoint to the Media Distributor.  A salt value
is generated along with the HBH key.  The salt is also longer than
needed for hop-by-hop operations, thus only the least significant
bits of the required length (i.e., half of the generated salt
material) are sent to the Media Distributor.  One way to transmit
this key and salt information is via the tunnel protocol defined in
I-D.ietf-perc-dtls-tunnel.
Paragraph (version B):
No two endpoints have the same HBH key, thus the Media Distributor
MUST keep track each distinct HBH key (and the corresponding salt)
and use it only for the specified hop.
Paragraph (version B):
The HBH key is also used for hop-by-hop encryption of RTCP.  RTCP is
not end-to-end encrypted in PERC.
Paragraph (version B):
Via the aforementioned DTLS-SRTP association, the Key Distributor
sends the endpoint the KEK (i.e., EKT Key per I-D.ietf-perc-srtp-ekt-
diet).  This key is known only to the Key Distributor and endpoints.
This key is the most important to protect since having knowledge of
this key (and the SRTP master salt transmitted as a part of the same
message) allows an entity to decrypt any media packet in the
conference.
Paragraph (version B):
Note that the Key Distributor can send any number of EKT Keys to
endpoints.  This is used to re-key the entire conference.  Each key
is identified by a "Security Parameter Index" (SPI) value.  Endpoints
MUST expect that a conference might be re-keyed when a new
participant joins a conference or when a participant leaves a
conference in order to protect the confidentiality of the
conversation before and after such events.
Paragraph (version B):
The SRTP master salt to be used by the endpoint is transmitted along
with the EKT Key.  All endpoints in the conference utilize the same
SRTP master salt that corresponds with a given EKT Key.
Paragraph (version B):
The Full EKT Tag in media packets is encrypted using a cipher
specified via the EKTKey message (e.g., AES Key Wrap with a 128-bit
key).  This cipher is different than the cipher used to protect media
and is only used to encrypt the endpoint's SRTP master key (and other
EKT Tag data as per I-D.ietf-perc-srtp-ekt-diet).
Paragraph (version B):
The media distributor is not given the KEK (i.e., EKT Key).
Paragraph (version B):
As stated earlier, the E2E key determined via DTLS-SRTP MAY be
discarded in favor of a locally-generated SRTP master key.  While the
DTLS-SRTP-derived SRTP master key can be used initially, the endpoint
might choose to change the SRTP master key periodically and MUST
change the SRTP master key as a result of the EKT key changing.
Paragraph (version B):
A locally-generated SRTP master key is used along with the master
salt transmitted to the endpoint from the key distributor via the
EKTKey message to encrypt media end-to-end.
Paragraph (version B):
Since the media distributor is not involved in E2E functions, it does
not create this key nor have access to any endpoint's E2E key.  Note,
too, that even the key distributor is unaware of the locally-
generated E2E keys used by each endpoint.
Paragraph (version B):
The endpoint transmits its E2E key to other endpoints in the
conference by periodically including it in SRTP packets in a Full EKT
Tag.  When placed in the Full EKT Tag, it is encrypted using the EKT
Key provided by the key distributor.  The master salt is not
transmitted, though, since all endpoints receive the same master salt
via the EKTKey message from the Key Distributor.  The recommended
frequency with which an endpoint transmits its SRTP master key is
specified in I-D.ietf-perc-srtp-ekt-diet.
Paragraph (version B):
All endpoints have knowledge of the KEK.
Paragraph (version B):
Every HBH key is distinct for a given endpoint, thus Endpoint A and
Endpoint B do not have knowledge of the other's HBH key.
Paragraph (version B):
Each endpoint generates its own E2E Key (SRTP master key), thus
distinct per endpoint.  This key is transmitted (encrypted) via the
Full EKT Tag to other endpoints.  Endpoints that receive media from a
given transmitting endpoint gains knowledge of the transmitter's E2E
key via the Full EKT Tag.
Paragraph (version B):
To summarize the various keys and which entity is in possession of a
given key, refer to fig-who-has-what-key.
Paragraph (version B):
fig-perc-packet-format presents a complete picture of what an
encrypted media packet per this framework looks like when transmitted
over the wire.  The packet format shown is encrypted using the Double
cryptographic transform with an EKT Tag appended to the end.
Paragraph (version B):
On-path attacks are mitigated by hop-by-hop integrity protection and
encryption.  The integrity protection mitigates packet modification
and encryption makes selective blocking of packets harder, but not
impossible.
Paragraph (version B):
Off-path attackers may try connecting to different PERC entities and
send specifically crafted packets.  A successful attacker might be
able to get the Media Distributor to forward such packets.  The Media
Distributor mitigates such an attack by performing hop-by-hop
authentication and discarding packets that fail authentication.
Paragraph (version A):
This attack can be mitigated by the false Media Distributor not being
authenticated by the Key Distributor during PERC Tunnel
establishment.  Without the tunnel in place, endpoints will not
establish secure associations with the Key Distributor and receive
the KEK, causing the conference to not proceed.
Paragraph (version A):
Any modification of the end-to-end authenticated data will result in
the receiving endpoint getting an integrity failure when performing
authentication on the received packet.
Paragraph (version A):
The Media Distributor can also attempt to perform resource
consumption attacks on the receiving endpoint.  One such attack would
be to insert random SSRC/CSRC values in any RTP packet with an inband
key-distribution message attached (i.e., Full EKT Field).  Since such
a message would trigger the receiver to form a new cryptographic
context, the Media Distributor can attempt to consume the receiving
endpoints resources.
Paragraph (version A):
Another denial of service attack is where the Media Distributor
rewrites the PT field to indicate a different codec.  The effect of
this attack is that any payload packetized and encoded according to
one RTP payload format is then processed using another payload format
and codec.  Assuming that the implementation is robust to random
input, it is unlikely to cause crashes in the receiving software/
hardware.  However, it is not unlikely that such rewriting will cause
severe media degradation.
Paragraph (version A):
For audio formats, this attack is likely to cause highly disturbing
audio and/or can be damaging to hearing and playout equipment.
Paragraph (version A):
Replay attack is when an already received packets from a previous
point in the RTP stream is replayed as new packet.  This could, for
example, allow a Media Distributor to transmit a sequence of packets
identified as a user saying "yes", instead of the "no" the user
actually said.
Paragraph (version B):
This attack is be mitigated by the false Media Distributor not being
authenticated by the Key Distributor.  They Key Distributor will fail
to establish the secure association with the endpoint if the Media
Distributor cannot be authenticated.
Paragraph (version B):
A simple form of attack is discarding received packets that should be
forwarded.  This solution framework does not introduce any mitigation
for Media Distributors that fail to forward media packets.
Paragraph (version B):
Another form of attack is modifying received packets before
forwarding.  With this solution framework, any modification of the
end-to-end authenticated data results in the receiving endpoint
getting an integrity failure when performing authentication on the
received packet.
Paragraph (version B):
The Media Distributor can also attempt to perform resource
consumption attacks on the receiving endpoint.  One such attack would
be to insert random SSRC/CSRC values in any RTP packet with an inband
key-distribution message attached (i.e., Full EKT Tag).  Since such a
message would trigger the receiver to form a new cryptographic
context, the Media Distributor can attempt to consume the receiving
endpoints resources.  While E2E authentication would fail and the
cryptographic context would be destroyed, the key derivation
operation would nonetheless consume some computational resources.
Paragraph (version B):
A replay attack is when an already received packets from a previous
point in the RTP stream is replayed as new packet.  This could, for
example, allow a Media Distributor to transmit a sequence of packets
identified as a user saying "yes", instead of the "no" the user
actually said.
Paragraph (version A):
The splicing attack is an attack where a Media Distributor receiving
multiple media sources splices one media stream into the other.  If
the Media Distributor is able to change the SSRC without the receiver
having any method for verifying the original source ID, then the
Media Distributor could first deliver stream A and then later forward
stream B under the same SSRC as stream A was previously using.  Not
allowing the Media Distributor to change the SSRC mitigates this
attack.
Paragraph (version B):
The splicing attack is an attack where a Media Distributor receiving
multiple media sources splices one media stream into the other.  If
the Media Distributor is able to change the SSRC without the receiver
having any method for verifying the original source ID, then the
Media Distributor could first deliver stream A and then later forward
stream B under the same SSRC as stream A was previously using.  By
not allowing the Media Distributor to change the SSRC, PERC mitigates
this attack.