fuchsia.drm

Added: HEAD

STRUCTS

EncryptionPattern

Defined in fuchsia.drm/encryption.fidl

Pattern encryption utilizes a pattern of encrypted and clear 16 byte blocks over the protected range of a subsample (the encrypted_bytes of a SubsampleEntry). This structure specifies the number of encrypted data blocks followed by the number of clear data blocks.

FieldTypeDescriptionDefault
clear_blocks uint32 No default
encrypted_blocks uint32 No default

EncryptionSubsampleEntry

Defined in fuchsia.drm/encryption.fidl

A byte range within a sample consisting of a clear byte range followed by an encrypted byte range. This structure specifies the size of each range in the subsample.

FieldTypeDescriptionDefault
clear_bytes uint32 No default
encrypted_bytes uint32 No default

TABLES

Encryption

Defined in fuchsia.drm/encryption.fidl

The stream format details payload of a decrypting stream processor. This is a sparsely populated table to specify parameters necessary for decryption other than the data stream. It is only necessary to update fields if they changed, but not an error if the same value is repeated.

OrdinalFieldTypeDescription
scheme EncryptionScheme

Specifies which encryption scheme to use, such as ENCRYPTION_SCHEME_CENC. Usage:

  • It is required to be set prior to delivery of input packets.
  • Changing the scheme mid-stream is only permitted in some scenarios. Once an encrypted scheme is selected for a stream, the scheme may only be set to ENCRYPTION_SCHEME_UNENCRYPTED or that same initial encrypted scheme. The scheme may be set to ENCRYPTION_SCHEME_UNENCRYPTED at any point.
default_key_id EncryptionKeyId

Identifies the key that should be used for decrypting subsequent data. Usage:

  • It is required to be set prior to delivery of input packets to a decryptor.
  • This may be changed multiple times during a data stream.
default_init_vector EncryptionInitVector

Used in combination with a key and a block of content to create the first cipher block in a chain and derive subsequent cipher blocks in a cipher block chain. Usage:

  • It is required to be set prior to the delivery of input packets to a decryptor.
  • This may be changed multiple times during a data stream.
default_pattern EncryptionPattern

Used to identify the clear and encrypted blocks for pattern based encryption. Usage:

  • This is not allowed for CENC and CBC1 and required for CENS and CBCS.
  • If required, it must be set prior to the delivery of input packets to a decryptor.
  • This may be changed multiple times during a data stream.

PacketEncryptionProperties

Defined in fuchsia.drm/packet_encryption_properties.fidl

Properties accompanying a packet in an encrypted stream.

OrdinalFieldTypeDescription
is_encrypted bool

Indicates whether the packet is encrypted.

key_id EncryptionKeyId

If specified, overrides the previous key id.

init_vector EncryptionInitVector

If specified, overrides the previous initialization vector.

pattern EncryptionPattern

If specified, overrides the previous encryption pattern.

subsamples vector<EncryptionSubsampleEntry>:16

Subsamples to decrypt. An absent or empty list indicates whole sample decryption.

CONSTANTS

NameValueTypeDescription
ENCRYPTION_SCHEME_CBC1 cbc1 String
ENCRYPTION_SCHEME_CBCS cbcs String
ENCRYPTION_SCHEME_CENC cenc String
ENCRYPTION_SCHEME_CENS cens String
MAX_ENCRYPTION_SCHEME_SIZE 4 uint32

The maximum size of an EncryptionScheme string.

MAX_INIT_VECTOR_SIZE 16 uint32

The maximum size of a EncryptionInitVector blob.

MAX_KEY_ID_SIZE 16 uint32

The maximum size of a EncryptionKeyId blob.

MAX_SUBSAMPLE_ENTRIES 16 uint32

The maximum number of EncryptionSubsampleEntrys allowed.

ALIASES

NameValueDescription
EncryptionInitVector vector[MAX_INIT_VECTOR_SIZE]
EncryptionKeyId vector[MAX_KEY_ID_SIZE]
EncryptionScheme string[MAX_ENCRYPTION_SCHEME_SIZE]

Identifies an encryption scheme.