CN101184223A - Method for encrypting WMA/WMV/ASF/ASX files - Google Patents
Method for encrypting WMA/WMV/ASF/ASX files Download PDFInfo
- Publication number
- CN101184223A CN101184223A CNA2007102029150A CN200710202915A CN101184223A CN 101184223 A CN101184223 A CN 101184223A CN A2007102029150 A CNA2007102029150 A CN A2007102029150A CN 200710202915 A CN200710202915 A CN 200710202915A CN 101184223 A CN101184223 A CN 101184223A
- Authority
- CN
- China
- Prior art keywords
- data
- bag
- load
- valid data
- file
- 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
Images
Landscapes
- Storage Device Security (AREA)
Abstract
The invention relates to an encryption technology for multi-media files. The technical problem solved by the invention is to provide an encryption method aiming at WMA/WMV/ASF/ASX files, of which only the audio and video data are encrypted. The invention comprises the following steps: a, analyze the chief target objects of files and confirm the initial positions of the data target objects; b, locate the stream attribute of the chief target objects among the target objects and revise encryption marks when encryption is required; c, analyze loading analysis data, confirm the effective data position via length type marks and attribute marks, and encrypt the effective data; d, insert DRM information at the end of the files; the effective data refers to the audio and video data. The invention has the advantages that the file formats can be recognized by the corresponding players without altering any file information except the audio and video data and encryption marks; the files are independent from various transmission bearing protocols, and applicable for practical uses, such as download playing and real-time playing and other excellences.
Description
Technical field
The present invention relates to technology that multimedia file is encrypted, particularly the WMA/WMV/ASF/ASX file.
Background technology
WMA (Windows Media Audio) is a kind of audio format that Microsoft releases; WMV (Windows MediaVideo) is a kind of compression of digital video form of release that Microsoft releases.ASF (Advanced StreamingFormat, senior stream format) is that Microsoft is the crossfire multimedia file format that Windows98 developed.ASX is the text formatting that relevant document flow and representation thereof are provided for Windows Media.These four kinds of files of WMA/WMV/ASF/ASX are except mime type and suffix name different, and data format is all identical.
Multimedia messagess such as audio frequency, video, image and control command script are by these several forms of WMA/WMV/ASF/ASX, and the form transmission with network packet realizes the streamed multimedia content issue.The WMA/WMV/ASF/ASX file can be supported compression/de-compression coded system arbitrarily, and can use any bottom-layer network host-host protocol, has very big flexibility.
At present, for the encryption copyright protection of WMA/WMV/ASF/ASX file, mainly there are following two kinds of cipher modes:
One is the DRM encipherment protection of Microsoft, and encrypt file only is confined to just be able to normal play after obtaining associated rights on the Windows Media Player.
Its two, be the data format of not considering file, whole file data is carried out encipherment protection.File after the method is encrypted, form can't be played device identification, also can't satisfy the network transmission protocol requirement of original itself.
Summary of the invention
Technical problem to be solved by this invention is, a kind of encryption method at the WMA/WMV/ASF/ASX file is provided, and only the audio, video data in the WMA/WMV/ASF/ASX file encrypted.
The present invention solves the problems of the technologies described above the technical scheme that is adopted to be, a kind of the WMA/WMV/ASF/ASX file is carried out method of encrypting, may further comprise the steps:
The head in a, the resolution file marks object, obtains the original position that the head marks the total length specified data destination object of object;
B, mark the head and to search the stream attribute that the head marks object in the object, need to encrypt and then revise encryption identification;
C, parsing load resolution data obtain length type sign and attribute-bit, identify the position of determining valid data with attribute-bit by length type, and valid data are encrypted;
D, insert DRM information at tail of file;
Described valid data are the audio or video data.
Step c specifically may further comprise the steps:
C1, parsing load resolution data obtain the length type sign, as are single bag data, enter step c2; As entering step c3 for many bag data;
C2, parsing load resolution data obtain attribute-bit, as are non-compressed package, enter step c4; As be compressed package, enter step c5;
C3, parsing load resolution data obtain attribute-bit, as are non-compressed package, enter step c6; As be compressed package, enter step c7;
C4, resolve the load header, obtain the length of valid data, valid data are encrypted;
Behind c5, the parsing load header, resolve first byte of each packed data unit, obtain the length of the valid data of each packed data unit, the valid data of each packed data unit are encrypted;
C6, resolve the previous byte of load header, obtain the number of many APMB packages; Resolve the load header of each bag, obtain the length of valid data in each bag, the valid data of each bag are encrypted;
C7, resolve the previous byte of load header, obtain the number of many APMB packages; After resolving the load header of each bag, resolve first byte of each packed data unit in each bag, obtain the length of the valid data of this packed data unit, the valid data of each packed data unit in each bag are encrypted.
The invention has the beneficial effects as follows, do not change any fileinfo except that audio, video data and encryption identification, file format can be independent of each transmission bearer agreement simultaneously by corresponding player identification, is fit to practical applications such as downloading and playing, real-time VOD.
Description of drawings
Fig. 1 is the data structure of WMA/WMV/ASF/ASX file;
Fig. 2 is the data structure of datum target object in the WMA/WMV/ASF/ASX file.
Embodiment
As shown in Figure 1, a complete WMA/WMV/ASF/ASX file all should comprise: the head marks object (HeaderObject), datum target object (Data Object), index destination object (Index Object), and wherein the index destination object is optional.
Realization of the present invention mainly is divided into following 3 steps:
1, the content of correct destination object is resolved;
2, the content of data destination object is resolved and the audio, video data in the data destination object is encrypted;
3, embed DRM information.
Below be example (to call file in the following text) with the ASF file, be elaborated with regard to these three steps:
1, the Context resolution of correct destination object:
The data that the head marks object are positioned at the original position of file, the most information of having stored file, and the head marks the data format such as the following table of object:
Title | Size (bits) | Explanation |
Destination object ID | 128 | 16 byte GUID, the head marks the object data origin identification |
The destination object size | 64 | 8 byte-sized signs, sign comprise GUID and mark the total length of object the interior head, are unit with the byte |
The head marks the quantity of object | 32 | The head marks the concrete number of object, and the head marks information such as file attribute object that object generally comprises, stream attribute, error correction, decoding tabulation |
Keep | 8 | Keep the position, put 0x01 |
Keep | 8 | Keep the position, put 0x02 |
The head marks object | Indefinite | Each head marks object and all begins with the GUID of 16 bytes |
The process of analysis of correct destination object, as follows in detail:
(1) head marks the GUID sign beginning of the file initial place of object with one 16 byte, and is as follows: 0x30,0x26,0xb2,0x75,0x8e, 0x66,0xcf, 0x11,0xa6,0xd9,0x00,0xaa, 0x00,0x62,0xce, 0x6c.
(2) head marks the length mark of object, is right after after the GUID of 16 bytes, resolves this length so that the whole of HeaderObject content are read and next step parsing to the data destination object.
(3) locating file attributes object parses the packet size of follow-up data destination object.The GUID of file attribute object is: 0xa1, and 0xdc, 0xab, 0x8c, 0x47,0xa9,0xcf, 0x 11,0x8e, 0xe6,0x00,0xc0,0x0c, 0x20,0x53,0x65.
(4) search the stream attribute object, exist simultaneously, then can leave in 2 stream attribute objects as audio, video data:
The GUID of stream attribute object is: 0x91,0x07,0xdc, 0xb7,0xb7,0xa9,0xcf, 0x11,0x8e, 0xe6,0x00,0xc0,0x0c, 0x20,0x53,0x65;
Audio frequency GUID is designated 0x40,0x9e, 0x69,0xf8,0x4d, 0x5b, 0xcf, 0x11,0xa8,0xfd, 0x00,0x80,0x5f, 0x5c, 0x44,0x2b;
Video GUID is designated: 0xc0,0xef, 0x19,0xbc, 0x4d, 0x5b, 0xcf, 0x11,0xa8,0xfd, 0x00,0x80,0x5f, 0x5c, 0x44,0x2b;
(5) search audio frequency and video GUID success after, data are resolved, obtain the traffic identifier number (streamnumber) of audio frequency and video, simultaneously, if follow-up the needs encrypts, revise the encryption identification that needs the audio or video encrypted in the stream attribute, encryption identification is 1bit, and 1 has encrypted for the audio or video of this traffic identifier representative; 0 is unencryption.After revising encryption identification, terminal can judge corresponding data whether decipher by needs according to encryption identification, thus correct resolution file.
2, the content of data destination object is resolved and the audio, video data in the data destination object is encrypted:
The datum target object mainly is that audio/video information subpackage (packet) is stored.As Fig. 2, for single bag, generally comprise 3 parts, be followed successively by: error correction data (Error Correction data), load resolution data (PayloadParsing data), load data (Payload Data).Wherein error correction data is optional.
Error correction data indicates whether to exist the error correction data section, if there is error correction data, could correctly parse the original position of load resolution data in each bag according to these data, thereby could determine the original position of load data, concrete data format sees table:
For existing ASF file, by analysis, the value of error correction data all is fixed as 0x82, Ox00, Ox00.
The load resolving information has mainly been indicated length mark (promptly having used several bytes to write down the length of related data), packet length, padding data length, frequency, transmitting time and the duration etc. of the concrete data in the bag, and concrete data format sees table:
Wherein the multi-load in the length type sign is designated 1, the many bags of expression; Multi-load sign 0, the single bag of expression; Copy data length type in the attribute-bit is 00, is expressed as non-compressed package; Other then represents compressed package; According to the difference of depositing the pay(useful) load mode, bag is divided into 4 kinds of forms: single non-compressed package, single compressed package, a plurality of non-compressed package, a plurality of compressed package.
Load data is used to deposit the main indication information and the valid data content of valid data.
Many bag load datas are after the load resolving information, Duo the sign of a byte than single bag load data: low 6bits represents that this load data is made up of several bag data, and high 2bits represents that the length type of valid data identifies that (00-does not have, the 01-1 byte, the 10-2 byte, the 11-4 byte);
Single bag load data is represented its valid data length mark by its load header, and concrete byte number is according to the numerical value of high 2bits and difference.
When the form of load data not simultaneously, the position that valid data are deposited is also different, and the ciphering process of valid data is had difference:
Resolve the load resolution data, obtain the length type sign and resolve the load resolution data;
As load data is single non-compressed package, then resolves the load header, obtains the length of valid data, and valid data are encrypted;
As load data is single compressed package, then resolves first byte of each packed data unit, obtains the length of the valid data of each packed data unit, and the valid data of each packed data unit are encrypted;
As load data is a plurality of non-compressed packages, then resolves the previous byte of load header, obtains the number of many APMB packages; Resolve the load header of each bag, obtain the length of valid data in each bag, the valid data of each bag are encrypted;
As load data is a plurality of compressed packages, then resolves the previous byte of load header, obtains the number of many APMB packages; After resolving the load header of each bag, resolve first byte of each packed data unit in each bag, obtain the length of the valid data of this packed data unit, the valid data of each packed data unit in each bag are encrypted.
3, embed DRM information
In order not influence the normal parsing of file, through the debugging checking, it is comparatively reasonable that DRM information adds tail of file.
Above method is applicable to the encryption of audio, video data in the WMA/WMV/ASF/ASX file.Because encapsulated DRM information in the file, terminal can be resolved according to corresponding rule, thereby reaches the final purpose of digital copyright protecting.
Claims (3)
1. one kind is carried out method of encrypting to the WMA/WMV/ASF/ASX file, it is characterized in that, may further comprise the steps:
The head in a, the resolution file marks object, obtains the original position that the head marks the total length specified data destination object of object;
B, mark the head and to search the stream attribute that the head marks object in the object, need to encrypt and then revise encryption identification;
C, parsing load resolution data obtain length type sign and attribute-bit, identify the position of determining valid data with attribute-bit by length type, and valid data are encrypted;
D, insert DRM information at tail of file;
Described valid data are the audio or video data.
2. a kind of according to claim 1 the WMA/WMV/ASF/ASX file is carried out method of encrypting, it is characterized in that, further comprising the steps of before the described step c:
Error correction data in the resolution data destination object is determined the original position of load resolution data.
3. a kind of as claimed in claim 1 or 2 the WMA/WMV/ASF/ASX file is carried out method of encrypting, it is characterized in that described step c specifically may further comprise the steps:
C1, parsing load resolution data obtain the length type sign, as are single bag data, enter step c2; As entering step c3 for many bag data;
C2, parsing load resolution data obtain attribute-bit, as are non-compressed package, enter step c4; As be compressed package, enter step c5;
C3, parsing load resolution data obtain attribute-bit, as are non-compressed package, enter step c6; As be compressed package, enter step c7;
C4, resolve the load header, obtain the length of valid data, valid data are encrypted;
Behind c5, the parsing load header, resolve first byte of each packed data unit, obtain the length of the valid data of each packed data unit, the valid data of each packed data unit are encrypted;
C6, resolve the previous byte of load header, obtain the number of many APMB packages; Resolve the load header of each bag, obtain the length of valid data in each bag, the valid data of each bag are encrypted;
C7, resolve the previous byte of load header, obtain the number of many APMB packages; After resolving the load header of each bag, resolve first byte of each packed data unit in each bag, obtain the length of the valid data of this packed data unit, the valid data of each packed data unit in each bag are encrypted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007102029150A CN101184223A (en) | 2007-12-07 | 2007-12-07 | Method for encrypting WMA/WMV/ASF/ASX files |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007102029150A CN101184223A (en) | 2007-12-07 | 2007-12-07 | Method for encrypting WMA/WMV/ASF/ASX files |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101184223A true CN101184223A (en) | 2008-05-21 |
Family
ID=39449273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2007102029150A Pending CN101184223A (en) | 2007-12-07 | 2007-12-07 | Method for encrypting WMA/WMV/ASF/ASX files |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101184223A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101980238A (en) * | 2010-11-12 | 2011-02-23 | 四川长虹电器股份有限公司 | Method for encrypting RM/RMVB file |
CN104753925A (en) * | 2015-03-11 | 2015-07-01 | 华中科技大学 | Gateway system and method for encrypting and decoding files |
CN108052590A (en) * | 2017-12-11 | 2018-05-18 | 四川新网银行股份有限公司 | The dynamic application method and system of a kind of structural data |
CN108306848A (en) * | 2017-01-13 | 2018-07-20 | 上海交通大学 | A kind of data packet length identification method based on media encapsulation format |
-
2007
- 2007-12-07 CN CNA2007102029150A patent/CN101184223A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101980238A (en) * | 2010-11-12 | 2011-02-23 | 四川长虹电器股份有限公司 | Method for encrypting RM/RMVB file |
CN104753925A (en) * | 2015-03-11 | 2015-07-01 | 华中科技大学 | Gateway system and method for encrypting and decoding files |
CN108306848A (en) * | 2017-01-13 | 2018-07-20 | 上海交通大学 | A kind of data packet length identification method based on media encapsulation format |
CN108052590A (en) * | 2017-12-11 | 2018-05-18 | 四川新网银行股份有限公司 | The dynamic application method and system of a kind of structural data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11082479B2 (en) | Method and apparatus for transmitting and receiving content | |
US10911511B2 (en) | Carriage of ISO-BMFF event boxes in an MPEG-2 transport stream | |
CN103283220B (en) | The method sending broadcast service, the method receiving broadcast service and the equipment of reception broadcast service | |
US20060184790A1 (en) | Protecting elementary stream content | |
US20060036551A1 (en) | Protecting elementary stream content | |
JP5557897B2 (en) | Digital media content protection system and method | |
KR20010052145A (en) | Method and apparatus for media data transmission | |
EP3136738A1 (en) | Reception device, reception method, transmission device, and transmission method | |
EP3404924A1 (en) | Reception device, transmission device, and data processing method | |
US7555009B2 (en) | Data processing method and apparatus, and data distribution method and information processing apparatus | |
KR20130116307A (en) | System and method for conveying session information for use in forensic watermarking | |
CN101184223A (en) | Method for encrypting WMA/WMV/ASF/ASX files | |
CN101394297B (en) | DRM service implementing method, equipment and system under broadcast environment | |
CN101980238B (en) | Method for encrypting RM/RMVB file | |
CN101188750A (en) | An encryption method for transfer stream file | |
JP4308493B2 (en) | Apparatus for flexible and common IPMP system for distribution and protection of MPEG-2 content | |
CN102326399A (en) | Method and apparatus for secure distribution of audiovisual data encapsulated according to a plurality of transport protocols |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20080521 |