Subject: [AVTCORE] EKT Problems with RTCP

From: John Mattsson <[email-masked]>
Date: Mon, 23 Mar 2015 12:15:48 +0000

Hi,

While editing the EKT draft I realized that EKT has major problems with RTCP.

+---+ —------ SRTP ---------> +---+
| S | ------- SRTCP SR -----> | R |
+---+ <------ SRTCP RR ------ +---+

Take the above example. The sender S sends RTP and RTCP to the receiver R. R sends RTCP but not RTP to S.

S re-keying: Irrespectively if S sends EKT in SRTP or SRTCP the occurrence of the key change is signalled with ROC || ISN and R has no way to know when to exactly change key for SRTCP (i.e. how ISN maps to the SRTCP index). R is forced to guess and try authenticating with both the old and the new key.

R re-keying: Here ROC || ISN has no meaning at all and S will have to do trial and error with both the old and the new key.

This is not a robust solution and it needs to be fixed. Two suggestions:

- Option 1
One option is to add another field ISI (Initial SRTCP Index) to the EKT_Plaintext. This would then work similar to ISN. The Plaintext could contain both, or one of them. One alternative is that EKT contains both ISN and ISI. Another alternative is that ISN is used in EKT over SRTP and ISI in EKT over SRTCP, forcing EKT to be used in both SRTP and SRTCP.

- Option 2
The current EKT draft says

