CN114189713A - Content encryption method - Google Patents
Content encryption method Download PDFInfo
- Publication number
- CN114189713A CN114189713A CN202111573707.8A CN202111573707A CN114189713A CN 114189713 A CN114189713 A CN 114189713A CN 202111573707 A CN202111573707 A CN 202111573707A CN 114189713 A CN114189713 A CN 114189713A
- Authority
- CN
- China
- Prior art keywords
- information
- encryption
- encrypted
- drm
- info
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
- H04N21/2347—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/188—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a video data packet, e.g. a network abstraction layer [NAL] unit
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
- H04N21/234327—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by decomposing into layers, e.g. base layer and one or more enhancement layers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
- H04N21/2347—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption
- H04N21/23476—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption by partially encrypting, e.g. encrypting the ending portion of a movie
Abstract
The invention discloses a content encryption method. The method specifically comprises the following steps: (1) encryption: aiming at SEI information of H.264/H.265, encryption information DRM _ Info is added in an extension field of a basic code stream and is used for transmitting the encryption information, a frame header of each frame needs to carry the information, and if the information is not carried, the frame header is clear stream data; (2) and (3) decryption: acquiring SEI information of H.264/H.265, analyzing DRM _ Info, and if not, determining that the stream is clear; otherwise, the clear stream is decrypted by using the DRM _ Info. The invention has the beneficial effects that: the deployment is convenient, the illegal broadcasting can be effectively prevented, the encrypted content can be conveniently reprocessed, and additional networking is not needed; when the encrypted contents are distributed, the encrypted information is not lost, and the clear stream can be restored at any time and any place by using the encrypted information.
Description
Technical Field
The invention relates to the technical field related to video processing, in particular to a content encryption method.
Background
In IPTV, a content provider needs a content encryption system that is simple to deploy, low in cost, and safe and reliable. In the real-time live broadcast process, not only is the illegal broadcast prevented, but also the encrypted content needs to be provided for downstream manufacturers for reprocessing and distribution. The current common content encryption systems include PlayReady, Widevine, FairPlay, china drm, etc., but these systems are very expensive and require a license server to be set up, and the terminal obtains the decrypted key through a networking manner. The high cost, and complex deployment, make content providers reluctant to set up these systems.
Disclosure of Invention
The present invention provides a method for deploying simple content encryption to overcome the above-mentioned disadvantages in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for encrypting content specifically comprises the following steps:
(1) encryption: aiming at SEI information of H.264/H.265, encryption information DRM _ Info is added in an extension field of a basic code stream and is used for transmitting the encryption information, a frame header of each frame needs to carry the information, and if the information is not carried, the frame header is clear stream data;
(2) and (3) decryption: acquiring SEI information of H.264/H.265, analyzing DRM _ Info, and if not, determining that the stream is clear; otherwise, the clear stream is decrypted by using the DRM _ Info.
The content encryption method provided by the invention is convenient to deploy, can effectively prevent illegal broadcasting, and can conveniently reprocess the encrypted content without additional networking. The invention puts the encryption information into the user _ data field of the video frame, namely the SEI field of H.264/H.265, so that the encryption information is not lost when the encrypted contents are distributed, and the clear stream can be restored by using the encryption information at any time and any place. The data structure defined by the invention and the encryption algorithm can be disclosed.
Preferably, the encryption information DRM _ Info includes a unique identifier, an encryption algorithm ID, random number information, and reserved bits.
Preferably, in the step (1), specifically:
(11) for h.264, the NALU type is 6, that is, the SEI information contains DRM _ Info extension information, the payloadType is 286, and the encryption of the encoded video content means that parts 1, 2, and 5 of the NALU type are encrypted, and the other types are not encrypted; the encryption starting position starts 32 bytes after the NALU type, and the part less than 16 bytes is not encrypted;
(12) for h.265, the NALU type is 39, that is, the SEI information contains DRM _ Info extension information, the payloadType is 286, and the encryption of the encoded video content means that the part with NALU type of 0-31 is encrypted, and the other types are not encrypted; the encryption start position starts 64 bytes after NALU type, and less than 16 bytes are not encrypted.
Preferably, in the step (2), specifically:
(21) acquiring SEI information of H.264/H.265, analyzing DRM _ Info, and if not, determining that the stream is clear;
(22) generating a decrypted key according to a self-defined rule through the information in the DRM _ Info;
(23) the corresponding Encrypted _ nal _ unit is decrypted into a clear stream.
The invention has the beneficial effects that: the deployment is convenient, the illegal broadcasting can be effectively prevented, the encrypted content can be conveniently reprocessed, and additional networking is not needed; when the encrypted contents are distributed, the encrypted information is not lost, and the clear stream can be restored at any time and any place by using the encrypted information.
Detailed Description
The invention is further described with reference to specific embodiments.
A method for encrypting content specifically comprises the following steps:
(1) encryption: aiming at SEI information of H.264/H.265, encryption information DRM _ Info is added in an extension field of a basic code stream and is used for transmitting the encryption information, a frame header of each frame needs to carry the information, and if the information is not carried, the frame header is clear stream data; the method specifically comprises the following steps:
(11) for h.264, the NALU has type 6, i.e. the SEI information contains DRM _ Info extension information, the payloadType is 286,
sei_payload(payloadType,payloadSize) |
If(payloadType==286) |
DRM_Info() |
the encryption of the coded video content means that parts with NALU types of 1, 2 and 5 are encrypted, and other types are not encrypted; the encryption starting position starts 32 bytes after the NALU type, and the part less than 16 bytes is not encrypted;
(12) for h.265, the NALU has a type of 39, i.e., the SEI information contains DRM _ Info extension information, the payloadType is 286,
sei_payload(payloadType,payloadSize) |
If(payloadType==286) |
DRM_Info() |
the encryption of the coded video content refers to the encryption of the part with NALU type of 0-31, and the non-encryption of other types; the encryption starting position starts from 64 bytes after the NALU type, and the part less than 16 bytes is not encrypted;
(2) and (3) decryption: acquiring SEI information of H.264/H.265, analyzing DRM _ Info, and if not, determining that the stream is clear; otherwise, decrypting into clear stream by using DRM _ Info; the method specifically comprises the following steps:
(21) acquiring SEI information of H.264/H.265, analyzing DRM _ Info, and if not, determining that the stream is clear;
(22) generating a decrypted key according to a self-defined rule through information encryption _ method, encryption _ id and key _ seed in DRM _ Info;
(23) the corresponding Encrypted _ nal _ unit is decrypted into a clear stream.
The encryption information DRM _ Info includes an encryption algorithm, an encryption algorithm ID, and current random number information. The following table specifically shows:
wherein:
and a unique identification item for identifying the structural body, wherein the value is 3204FA72-6C4F-4DF6-B729-E5A7DE8BFA 5A.
reserved: reserved bit, value 1.
encryption _ method: encryption algorithms such as AES 128bits CBC. The encryption algorithm is not part of the present invention.
algorithms _ id: and encrypting algorithm ids, wherein each id corresponds to a different key generation rule. The rule algorithm is not part of the present invention.
key _ seed: and generating a private key by the random number and the corresponding algorithm id.
Wherein:
Encrypted_nal_unit()
{
NAL_unit_type_byte//1byte
unencrypted_leader//31bytes
while(bytes_remaining()>16){
protected_block //16bytes
}
unencrypted_trailer //1-16bytes
}
NAL _ unit _ type _ byte: NAL _ unit _ type of H264/H265, i.e. the type of each NAL unit. unencrypted _ leader: in Encrypted _ nal _ unit, data not Encrypted immediately following nal _ unit _ type, H264 is 31 bytes, and H265 is 63 bytes.
protected _ block: in Encrypted _ nal _ unit, the data stream is Encrypted.
unforcrypted _ trailer: when the encrypted data byte < ═ 16, no encryption is required.
The content encryption method provided by the invention is convenient to deploy, can effectively prevent illegal broadcasting, and can conveniently reprocess the encrypted content without additional networking. The invention puts the encryption information into the user _ data field of the video frame, namely the SEI field of H.264/H.265, so that the encryption information is not lost when the encrypted contents are distributed, and the clear stream can be restored by using the encryption information at any time and any place. The data structure defined by the invention and the encryption algorithm can be disclosed.
Claims (4)
1. A method for encrypting contents is characterized by comprising the following steps:
(1) encryption: aiming at SEI information of H.264/H.265, encryption information DRM _ Info is added in an extension field of a basic code stream and is used for transmitting the encryption information, a frame header of each frame needs to carry the information, and if the information is not carried, the frame header is clear stream data;
(2) and (3) decryption: acquiring SEI information of H.264/H.265, analyzing DRM _ Info, and if not, determining that the stream is clear; otherwise, the clear stream is decrypted by using the DRM _ Info.
2. The method of claim 1, wherein the encryption information DRM _ Info includes a unique identifier, an encryption algorithm ID, random number information, and reserved bits.
3. The method for encrypting the content according to claim 1 or 2, wherein in the step (1), specifically:
(11) for h.264, the NALU type is 6, that is, the SEI information contains DRM _ Info extension information, the payloadType is 286, and the encryption of the encoded video content means that parts 1, 2, and 5 of the NALU type are encrypted, and the other types are not encrypted; the encryption starting position starts 32 bytes after the NALU type, and the part less than 16 bytes is not encrypted;
(12) for h.265, the NALU type is 39, that is, the SEI information contains DRM _ Info extension information, the payloadType is 286, and the encryption of the encoded video content means that the part with NALU type of 0-31 is encrypted, and the other types are not encrypted; the encryption start position starts 64 bytes after NALU type, and less than 16 bytes are not encrypted.
4. The method for encrypting the content according to claim 1 or 2, wherein in the step (2), specifically:
(21) acquiring SEI information of H.264/H.265, analyzing DRM _ Info, and if not, determining that the stream is clear;
(22) generating a decrypted key according to a self-defined rule through the information in the DRM _ Info;
(23) the corresponding Encrypted _ nal _ unit is decrypted into a clear stream.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111573707.8A CN114189713A (en) | 2021-12-21 | 2021-12-21 | Content encryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111573707.8A CN114189713A (en) | 2021-12-21 | 2021-12-21 | Content encryption method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114189713A true CN114189713A (en) | 2022-03-15 |
Family
ID=80605809
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111573707.8A Pending CN114189713A (en) | 2021-12-21 | 2021-12-21 | Content encryption method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114189713A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024087208A1 (en) * | 2022-10-28 | 2024-05-02 | 深圳市锐明技术股份有限公司 | Video playback method and system, and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101394297A (en) * | 2007-09-17 | 2009-03-25 | 华为技术有限公司 | DRM service implementing method, equipment and system under broadcast environment |
CN102918864A (en) * | 2010-04-02 | 2013-02-06 | 三星电子株式会社 | Method and system for managing an encryption key for a broadcasting service |
CN104205107A (en) * | 2012-03-22 | 2014-12-10 | 索尼公司 | Reception device, reception method, program, decryption processing device, reception processing system, and information processing device |
CN104639943A (en) * | 2015-01-30 | 2015-05-20 | 中国科学院信息工程研究所 | H.264 coding standard-based general video encryption method and system |
CN105704545A (en) * | 2016-01-20 | 2016-06-22 | 中国科学院信息工程研究所 | Secret key synchronizing information transmission method based on H.264 video stream |
CN107004070A (en) * | 2014-09-10 | 2017-08-01 | 微软技术许可有限责任公司 | The media carried out using the shielded Digital Right Management of hardware decode control |
CN111988624A (en) * | 2020-09-07 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Video processing method, device, equipment and storage medium |
-
2021
- 2021-12-21 CN CN202111573707.8A patent/CN114189713A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101394297A (en) * | 2007-09-17 | 2009-03-25 | 华为技术有限公司 | DRM service implementing method, equipment and system under broadcast environment |
CN102918864A (en) * | 2010-04-02 | 2013-02-06 | 三星电子株式会社 | Method and system for managing an encryption key for a broadcasting service |
CN104205107A (en) * | 2012-03-22 | 2014-12-10 | 索尼公司 | Reception device, reception method, program, decryption processing device, reception processing system, and information processing device |
CN107004070A (en) * | 2014-09-10 | 2017-08-01 | 微软技术许可有限责任公司 | The media carried out using the shielded Digital Right Management of hardware decode control |
CN104639943A (en) * | 2015-01-30 | 2015-05-20 | 中国科学院信息工程研究所 | H.264 coding standard-based general video encryption method and system |
CN105704545A (en) * | 2016-01-20 | 2016-06-22 | 中国科学院信息工程研究所 | Secret key synchronizing information transmission method based on H.264 video stream |
CN111988624A (en) * | 2020-09-07 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Video processing method, device, equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024087208A1 (en) * | 2022-10-28 | 2024-05-02 | 深圳市锐明技术股份有限公司 | Video playback method and system, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20090290711A1 (en) | Method, Apparatus and System for Secure Distribution of Content | |
EP2772062B1 (en) | Constructing a transport stream | |
EP2373019A1 (en) | Secure descrambling of an audio / video data stream | |
US20050216752A1 (en) | Common scrambling | |
WO2010063532A1 (en) | Content decryption device and encryption system using an additional key layer | |
EP3308551B1 (en) | Method and apparatus for enabling content protection over broadcast channels | |
US8571213B2 (en) | Security method for preventing the unauthorized use of multimedia contents | |
CN102075812A (en) | Data receiving method and system of digital television | |
JP6596131B2 (en) | Transmitting apparatus, receiving apparatus and conditional access system | |
US11259057B2 (en) | Methods, devices and system for generating a watermarked stream | |
CN114189713A (en) | Content encryption method | |
CN112511299B (en) | Interface data transmission method and device, electronic equipment and storage medium | |
KR101005844B1 (en) | Conditional access system for ts packet processing based on memory card | |
US10075419B2 (en) | Method and device to protect a decrypted media content before transmission to a consumption device | |
JP2004152014A (en) | Contents transmitting method, contents transmitting device, contents transmitting program, contents receiving method, contents receiving device, and contents receiving program | |
KR101980928B1 (en) | Method, cryptographic system and security module for descrambling content packets of a digital transport stream | |
CA2498346A1 (en) | Selective encryption for video on demand | |
Ogawa et al. | Practically secure update of scrambling scheme | |
JP6596130B2 (en) | Transmitting apparatus, receiving apparatus and conditional access system | |
JP2008011406A (en) | Receiving apparatus and transmitting apparatus | |
CN114205643A (en) | Advertisement insertion identification method and device based on IP live stream | |
JP2018191319A (en) | Transmission device, reception device, and limited reception system | |
WO2014117851A1 (en) | Proxy modules |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |