Mikey Intiator & Response Message Parsing in Secure RTSP 2.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mikey Intiator & Response Message Parsing in Secure RTSP 2.0

ragh av
Hi All,
  When i tried RTSP 2.0 back to back server and client.
  I bot mikey parametes in Base64 with reference to RFC 3830 i parsed and expanded as below.

a=key-mgmt:mikey AQAFAAaC3cABAACdholzAAAAAAsA39SOMRCMLncKEM9XcnVKxlU+AiqkC9YwWvYBAAAAFQABAQEBEAIBAQMBCgcBAQgBAQoBAQAAACIAIAAe6zxuG+m5rliPZA+zkiG4pIUetv5UEBEq0/y9Wr71AA==

Base64 decode of mikey data above is

01 00 05 00 06 82 DD C0 01 00 00 9D 86 89 73 00 00 00 00 0B 00 DF D4 8E 31 10 8C 2E 77 0A 10 CF 57 72 75 4A C6 55 3E 02 2A A4 0B D6 30 5A F6 01 00 00 00 15 00 01 01 01 01 10 02 01 01 03 01 0A 07 01 01 08 01 01 0A 01 01 00 00 00 22 00 20 00 1E EB 3C 6E 1B E9 B9 AE 58 8F 64 0F B3 92 21 B8 A4 85 1E B6 FE 54 10 11 2A D3 FC BD 5A BE F5 00

 

Section 6.1

  • 01 – Version refers to the MIKEY as defined in the Spec
  • 00 – Data Type: Pre Shared Key
  • 05 – Next Payload: TimeStamp
  • 00 – PRF Func
  • 06 82 DD C0 – CSB ID
  • 01 - #CS
  • 00 – CS ID Map Type
  • CS Map Info
    • 00 – Policy_1
    • 9D 86 89 73 – SSRC_1
    • 00 00 00 00 – ROC_1
  • Section 6.6 TimeStamp
    • 0B – Next Payload: RAND
    • 00 – TS-Type 0 is NTP-UTC
    • DF D4 8E 31 10 8C 2E 77 – NTP (first 4 bytes integer part, next 4 bytes fraction part)
  • Section 6.11 RAND
    • 0A – Next Payload: SP (Security Profile)
    • 10 – Length
    • RAND Value
      • CF 57 72 75 4A C6 55 3E 02 2A A4 0B D6 30 5A F6
  • Section 6.10 Security Profile
    • 01 – Next Payload: KEMAC
    • 00 – Policy Number
    • 00 – Prot Type: SRTP
    • 00 15 – Policy Param Len
    • Policy Params
      • 00 – Policy Type: Encr Algo
      • 01 – Policy Len
      • 01 – Policy Value: AES_CM
      • 01 – Policy Type: Encr. Key Length
      • 01 – Policy Len
      • 10 – Policy Param
      • 02 – Policy Type: Auth Algo
      • 01 – Policy Len
      • 01 – Policy Value: HMAC-SHA-1
      • 03 – Policy Type: Auth Key Len
      • 01 – Policy Len
      • 0A – Policy Value
      • 07 – Policy Type: SRTP Encryption
      • 01 – Policy Len
      • 01 – Policy Value: Enabled
      • 08 – Policy Type: SRTCP Encryption
      • 01 – Policy Len
      • 01 – Policy Value: Enabled
      • 0A – Policy Type: SRTP Authentication
      • 01 – Policy Type
      • 01 – Policy Value
  • Section 6.2 KEMAC
    • 00 – Next Payload: Last
    • 00 – Encr. Algo (NULL)
    • 00 22 – Encr. Length
    • Section 6.13 Encr. Data
      • 00 – Next Payload: Last
      • 2 – Type: TEK
      • 0 – KV
      • 00 1E – Key Data Length
      • Key Data (TEK)
        • EB 3C 6E 1B E9 B9 AE 58 8F 64 0F B3 92 21 B8 A4 85 1E B6 FE 54 10 11 2A D3 FC BD 5A BE F5
      • 00 – MAC Algo (NULL)
Qusetion is what TEK contains with size of 30 bytes amssuming it is 16 bytes of master and 14 bytes of Salt key.Is it correct?

