METHOD AND DEVICE TO TRANSFER A VIDEO STREAM BETWEEN A HOST DEVICE AND AN ELECTRONIC DESCRAMBLING DEVICE
20210136438 · 2021-05-06
Assignee
Inventors
Cpc classification
H04N21/84
ELECTRICITY
H04N21/8352
ELECTRICITY
International classification
H04N21/418
ELECTRICITY
H04N21/266
ELECTRICITY
H04N21/436
ELECTRICITY
H04N21/8352
ELECTRICITY
Abstract
A method to transfer a video stream from a host device comprising a controller configured for bulk transfers to a descrambling device, comprises: forming a chain out transfer comprising a chain out header linked with multiple chain out descriptors, the first chain out descriptor pointing to an out description packet containing at least one producer ID, the second and subsequent chain out descriptor pointing to chunks from the video stream, the last chain out descriptor being configured to generate an interrupt; forming a chain in transfer comprising a chain in header linked with a plurality of chain in descriptors, each chain in descriptor pointing to a descrambled chunk; requesting the controller to process the chain; receiving the description packet by the descrambling device and using key data associated with the chunks to descramble them; receiving by the controller the descrambled chunks and triggering an interrupt on the last chunk.
Claims
1. A method to descramble at least one video stream, originating each from a producer and received by a host device, using an electronic descrambling device connected to the host device, the method comprising: splitting the video stream into scrambled data chunks in the host device; transferring the scrambled data chunks to the electronic descrambling device within a chain out transfer structure, the chain out transfer structure comprising a chain out header linked with a plurality of chain out descriptors, a first chain out descriptor pointing to an out description packet containing at least one producer ID, each producer ID identifying a single producer, and subsequent chain out descriptors pointing each to one scrambled data chunk, each scrambled data chunk being associated to a single producer ID of the first chain out descriptor; descrambling the scrambled data chunks in the electronic descrambling device using pre-loaded key data associated thereto, said key data being identified thanks to the producer ID which is both assigned to the key data and provided through the chain out transfer structure; returning the descrambled data chunks to the host device within a chain in transfer structure, the chain in transfer structure including a chain in header linked with a plurality of chain in descriptors, each chain in descriptor pointing to a descrambled data chunk, and a last chain in descriptor configured to generate an interrupt; storing each of the received descrambled data chunks in the host device at an address indicated by the corresponding chain in descriptor; and triggering an interrupt in response to reception of the last chain in descriptor.
2. The method of claim 1, wherein the electronic descrambling device is a universal serial bus dongle.
3. The method of claim 1, wherein the at least one video stream is compliant with a Moving Picture Experts Group (MPEG) standard.
4. The method of claim 3, wherein the at least one MPEG stream is formed by a Single Program Transport Stream (SPTS) having one packet identifier (PID).
5. The method of claim 4, wherein the chain out transfer structure contains different types of producers selected among SPTS, Multi Program transport stream (MPTS), or raw MPEG, each identified using an associated producer ID.
6. The method of claim 3, wherein the at least one MPEG stream comprises a Multi Program transport stream (MPTS) comprising a plurality of sub-streams, each having a program ID, said method further comprising inserting in the out description packet a program ID of each sub-stream, the chain in transfer structure containing at least one data chunk associated with each program ID; and informing a media player that the at least one data chunk of the chain in transfer structure is descrambled.
7. The method of claim 6, wherein at least a first and a second MPEG stream are transferred to the electronic descrambling device, each having a different producer ID, the method further comprising inserting in the first chain out descriptor the producer ID of the first stream and the producer ID of the second stream; and inserting in the second chain out descriptor a data chunk from the first MPEG stream and in a third chain out descriptor a data chunk from the second MPEG stream.
8. The method of claim 1, wherein the key data are transferred to the electronic descrambling device through a dedicated channel, each key data being dedicated to one packet identifier (PID), the key data being used with a data chunk corresponding to the respective PID.
9. The method of claim 1, wherein each descrambled data chunk is re-encrypted by a channel key shared between the host device and the electronic descrambling device.
10. A host device having an interface connectable to an electronic descrambling device for exchanging data therewith, in particular for transferring at least one scrambled video stream thereto, each video stream being originating from a producer, said host device comprising: a memory storing instructions; and a processing block configured to execute the instructions to perform out and in transfers, said processing block being configured to split the video stream into scrambled data chunks; form a chain out transfer structure comprising a chain out header linked with a plurality of chain out descriptors, a first chain out descriptor pointing to an out description packet containing at least one producer ID, each producer ID identifying a single producer, and subsequent chain out descriptors pointing each to one scrambled data chunk, each scrambled data chunk being associated to a single producer ID of the first chain out descriptor; transfer the scrambled data chunks to the interface within the chain out transfer structure; receive descrambled data chunks within a chain in transfer structure from the interface, the chain in transfer structure including a chain in header linked with a plurality of chain in descriptors, each chain in descriptor pointing to a descrambled data chunk, and a last chain in descriptor configured to generate an interrupt; store each of the received descrambled data chunks in the host device at an address indicated by the corresponding chain in descriptor; and trigger an interrupt in response to reception of the last chain in descriptor.
11. The host device of claim 10, wherein the video stream is compliant with a Moving Picture Experts Group (MPEG) standard and comprises a Multi Program transport stream (MPTS) comprising a plurality of sub-streams each having a packet identifier (PID), the processing block being further configured to insert in the out description packet a program ID of each program, the chain in transfer structure containing at least one data chunk associated with each program ID, inform a media player that the at least one data chunk of the chain in transfer structure is descrambled.
12. The host device of claim 10, wherein a first and a second video stream are transferred to the interface, each having a different producer ID, the processing block being further configured to insert in the first chain out descriptor the producer ID of the first stream and the producer ID of the second stream; insert in the chain out transfer structure a first consumer identification of the first stream and a second consumer identification of the second stream; insert in the chain out transfer structure at least two data chunks, one of the first stream and one of the second stream; and inform a first consumer and a second consumer that the data chunks are descrambled.
13. The host device of claim 10, wherein each descrambled data chunk received through the interface is encrypted using a shared channel key and the processing block is further configured to decrypt each descrambled data chunk using said channel key.
14. An electronic descrambling device for descrambling at least one video stream, each originating from a producer, said electronic descrambling device being configured to receive a chain of out transfer from an I/O interface connectable with a host device and thus receive a scrambled data chunk, wherein the data chunk is of a particular producer and defined from the video stream , and the chain of out transfer comprises a chain out header linked with a plurality of chain out descriptors, the first chain out descriptor pointing to a out description packet containing a producer ID, the second and subsequent chain out descriptor pointing to the data chunk, receive the out description packet; retrieve the producer ID from said out description packet; identify key data associated with the data chunk with the producer ID; use the key data to descramble the scrambled data chunk, return the descrambled data to the I/O interface connectable with the host device.
15. The electronic descrambling device according to claim 14, wherein the electronic descrambling device is a USB Dongle.
16. The electronic descrambling device according to claim 14, comprising a key table populated, for each of a plurality of producer IDs, with key data related to said producer ID.
17. The electronic descrambling device according to claim 16, wherein the key table contains a packet identifier PID or a program ID, in case one producer ID is associated with a plurality of key data.
18. The electronic descrambling device according to claim 14, comprising a personal key and further configured to receive the key data encrypted from the host device, and to decrypt the encrypted key data with the personal key.
19. The electronic descrambling device according to claim 18, configured to obtain the encrypted key data in the form of an Entitlement Control Message.
20. The electronic descrambling device according to claim 18, configured to obtain the encrypted key data in a license file.
21. The electronic descrambling device according to claim 14, comprising the I/O interface connectable with the host device, a memory acting as a buffer memory and configured to store data chunks, a processing block in charge of directing a flow of data entering or exiting via the I/O interface to the memory, and a descrambling module, wherein the processing block is configured to handle in and out pointers of the buffer memory, pass the pointer for a data chunk stored in the memory to the descrambling module, keep track of the producer ID for said data chunk and load the related key data into the descrambling module.
22. The electronic descrambling device according to claim 14, comprising a key memory to store the key data received from the host device.
Description
BRIEF DESCRIPTION OF THE FIGURES
[0017] The following detailed description will be better understood thanks to the attached figures in which:
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
DETAILED DESCRIPTION
[0024]
[0025]
[0026] The first chain out descriptor (odTD1) points to the second chain out descriptor (odTD2). This second chain out descriptor (and the following chain out descriptors) points to the chunk of data extracted from the MPEG stream. The application layer handling the MPEG stream splits the stream into chunks of data and loads them into the buffer memory at an address loaded into the chain out descriptor.
[0027] The application layer can load more than one chunk into the chain in accordance with the maximum number of chain out descriptors handled by the chain.
[0028] According to the example of
[0029] The MPTS1 Data, forming the first data chunk, is then pointed by the second chain out descriptor (oqTD2), the MPTS2 Data, forming the second data chunk, is then pointed by the third chain out descriptor (oqTD) and the MPTS3 Data, forming the third data chunk, is then pointed by the fourth chain out descriptor (oqTD1).
[0030] The application layer also configures the chain in. The chain in and chain out are connected together and form a single event. Once configured, the application layer calls the USB controller to execute the chain operations. The chain in is a chain starting with a chain in header (iqH) linked with a plurality of chain in descriptors (iqTD). Each chain in descriptor points to a chunk of data resulting from the processing (i.e. descrambling) by the USB dongle.
[0031] The last chain in descriptor (iqTDn) is configured to trigg an interrupt when the USB controller receives the last chunk of processed data by the USB dongle.
[0032] Each chain in descriptor is associated with a MPEG stream. Depending of the implementation of the USB controller, the size of data chunk can vary. According to one example, a data chunk comprises a plurality of packets. Each packet represents a USB transaction. According to one example of forming a chain of packets, each packet has a size equal to the nominal size (e.g. 512 Bytes), except the last packet. The non-nominal size of the packet indicates that this is the last packet of the data chunk. This is illustrated in the
[0033] According to another example of realization, the chain out transfer is configured such as the producer ID is placed in the data chunk, into the first packet. The producer ID is placed in a data header preceding the data chunk and both are concatenated by the USB controller and transferred in a single USB transaction.
[0034] This is the case illustrated at the
[0035] When the USB controller is supporting both 3a and 3b, 3a and 3b share a common field in their respective header allowing the dongle USB controller to differentiate between a 3a and a 3b chain of descriptor. This allows a host to choose the most efficient transfer for a specific processing.
[0036] Once the chain out and in is configured, the USB controller receives a signal from the application layer and the chain is processed. The transfer to the USB dongle is executed by the USB controller for example using the bulk in and out transfer. The USB controller activates and transfers the data as instructed.
[0037] The USB dongle receives the chain out and retrieves the producer ID from the corresponding packet. With the producer ID, the USB dongle can retrieve the key data corresponding to the data chunk. The USB dongle receives through another USB channel, key data related to the MPEG streams to proceed.
[0038] The USB dongle comprises a key table populated with the key data for each MPEG stream. According to a first example, the key table comprises for each producer ID, the key data related to this producer. Preferably, the key data comprises an odd and an even key, one being currently used and the other one ready for the next key change. A bit in the chunk data indicates the current key to be used.
[0039] This key table can further contain a packet identifier PID (or program ID) in case one producer ID is associated with a plurality of key data. The table will be then as follows:
TABLE-US-00001 Producer ID PID ID Key odd Key even PRID1 PID12 Value Value PRID1 PID15 Value Value PRID2 PID3 Value Value PRID3 PID10 Value Value
[0040] An example of the value of the keys is a 128 bits pseudorandom number.
[0041] In the above example, the producer PRID1 is associated with an MPEG stream comprising two sub-streams needing key data to be descrambled. Each sub-stream is identified by a PID identifier or program ID (in our example PID12 and PID15), each sub-stream being associated with different key data.
[0042] The key table is received by the host device from an authorization server or can be extracted from one or more MPEG stream. According to an embodiment of the invention, the USB dongle comprises the key(s) necessary to decrypt the encrypted key data. The encrypted key data can be in the form of ECM (Entitlement Control Message) extracted from the MPEG stream by the host and transferred to the USB dongle.
[0043] According to another embodiment, the host can request a license file from an authorization server and can pass the license file to the USB dongle once received from the authorization server. The license file is decrypted and the key data are used to populate the key table. The USB dongle can comprise a personal key to decrypt the encrypted key data (license or ECM).
[0044] Once the USB dongle has descrambled the data chunk using the corresponding key data, the descrambled data chunk are sent to the host device, in particular to the USB controller. The latter stores the received data at the address indicated in the first chain out descriptor. As a consequence, a data chunk DCo1 is transferred by the USB controller to the USB dongle and when the USB dongle returns the data chunk DCi1, the USB controller stores it at the address indicated by the first chain in descriptor iqTD1.
[0045] When the last data chunk has been stored in the chain in queue the USB controller initiates an interrupt to inform the application layer.
[0046] The application layer can then retrieve the descrambled data chunk and can deliver it to a consumer such as a multimedia player.
[0047] It is to be noted that a MPEG stream is loaded into a stream buffer as illustrated at the
[0048] According to the illustrated example, the stream buffer is the same for the scrambled and descrambled data. However, in accordance with another example, the buffer for the scrambled data is independent to the buffer of the descrambled data. In this case, the USB controller, while receiving the descrambled chunk from the USB dongle, stores them into the in buffer.
[0049] This formatting and handling of chain buffer is particularly adapted to USB 2.0 transmission.
[0050] However, other protocol layer can be used to transfer the data based on stream buffer and chain pointer and descriptor as described above.
[0051]
[0052] The I/O interface is connectable with the host device to receive the data via the dedicated USB signals. The processing block PRO_M is in charge of directing the flow of data entering and exiting via the I/O Interface to the memory MEM. The memory acts as a buffer memory and the pointers (in and out pointers) are handled by the processing block. The data chunks are stored in the memory and the pointer for this chunk is passed to the descrambling module. The processing block also keep track of the producer ID for said chunk of data and loads the related keys into the descrambling module. The descrambling module, when the chunk is descrambled, stores the descrambled chunk and sends a signal to the processing module. The pointer is then passed to the I/O interface which routes the descrambled chunk into the I/O Interface. The processing block is in charge of executing the chain's instruction. The structure of the chain is known by the processing block and the elements of the chain extracted so that the processing block knows for each data chunk, which producer ID is related to. For that purpose, the processing block is connected with a key memory K_MEM to store the keys received from the host device via the USB Interface.
[0053] According to another embodiment, the keys memory K_MEM is directly connected to the descrambling module and this module, when the processing block instructs to descramble a data chunk identified by producer ID, loads the keys related to said producer ID in the key registers.
[0054] Although an overview of the inventive subject matter has been described with reference to specific example embodiments, various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of embodiments of the present invention. For example, various embodiments or features thereof may be mixed and matched or made optional by a person of ordinary skill in the art. Such embodiments of the inventive subject matter may be referred to herein, individually or collectively, by the term “invention” merely for convenience and without intending to voluntarily limit the scope of this application to any single invention or inventive concept if more than one is, in fact, disclosed.
[0055] The embodiments illustrated herein are believed to be described in sufficient detail to enable those skilled in the art to practice the teachings disclosed. Other embodiments may be used and derived therefrom, such that structural and logical substitutions and changes may be made without departing from the scope of this disclosure. The Detailed Description, therefore, is not to be taken in a limiting sense, and the scope of various embodiments is defined only by the appended claims, along with the full range of equivalents to which such claims are entitled.