“MKI is no longer allowed with EKT (as MKI duplicates some of EKT's functions)”.

Its rather EKT that duplicates MKI (RFC 3711) and one simple option would be to simply remove the EKT parts that duplicates MKI and instead mandate use of MKI.

The EKT_Plaintext would then be:
EKT_Plaintext = SRTP_Master_Key || SSRC || ROC || MKI

And the SRT(C)P packets would look like:
+------------+-------------+-----+-----+-----+
| RTP Header | RTP Payload | MKI | TAG | EKT |
+------------+-------------+-----+-----+-----+
+--------------------+-------------+-----+-----+-----+
| RTCP Packet Types  | SRTCP INDEX | MKI | TAG | EKT |
+--------------------+-------------+-----+-----+-----+

This would allow full flexibility in the use of EKT. EKT could be sent in RTP and/or RTCP. Any number of keys could be distributed ahead of time.

If the MKIs are random, this would also make the EKT replay attack (in the case of SSRC collisions) much harder.

MKI could by default be one byte.

For AEAD algorithms MKI is the last field in the SRTP. If AEAD algorithms were mandated for EKT, MKIs with the last bit ‘0’ could be mandated and the short EKT tag would not be needed.

Comments welcome, I would strongly prefer option 2. The more I think about it, the ISN approach duplicates functionality in RFC3711, it is complex, not robust, and vulnerable to replay attacks.

Cheers,
John

JOHN MATTSSON
MSc Engineering Physics, MSc Business Administration and Economics
Ericsson IETF Security Coordinator
Senior Researcher, Security

Ericsson AB
Ericsson Research
Färögatan 6
SE-164 80 Stockholm, Sweden
Phone +46 10 71 43 501
SMS/MMS +46 76 11 53 501
[email-masked]<mailto:[email-masked]>
www.ericsson.com<http://www.ericsson.com/>

---

From: "Paul E. Jones" <[email-masked]>
Date: Mon, 23 Mar 2015 19:27:39 +0000

John,

Option 1 strikes me as the simplest solution to the problem you describe 
with minimal changes in the text.  Option 2 would work, though I'm 
missing the point of the replay benefit that comes with MKI.  Given the 
endpoints are randomly generating SRTP master keys, isn't that 
sufficient?  Perhaps I'm missing something key.

Paul

------ Original Message ------
From: "John Mattsson" <[email-masked]>
To: "IETF AVTCore WG" <[email-masked]>
Sent: 3/23/2015 8:15:48 AM
Subject: [AVTCORE] EKT Problems with RTCP

>S re-keying: Irrespectively if S sends EKT in SRTP or SRTCP the 
>occurrence of the key change is signalled with ROC || ISN and R has no 
>way to know when to exactly change key for SRTCP (i.e. how ISN maps to 
>the SRTCP index). R is forced to guess and try authenticating with both 
>the old and the new key.
>
>R re-keying: Here ROC || ISN has no meaning at all and S will have to 
>do trial and error with both the old and the new key.
>
>One option is to add another field ISI (Initial SRTCP Index) to the 
>EKT_Plaintext. This would then work similar to ISN. The Plaintext could 
>contain both, or one of them. One alternative is that EKT contains both 
>ISN and ISI. Another alternative is that ISN is used in EKT over SRTP 
>and ISI in EKT over SRTCP, forcing EKT to be used in both SRTP and 
>SRTCP.
>
>- Option 2
>Its rather EKT that duplicates MKI (RFC 3711) and one simple option 
>would be to simply remove the EKT parts that duplicates MKI and instead 
>mandate use of MKI.
>
>This would allow full flexibility in the use of EKT. EKT could be sent 
>in RTP and/or RTCP. Any number of keys could be distributed ahead of 
>time.
>
>If the MKIs are random, this would also make the EKT replay attack (in 
>the case of SSRC collisions) much harder.
>
>For AEAD algorithms MKI is the last field in the SRTP. If AEAD 
>algorithms were mandated for EKT, MKIs with the last bit ‘0’ could be 
>mandated and the short EKT tag would not be needed.
>
>
>Comments welcome, I would strongly prefer option 2. The more I think 
>about it, the ISN approach duplicates functionality in RFC3711, it is 
>complex, not robust, and vulnerable to replay attacks.
>
>
>Cheers,
>John
>
>
>
>JOHN MATTSSON
>[email-masked]
>http://www.ericsson.com/
>

---

From: "Mo Zanaty (mzanaty)" <[email-masked]>
Date: Tue, 24 Mar 2015 15:29:42 +0000

I agree with Paul, option 1 seems best. I think it could even be argued that ISN/ISI should be eliminated, and EKT must always be sent separately in SRTP/SRTCP coincident with the SN/index of the rekey point.

Some additional text may be useful to reflect operation in more complex RTP scenarios, such as multiple RTP streams bundled in the same session with sparse RTCP reporting (not full mesh).

Mo

On 3/23/15, 3:27 PM, Paul E. Jones <[email-masked]<mailto:[email-masked]>> wrote:

John,

Option 1 strikes me as the simplest solution to the problem you describe with minimal changes in the text.  Option 2 would work, though I'm missing the point of the replay benefit that comes with MKI.  Given the endpoints are randomly generating SRTP master keys, isn't that sufficient?  Perhaps I'm missing something key.

Paul

------ Original Message ------
From: "John Mattsson" <[email-masked]<mailto:[email-masked]>>
To: "IETF AVTCore WG" <[email-masked]<mailto:[email-masked]>>
Sent: 3/23/2015 8:15:48 AM
Subject: [AVTCORE] EKT Problems with RTCP

Hi,

- Option 1

- Option 2

Cheers,
John

JOHN MATTSSON

Ericsson AB
Ericsson Research
Färögatan 6

---

From: John Mattsson <[email-masked]>
Date: Tue, 24 Mar 2015 16:41:44 +0000

> I think it could even be argued that ISN/ISI should be eliminated

Agree, Thinking more about the problem, there is no possibility at all to keep ISN, it definitely needs to be eliminated.

Not only is it causing the major problems it is also making EKT vulnerable to several types of practical replay attacks.

The question needing answer is "Do we really need several SRTP Master keys per SSRC and EKT SPI?”

If no we can just skip ISN. If yes we need MKI. If maybe we can make MKI optional.

The ISN problems and the scope of EKT will the two topics of my EKT presentation today.

John

On 24 Mar 2015, at 10:29, Mo Zanaty (mzanaty) <[email-masked]<mailto:[email-masked]>> wrote:

Mo

John,

Paul

------ Original Message ------
From: "John Mattsson" <[email-masked]<mailto:[email-masked]>>
To: "IETF AVTCore WG" <[email-masked]<mailto:[email-masked]>>
Sent: 3/23/2015 8:15:48 AM
Subject: [AVTCORE] EKT Problems with RTCP

Hi,

- Option 1

- Option 2

Cheers,
John

JOHN MATTSSON

Ericsson AB
Ericsson Research
Färögatan 6

---

From: "Tirumaleswar Reddy (tireddy)" <[email-masked]>
Date: Thu, 26 Mar 2015 12:02:11 +0000

Trial and error to detect the right key without MKI is discussed in https://tools.ietf.org/html/rfc5764#section-5.2.

-Tiru

From: avt [mailto:[email-masked]] On Behalf Of Mo Zanaty (mzanaty)
Sent: Tuesday, March 24, 2015 9:00 PM
To: Paul E. Jones; John Mattsson; IETF AVTCore WG
Subject: Re: [AVTCORE] EKT Problems with RTCP

Mo

John,

Paul

------ Original Message ------
From: "John Mattsson" <[email-masked]<mailto:[email-masked]>>
To: "IETF AVTCore WG" <[email-masked]<mailto:[email-masked]>>
Sent: 3/23/2015 8:15:48 AM
Subject: [AVTCORE] EKT Problems with RTCP

Hi,

+---+ ------- SRTP ---------> +---+
| S | ------- SRTCP SR -----> | R |
+---+ <------ SRTCP RR ------ +---+

- Option 1

- Option 2

"MKI is no longer allowed with EKT (as MKI duplicates some of EKT's functions)".

For AEAD algorithms MKI is the last field in the SRTP. If AEAD algorithms were mandated for EKT, MKIs with the last bit '0' could be mandated and the short EKT tag would not be needed.

Cheers,
John

JOHN MATTSSON

Ericsson AB
Ericsson Research
Färögatan 6