And also when SETUP request comes it also includes Mikey parameters when i expanded as per RFC 3830 it also having one TEK which is different from SDP mikey. which TEK i have to use for encryption?

Thanks,
Raghav.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Fwd: Mikey Intiator & Response Message Parsing in Secure RTSP 2.0

ragh av





Hi All,
  When i tried RTSP 2.0 back to back server and client.
   In sdp message i found below mikey parametes in Base64 

a=key-mgmt:mikey AQAFAAaC3cABAACdholzAAAAAAsA39SOMRCMLncKEM9XcnVKxlU+AiqkC9YwWvYBAAAAFQABAQEBEAIBAQMBCgcBAQgBAQoBAQAAACIAIAAe6zxuG+m5rliPZA+zkiG4pIUetv5UEBEq0/y9Wr71AA==

Base64 decode of mikey data above is


01 00 05 00 06 82 DD C0 01 00 00 9D 86 89 73 00 00 00 00 0B 00 DF D4 8E 31 10 8C 2E 77 0A 10 CF 57 72 75 4A C6 55 3E 02 2A A4 0B D6 30 5A F6 01 00 00 00 15 00 01 01 01 01 10 02 01 01 03 01 0A 07 01 01 08 01 01 0A 01 01 00 00 00 22 00 20 00 1E EB 3C 6E 1B E9 B9 AE 58 8F 64 0F B3 92 21 B8 A4 85 1E B6 FE 54 10 11 2A D3 FC BD 5A BE F5 00

 

 Decoded above Hex values as per RFC 3830


Section 6.1

  • 01 – Version refers to the MIKEY as defined in the Spec
  • 00 – Data Type: Pre Shared Key
  • 05 – Next Payload: TimeStamp
  • 00 – PRF Func
  • 06 82 DD C0 – CSB ID
  • 01 - #CS
  • 00 – CS ID Map Type
  • CS Map Info
    • 00 – Policy_1
    • 9D 86 89 73 – SSRC_1
    • 00 00 00 00 – ROC_1
  • Section 6.6 TimeStamp
    • 0B – Next Payload: RAND
    • 00 – TS-Type 0 is NTP-UTC
    • DF D4 8E 31 10 8C 2E 77 – NTP (first 4 bytes integer part, next 4 bytes fraction part)
  • Section 6.11 RAND
    • 0A – Next Payload: SP (Security Profile)
    • 10 – Length
    • RAND Value
      • CF 57 72 75 4A C6 55 3E 02 2A A4 0B D6 30 5A F6
  • Section 6.10 Security Profile
    • 01 – Next Payload: KEMAC
    • 00 – Policy Number
    • 00 – Prot Type: SRTP
    • 00 15 – Policy Param Len
    • Policy Params
      • 00 – Policy Type: Encr Algo
      • 01 – Policy Len
      • 01 – Policy Value: AES_CM
      • 01 – Policy Type: Encr. Key Length
      • 01 – Policy Len
      • 10 – Policy Param
      • 02 – Policy Type: Auth Algo
      • 01 – Policy Len
      • 01 – Policy Value: HMAC-SHA-1
      • 03 – Policy Type: Auth Key Len
      • 01 – Policy Len
      • 0A – Policy Value
      • 07 – Policy Type: SRTP Encryption
      • 01 – Policy Len
      • 01 – Policy Value: Enabled
      • 08 – Policy Type: SRTCP Encryption
      • 01 – Policy Len
      • 01 – Policy Value: Enabled
      • 0A – Policy Type: SRTP Authentication
      • 01 – Policy Type
      • 01 – Policy Value
  • Section 6.2 KEMAC
    • 00 – Next Payload: Last
    • 00 – Encr. Algo (NULL)
    • 00 22 – Encr. Length
    • Section 6.13 Encr. Data
      • 00 – Next Payload: Last
      • 2 – Type: TEK
      • 0 – KV
      • 00 1E – Key Data Length
      • Key Data (TEK)
        • EB 3C 6E 1B E9 B9 AE 58 8F 64 0F B3 92 21 B8 A4 85 1E B6 FE 54 10 11 2A D3 FC BD 5A BE F5
      • 00 – MAC Algo (NULL)
Qusetion is.. what TEK contains as its size is 30 bytes am assumed it is combination of 16 bytes of master and 14 bytes of Salt key.Is my assumption is correct?

