RE: tvapi-ACTION-38: Propose an api spec for conditional access systems



Dear All,

[Background]
I have studied the CAS requirements.
I have looked at two references, i.e., ATSC CAS for terrestrial broadcast, ISO 13818-1.
ATSC[1] from 4.1.3.5.1 (page 10) defines ATSC_CA_descriptor () as follows:
ATSC_CA_descriptor() {
descriptor_tag (8bits, value= 0x88)
descriptor_length (8bits, uimsbf)
CA_System_ID (16bits, uimsbf)
for ( i = 0 ; i < descriptor_length - 2 ; i++ ) {
private_data_byte 8 bslbf
}
}
The CA_System_ID is defined as This 16-bit unsigned integer indicates the type of CA system applicable for the information conveyed in this descriptor.
So “meta information” regarding CAS is CA_System_ID, which is usually identifies vendor of the CAS system which is used for encrypting/decrypting channels.

ISO[2] from 2.6.16 (page 69) defines Conditional access descriptor as follows:
CA_descriptor() {
 descriptor_tag (8bits, uimsbf)
 descriptor_length (8bits, uimsbf)
 CA_system_ID (16bits, uimsbf)
 reserved (3bits, bslbf)
 CA_PID 13 uimsbf
 for (i = 0; i < N; i++) {
 private_data_byte (8bits, uimsbf)
 }
}

CA_system_ID – This is a 16-bit field indicating the type of CA system applicable for either the associated ECM and/or EMM streams. The coding of this is privately defined and is not specified by ITU-T | ISO/IEC.
CA_PID – This is a 13-bit field indicating the PID of the Transport Stream packets which shall contain either ECM or EMM information for the CA systems as specified with the associated CA_system_ID. The contents (ECM or EMM) of the packets indicated by the CA_PID is determined from the context in which the CA_PID is found, i.e. a TS_program_map_section or the CA table in the Transport Stream, or the stream_id field in the Program Stream.

So “meta information” regarding CAS is can be CA_System_ID and CA_PID.

Also there is an important CAS related meta-information in the field of PES (Packetized Elementary Stream) which is called PES_scrambling_control (indicate the scrambling mode of the PES packet payload).
If “ PES_scrambling_control = 0x00 “ indicated not scrambled. Other value are user-defined which means the packet is scrambled.

[Reference]
[ATSC] ATSC Standard: Conditional Access System for Terrestrial Broadcast (A/70 Part 1:2010)
[ISO] ISO 13818-1, Information technology — Generic coding of moving pictures and associated audio information: Systems, 2000

Through this analysis, it is possible to define the APIs for CAS requirements.
The followings are the proposals for the APIs.

[Proposal 1] Meta information for CI Card
Proposal for “Meta information” for CAS CI card is as follows.
The TVCICardInformation dictionary contains the information on the CI Card used to decrypt the encrypted TV channel.
dictionary TVCICardInformation  {
readonly    attribute Boolean          isScrambled;
readonly    attribute DOMString?            casSystemId;
readonly    attribute DOMString?            casPId;
};

isScrambled of type Boolean, readonly
   MUST indicate whether the stream from this TV channel is encrypted(or scrambled).
casSystemId of type DOMString, readonly, nullable
   MUST return the CAS system ID used to decrypt stream from the encrypted TV channel. Note, the value is null, if the value of isScrambled is false.
casPID of type DOMString, readonly, nullable
MUST return the CAS PID of ECM or EMM information for CA System. Note, the value is null, if the value of isScrambled is false or if the system does not support casPID.

Note) isScambled is equivalent to the isFree attribute in the TVchannel.


[Proposal 2] APIs for CAS Requirements
To support [cas], [cas.descrypt] [cas.notifications.change] requirements, it can be defined under TVChannel Interface, since CAS are applied for each TV channel.
But we need to discuss where the methods to support CAS requirements should be defined under TVSource interface or TVChannel interface.
Anyway, proposed methods are as follows.
Interface TVChannel: EventTarget {
 :
TVCICardInformation   getCICard();
 void    applyCICard (TVCICardInformation card);
 attribute EventHandler onCIcardchanged;
   :
}

[New Methods]
getCICard
returns a dictionary of TVCICardInformation which provides meta information of the CI cards used in decrypting encrypted TV channel as long as the information are available.
No parameters
   Return type: TVCICardInformation

applyCICard
   request the tuner to apply CI card with the card parameter.
   Parameter (card)
      Type: TVCICardInformation, Nullable(X), Optional(X)
       Description: Specifies information of CI Card to be applied to the encrypted TV channel.
Return type: void

[Memo from Sung Hei Kim] I am not sure if the system (settop) can use(apply) the specified CI card from the webapp. Normally, CI card that can be used for decryption are already included in the TV stream.

[New Event]
Event Handler: onCIcardchanged
Event name: CI_CHANGE
Event type: TVCICardChangedEvent
Description: Handles the information for the dynamically added/removed common interface (CI) cards.


XX. TVCICardChangedEvent Interface
The TVCICardChangedEvent interface represents the event related to the changes to the CI cards, which can be occur with the add or removal of the CI cards.

Interface TVCICardChangedEvent : Event  {
    readonly attribute TVCICardState    state;
readonly attribute DOMString?            casSystemId;
}

23. Enumerations
Enum TVCICardState  {
     “CIcard-added”,
     “CIcard-removed”
};

Regards,
Sung Hei Kim (ETRI)


[Note Requirements]
[cas] This API SHALL be able to provide the webapps with the meta information of the CI cards as long as those meta information is available. For example, the CAS standards such as DVB-CI, ARIB-CAS... etc.
[cas.decrypt] This API SHALL be able to enable the webapps to apply the CI cards to decrypt the encrypted channel.
[cas.notifications] This API SHALL be able to notify the webapps of the dynamically added/removed Common Interface (CI) cards.
The following event SHALL be supported
[cas.notifications.change] CI_CHANGE

________________________________
보낸 사람 : "TV Control API Community Group Issue Tracker" <sysbot+tracker@w3.org>
보낸 날짜 : 2015-07-07 22:54:12 ( +09:00 )
받는 사람 : public-tvapi@w3.org <public-tvapi@w3.org>
참조 :
제목 : tvapi-ACTION-38: Propose an api spec for conditional access systems

tvapi-ACTION-38: Propose an api spec for conditional access systems

http://www.w3.org/community/tvapi/track/actions/38


Assigned to: Sung Hei Kim

Received on Tuesday, 1 September 2015 10:41:10 UTC