Merge "Sync license_protocol.proto"

This commit is contained in:
Rahul Frias
2022-12-20 22:06:14 +00:00
committed by Android (Google) Code Review

View File

@@ -29,6 +29,156 @@ message RemoteAttestation {
optional bytes signature = 3;
}
// ----------------------------------------------------------------------------
// dtcp_usage.proto
// ----------------------------------------------------------------------------
// Description of section:
// Definitions of the protocol buffer message used for DTCP2 usage rules.
message DTCPUsageRules {
// This field indicates the value of Retention_State.
enum RetentionState {
// (-- api-linter: core::0126::unspecified=disabled
// aip.dev/not-precedent: name and values are defined in the DTCP
// specification. --)
// Forever
RETENTION_STATE_FOREVER = 0;
// 1 week
RETENTION_STATE_1_WEEK = 1;
// 2 day
RETENTION_STATE_2_DAYS = 2;
// 1 day
RETENTION_STATE_1_DAY = 3;
// 12 hours
RETENTION_STATE_12_HOURS = 4;
// 6 hours
RETENTION_STATE_6_HOURS = 5;
// 3 hours
RETENTION_STATE_3_HOURS = 6;
// 90 minutes
RETENTION_STATE_90_MINUTES = 7;
}
// This field indicates Copy Control Information (CCI).
enum CopyControlInfo {
// Copy freely
COPY_FREE = 0;
// No more copies
COPY_NO_MORE = 1;
// One time copy
COPY_ONE = 2;
// Copy not allowed
COPY_NEVER = 3;
}
// This field indicates Analog Protection System (APS) used to block
// recording devices.
enum AnalogProtectionSystem {
// Copy freely, APS is off
APS_OFF = 0;
// APS is on, Type 1 (AGC)
APS_TYPE1 = 1;
// APS is on, Type 2 (AGC + 2L Colorstripe)
APS_TYPE2 = 2;
// APS is on, Type 3 (AGC + 4L Colorstripe)
APS_TYPE3 = 3;
}
// This field indicates the value of the Image Constraint Token (ICT) that
// controls downsampling of high-definition video.
enum ImageConstraintToken {
// HD analog output, Constrained Image
ICT_CONSTRAINED = 0;
// HD analog out
ICT_HD_ANALOG = 1;
}
// This field indicates the value of Analog Sunset Token (AST) used to limit
// playback to standard definition (SD) only
enum AnalogSunsetToken {
// Asserted
AST_ASSERTED = 0;
// Unasserted
AST_UNASERTED = 1;
}
// This field indicates the value of Digital Only Token (DOT) used to restrict
// output to digital only.
enum DigitalOnlyToken {
// Asserted
DOT_ASSERTED = 0;
// Unasserted
DOT_UNASSERTED = 1;
}
// This field indicates the value of Audio Enhanced Token (AET).
enum AudioEnhancedToken {
// Asserted
AET_ASSERTED = 0;
// Unasserted
AET_UNASSERTED = 1;
}
// This field indicates the value of Standard Digital Output (SDO) token.
enum StandardDigitalOutputToken {
// Unasserted
SDO_UNASSEERTED = 0;
// Asserted, L2 protection is permitted
SDO_ASSEERTED = 1;
}
// This field indicates the value of High Dynamic Rnage (HDR) token.
enum HighDynamicRangeToken {
// Unasserted, SDR conversion is permitted
HDR_UNASSERTED = 0;
// Unasserted, SDR conversion is not permitted
HDR_ASSERTED = 1;
}
// This field indicates the value of the L2 Protection Only token.
enum L2ProtectionOnlyToken {
// Unasserted
L2_ONLY_UNASSERTED = 0;
// Aasserted (L2 protection onl)
L2_ONLY_ASSERTED = 1;
}
// This field indicates the value of the Enhanced Image (EI) token
enum EnhancedImageToken {
// Unasserted, Non-Enhanced Image
EI_UNASSERTED = 0;
// Asserted, Enhanced Image
EI_ASSERTED = 1;
}
// This field indicates whether a further Bound Copy can be made from a
// Bound Copy retained in accordance with the RetentionStatefield.
enum FurtherBoundCopy {
// Further Bound Copy Prohibited
FBC_PROHIBITED = 0;
// Further Bound Copy Permitted
FBC_PERMITTED = 1;
}
// Indicates if Digital Transmission Control Protection 2 (DTCP2) is required.
optional bool require_dtcp2 = 1 [default = false];
optional CopyControlInfo copy_control = 2;
optional bool encryption_plus = 3;
optional RetentionState retention_state = 4;
optional AnalogProtectionSystem analog_protection_system = 5;
optional ImageConstraintToken image_constraint_token = 6;
optional AnalogSunsetToken analog_sunset_token = 7;
optional DigitalOnlyToken digital_only_token = 8;
optional AudioEnhancedToken audio_enhanced_token = 9;
optional uint32 copy_count = 10;
optional StandardDigitalOutputToken standard_digital_token = 11;
optional HighDynamicRangeToken high_dynamic_token = 12;
optional L2ProtectionOnlyToken l2_only_token = 13;
optional EnhancedImageToken enhaned_image_token = 14;
optional uint32 retention_time = 15;
optional FurtherBoundCopy further_copy = 16;
}
// ----------------------------------------------------------------------------
// license_protocol.proto
// ----------------------------------------------------------------------------
@@ -134,6 +284,26 @@ message License {
WATERMARKING_REQUIRED = 2;
}
// The base for (delayed) timers, i.e. the time from which the delayed timer
// starts.
enum TimerDelayBase {
// Not specified
TIMER_DELAY_BASE_UNSPECIFIED = 0;
// The timer delay is based on |license_start_time|.
LICENSE_START = 1;
// The timer delay is based on the time the license is received by the
// client, whether the license is newly issued by the server or loaded
// from the disk (for persistent licenses).
// IMPORTANT: The playback window also begins immediately at license load
// time.
LICENSE_LOAD = 2;
// The timer delay is based on the time of first decryption.
// NOTE: For persistent licenses, the first decryption time should be
// persisted so that the "first decrypt" should only happen once even when
// the license is loaded repeatedly.
FIRST_DECRYPT = 3;
}
// Indicates that playback of the content is allowed.
optional bool can_play = 1 [default = false];
@@ -169,10 +339,17 @@ message License {
// specified URL.
optional string renewal_server_url = 8;
// How many seconds after |license_start_time| before renewal is first
// attempted. If |renew_with_usage| is true in a new license, then this is
// the optional number of seconds after first playback, before renewal is
// first attempted.
// How many seconds after the "renewal delay base" before renewal is first
// attempted. For an initial license, see comments on
// |initial_renewal_delay_base| on how the "renewal delay base" is
// determined. For a renewal license, the "renewal delay base" is always the
// |license_start_time| of the renewal license.
// NOTE:
// - Renewal should not be attempted if |can_renew| or |can_play| is false,
// or if the license has expired.
// - When the "renewal delay base" is first time of decryption
// (|FIRST_DECRYPT|), this delay is optional: the client can attempt the
// renewal without the delay.
optional int64 renewal_delay_seconds = 9 [default = 0];
// Specifies the delay in seconds between subsequent license
@@ -207,6 +384,19 @@ message License {
// Optional requirement to indicate watermarking is allowed.
optional WatermarkingControl watermarking_control = 16
[default = WATERMARKING_CONTROL_UNSPECIFIED];
// Optional DTCP2 requirements. Default is to not allow dtcp2.
optional DTCPUsageRules dtcp2 = 17;
// The base for |renewal_delay_seconds| for the initial license. For renewal
// licenses this field will be ignored and |renewal_delay_seconds| is always
// be based on |license_start_time|.
// NOTE: For backward compatibility, when set to
// TIMER_DELAY_BASE_UNSPECIFIED or has no value, the actual "renewal delay
// base" will be FIRST_DECRYPT if |renew_with_usage| is true, or
// LICENSE_START otherwise.
optional TimerDelayBase initial_renewal_delay_base = 18
[default = TIMER_DELAY_BASE_UNSPECIFIED];
}
message KeyContainer {
@@ -247,6 +437,14 @@ message License {
HW_SECURE_ALL = 5;
}
// The EncryptionScheme to be used for the content keys. This is applicable
// only to Moho API.
enum EncryptionScheme {
ENCRYPTION_SCHEME_UNSPECIFIED = 0;
AES128_CTR = 1;
AES128_CBC = 2;
}
message KeyControl {
// If present, the key control must be communicated to the secure
// environment prior to any usage. This message is automatically generated
@@ -368,6 +566,10 @@ message License {
// single content or a group of contents. Currently it is only used in CAS
// request.
optional KeyCategorySpec key_category_spec = 13;
// Optional. Used by Moho API for Content key encryption. If unspecified,
// the Moho code uses the encryption scheme of type AES128_CTR.
optional EncryptionScheme encryption_scheme = 14
[default = ENCRYPTION_SCHEME_UNSPECIFIED];
}
optional LicenseIdentification id = 1;
@@ -479,6 +681,9 @@ message LicenseRequest {
optional uint32 key_control_nonce = 7;
// Encrypted ClientIdentification message, used for privacy purposes.
optional EncryptedClientIdentification encrypted_client_id = 8;
// The version of the client implementation. This field is optional and
// informational only.
optional string client_version = 9;
}
message LicenseError {