And also, SETUP request  sent by client alsohaving Mikey parameters when i expanded as per RFC 3830 it also having one TEK which is different from SDP TEK value. which TEK gstreamer used to use for encryption/decryption?

Thanks,
Raghav.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mikey Intiator & Response Message Parsing in Secure RTSP 2.0

ragh av
In reply to this post by ragh av
Hi ,
 Can some one reply to this.
Thanks,
Raghav.

On Fri, Jan 11, 2019 at 3:18 PM <[hidden email]> wrote:
Send gstreamer-devel mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gstreamer-devel digest..."


Today's Topics:

   1. Fwd: Mikey Intiator & Response Message Parsing in Secure RTSP
      2.0 (ragh av)
   2. Re: kmssink0: failed to configure video mode (bubbab315)
   3. Re: How to figure out buffer's parent GESClipAsset with
      GESPipeline? (Thibault Saunier)
   4. Re: 24/7 playout with gstreamer in 2019 (Jon bae)


----------------------------------------------------------------------

Message: 1
Date: Fri, 11 Jan 2019 01:52:04 +0530
From: ragh av <[hidden email]>
To: [hidden email]
Subject: Fwd: Mikey Intiator & Response Message Parsing in Secure RTSP
        2.0
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Hi All,
  When i tried RTSP 2.0 back to back server and client.
   In sdp message i found below mikey parametes in Base64

a=key-mgmt:mikey
AQAFAAaC3cABAACdholzAAAAAAsA39SOMRCMLncKEM9XcnVKxlU+AiqkC9YwWvYBAAAAFQABAQEBEAIBAQMBCgcBAQgBAQoBAQAAACIAIAAe6zxuG+m5rliPZA+zkiG4pIUetv5UEBEq0/y9Wr71AA==

Base64 decode of mikey data above is


01 00 05 00 06 82 DD C0 01 00 00 9D 86 89 73 00 00 00 00 0B 00 DF D4 8E 31
10 8C 2E 77 0A 10 CF 57 72 75 4A C6 55 3E 02 2A A4 0B D6 30 5A F6 01 00 00
00 15 00 01 01 01 01 10 02 01 01 03 01 0A 07 01 01 08 01 01 0A 01 01 00 00
00 22 00 20 00 1E EB 3C 6E 1B E9 B9 AE 58 8F 64 0F B3 92 21 B8 A4 85 1E B6
FE 54 10 11 2A D3 FC BD 5A BE F5 00



* Decoded above Hex values as per RFC 3830*


Section 6.1

   - 01 – Version refers to the MIKEY as defined in the Spec
   - 00 – Data Type: Pre Shared Key
   - 05 – Next Payload: TimeStamp
   - 00 – PRF Func
   - 06 82 DD C0 – CSB ID
   - 01 - #CS
   - 00 – CS ID Map Type
   - CS Map Info
      - 00 – Policy_1
      - 9D 86 89 73 – SSRC_1
      - 00 00 00 00 – ROC_1
   - Section 6.6 TimeStamp
      - 0B – Next Payload: RAND
      - 00 – TS-Type 0 is NTP-UTC
      - DF D4 8E 31 10 8C 2E 77 – NTP (first 4 bytes integer part, next 4
      bytes fraction part)
   - Section 6.11 RAND
      - 0A – Next Payload: SP (Security Profile)
      - 10 – Length
      - RAND Value
         - CF 57 72 75 4A C6 55 3E 02 2A A4 0B D6 30 5A F6
      - Section 6.10 Security Profile
      - 01 – Next Payload: KEMAC
      - 00 – Policy Number
      - 00 – Prot Type: SRTP
      - 00 15 – Policy Param Len
      - Policy Params
         - 00 – Policy Type: Encr Algo
         - 01 – Policy Len
         - 01 – Policy Value: AES_CM
         - 01 – Policy Type: Encr. Key Length
         - 01 – Policy Len
         - 10 – Policy Param
         - 02 – Policy Type: Auth Algo
         - 01 – Policy Len
         - 01 – Policy Value: HMAC-SHA-1
         - 03 – Policy Type: Auth Key Len
         - 01 – Policy Len
         - 0A – Policy Value
         - 07 – Policy Type: SRTP Encryption
         - 01 – Policy Len
         - 01 – Policy Value: Enabled
         - 08 – Policy Type: SRTCP Encryption
         - 01 – Policy Len
         - 01 – Policy Value: Enabled
         - 0A – Policy Type: SRTP Authentication
         - 01 – Policy Type
         - 01 – Policy Value
      - Section 6.2 KEMAC
      - 00 – Next Payload: Last
      - 00 – Encr. Algo (NULL)
      - 00 22 – Encr. Length
      - Section 6.13 Encr. Data
         - 00 – Next Payload: Last
         - 2 – Type: TEK
         - 0 – KV
         - 00 1E – Key Data Length
         - Key Data (TEK)
            - EB 3C 6E 1B E9 B9 AE 58 8F 64 0F B3 92 21 B8 A4 85 1E B6 FE
            54 10 11 2A D3 FC BD 5A BE F5
         - 00 – MAC Algo (NULL)

Qusetion is.. what TEK contains as its size is 30 bytes am assumed it is
combination of 16 bytes of master and 14 bytes of Salt key.Is my assumption
is correct?

And also, SETUP request  sent by client alsohaving Mikey parameters when i
expanded as per RFC 3830 it also having one TEK which is different from SDP
TEK value. which TEK gstreamer used to use for encryption/decryption?

Thanks,
Raghav.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190111/6898f079/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 10 Jan 2019 14:57:49 -0600 (CST)
From: bubbab315 <[hidden email]>
To: [hidden email]
Subject: Re: kmssink0: failed to configure video mode
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii

Worked! thank you very much!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


------------------------------

Message: 3
Date: Thu, 10 Jan 2019 22:40:47 -0300
From: Thibault Saunier <[hidden email]>
To: Discussion of the development of and with GStreamer
        <[hidden email]>
Subject: Re: How to figure out buffer's parent GESClipAsset with
        GESPipeline?
Message-ID:
        <CANYYV1zYbqNaQbygOq+nL1V6jzVQCSH2FvxpxRSJJAg=n=[hidden email]>
Content-Type: text/plain; charset="UTF-8"

Hi,

Do you need mixing? If you don't using a GstMeta might be straight
forward, just create an effect element to add metas on buffers and add
it as a effect on all GESClips (not sure how you could handle gaps...
but do you care?)

If you need mixing, I think theorically we could add an "aggregate"
TransformFunction type for metas and then we could have GstAggregator
use that to be able to get upstream "asset metas" as a  list of metas
from the input buffers to the outputed buffers.

Hope it helps,

Thibault


On Mon, Jan 7, 2019 at 10:59 PM Seungha Yang <[hidden email]> wrote:
>
> Hi all,
>
> I'm building an application which is to editing VOD using GES.
> Roughly, my GESpipeline is configured to generate raw audio/video without any
> encoding and I'm pulling raw audio/video buffers via appsink.
>
> The point is that, I want to figure out that final buffer's (at appsink)
> parent asset (i.e., VOD file) with explicit methods such as using GstMeta
> or some special callbacks/signals.
>
> Can GESPipeline support that way?
>
> Regards
> Seungha Yang
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


------------------------------

Message: 4
Date: Fri, 11 Jan 2019 10:48:29 +0100
From: Jon bae <[hidden email]>
To: Discussion of the development of and with GStreamer
        <[hidden email]>
Subject: Re: 24/7 playout with gstreamer in 2019
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Am Do., 10. Jan. 2019 um 13:43 Uhr schrieb Geek-Gst <
[hidden email]>:

> Use streamsynchronizer. Which will synchronize the stream.
>
> Check playbin code for streamsynchronizer use.
>
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-streamsynchronizer.html
>
> I was far away from having a code, where I only needed to synchronizing
audio/video.

But now maybe I found a solution. It is a bit unconventional, but it could
work:
I use two pipelines in the first one I put playbin3 and give them
inter-sinks. In the second pipeline I use intersources. I test it only with
a hand full clips, and not with rtmp output. But this is the next step now.

It would be nice when uridecodebin3 had the same behavior like playbin3,
then I could do everything in one pipeline.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190111/ff1106eb/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


------------------------------

End of gstreamer-devel Digest, Vol 96, Issue 13
***********************************************

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel