[go: up one dir, main page]

CN103065068B - A kind of encryption method of imprinting file and device - Google Patents

A kind of encryption method of imprinting file and device Download PDF

Info

Publication number
CN103065068B
CN103065068B CN201210554558.5A CN201210554558A CN103065068B CN 103065068 B CN103065068 B CN 103065068B CN 201210554558 A CN201210554558 A CN 201210554558A CN 103065068 B CN103065068 B CN 103065068B
Authority
CN
China
Prior art keywords
encryption
bytes
ksv
electronic equipment
information
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.)
Active
Application number
CN201210554558.5A
Other languages
Chinese (zh)
Other versions
CN103065068A (en
Inventor
熊跃平
徐永桥
刘威
陈敏锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN201210554558.5A priority Critical patent/CN103065068B/en
Publication of CN103065068A publication Critical patent/CN103065068A/en
Application granted granted Critical
Publication of CN103065068B publication Critical patent/CN103065068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The present invention is applicable to electronic equipment engraving data security fields, provides a kind of encryption method and device of imprinting file.Described encryption method comprises: the KSV sequence number being obtained electronic equipment by twin wire universal serial bus I2C; The encryption key being used for encryption burning file is generated according to the KSV sequence number obtained; Obtain the information that electronic equipment exports, and adopt the information that described in the encryption keys of generation, electronic equipment exports, to obtain the imprinting file encrypted.This invention ensures that an electronic equipment can only play the file of this electronic equipment imprinting, avoid the dispute over copyright caused because of PVR file propagation, better protect electronic equipment manufacturer, add the international competitiveness of electronic equipment manufacturer.

Description

一种刻录文件的加密方法及装置Encryption method and device for recording files

技术领域technical field

本发明属于电子设备刻录数据安全领域,尤其涉及一种刻录文件的加密方法及装置。The invention belongs to the field of recording data security of electronic equipment, and in particular relates to an encryption method and device for recording files.

背景技术Background technique

随着国内外数字电视的普及,作为数字电视标准配置功能的个人视频录像机(Personalvideorecorder,PVR)功能也随之进入了外国的千家万户。With the popularization of digital TV at home and abroad, the function of personal video recorder (PVR) as a standard configuration function of digital TV has also entered thousands of households in foreign countries.

但如果在一个电子设备(如电视)中刻录的视频也可以在其它电子设备中播放将涉及到侵犯版权的问题,现有的电子设备(如电视)软件中的一般做法是,把PVR生成的文件格式根据不同电子设备厂商的要求生成特殊的格式,从而使不同电子设备厂商的PVR文件不能互相兼容,不能互相播放。However, if the video recorded in one electronic device (such as TV) can also be played in other electronic devices, it will involve copyright infringement. The general practice in the existing electronic device (such as TV) software is to convert The file format generates a special format according to the requirements of different electronic equipment manufacturers, so that the PVR files of different electronic equipment manufacturers are not compatible with each other and cannot be played with each other.

但是现有的方法仍不能解决以下问题:对于同一电子设备厂商生产的电子设备刻录的PVR文件,该同一电子设备厂商生产的其他电子设备仍能播放。例如,假设李某买了厂商A生产的电视,夏某也买了一个同型号的电视,则李某通过其购买的电视的PVR刻录的视频文件拿到夏某的电视上同样也可以播放。这样,随着海外市场订单的持续增多,碰到这样情况的几率也在增多,从而加大了版权侵犯的几率。However, the existing methods still cannot solve the following problem: for the PVR files burned by the electronic equipment produced by the same electronic equipment manufacturer, other electronic equipment produced by the same electronic equipment manufacturer can still play them. For example, suppose Li buys a TV produced by manufacturer A, and Xia also buys a TV of the same model, then the video files recorded by Li through the PVR of the TV purchased by Li can also be played on Xia’s TV. In this way, with the continuous increase in orders from overseas markets, the chances of encountering such situations are also increasing, thus increasing the chances of copyright infringement.

发明内容Contents of the invention

本发明实施例提供了一种刻录文件的加密方法及装置,旨在解决同一型号的两个电子设备刻录的PVR文件相互之间能够播放,从而导致版权侵犯的几率提高的问题。The embodiment of the present invention provides an encryption method and device for recording files, aiming to solve the problem that the PVR files recorded by two electronic devices of the same model can be played mutually, thereby increasing the probability of copyright infringement.

本发明实施例是这样实现的,一种刻录文件的加密方法,所述方法包括下述步骤:The embodiment of the present invention is achieved like this, a kind of encryption method of burning file, described method comprises the following steps:

通过两线式串行总线I2C获取电子设备的KSV序列号;Obtain the KSV serial number of the electronic device through the two-wire serial bus I2C;

根据获取的KSV序列号生成用于加密刻录文件的加密密钥;Generate the encryption key used to encrypt the burning file according to the obtained KSV serial number;

获取电子设备输出的信息,并采用生成的加密密钥加密所述电子设备输出的信息,以得到加密的刻录文件。The information output by the electronic device is obtained, and the generated encryption key is used to encrypt the information output by the electronic device to obtain an encrypted recording file.

本发明实施例的另一目的在于提供一种刻录文件的加密装置,所述加密装置包括:Another object of the embodiments of the present invention is to provide an encryption device for burning files, the encryption device comprising:

I2C总线,用于通过两线式串行总线I2C获取电子设备的KSV序列号;I2C bus, used to obtain the KSV serial number of the electronic device through the two-wire serial bus I2C;

加密密钥生成单元,用于根据获取的KSV序列号生成用于加密刻录文件的加密密钥;An encryption key generation unit, used to generate an encryption key for encrypting and recording files according to the acquired KSV serial number;

加密单元,用于获取电子设备输出的信息,并采用生成的加密密钥加密所述电子设备输出的信息,以得到加密的刻录文件。The encryption unit is used to obtain the information output by the electronic device, and encrypt the information output by the electronic device by using the generated encryption key to obtain an encrypted recording file.

本发明实施例中,由于每个电子设备存储的KSV序列号都是不同的,因此使用电子设备存储的KSV序列号生成的加密密钥也是不同的,从而保证在每个电子设备得到的刻录文件也都是不同的,即保证一个电子设备只能播放该电子设备刻录的文件,避免了因为PVR文件传播而引起的版权纠纷,更好的保护了电子设备厂商,增加了电子设备厂商的国际竞争力。In the embodiment of the present invention, since the KSV serial number stored in each electronic device is different, the encryption key generated by using the KSV serial number stored in the electronic device is also different, so as to ensure that the recording files obtained in each electronic device They are also different, that is, ensuring that an electronic device can only play the files recorded by the electronic device, avoiding copyright disputes caused by the spread of PVR files, better protecting electronic device manufacturers, and increasing international competition among electronic device manufacturers force.

附图说明Description of drawings

图1是本发明第一实施例提供的一种刻录文件的加密方法的流程图;Fig. 1 is the flowchart of the encryption method of a kind of recording file that the first embodiment of the present invention provides;

图2是本发明第二实施例提供的一种刻录文件的加密装置的结构图;Fig. 2 is a structural diagram of an encryption device for burning files provided in the second embodiment of the present invention;

图3是本发明第二实施例提供的另一种刻录文件的加密装置的结构图。Fig. 3 is a structural diagram of another encryption device for burning files provided by the second embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

本发明实施例中,获取电子设备存储的KSV序列号,根据该KSV序列号生成用于加密刻录文件的加密密钥,将生成的加密密钥加密电子设备输出的信息,从而得到该电子设备加密后的刻录文件。In the embodiment of the present invention, the KSV serial number stored in the electronic device is obtained, an encryption key for encrypting the recording file is generated according to the KSV serial number, and the generated encryption key is used to encrypt the information output by the electronic device, thereby obtaining the encryption key of the electronic device. recorded files.

为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions of the present invention, specific examples are used below to illustrate.

实施例一:Embodiment one:

图1示出了本发明第一实施例提供的一种刻录文件的加密方法的流程图,详述如下:Fig. 1 has shown the flow chart of a kind of encryption method of recording file that the first embodiment of the present invention provides, and details are as follows:

步骤S11,通过两线式串行总线I2C获取电子设备的KSV序列号。Step S11, obtaining the KSV serial number of the electronic device through the two-wire serial bus I2C.

在该步骤中,KSV序列号(视频加密密钥)是预先存储在配有高清晰度多媒体接口(HighDefinitionMultimediaInterface,HDMI)或数字视频接口(DigitalVideoInterface,DVI)的电子设备中。为了保证HDMI或者DVI传输的高清晰信号不会被非法录制,就出现了高带宽数字内容保护(High-bandwidthDigitalContentProtection,HDCP)技术。HDCP技术规范由Intel领头完成,当用户进行非法复制时,该技术会进行干扰,降低复制出来的影像的质量,从而对内容进行保护。HDCP的每个设备会有一个唯一的KSV序列号,发送端和接受端的密码处理单元会核对对方的KSV值,以确保连接是合法的。In this step, the KSV serial number (video encryption key) is pre-stored in an electronic device equipped with a High Definition Multimedia Interface (HDMI) or a Digital Video Interface (DVI). In order to ensure that the high-definition signals transmitted by HDMI or DVI will not be illegally recorded, High-bandwidth Digital Content Protection (HDCP) technology has emerged. The HDCP technical specification is led by Intel. When users make illegal copies, this technology will interfere and reduce the quality of the copied images, thereby protecting the content. Each HDCP device will have a unique KSV serial number, and the cryptographic processing units at the sending end and the receiving end will check each other's KSV value to ensure that the connection is legal.

电子设备厂商为每个电子设备(如电视)购买唯一的KSV序列号,然后把KSV序列号烧入到电子设备的主板的FLASH或E2PROM中。在步骤S11中,通过两线式串行总线(Inter-IntegratedCircuit,I2C)把烧入电子设备主板的FLASH或E2PROM中的KSV序列号读出来。Electronic equipment manufacturers purchase a unique KSV serial number for each electronic equipment (such as TV), and then burn the KSV serial number into the FLASH or E2PROM of the motherboard of the electronic equipment. In step S11, the KSV serial number burned into the FLASH or E2PROM of the main board of the electronic device is read out through a two-wire serial bus (Inter-Integrated Circuit, I2C).

进一步地,保存读取的KSV序列号,如保存在电视机的数组HashKey[]中。其中,KSV的长度为289个字节。Further, save the read KSV serial number, such as saving in the array HashKey[] of the TV set. Among them, the length of KSV is 289 bytes.

步骤S12,根据获取的KSV序列号生成用于加密刻录文件的加密密钥。Step S12, generating an encryption key for encrypting the recording file according to the acquired KSV serial number.

该步骤的刻录文件也称为PVR文件。The burning file of this step is also called a PVR file.

其中,根据获取的KSV序列号生成用于加密刻录文件的加密密钥的步骤具体包括:将289个字节的KSV序列号生成8个字节的用于加密刻录文件的加密密钥。其中,用于加密刻录文件的加密密钥的前4个字节等于KSV序列号的前145个字节的值的平方和;用于加密刻录文件的加密密钥的后4个字节等于KSV序列号的后144个字节的值的平方和。Wherein, the step of generating the encryption key for encrypting the recording file according to the obtained KSV serial number specifically includes: generating an 8-byte encryption key for encrypting the recording file from the 289-byte KSV serial number. Among them, the first 4 bytes of the encryption key used to encrypt the burning file are equal to the square sum of the value of the first 145 bytes of the KSV serial number; the last 4 bytes of the encryption key used to encrypt the burning file are equal to KSV The sum of the squares of the values of the last 144 bytes of the serial number.

在该步骤中,把保存在HashKey[]数组中的289个字节的KSV序列号生成一个8个字节(64位)的密匙,假设该密匙的前4个字节(32位)为Key_1,则该Key_1等于HashKey[]数组的HashKey[0]的平方加上HashKey[1]的平方,一直加到HashKey[144]的平方的和,密匙的后4个字节(32位)为Key_2,该Key_2等于HashKey[]数组的HashKey[145]的平方加上HashKey[146]的平方,一直加到HashKey[288]的平方得出。由于每个电子设备购买的KSV序列号都是唯一的,因此每个电子设备根据其本身的KSV序列号生成的用于加密刻录文件的64位加密密钥都是唯一的。其中,用于加密刻录文件的加密密钥生成代码如下:In this step, generate an 8-byte (64-bit) key from the 289-byte KSV serial number stored in the HashKey[] array, assuming the first 4 bytes (32 bits) of the key is Key_1, then the Key_1 is equal to the square of HashKey[0] plus the square of HashKey[1] in the HashKey[] array, until the sum of the square of HashKey[144], the last 4 bytes of the key (32 bits ) is Key_2, and this Key_2 is equal to the square of HashKey[145] of the HashKey[] array plus the square of HashKey[146], which is obtained by adding to the square of HashKey[288]. Since the KSV serial number purchased by each electronic device is unique, the 64-bit encryption key used to encrypt and burn files generated by each electronic device based on its own KSV serial number is unique. Among them, the encryption key generation code used to encrypt the burning file is as follows:

步骤S13,获取电子设备输出的信息,并采用生成的加密密钥加密所述电子设备输出的信息,以得到加密的刻录文件。In step S13, the information output by the electronic device is obtained, and the generated encryption key is used to encrypt the information output by the electronic device, so as to obtain an encrypted recording file.

该步骤中,获取电子设备输出的用户需要刻录的文件信息,例如,当用户使用数字电视的PVR刻录时,通过该数字电视的解码模块,把传输到该数字电视的信号转换为对应的数字信息,再使用生成的加密密钥加密转换得到的数字信息。In this step, the file information output by the electronic device that the user needs to burn is obtained. For example, when the user uses the PVR of the digital TV to burn, the signal transmitted to the digital TV is converted into corresponding digital information through the decoding module of the digital TV. , and then use the generated encryption key to encrypt the converted digital information.

其中,获取电子设备输出的信息,并采用生成的加密密钥加密所述电子设备输出的信息,以得到加密的刻录文件的步骤具体包括:获取电子设备输出的信息;采用加密密钥的前4个字节加密输出的第n次的4个字节的信息,采用加密密钥的后4个字节加密输出的第(n+1)次的4个字节的信息;其中,n为奇数,n等于1,3,5,7,…,。具体地,将获取的电子设备输出的信息保存在缓冲器(buffer)的数组中,每个buffer数据占4个字节(32位),然后对每两个buffer数据进行加密,把第一个buffer数据与加密密钥的前4个字节(Key_1)进行数学的异或操作得到加密的数据,再把第二个buffer数据与加密密钥的后4个字节(Key_2)进行异或操作得到加密的数据。Wherein, the step of obtaining the information output by the electronic device, and using the generated encryption key to encrypt the information output by the electronic device, so as to obtain the encrypted recording file specifically includes: obtaining the information output by the electronic device; The n-th 4-byte information output by encryption of bytes, and the (n+1)-th 4-byte information encrypted by the last 4 bytes of the encryption key; where n is an odd number , n is equal to 1, 3, 5, 7,...,. Specifically, the acquired information output by the electronic device is stored in the buffer array, each buffer data occupies 4 bytes (32 bits), and then every two buffer data are encrypted, and the first The buffer data and the first 4 bytes of the encryption key (Key_1) are mathematically XORed to obtain the encrypted data, and then the second buffer data is XORed with the last 4 bytes of the encryption key (Key_2) get encrypted data.

优选地,在步骤获取电子设备输出的信息,并采用生成的加密密钥加密所述电子设备输出的信息,以得到加密的刻录文件之后,进一步包括下述步骤:通过I2C总线把生成的刻录文件存储到外部存储介质中。该步骤中,通过I2C总线把加密后的刻录文件存到外部存储介质中(如U盘或移动硬盘等)。Preferably, after the step of obtaining the information output by the electronic device, and using the generated encryption key to encrypt the information output by the electronic device to obtain the encrypted recording file, the following steps are further included: converting the generated recording file through the I2C bus stored in an external storage medium. In this step, the encrypted burning file is stored in an external storage medium (such as a U disk or a mobile hard disk, etc.) through the I2C bus.

在本发明实施例中,获取电子设备存储的KSV序列号,根据该KSV序列号生成用于加密刻录文件的加密密钥,将生成的加密密钥加密电子设备输出的信息,从而得到该电子设备加密后的刻录文件。由于每个电子设备存储的KSV序列号都是不同的,因此使用电子设备存储的KSV序列号生成的加密密钥也是不同的,从而保证在每个电子设备得到的刻录文件也都是不同的,即保证一个电子设备只能播放该电子设备刻录的文件,避免了因为PVR文件传播而引起的版权纠纷,更好的保护了电子设备厂商,增加了电子设备厂商的国际竞争力。In the embodiment of the present invention, the KSV serial number stored in the electronic device is obtained, an encryption key used to encrypt the recording file is generated according to the KSV serial number, and the generated encryption key is encrypted to the information output by the electronic device, thereby obtaining the electronic device Encrypted burn files. Since the KSV serial number stored in each electronic device is different, the encryption key generated using the KSV serial number stored in the electronic device is also different, thus ensuring that the burning files obtained in each electronic device are also different. That is to ensure that an electronic device can only play the files recorded by the electronic device, avoid copyright disputes caused by the spread of PVR files, better protect electronic device manufacturers, and increase the international competitiveness of electronic device manufacturers.

以下为电子设备解密播放该电子设备生成的PVR文件的过程:(1)首先,当用户播放PVR刻录文件时,电子设备通过I2C总线从存储在外部存储介质中(如U盘或移动硬盘等)的PVR文件读出相对应的数字信息,并保存在buffer数组中,每个buffer数据占4个字节(32位);(2)然后对每两个buffer数据解密,第一个buffer数据与Key_1进行数学的异或操作得到解密的数据,第二个buffer数据与Key_2进行异或操作得到解密的数据;(3)在把加密文件还原成普通数字数据后,通过电子设备的视频解码模块把这些解密后的数据传输到主芯片解码的视频播放器中进行播放。The following is the process of electronic equipment decrypting and playing the PVR file generated by the electronic equipment: (1) First, when the user plays the PVR recording file, the electronic equipment is stored in the external storage medium (such as U disk or mobile hard disk, etc.) through the I2C bus. The PVR file reads out the corresponding digital information and saves it in the buffer array, each buffer data occupies 4 bytes (32 bits); (2) Then decrypts every two buffer data, the first buffer data and Key_1 performs mathematical XOR operation to obtain decrypted data, and the second buffer data and Key_2 perform XOR operation to obtain decrypted data; (3) After restoring the encrypted file to ordinary digital data, the video decoding module of the electronic device converts These decrypted data are transmitted to the video player decoded by the main chip for playback.

实施例二:Embodiment two:

图2示出了本发明第二实施例提供的一种刻录文件的加密装置的结构,为了便于说明,仅示出了与本发明实施例相关的部分。FIG. 2 shows the structure of an encryption device for burning files provided by the second embodiment of the present invention. For convenience of description, only the parts related to the embodiment of the present invention are shown.

该刻录文件的加密装置可以用于通过有线或者无线网络连接服务器的各种信息处理终端,例如电视机、计算机、笔记本电脑等,可以是运行于这些信息处理终端内的软件单元、硬件单元或者软硬件相结合的单元,也可以作为独立的挂件集成到这些信息处理终端中或者运行于这些信息处理终端的应用系统中。The encryption device for recording files can be used for various information processing terminals connected to servers through wired or wireless networks, such as televisions, computers, notebook computers, etc., and can be software units, hardware units or software units running in these information processing terminals. The unit combined with hardware can also be integrated into these information processing terminals as an independent pendant or run in the application systems of these information processing terminals.

该刻录文件的加密装置包括:I2C总线21、加密密钥生成单元22、加密单元23。其中:The encryption device for burning files includes: an I2C bus 21 , an encryption key generation unit 22 , and an encryption unit 23 . in:

I2C总线21,用于通过两线式串行总线I2C获取电子设备的KSV序列号。The I2C bus 21 is used to obtain the KSV serial number of the electronic device through the two-wire serial bus I2C.

本实施例中,电子设备厂商为每个电子设备(如电视)购买唯一的KSV序列号,然后把KSV序列号烧入到电子设备的主板的FLASH或E2PROM中。再通过I2C总线把烧入电子设备主板的FLASH或E2PROM中的KSV序列号读出来。进一步地,保存读取的KSV序列号,如保存在电视机的数组HashKey[]中。其中,KSV的长度为289个字节。In this embodiment, the electronic equipment manufacturer purchases a unique KSV serial number for each electronic equipment (such as a TV), and then burns the KSV serial number into the FLASH or E2PROM of the motherboard of the electronic equipment. Then read out the KSV serial number burned into the FLASH or E2PROM of the main board of the electronic device through the I2C bus. Further, save the read KSV serial number, such as saving in the array HashKey[] of the TV set. Among them, the length of KSV is 289 bytes.

优选地,所述KSV序列号预先存储在电子设备中,每个KSV序列号唯一对应一个电子设备。Preferably, the KSV serial number is pre-stored in the electronic device, and each KSV serial number uniquely corresponds to one electronic device.

加密密钥生成单元22,用于根据获取的KSV序列号生成用于加密刻录文件的加密密钥。The encryption key generating unit 22 is configured to generate an encryption key for encrypting the recording file according to the acquired KSV serial number.

其中,所述加密密钥生成单元22生成加密密钥的步骤具体为:Wherein, the step of generating the encryption key by the encryption key generation unit 22 is specifically:

将289个字节的KSV序列号生成8个字节的用于加密刻录文件的加密密钥;其中,所述用于加密刻录文件的加密密钥的前4个字节等于KSV序列号的前145个字节的值的平方和;所述用于加密刻录文件的加密密钥的后4个字节等于KSV序列号的后144个字节的值的平方和。The 289-byte KSV serial number is used to generate an 8-byte encryption key for encrypting the recording file; wherein, the first 4 bytes of the encryption key for encrypting the recording file are equal to the first 4 bytes of the KSV serial number The sum of the squares of the value of 145 bytes; the last 4 bytes of the encryption key used to encrypt the burning file is equal to the sum of the squares of the value of the last 144 bytes of the KSV serial number.

本实施例中,把保存在HashKey[]数组中的289个字节的KSV序列号生成一个8个字节(64位)的密匙。In this embodiment, an 8-byte (64-bit) key is generated from the 289-byte KSV serial number stored in the HashKey[] array.

加密单元23,用于获取电子设备输出的信息,并采用生成的加密密钥加密所述电子设备输出的信息,以得到加密的刻录文件。The encryption unit 23 is configured to obtain the information output by the electronic device, and use the generated encryption key to encrypt the information output by the electronic device, so as to obtain an encrypted recording file.

本实施例中,获取的电子设备输出的信息为无加密的,例如获取数字电视输出的由该数字电视信号解码得到的数字信息。In this embodiment, the obtained information output by the electronic device is not encrypted, for example, the digital information obtained by decoding the digital TV signal output by the digital TV is obtained.

在本发明实施例中,由于每个电子设备存储的KSV序列号都是不同的,因此使用电子设备存储的KSV序列号生成的加密密钥也是不同的,从而保证在每个电子设备得到的刻录文件也都是不同的,即保证一个电子设备只能播放该电子设备刻录的文件,避免了因为PVR文件传播而引起的版权纠纷,更好的保护了电子设备厂商,增加了电子设备厂商的国际竞争力。In the embodiment of the present invention, since the KSV serial number stored in each electronic device is different, the encryption key generated using the KSV serial number stored in the electronic device is also different, so as to ensure the recording The files are also different, that is, to ensure that an electronic device can only play the files recorded by the electronic device, avoiding copyright disputes caused by the spread of PVR files, better protecting electronic device manufacturers, and increasing the international reputation of electronic device manufacturers. Competitiveness.

图3示出了本发明实施例提供的另一种刻录文件的加密装置的结构图,作为本发明一优选实施例,刻录文件的加密装置的加密单元23包括:Fig. 3 shows the structural diagram of another kind of encryption device for recording files provided by the embodiment of the present invention, as a preferred embodiment of the present invention, the encryption unit 23 of the encryption device for recording files includes:

刻录信息获取模块231,用于获取电子设备输出的信息。The recording information obtaining module 231 is configured to obtain information output by the electronic device.

刻录信息加密模块232,用于采用加密密钥的前4个字节加密输出的第n次的4个字节的信息,采用加密密钥的后4个字节加密输出的第(n+1)次的4个字节的信息;其中,n为奇数,n等于1,3,5,7,…。Burning information encryption module 232, used for adopting the first 4 bytes of the encryption key to encrypt the information of the nth 4 bytes of output, and adopting the last 4 bytes of the encryption key to encrypt the output of the (n+1 ) times of 4-byte information; wherein, n is an odd number, and n is equal to 1, 3, 5, 7, ....

本实施例中,将获取的电子设备输出的信息保存在buffer的数组中,每个buffer数据占4个字节(32位),然后采用刻录信息加密模块232对每两个buffer数据进行加密,把第一个buffer数据与加密密钥的前4个字节(Key_1)进行数学的异或操作得到加密的数据,再把第二个buffer数据与加密密钥的后4个字节(Key_2)进行异或操作得到加密的数据。In this embodiment, the acquired information output by the electronic device is stored in the buffer array, and each buffer data occupies 4 bytes (32 bits), and then the burning information encryption module 232 is used to encrypt every two buffer data, Perform a mathematical XOR operation on the first buffer data and the first 4 bytes of the encryption key (Key_1) to obtain encrypted data, and then combine the second buffer data with the last 4 bytes of the encryption key (Key_2) Perform XOR operation to get encrypted data.

作为一优选实施例,所述I2C总线21还用于:As a preferred embodiment, the I2C bus 21 is also used for:

把生成的刻录文件存储到外部存储介质中。Store the generated burning file to an external storage medium.

本实施例中,通过I2C总线把加密后的刻录文件存到外部存储介质中(如U盘或移动硬盘等),从而能够保存该刻录文件。In this embodiment, the encrypted burning file is stored in an external storage medium (such as a U disk or a mobile hard disk) through the I2C bus, so that the burning file can be saved.

在本发明实施例中,获取电子设备存储的KSV序列号,根据该KSV序列号生成用于加密刻录文件的加密密钥,将生成的加密密钥加密电子设备输出的信息,从而得到该电子设备加密后的刻录文件。由于每个电子设备存储的KSV序列号都是不同的,因此使用电子设备存储的KSV序列号生成的加密密钥也是不同的,从而保证在每个电子设备得到的刻录文件也都是不同的,即保证一个电子设备只能播放该电子设备刻录的文件,避免了因为PVR文件传播而引起的版权纠纷,更好的保护了电子设备厂商,增加了电子设备厂商的国际竞争力。In the embodiment of the present invention, the KSV serial number stored in the electronic device is obtained, an encryption key used to encrypt the recording file is generated according to the KSV serial number, and the generated encryption key is encrypted to the information output by the electronic device, thereby obtaining the electronic device Encrypted burn files. Since the KSV serial number stored in each electronic device is different, the encryption key generated using the KSV serial number stored in the electronic device is also different, thus ensuring that the burning files obtained in each electronic device are also different. That is to ensure that an electronic device can only play the files recorded by the electronic device, avoid copyright disputes caused by the spread of PVR files, better protect electronic device manufacturers, and increase the international competitiveness of electronic device manufacturers.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.

Claims (8)

1. an encryption method for imprinting file, is characterized in that, described method comprises the steps:
The KSV sequence number of electronic equipment is obtained by twin wire universal serial bus I2C;
The encryption key being used for encryption burning file is generated according to the KSV sequence number obtained;
Obtain the information that electronic equipment exports, and adopt the information that described in the encryption keys of generation, electronic equipment exports, to obtain the imprinting file encrypted;
The step that the described KSV sequence number according to obtaining generates the encryption key being used for encryption burning file specifically comprises:
The KSV sequence number of 289 bytes is generated the encryption key being used for encryption burning file of 8 bytes;
Wherein, front 4 bytes of the described encryption key for encryption burning file equal the quadratic sum of the value of front 145 bytes of KSV sequence number; Rear 4 bytes of the described encryption key for encryption burning file equal the quadratic sum of the value of rear 144 bytes of KSV sequence number.
2. the method for claim 1, is characterized in that, described KSV sequence number prestores in the electronic device, the unique corresponding electronic equipment of each KSV sequence number.
3. the method for claim 1, is characterized in that, the information that described acquisition electronic equipment exports, and adopts the information that described in the encryption keys of generation, electronic equipment exports, and specifically comprises with the step obtaining the imprinting file encrypted:
Obtain the information that electronic equipment exports;
The information of 4 bytes of n-th time adopting front 4 bytes encryption of encryption key to export, the information of 4 bytes that (n+1) that adopt rear 4 bytes encryption of encryption key to export is secondary; Wherein, n is odd number.
4. the method as described in any one of claims 1 to 3, it is characterized in that, in the information that described acquisition electronic equipment exports, and adopt the information that described in the encryption keys of generation, electronic equipment exports, with obtain encrypt imprinting file step after, comprise the steps: further
By I2C bus, the imprinting file generated is stored in exterior storage medium.
5. an encryption device for imprinting file, is characterized in that, described encryption device comprises:
I2C bus, for obtaining the KSV sequence number of electronic equipment by twin wire universal serial bus I2C;
Encrypting key generating unit, for generating the encryption key being used for encryption burning file according to the KSV sequence number obtained;
Ciphering unit, for obtaining the information that electronic equipment exports, and adopts the information that described in the encryption keys of generation, electronic equipment exports, to obtain the imprinting file encrypted;
The step that described encrypting key generating unit generates encryption key is specially:
The KSV sequence number of 289 bytes is generated the encryption key being used for encryption burning file of 8 bytes;
Wherein, front 4 bytes of the described encryption key for encryption burning file equal the quadratic sum of the value of front 145 bytes of KSV sequence number; Rear 4 bytes of the described encryption key for encryption burning file equal the quadratic sum of the value of rear 144 bytes of KSV sequence number.
6. encryption device as claimed in claim 5, it is characterized in that, described KSV sequence number prestores in the electronic device, the unique corresponding electronic equipment of each KSV sequence number.
7. encryption device as claimed in claim 5, it is characterized in that, described ciphering unit comprises:
Record information acquisition module, for obtaining the information that electronic equipment exports;
Record information encrypting module, the information of 4 bytes of n-th time exported for adopting front 4 bytes encryption of encryption key, the information of 4 bytes that (n+1) that adopt rear 4 bytes encryption of encryption key to export is secondary; Wherein, n is odd number.
8. the encryption device as described in any one of claim 5 to 7, is characterized in that, described I2C bus also for:
The imprinting file generated is stored in exterior storage medium.
CN201210554558.5A 2012-12-19 2012-12-19 A kind of encryption method of imprinting file and device Active CN103065068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210554558.5A CN103065068B (en) 2012-12-19 2012-12-19 A kind of encryption method of imprinting file and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210554558.5A CN103065068B (en) 2012-12-19 2012-12-19 A kind of encryption method of imprinting file and device

Publications (2)

Publication Number Publication Date
CN103065068A CN103065068A (en) 2013-04-24
CN103065068B true CN103065068B (en) 2015-12-23

Family

ID=48107696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210554558.5A Active CN103065068B (en) 2012-12-19 2012-12-19 A kind of encryption method of imprinting file and device

Country Status (1)

Country Link
CN (1) CN103065068B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104902324A (en) * 2015-06-26 2015-09-09 深圳市九洲电器有限公司 Method and system for protecting personal video recording file
CN111935435B (en) * 2020-07-28 2022-12-20 深圳市鼎盛光电有限公司 Video file encryption method and device, digital television equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064812A (en) * 2006-04-24 2007-10-31 深圳Tcl新技术有限公司 Method for reencrypting the cipher key of HDCP
CN101931784A (en) * 2010-07-30 2010-12-29 康佳集团股份有限公司 Method for encrypting and decrypting recorded program through HDCP key

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030063580A (en) * 2002-01-23 2003-07-31 주식회사 엘지이아이 Method for managing a secret code of key of pvr
US8019999B2 (en) * 2007-10-18 2011-09-13 Sony Corporation Wireless receiver device revocation management

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064812A (en) * 2006-04-24 2007-10-31 深圳Tcl新技术有限公司 Method for reencrypting the cipher key of HDCP
CN101931784A (en) * 2010-07-30 2010-12-29 康佳集团股份有限公司 Method for encrypting and decrypting recorded program through HDCP key

Also Published As

Publication number Publication date
CN103065068A (en) 2013-04-24

Similar Documents

Publication Publication Date Title
US10097347B2 (en) Content providing system, content reproducing device, content reproducing method, and computer program
JP4740157B2 (en) Protect digital data content
US20050201726A1 (en) Remote playback of ingested media content
JP5824581B2 (en) System and method for controlling access to protected content
US8355989B2 (en) Method and apparatus for importing content
US7801308B1 (en) Secure key encoding for content protection
US20080289050A1 (en) Copyright Protection Storage Medium, Information Recording Apparatus and Information Recording Method, and Information Playback Apparatus and Information Playback Method
US20080301467A1 (en) Memory Security Device
US20080148063A1 (en) Method and apparatus for content protection within an open architecture system
EP2082199A2 (en) A data storage device and method
WO2009100399A9 (en) Media security through hardware-resident proprietary key generation
KR20040104530A (en) Recording medium, recording apparatus, reading apparatus, and program and method therefore
USRE46959E1 (en) Enabling/disabling display data channel access to enable/disable high-bandwidth digital content protection
CN107679370A (en) A kind of device identification generation method and device
US8681977B2 (en) Enabling/disabling display data channel access to enable/ disable high-bandwidth digital content protection
CN103065068B (en) A kind of encryption method of imprinting file and device
JP2010511956A (en) Data storage device having anti-duplication function based on smart card, data storage method and transmission method thereof
US20140122887A1 (en) Information processing apparatus, information storage apparatus, information processing system, and information processing method and program
CN101212633A (en) Digital video and audio data encryption and decryption method
CN105825088A (en) Multimedia data processing device and multimedia data copyright protection method
CN101437143A (en) Video and audio transmission encryption device
JP2006195973A (en) Data processing device
US20140023350A1 (en) Video recording apparatus
TW201525703A (en) Video playback system
JP2006277697A (en) Content transfer system, content transfer device, content reproduction device, content transfer method, and content reproduction method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant