gstreamer-rs/docs/gstreamer-sdp/docs.md
2018-04-05 22:25:13 +03:00

13 KiB

The different cache types

The envelope key MUST NOT be cached

The envelope key MUST be cached

The envelope key MUST be cached, but only to be used for the specific CSB.

The encryption algorithm used to encrypt the Encr data field

no encryption

AES-CM using a 128-bit key

AES Key Wrap using a 128-bit key

The key validity type

No specific usage rule

The key is associated with the SPI/MKI

The key has a start and expiration time

The type of key.

a TEK Generation Key

Traffic-Encrypting Key

Specifies the authentication algorithm used

no authentication

HMAC-SHA-1-160

Specifies the method of uniquely mapping Crypto Sessions to the security protocol sessions.

Structure holding the information of the MIKEY message

Make a new MIKEY message.

Returns

a new MIKEYMessage on success

Make a new MIKEYMessage from bytes.

bytes

a glib::Bytes

info

a MIKEYDecryptInfo

Returns

a new MIKEYMessage

Makes mikey message including:

  • Security Policy Payload
  • Key Data Transport Payload
  • Key Data Sub-Payload

caps

a gst::Caps, including SRTP parameters (srtp/srtcp cipher, authorization, key data)

Returns

a MIKEYMessage, or None if there is no srtp information in the caps.

Parse size bytes from data into a MIKEYMessage. info contains the parameters to decrypt and verify the data.

data

bytes to read

size

length of data

info

MIKEYDecryptInfo

Returns

a MIKEYMessage on success or None when parsing failed and error will be set.

Add a Crypto policy for SRTP to self.

policy

The security policy applied for the stream with ssrc

ssrc

the SSRC that must be used for the stream

roc

current rollover counter

Returns

true on success

Add a new payload to self.

payload

a MIKEYPayload

Returns

true on success

Add a new PKE payload to self with the given parameters.

C

envelope key cache indicator

data_len

the length of data

data

the encrypted envelope key

Returns

true on success

Add a new RAND payload to self with the given parameters.

len

the length of rand

rand

random data

Returns

true on success

Add a new RAND payload to self with len random bytes.

len

length

Returns

true on success

Add a new T payload to self with the given parameters.

type_

specifies the timestamp type used

ts_value

The timestamp value of the specified type_

Returns

true on success

Add a new T payload to self that contains the current time in NTP-UTC format.

Returns

true on success

Returns

a gchar, base64-encoded data

Find the nth occurence of the payload with type_ in self.

type_

a MIKEYPayloadType

nth

payload to find

Returns

the nth MIKEYPayload of type_.

Get the policy information of self at idx.

idx

an index

Returns

a MIKEYMapSRTP

Get the number of crypto sessions in self.

Returns

the number of crypto sessions

Get the number of payloads in self.

Returns

the number of payloads in self

Get the MIKEYPayload at idx in self

idx

an index

Returns

the MIKEYPayload at idx. The payload remains valid for as long as it is part of self.

Insert a Crypto Session map for SRTP in self at idx

When idx is -1, the policy will be appended.

idx

the index to insert at

map

the map info

Returns

true on success

Insert the payload at index idx in self. If idx is -1, the payload will be appended to self.

idx

an index

payload

a MIKEYPayload

Returns

true on success

Remove the SRTP policy at idx.

idx

the index to remove

Returns

true on success

Remove the payload in self at idx

idx

an index

Returns

true on success

Replace a Crypto Session map for SRTP in self at idx with map.

idx

the index to insert at

map

the map info

Returns

true on success

Replace the payload at idx in self with payload.

idx

an index

payload

a MIKEYPayload

Returns

true on success

Set the information in self.

version

a version

type_

a MIKEYType

V

verify flag

prf_func

the MIKEYPRFFunc function to use

CSB_id

the Crypto Session Bundle id

map_type

the GstMIKEYCSIDMapType

Returns

true on success

Convert self to a glib::Bytes.

info

a MIKEYEncryptInfo

Returns

a new glib::Bytes for self.

Feature: v1_8_1

caps

a gst::Caps to be filled with SRTP parameters (srtp/srtcp cipher, authorization, key data)

Returns

true on success

The PRF function that has been/will be used for key derivation

MIKEY-1 PRF function

Hold the common fields for all payloads

Make a new MIKEYPayload with type_.

type_

a MIKEYPayloadType

Returns

a new MIKEYPayload or None on failure.

Add a new sub payload to self.

newpay

a MIKEYPayload to add

Returns

true on success.

Get the number of sub payloads of self. self should be of type MIKEYPayloadType::Kemac.

Returns

the number of sub payloads in self

Get the sub payload of self at idx. self should be of type MIKEYPayloadType::Kemac.

idx

an index

Returns

the MIKEYPayload at idx.

Remove the sub payload at idx in self.

idx

the index to remove

Returns

true on success.

Set the KEMAC parameters. self should point to a MIKEYPayloadType::Kemac payload.

enc_alg

the MIKEYEncAlg

mac_alg

a MIKEYMacAlg

Returns

true on success

Set the key validity period in the MIKEYPayloadType::KeyData self.

vf_len

the length of vf_data

vf_data

the Valid From data

vt_len

the length of vt_data

vt_data

the Valid To data

Returns

true on success

Set key_len bytes of key_data of type key_type as the key for the MIKEYPayloadType::KeyData self.

key_type

a MIKEYKeyDataType

key_len

the length of key_data

key_data

the key of type key_type

Returns

true on success

Set the salt key data. If salt_len is 0 and salt_data is None, the salt data will be removed.

salt_len

the length of salt_data

salt_data

the salt

Returns

true on success

Set the SPI/MKI validity in the MIKEYPayloadType::KeyData self.

spi_len

the length of spi_data

spi_data

the SPI/MKI data

Returns

true on success

Set the PKE values in self. self must be of type MIKEYPayloadType::Pke.

C

envelope key cache indicator

data_len

the length of data

data

the encrypted envelope key

Returns

true on success

Set the random values in a MIKEYPayloadType::Rand self.

len

the length of rand

rand

random values

Returns

true on success

Add a new parameter to the MIKEYPayloadType::Sp self with type_, len and val.

type_

a type

len

a length

val

len bytes of data

Returns

true on success

Get the number of security policy parameters in a MIKEYPayloadType::Sp self.

Returns

the number of parameters in self

Get the Security Policy parameter in a MIKEYPayloadType::Sp self at idx.

idx

an index

Returns

the MIKEYPayloadSPParam at idx in self

Remove the Security Policy parameters from a MIKEYPayloadType::Sp self at idx.

idx

an index

Returns

true on success

Set the Security Policy parameters for self.

policy

the policy number

proto

a MIKEYSecProto

Returns

true on success

Set the timestamp in a MIKEYPayloadType::T self.

type_

the MIKEYTSType

ts_value

the timestamp value

Returns

true on success

Different MIKEY Payload types.

Last payload

Key data transport payload

Envelope data payload

DH data payload

Signature payload

Timestamp payload

ID payload

Certificate Payload

Cert hash payload

Verfication message payload

Security Policy payload

RAND payload

Error payload

Key data sub-payload

General Extension Payload

Specifies the security protocol

This policy specifies the parameters for SRTP and SRTCP

Encryption algorithm

Session Encr. key length

Authentication algorithm

Session Auth. key length

Session Salt key length

SRTP Pseudo Random Function

Key derivation rate

SRTP encryption off/on, 0 if off, 1 if on

SRTCP encryption off/on, 0 if off, 1 if on

sender's FEC order

SRTP authentication off/on, 0 if off, 1 if on

Authentication tag length

SRTP prefix length

Specifies the timestamp type.

an NTP time in UTC timezone

an NTP time

a counter

Different MIKEY data types.

Invalid type

Initiator's pre-shared key message

Verification message of a Pre-shared key message

Initiator's public-key transport message

Verification message of a public-key message

Initiator's DH exchange message

Responder's DH exchange message

Error message