[go: up one dir, main page]

WO2005043806A1 - Encryption/recording device and method - Google Patents

Encryption/recording device and method Download PDF

Info

Publication number
WO2005043806A1
WO2005043806A1 PCT/JP2004/016149 JP2004016149W WO2005043806A1 WO 2005043806 A1 WO2005043806 A1 WO 2005043806A1 JP 2004016149 W JP2004016149 W JP 2004016149W WO 2005043806 A1 WO2005043806 A1 WO 2005043806A1
Authority
WO
WIPO (PCT)
Prior art keywords
encryption
encryption key
key
intra
recording
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.)
Ceased
Application number
PCT/JP2004/016149
Other languages
French (fr)
Japanese (ja)
Inventor
Kenichiro Tada
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.)
Pioneer Corp
Original Assignee
Pioneer Corp
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 Pioneer Corp filed Critical Pioneer Corp
Priority to JP2005515184A priority Critical patent/JP4361903B2/en
Priority to US10/577,805 priority patent/US20070110236A1/en
Publication of WO2005043806A1 publication Critical patent/WO2005043806A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • H04N21/4325Content retrieval operation from a local storage medium, e.g. hard-disk by playing back content from the storage medium
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4623Processing of entitlement messages, e.g. ECM [Entitlement Control Message] or EMM [Entitlement Management Message]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/913Television signal processing therefor for scrambling ; for copy protection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/913Television signal processing therefor for scrambling ; for copy protection
    • H04N2005/91357Television signal processing therefor for scrambling ; for copy protection by modifying the video signal
    • H04N2005/91364Television signal processing therefor for scrambling ; for copy protection by modifying the video signal the video signal being scrambled

Definitions

  • the present invention relates to an encryption recording apparatus and method for encrypting and recording encoded data such as an MPEG stream.
  • the digital signal recording device described in Patent Document 1 encrypts a digital signal with a key obtained by performing a predetermined operation on key information when recording the digital signal, and converts the encrypted data into key information. Is recorded on a recording medium together with the program.
  • the recording medium reproduces the encrypted data reproduced with the key obtained by performing a predetermined operation on the reproduced key information, and outputs the decrypted data.
  • Patent Document 1 discloses that data security is improved by changing encryption keys at regular intervals.
  • Patent Document 1 International Publication No. OOZ52690 pamphlet
  • the digital signal is encrypted while changing the encryption key at regular intervals. Therefore, one I-picture in the GOP (Group of picture)
  • the encryption key may be changed while the key is being encrypted.
  • one I-picture is encrypted with a plurality of encryption keys, and when reproducing a digital signal, one I-picture requires a plurality of decryption keys.
  • decoding one I-picture with a plurality of decoding keys for example, when performing special playback such as fast-forward playback or search, smooth video display cannot be performed due to the intervening process of changing the decoding key. There was a problem.
  • An example of the problem to be solved by the present invention is the above-mentioned problem.
  • the present invention has been made in view of the above, and when performing special playback such as fast-forward playback or search, an encryption key capable of displaying a smooth image without a change process of a decryption key intervenes. It is an object of the present invention to obtain a recording apparatus and method.
  • an invention according to claim 1 is an input apparatus to which coded data constituted by a coding unit including at least an intra-frame coded image is input.
  • encoded data composed of encoding units including at least an intra-frame encoded image is encrypted in a predetermined encryption unit while changing an encryption key.
  • at least one intra-frame encoded image is converted into a single encrypted key so that an encryption key is not changed during encryption of the one intra-coded image. It is characterized in that it is encrypted.
  • FIG. 1 is a block diagram for explaining a configuration of an encryption and recording apparatus according to a first embodiment.
  • FIG. 2 is a diagram showing information stored in storage means.
  • FIG. 3 is a diagram showing information recorded in a recording medium.
  • FIG. 4 is a diagram for explaining the relationship between CBC and pictures.
  • FIG. 5 is a flowchart illustrating a processing procedure from encryption to recording of the encryption and recording apparatus according to the first embodiment.
  • FIG. 6 is a block diagram for explaining a configuration of the encryption device according to the second embodiment.
  • FIG. 7 is a diagram for explaining the relationship between CBC and GOP.
  • FIG. 8 is a flowchart showing a procedure for inserting a NULL packet.
  • the content to be subjected to encryption processing is encoded data such as MPEG-TS (Motion Picture Expert Group-Transport Stream).
  • the content includes an intra-frame encoded image encoded only with information in the own frame, such as an I picture in MPEG, and other encoded images!
  • Examples of other images include, for example, a picture force located in the past in time, such as a P picture in MPEG, and an inter-frame forward prediction code created by predicting a picture, and a time, such as a Z or B picture.
  • Inter-frame bi-directional predictive coded images that are created by predicting the picture powers located in front of and behind the image are expected.
  • a GOP Group of picture
  • GOPs There are various types of GOPs, but one GOP always has at least one I-picture.
  • DES Data Encryption Standard
  • 3DES 3DES
  • AES Advanced Encryption Standard
  • CBC Cipher Block Chaining: CBC
  • the encryption key is changed in units of one or more CBC blocks. That is, in the present embodiment, encoding data such as MPEG-TS is encrypted for each predetermined encryption unit, and the encryption key is changed for each one or more encryption units. An encryption process is performed.
  • the encryption key may be changed when one intra-frame encoded image (I-picture in MPEG) is encrypted. is there. That is, one intra-frame encoded image is encrypted using a plurality of encryption keys, and a plurality of decryption keys are required to reproduce this portion.
  • one intra-frame encoded image is encrypted using a plurality of encryption keys, and a plurality of decryption keys are required to reproduce this portion.
  • the ability to extract and reproduce only intra-frame encoded images (I-pictures). Image cannot be displayed.
  • an encoded image including at least one intra-frame encoded image is encrypted using the same encryption key.
  • the encryption key change timing which is the timing for changing the encryption key when encrypting the encoded data
  • the encryption key change is performed.
  • the intra-frame encoded image is encrypted with the same encryption key, or the encryption key change timing is changed.
  • the encoding unit including the intra-frame encoding image is in the middle of encryption
  • the encryption key change timing is not in the middle of encrypting the encoding unit.
  • the timing for changing the encryption key is not set in the middle of the intra-frame encoded image, at least one intra-frame encoded image is changed using the same encryption key. Encryption can be performed, so that at least one intra-frame encoded image can be decrypted with the same decryption key. Therefore, smooth video display can be performed during fast-forward playback or search.
  • FIG. 1 is a block diagram for explaining a configuration of the encryption device according to the first embodiment of the present invention.
  • An encryption recording device 10 applied to an iVDR (Intelligent Video Digital Recorder) or the like is a device that encodes and encodes encoded data such as MPEG-TS in real time and records the information. It comprises a processing means 100, a recording means 40, a CPU (Central Processing Unit) 60 as a control means, and a storage means (RAM) 62.
  • the encryption processing means 100 includes an encryption means 30, an encryption key supply means 70, and an encryption key generation means 80.
  • the encryption device 10 is connected to a recording medium 50.
  • the information supply means 20 is an input means to which encoded data is input from the outside, and is connected to the encryption means 30, the encryption key supply means 70, and the CPU 60.
  • the start and stop of the operation of the information supply means 20 are controlled by a control signal from the CPU 60, and the information supply means 20 is externally input.
  • the partial TS (Transport Stream) signal is supplied to the encrypting means 30 at a predetermined timing while buffering for each data size to be encrypted by the encrypting means 30!
  • the partial TS signal is obtained by extracting information necessary for recording and reproduction from the MPEG-TS signal.
  • the information supply means 20 has data identification means (not shown) for determining whether to prohibit key change based on the input partial TS signal! / Puru.
  • the data identification means changes the state of the key change prohibition flag as an identification flag for identifying whether or not to prohibit the change of the encryption key, according to the determination result.
  • the key change prohibition flag is set to “1” when key change is prohibited, and set to “0” when key change is permitted.
  • the video data encoded (encoded) by MPEG is packetized with a predetermined size such as 188 bytes or 192 bytes.
  • the information compression ratio differs depending on video data and the like, and video data is composed of I-pictures, B-pictures, P-pictures, etc., whose data length is indefinite.
  • an I picture is an intra-frame coded image that is encoded only with information in its own frame, and does not use correlation information of another screen that precedes and follows in time.
  • I-pictures are arranged at regular intervals in video data.
  • the P picture is an inter-frame forward predictive coding image created by prediction from an I picture or a P picture located in the past in time.
  • the B picture is an inter-frame bidirectional predictive encoded image created by also predicting the I picture and the P picture power located before and after in time.
  • GOPs There are various types of GOPs. For example, one GOP is composed of 15 pictures (frames) of IBBPBB PBBPBBPBB, and one! / Is composed of 18 pictures (frames) of IBBPB BPBBPBBPBBPBB. I do. There is always at least one I-picture in one GOP.
  • the information supply means 20 detects an I picture in the input partial TS signal in order to determine whether or not the picture to be encrypted by the encryption means 30 is an I picture.
  • the key change prohibition flag is set to “1” while the I picture is detected, and set to “0” during the period when no I picture is detected.
  • the information supply means 20 is, for example, an I picture
  • the time until the beginning of another B-picture or P-picture is detected is the I-picture detection period.
  • the key change prohibition flag is set to “1” during the detection period, and set to “0” during periods other than the I-picture detection period. This key change prohibition flag can be referred to by the encryption key supply means 70.
  • encryption key generation means 80 When receiving the key generation notification signal from CPU 60, encryption key generation means 80 generates a new encryption key and sends the generated encryption key to encryption key supply means 70.
  • the key generation notification signal sent from the CPU 60 to the encryption key generation means 80 indicates the encryption key change timing, and the transmission time interval is set by a timer, a counter, or the like.
  • a key generation notification signal is generated for each CBC block number. That is, the encryption key generation means 80 sequentially generates different encryption keys in response to the key generation notification signal, and sends the generated encryption keys to the encryption key supply means 70.
  • the encryption key supply means 70 holds the encryption key input from the encryption key generation means 80, and transfers the held encryption key at a timing determined according to the state of the key change prohibition flag. And output to the storage means 62. That is, when the key change prohibition flag is “0”, the encryption key supply means 70 immediately outputs the encryption key input from the encryption key generation means 80 to the encryption means 30. In the case of "l”, even if the encryption key is input from the encryption key generation means 80, the encryption key is not output to the encryption means 30 at this point, the encryption key is retained, and the key change prohibition flag is set. The encryption key is output to the encryption means 30 at the time corresponding to the boundary position between the first encryption blocks after the time when the value changes from “1” to “0”. As described above, in this case, the encryption key supply unit 70 adjusts the key change timing at the time of encryption in the encryption unit 30.
  • the encryption means 30 includes a CBC (Cipher Block Chaining) counter 31 that counts the number of encryption blocks (CBC blocks), which are encryption units.
  • the encryption means 30 performs encryption on the partial TS signal input from the information supply means 20 for each fixed-length encryption block using the encryption key input from the encryption key supply means 70.
  • the CBC counter 31 counts the number of encrypted CBC blocks, and outputs the count result to the storage means 62 via the CPU 60.
  • the CBC is a cipher that adds the previous ciphertext to the current plaintext and encrypts the result using DES (Data Encryption Standard), 3DES, AES (Advanced Encryption Standard), etc. It is a block chain method.
  • the recording means 40 causes the recording medium 50 to record the encrypted data obtained from the encryption means 30 and the management information of the encrypted data obtained from the CPU 60 (temporarily stored in the storage means 62).
  • the recording medium 50 is a recording medium such as an optical recording medium such as a hard disk or a DVD, and the recording medium 50 records the encrypted data sent from the recording means 40 and management information of the encrypted data.
  • the CPU 60 controls the components (the information supply means 20, the encryption means 30, the recording means 40, the encryption key supply means 70, and the encryption key generation means 80) of the encryption recording device 10 as a whole. Then, the management information of the encrypted data encrypted by the encryption means 30 is temporarily stored in the storage means 62. Further, the CPU 60 outputs the above-mentioned key generation notifying signal as the encryption key change timing signal to the encryption key generation means 80 at a constant time interval corresponding to a predetermined number of CBC blocks, for example.
  • FIG. 2 shows a specific example of the management information stored in the storage means 62.
  • the management information includes a key application number A and key application range information B1—Bn (n is a natural number).
  • the key application number A indicates the number n of keys used at the time of encryption by the encryption means 30, that is, the number of key application range information B1 to Bn.
  • Key application range information B1—Bn consists of key information X, key application start CBC number Y, and key application CBC number Z.
  • the key information X is information indicating the encryption key used at the time of encryption by the encryption means 30, that is, the encryption key generated by the encryption key generation means 80. Will be the decryption key of
  • the key application start CBC number Y is the number of the CBC block where the application of the key X is started.
  • the starting CBC number Y will be 10.
  • the key application CBC number Z indicates the number of CBCs to which key X is applied. For example, if key X is applied from the 10th CBC block to the 15th CBC block, Applicable CBC number Z is 6.
  • FIG. 3 shows information recorded in the recording medium 50.
  • the information written to the recording medium 50 is composed of the above-mentioned management information file and encrypted data.
  • the management information file includes information for managing the encrypted data recorded on the recording medium 50.
  • the key application number A and the key It has use range information B1—Bn.
  • Each of the key application range information B1 to Bn is composed of key information X, key application start CBC number Y, and key application CBC number, as described above.
  • the encrypted data recorded on the recording medium 50 is information such as a partial TS encrypted by the encrypting means 30.
  • one I-picture in order to smoothly perform fast-forward playback or the like performed by extracting an I-picture or the like, one I-picture is the same so that one I-picture is not decrypted with a plurality of different decryption keys. Encrypt with an encryption key.
  • the timing for performing the key change is delayed by referring to the state of the key change prohibition flag so that one I-picture cannot be decrypted with a different decryption key. Te ru.
  • FIG. 4 is a diagram for explaining the relationship between CBC blocks and pictures.
  • the CBC block for encryption has a fixed length.
  • an encryption key is changed every three CBC blocks by a key generation notification signal instructed by the CPU 60.
  • the key change timing is set as follows.
  • the first three CBC blocks 1 (CBC1) are encrypted with the same first encryption key
  • the next three CBC blocks 2 (CBC2) are encrypted.
  • the encryption is performed using a second encryption key different from the encryption key of the first time, and that the time point a is the key change timing in the initial stage.
  • the encryption key change timing at the initial stage by the key generation notification signal At the time point a a new second encryption key is input from the encryption key supply means 70 to the encryption means 30 at time point a, and the CBC block in section b is encrypted by the second encryption key in the initial stage.
  • a CBC2 block a new second encryption key is input from the encryption key supply means 70 to the encryption means 30 at time point a, and the CBC block in section b is encrypted by the second encryption key in the initial stage.
  • the initial key change timing a based on the key generation notification signal instructed from the CPU 60 is in the middle of the I picture. For this reason, the I picture is encrypted with two types of encryption keys. Therefore, in the first embodiment, the key change timing is delayed so that one I picture is not encrypted using a different encryption key.
  • the key change timing is delayed by one CBC block, which is a unit of encryption, and the new key change timing is set to time point c.
  • the key change prohibition flag is 1, so that at this time point a, the encryption key supply means 70 transmits the new second encryption key to the encryption key. Do not input to column 30.
  • the encryption key supply means 70 inputs a new second encryption key to the encryption means 30 at the boundary time point c of the first CBC block after the key change prohibition flag becomes 0. Therefore, at time point a, no key change is performed in the encryption unit 30, and the encrypted block in section b is a B-encoded block CBC1 encrypted using the first encryption key. Then, the three CBC blocks after the time point c become an encrypted block CBC2 which is encrypted using the second encryption key! /.
  • one I picture is encrypted using only the encryption key of CBC1. If one I-picture is encrypted with one encryption key, one I-picture can be decrypted with one decryption key. In the case of FIG. 4, one I-picture can be encrypted using the same encryption key only by changing one CBC2 to CBC1, but depending on the length of the I-picture, CBC2 and CBC3 may be changed to CBC1.
  • the number of CBC blocks (CBC2) to be encrypted with the second encryption key is set in the initial stage, even though one CBC2 is changed to CBC1.
  • the number of CBC blocks changed from CBC2 to CBC1 (one in this case) is encrypted with the second encryption key.
  • the number of CBC blocks (CBC2) to be used may be reduced. In that case, the number of CBC blocks (CBC2) in Fig. 4 is two It becomes.
  • FIG. Fig. 5 is a software flow chart showing the hardware flow of each component shown in Fig. 1.
  • Step S100 an initialization process for clearing the storage unit 62, the CBC counter 31, and the key change prohibition flag 21 is performed.
  • the encryption key generation unit 80 generates a first encryption key, and supplies the generated encryption key to the encryption key supply unit 70 (Steps S 110 and S 120).
  • the encryption key supply means 70 immediately outputs the encryption key supplied from the encryption key generation means 80 to the encryption means 30 unconditionally, that is, without referring to the key change prohibition flag. Further, the encryption key supply means 70 outputs the encryption key supplied from the encryption key generation means 80 to the CPU 60.
  • the encryption unit 30 enters a state of waiting for data input to wait for data to be input in an encryption process using the encryption key supplied from the encryption key generation unit 80 (Ste S 130). Further, the recording means 40 also enters a data input waiting state of waiting for recording processing until data to be recorded is input (step S140).
  • step S 150 when the partial TS signal is input, the information supply unit 20 starts a picture detection operation in the input partial TS signal (step S 150).
  • the information supply unit 20 supplies the input partial TS to the encryption unit 30 at a predetermined timing while buffering the input partial TS for each predetermined data size.
  • the head of the I picture in the input partial TS signal is detected (step S160).
  • the information supply means 20 detects the head of the I picture by detecting the head of the I picture or a similar sequence header code (SHC), GOP header, or the like.
  • the information supply unit 20 raises the key change prohibition flag from “0” to “1”.
  • the key change prohibition flag is held at ⁇ 1 '' until the start of another B picture or P picture is detected, and ⁇ 0 '' at the point where the start of another B picture or P picture is detected (step S180). (Step S190).
  • I picture The key change prohibition flag is held at “1” during the period when the key is detected, and the key change prohibition flag is set to “0” during the period when no I-picture is detected.
  • the information supply means 20 repeatedly executes the processing of steps S160 to S190.
  • the CPU 60 stores the first encryption key to which the encryption key supply means 70 was also supplied at the time of step S120 in the storage area of the key information X of the storage means 62 (step S210). ). Further, the CPU 60 obtains the count output of the CBC counter 31 of the encryption means 30 and stores the obtained count result (in this case, the initial value of the CBC counter 31). It is stored in the area (step S220).
  • the encryption key generation means 30 receives the partial TS signal from the information supply means 20.
  • step S110 encryption processing is performed in CBC block units using the first encryption key input from the information supply means 20. That is, the encryption unit 30 sequentially encrypts the partial TS signal input from the information supply unit 20 in CBC block units using the first encryption key in CBC block units, and encrypts the encrypted partial TS signal.
  • the buffer unit sequentially outputs the TS signal, that is, the encrypted data, to the recording unit 40 while buffering the data in units of CBC blocks (step S240).
  • the CBC counter 31 increments its count by +1 and outputs the count to the CPU 60 (step S250). Further, the recording means 40 sequentially records the encrypted data input from the encryption means 30 in a required area of the recording medium 50 sequentially (step S260). As described above, the encryption processing using the first encryption key in the encryption means 30, the increment of the CBC counter 31, and the recording operation in the recording means 40 are performed according to the key generation notification signal from the CPU 60. Repeated until 80 is entered.
  • encryption key generation means 80 generates and generates a second encryption key.
  • the second encryption key is output to the encryption key supply means 70.
  • the encryption key supply means 70 holds the input second encryption key and refers to the state of the key change prohibition flag 21 of the information supply means 20 (step S290). In this case, it is assumed that the key change prohibition flag 21 of the information supply means 20 is “0”.
  • the encryption key supply unit 70 immediately converts the held encryption key input from the encryption key generation unit 80 into the encryption key. Output to 30 and CPU 60 (step S330).
  • the CPU 60 performs an operation of subtracting the value of the key application start CBC number Y obtained in step S220 from the count value of the CBC counter 31 at this time, and stores the operation result in the storage means 62 as the key application CBC number Z. (Step S340). That is, in this case, in step S340, the key application CBC number Z in the encryption processing using the first encryption key, which is performed by repeating steps S230 to S260, is calculated.
  • step S330 the CPU 60 stores the second encryption key to which the encryption key supply means 70 has also been supplied in the storage area of the key information X of the storage means 62 (step S210). . Further, the CPU 60 obtains the count output of the CBC counter 31 of the encryption means 30 at this time, and stores the obtained count result in the storage area of the key application start CBC number Y of the storage means 62 (step S220). .
  • the encryption means 30 is input from the information supply means 20 in step S330.
  • encryption processing is performed for each CBC block. That is, the encryption unit 30 sequentially encrypts the partial TS signal input from the information supply unit 20 in CBC block units using the second encryption key in CBC block units, and converts the encrypted data into CBC blocks. The data is sequentially output to the recording means 40 while buffering in block units (step S240).
  • the CBC counter 31 increments its count by +1 and outputs the count to the CPU 60 (step S250).
  • the recording means 40 sequentially records the encrypted data input from the encryption means 30 in a required area of the recording medium 50 sequentially (step S260).
  • the above-described encryption processing using the second encryption key in the encryption means 30, the increment of the CBC counter 31, and the recording operation in the recording means 40 are performed by a new key generation notification signal from the CPU 60. Repeat until input to encryption key generation means 80.
  • encryption key generation means 80 generates and generates a third encryption key.
  • the third encryption key is output to the encryption key supply means 70.
  • the encryption key supply means 70 holds the input third encryption key and refers to the state of the key change prohibition flag 21 of the information supply means 20 (step S290).
  • the key change prohibition flag 21 of the information supply means 20 is “1”. Since the encryption key supply unit 70 has the key change prohibition flag power “l” (step S230, Yes), the third encryption key input from the encryption key generation unit 80 Do not output to Then, the encryption key supply means 70 holds the third encryption key, and stores the third encryption key between the first encryption blocks after the point at which the key change prohibition flag changes from “1” to “0”. At the time corresponding to the boundary position (time c in FIG. 4), the third encryption key is output to the encryption means 30 (step S330).
  • the encryption key supply unit 70 sets the time (e.g., time point a in FIG. 4) after the input of the encryption key from the encryption key generation means 80, at the time when the time corresponding to one or more CBC blocks has elapsed ( By sequentially detecting the time point c and the time point (1,...) In FIG. 4 using a timer counter or the like, the boundary position between the encrypted blocks is detected, and the key change inhibition flag is changed from “1” to “1”. After detecting the time point corresponding to the boundary position between the first encryption blocks after the time point at which it becomes ⁇ 0 '', the third encryption key is output to the encryption means 30. Good.
  • the encryption key supply unit 70 holds the encryption key (the third encryption key in this case) input from the encryption key generation unit 80. , Key change prohibited After the flag changes from “1” to “0”, the encryption key is output to the encryption unit 30 at the time corresponding to the boundary position between the first encrypted blocks (time c in FIG. 4). I am doing it. In this manner, the encryption key supply means 70 delays the timing of supplying a new encryption key (in this case, the third encryption key) to the encryption means 30!
  • the encryption key is supplied from the encryption key supply means 70 to the encryption means 30 (in this case, the third encryption key).
  • the encryption unit 30 performs encryption using the second encryption key.
  • the encryption means 30 sequentially encrypts the partial TS signal input from the information supply means 20 in CBC block units using the second encryption key in CBC block units.
  • the data is sequentially output to the recording means 40 while buffering the encrypted data in CBC block units (step S300).
  • the CBC counter 31 increments its count by +1 and outputs the count to the CPU 60 (step S310).
  • the recording means 40 sequentially records the encrypted data input from the encryption means 30 in a required area of the recording medium 50 (step S320).
  • the encryption processing using the second encryption key in the encryption means 30, the increment processing in the CBC counter 31, and the recording operation in the recording means 40 are performed when the key change prohibition flag is set to “1”. Is repeated from “" to "0".
  • the encryption process using the second encryption key added by changing the key change timing is performed after the key change prohibition flag changes from “1” to “0”, The process is executed until a new third key is supplied to the encryption unit 30.
  • the encryption key supply unit 70 corresponds to the boundary position between the first encrypted blocks after the point at which the key change inhibition flag changes from “1” to “0”.
  • the third encryption key is output to the encryption means 30 and the CPU 60 (step S330).
  • the CPU 60 performs an operation of subtracting the value of the key application start CBC number Y obtained in step S220 from the count value of the CBC counter 31 at this time, and stores the operation result as the key application CBC number Z. It is stored by means 62 (step S340). That is, in this case, step S At 340, the key application CBC number Z in the encryption processing using the second encryption key performed by repeating the processing of steps S230 to S260 and performing the processing of steps S300 to S320 is calculated.
  • the CPU 60 stores the third encryption key to which the encryption key supply means 70 was also supplied at the time of step S330 in the storage area of the key information X of the storage means 62 (step S210). . Further, the CPU 60 obtains the count output of the CBC counter 31 of the encryption means 30 at this time, and stores the obtained count result in the storage area of the key application start CBC number Y of the storage means 62 (step S220). .
  • encryption key generation means 80 generates and generates the fourth encryption key.
  • the fourth encryption key is output to the encryption key supply means 70.
  • the subsequent operation is the same as described above, and whether or not to change the key change timing is determined according to the state of the key change prohibition flag 21 of the information supply means 20, and the encryption according to the determination result is performed. A dani process is performed.
  • the change timing of the encryption key is delayed so that one I-picture is replaced by the same encryption key. Since encryption is performed, in a real-time encryption recording apparatus that encrypts while receiving encoded video data such as MPEG-TS and records it on a recording medium, smooth video display during fast-forward playback / search is achieved. It becomes possible.
  • the encryption key supply means 70 adjusts the key change timing at the time of encryption in the encryption means 30.
  • the timing may be adjusted.
  • the encryption means 30 is provided with a buffer for holding two new and old encryption keys.
  • the encryption key supply unit 70 sets the state of the key change prohibition flag 21 By the identification, an identification signal indicating which of the two new and old encryption keys is to be used is input to the encryption means 30.
  • the encryption means 30 selects an encryption key to be used from the two old and new encryption keys with reference to the identification signal each time a CBC block break occurs, and performs encryption using the selected encryption key.
  • the CPU 60 instructs the timing to change the encryption key.
  • the encryption key change timing may be set in advance in the encryption processing unit 100 itself. The point is that it is only necessary to be able to delay the encryption key change timing so that the encryption key change timing is not in the middle of an I-picture during encryption by the encryption means 30. Try using any other method.
  • an area in which one I picture is not encrypted with a plurality of encryption keys is protected from being encrypted with a plurality of encryption keys.
  • the area is not limited to one I picture, and may be, for example, an area including one P picture or B picture in addition to one I picture.
  • the power encryption method using CBC as the encryption method is not limited to CBC.
  • the size of the CBC block and the physical access size of the recording medium 50 be matched, and that the access start position of the content and the start position of the CBC block be matched. That is, if the physical access unit is 512 bytes and only a logical multiple, for example, 6144 bytes, can be accessed, the CBC block size is matched to this access unit.
  • the access to the content is performed at the head of the sector of the recording medium including the corresponding access position, if the access start position is matched with the start position of the CBC block, the access to the sector can be performed.
  • the CBC block can be accessed, and the decoding process can be simplified.
  • FIG. 6 is a block diagram for explaining a configuration of the encryption / imagine recording apparatus according to the second embodiment of the present invention. Note that among the components shown in FIG. 6, components that achieve the same functions as the components of the first embodiment shown in FIG. 1 are denoted by the same reference numerals.
  • one GOP is decrypted with a plurality of decryption keys.
  • One GOP is encrypted with one encryption key so that it is not encrypted.
  • a combination of an I picture, a P picture, and a B picture forms a GOP (Group of picture). Also, one GOP always contains at least one I picture.
  • the encryption recording device 15 has an authoring processing function, and includes an information supply unit 20, an encryption processing unit 100, a recording unit 40, a CPU 60, and a storage unit 62.
  • the encryption processing means 100 includes an encryption means 30 and a key generation means 32. Further, the encryption recording device 15 is connected to a recording medium 50. Since the authoring process is a non-real-time process, the size of the input partial TS signal after encoding can be known in advance, and the key change position can be freely determined.
  • the information supply means 20 is supplied with encoded video data such as a partial TS signal from an external storage device.
  • the partial TS signal is composed of a sequence header code (SHC), a plurality of GOPs having an indefinite data length, and the like. That is, the length of the data string including the GOP changes depending on the MPEG encoding method, the number of pixels, and the like.
  • the information supply means 20 is controlled to start and stop the operation by a control signal from the CPU 60, and outputs an externally input partial TS (Transport Stream) signal for each data size encrypted by the encryption means 30.
  • the data is supplied to the encryption means 30 at a predetermined timing while buffering.
  • the information supply means 20 acquires from the CPU 60 information on the key change position (key change timing) at the time of the encryption processing performed by the encryption means 30, and the input partial TS. Detects the break position between adjacent GOPs in the signal. Then, the information supply means 20 determines whether or not the force at which the key change position coincides with the separation position between the GOPs, and in the case of a mismatch, there is no meaning at the end of the GOP in other words immediately before the GOP. By performing a process of adding data, that is, a NULL packet, or a private packet including random data, the encryption key change timing encrypts the GOP (encoding unit). Do not be on the way.
  • the encryption processing means 100 includes an encryption means 30 including a CBC (Cipher Block Chaining) counter 31 for counting the number of encryption blocks (CBC blocks) as encryption units; Key generation means 32 for sequentially generating different encryption keys at predetermined time intervals or at a fixed number of CBC blocks according to a key generation notification signal from the CPU 60.
  • the encryption unit 30 performs encryption for each fixed-length encryption block on the partial TS signal input from the information supply unit 20 using the encryption key generated by the key generation unit 32, The encrypted encrypted data is output to the recording means 40.
  • CBC Cipher Block Chaining
  • the recording unit 40 causes the recording medium 50 to record the encrypted data obtained from the encryption unit 30 and the management information (temporarily stored in the storage unit 62) of the encrypted data obtained from the CPU 60.
  • the recording medium 50 is a recording medium such as an optical recording medium such as a hard disk or a DVD, and the recording medium 50 records the encrypted data sent from the recording means 40 and management information of the encrypted data.
  • the CPU 60 controls the components (the information supply means 20, the encryption means 30, and the recording means 40) of the encryption recording device 15 as a whole, and also controls the encryption performed by the encryption means 30. Data management information is temporarily stored in the storage means 62. Further, the CPU 60 outputs a key generation notification signal as an encryption key change timing signal to the encryption unit 30 at a constant time interval corresponding to, for example, a predetermined number of CBC blocks.
  • key application number A As shown in Fig. 2, in the storage means 62, key application number A, key information X, key application start CBC number Y, and key application CBC number Z key application range information B1—Bn Is stored. Further, as shown in FIG. 3, a management information file of the recorded encrypted data and the encrypted data encrypted by the encryption means 30 are recorded on the recording medium 50.
  • FIG. 7 is a diagram for explaining the relationship between CBC and GOP.
  • the CBC block for encryption has a fixed length.
  • the first plurality of CBC blocks 1 (CBC1) are encrypted with the same first encryption key
  • the next plurality of CBC blocks 2 (CBC2) are encrypted with a second encryption key different from the first encryption key.
  • the encryption key is set so that encryption is performed. That is, the time point a is the key change timing.
  • the key change timing a is in the middle of GOP2, and GOP2 is encrypted with the first encryption key and the second encryption key.
  • one GOP is encrypted with one encryption key by the information supply means 20 performing a process as shown in FIG.
  • information supply means 20 detects a break position between adjacent GOPs in the input partial TS signal, and changes a key at the time of encryption / reduction processing.
  • the position is detected (step S510).
  • the break position between GOPs can be detected by a GOP header or the like. Since the CBC block has a fixed length, the key change position is obtained from the CPU 60 by using information on the key change position (key change timing) such as the CBC block length (fixed length) and the number of CBC blocks for performing encryption with the same key. By obtaining it, it can be derived.
  • the information supply means 20 determines whether or not the obtained break position between GOPs matches the key change position (step S520). As a result of this determination, if the delimiter position between GOPs and the key change position do not match, as shown in FIG. 7, the key change position and the delimiter position between GOPs (the start position of the GOP) must be matched. In other words, a NULL packet is inserted between GOPs, in other words, immediately before the next GOP (step S530).
  • meaningless! ⁇ data such as a NULL packet is inserted so that the head position of the GOP coincides with the encryption key change position! / ⁇ .
  • a cryptographic recording device that has a function to authorize encoded video data such as MPEG TS
  • one GOP is encrypted with one cryptographic key, and special playback such as fast-forward playback and search is performed. Sometimes smooth video display is possible.
  • the key change position and the break position between the GOPs (the start position of the GOP) Position) and a NULL packet is inserted between GOPs so that they match.
  • the following implementation is also possible.
  • the information supply means 20 detects the data lengths of all GOPs in the input partial TS signal. Then, it is determined whether or not the detected data length of each GOP is an integral multiple of the data length (fixed length) of the CBC block. Then, for a GOP whose data length is not an integral multiple of the data length of the CBC block, a NULL packet is inserted at the end of the GOP so that the data length is an integral multiple of the data length of the CBC block. That is, in this case, a NULL packet is inserted at the end of the immediately preceding GOP so that the beginning of the GOP matches the delimiter of the CBC block. Then, at least one GOP is appropriately changed in the key change position so as to be encrypted with the same key. By doing so, at least one GOP can always be encrypted with one encryption key.
  • the above-described processing performed by the information supply unit 20 may be performed by the encryption processing unit 100!

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Television Signal Processing For Recording (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

It is possible to obtain a smooth video display not interrupted by a decryption key modification processing when performing a special reproduction such as fast-feed reproduction and search. There is provided an encryption/recording device including: information supply means (20) supplied with encoded data containing an encoding unit having an in-frame encrypted image (I picture) and other encoded image (P picture, B picture); encryption processing means (100) for encrypting the encoded data from the information supply means (20) for each predetermined encryption unit and modifying an encryption key for every one or more encryption units; and recording means (40) for recording the encrypted data. When the encryption key modification timing is in the middle of encryption of the in-frame encoded image (I picture), the encryption processing means (100) delays the key modification timing so that the encryption key modification timing is not in the middle of the in-frame encoded image (I picture).

Description

明 細 書  Specification

暗号化記録装置および方法  Encryption recording apparatus and method

技術分野  Technical field

[0001] 本発明は、 MPEGストリームなどの符号ィ匕データを暗号ィ匕して記録する暗号ィ匕記 録装置および方法に関するものである。  The present invention relates to an encryption recording apparatus and method for encrypting and recording encoded data such as an MPEG stream.

背景技術  Background art

[0002] 近年、マルチメディア技術の進展に伴!、ディジタル映像データを効率よく記録、再 生する技術の開発が進められている。ディジタル映像データ等を記録する際には、 著作権保護の観点力 所定の暗号ィ匕を行って記録することが望まれる場合が多い。 この暗号ィ匕は、データの安全性を確保するためデータの解読が困難なものが望まれ る。例えば、データの解読を困難にする暗号ィ匕のひとつとして、 1つのコンテンツを複 数の領域に分け、この領域毎に暗号ィ匕用の鍵を変更して暗号ィ匕する方法がある。一 方、暗号ィ匕されたディジタル映像データ等を再生する際にはスムーズな再生を行うた め効率よく復号ィ匕してスムーズな画面表示を行うことが望まれる。  [0002] In recent years, with the development of multimedia technology, technology for efficiently recording and reproducing digital video data has been developed. When recording digital video data or the like, it is often desired to perform recording with a predetermined encryption key in view of copyright protection. It is desired that the encryption key be difficult to decrypt the data in order to ensure the security of the data. For example, as one of the encryption methods that make it difficult to decrypt data, there is a method in which one content is divided into a plurality of areas, and the encryption key is changed for each area to perform encryption. On the other hand, when playing back digital video data or the like that has been encrypted, it is desirable to perform efficient decryption and display a smooth screen in order to perform smooth playback.

[0003] 特許文献 1に記載のディジタル信号記録装置は、ディジタル信号の記録時には、 鍵情報に所定の演算を施して得られた鍵でディジタル信号を暗号ィ匕し、暗号化した データを鍵情報ととともに記録媒体に記録している。そして、ディジタル信号の再生 時には、記録媒体力 再生した鍵情報に所定の演算を施して得られた鍵で再生した 暗号ィ匕データを復号ィ匕して出力している。これによつて、記録媒体上の鍵情報を得 ても再生時に所定の演算を施さなければ鍵を得ることができな 、ようにして 、る。また 、この特許文献 1には、暗号鍵を一定間隔で変更することで、データの安全性を高め ることが開示されている。  [0003] The digital signal recording device described in Patent Document 1 encrypts a digital signal with a key obtained by performing a predetermined operation on key information when recording the digital signal, and converts the encrypted data into key information. Is recorded on a recording medium together with the program. When the digital signal is reproduced, the recording medium reproduces the encrypted data reproduced with the key obtained by performing a predetermined operation on the reproduced key information, and outputs the decrypted data. As a result, even if the key information on the recording medium is obtained, the key cannot be obtained unless a predetermined operation is performed during reproduction. Patent Document 1 discloses that data security is improved by changing encryption keys at regular intervals.

[0004] 特許文献 1:国際公開第 OOZ52690号パンフレット  [0004] Patent Document 1: International Publication No. OOZ52690 pamphlet

発明の開示  Disclosure of the invention

発明が解決しょうとする課題  Problems to be solved by the invention

[0005] し力しながら、上記従来の技術によれば、暗号鍵を一定間隔で変更しながらデイジ タル信号を暗号化している。このため、 GOP (Group of picture)内の 1つの Iピクチ ャを暗号ィ匕している時に暗号鍵の変更が行われる場合がある。このような場合、 1つ の Iピクチャが複数の暗号鍵で暗号ィ匕されることとなり、ディジタル信号を再生する際 には 1つの Iピクチャに複数の復号鍵を要することとなる。 1つの Iピクチャを複数の復 号鍵で復号化する場合、例えば早送り再生、サーチ等の特殊再生を行う際に、復号 鍵の変更処理が介入するためスムーズな映像表示ができな 、と 、つた問題があった 。本発明が解決しょうとする課題は上記した問題が一例として挙げられる。 [0005] However, according to the above-described conventional technique, the digital signal is encrypted while changing the encryption key at regular intervals. Therefore, one I-picture in the GOP (Group of picture) The encryption key may be changed while the key is being encrypted. In such a case, one I-picture is encrypted with a plurality of encryption keys, and when reproducing a digital signal, one I-picture requires a plurality of decryption keys. When decoding one I-picture with a plurality of decoding keys, for example, when performing special playback such as fast-forward playback or search, smooth video display cannot be performed due to the intervening process of changing the decoding key. There was a problem. An example of the problem to be solved by the present invention is the above-mentioned problem.

[0006] 本発明は、上記に鑑みてなされたものであって、早送り再生、サーチ等の特殊再生 を行う際に、復号鍵の変更処理が介入しな ヽスムーズな映像表示をなし得る暗号ィ匕 記録装置および方法を得ることを目的とする。  [0006] The present invention has been made in view of the above, and when performing special playback such as fast-forward playback or search, an encryption key capable of displaying a smooth image without a change process of a decryption key intervenes. It is an object of the present invention to obtain a recording apparatus and method.

課題を解決するための手段  Means for solving the problem

[0007] 上述した課題を解決し、目的を達成するために、請求項 1に記載の発明は、フレー ム内符号化画像を少なくとも含む符号化単位により構成される符号化データが入力 される入力手段と、前記符号化データを所定の暗号化単位で暗号化するとともに、 一又は複数の暗号化単位毎に暗号鍵を変更しつつ前記符号化データを暗号化する 暗号ィ匕処理手段と、前記暗号化された符号ィ匕データを記録媒体に記録する記録手 段とを備えた暗号化記録装置において、前記暗号化処理手段は前記一つのフレー ム内符号ィ匕画像を暗号ィ匕する途中で暗号鍵が変更されないよう少なくとも一つのフ レーム内符号ィ匕画像を単一の暗号ィ匕鍵で暗号ィ匕すること、を特徴とする。  [0007] In order to solve the above-described problems and achieve the object, an invention according to claim 1 is an input apparatus to which coded data constituted by a coding unit including at least an intra-frame coded image is input. Means for encrypting the encoded data in a predetermined encryption unit, and encrypting the encoded data while changing an encryption key for each of one or a plurality of encryption units; and A recording means for recording the encrypted encoded data on a recording medium, wherein the encryption processing means encrypts the one intra-frame encoded image during encryption. At least one intra-frame encoded image is encrypted with a single encryption key so that the encryption key is not changed.

[0008] また、請求項 6に記載の発明は、フレーム内符号化画像を少なくとも含む符号化単 位により構成される符号ィ匕データを、暗号鍵を変更しながら所定の暗号ィ匕単位で暗 号化して記録する暗号化記録方法において、前記一つのフレーム内符号化画像を 暗号ィ匕する途中で暗号鍵が変更されないよう少なくとも一つのフレーム内符号ィ匕画 像を単一の暗号ィ匕鍵で暗号ィ匕することを特徴とする。  [0008] Further, according to the invention described in claim 6, encoded data composed of encoding units including at least an intra-frame encoded image is encrypted in a predetermined encryption unit while changing an encryption key. In the encryption recording method of encoding and recording, at least one intra-frame encoded image is converted into a single encrypted key so that an encryption key is not changed during encryption of the one intra-coded image. It is characterized in that it is encrypted.

図面の簡単な説明  Brief Description of Drawings

[0009] [図 1]図 1は、実施例 1にかかる暗号ィ匕記録装置の構成を説明するためのブロック図 である。  FIG. 1 is a block diagram for explaining a configuration of an encryption and recording apparatus according to a first embodiment.

[図 2]図 2は、記憶手段に記憶される情報を示す図である。  FIG. 2 is a diagram showing information stored in storage means.

[図 3]図 3は、記録媒体内に記録される情報を示す図である。 O FIG. 3 is a diagram showing information recorded in a recording medium. O

[図 4]図 4は、 CBCとピクチャの関係を説明するための図である。  FIG. 4 is a diagram for explaining the relationship between CBC and pictures.

[図1—  [Figure 1-

〇 5]図 5は、実施例 1にかかる暗号ィ匕記録装置の暗号化から記録までの処理手順を 示すフローチャートである。  [5] FIG. 5 is a flowchart illustrating a processing procedure from encryption to recording of the encryption and recording apparatus according to the first embodiment.

[図 6]図 6は、実施例 2にかかる暗号ィ匕記録装置の構成を説明するためのブロック図 である。  FIG. 6 is a block diagram for explaining a configuration of the encryption device according to the second embodiment.

[図 7]図 7は、 CBCと GOPの関係を説明するための図である。  FIG. 7 is a diagram for explaining the relationship between CBC and GOP.

[図 8]図 8は、 NULLパケットを挿入する手順を示すフローチャートである。  FIG. 8 is a flowchart showing a procedure for inserting a NULL packet.

符号の説明  Explanation of symbols

暗号化記録装置  Encryption recording device

15 暗号化記録装置  15 Encryption recorder

20 情報供給手段  20 Information supply means

21 鍵変更禁止フラグ  21 Key change prohibition flag

30 暗号化手段  30 means of encryption

31 CBCカウンタ  31 CBC counter

32 鍵生成手段  32 Key generation means

40 記録手段  40 Recording means

50 記録媒体  50 Recording media

60 CPU  60 CPU

62 記憶手段  62 Memory

70 暗号鍵供給手段  70 Encryption key supply means

80 暗号鍵生成手段  80 Encryption key generation means

100 暗号化処理手段  100 Encryption processing means

発明を実施するための最良の形態  BEST MODE FOR CARRYING OUT THE INVENTION

[0011] 以下に、本発明にかかる暗号ィ匕記録装置および方法の実施の形態を図面に基づ いて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではな い。以下では、本発明の暗号ィ匕記録装置の概略と特徴を実施の形態として説明し、 その後に暗号ィ匕記録装置に関する実施例を説明する。  Hereinafter, embodiments of the encryption device and method according to the present invention will be described in detail with reference to the drawings. The present invention is not limited by the embodiment. Hereinafter, the outline and characteristics of the encryption device of the present invention will be described as an embodiment, and thereafter, examples of the encryption device will be described.

[0012] [実施の形態] 本実施の形態において、暗号処理の対象としてのコンテンツは、 MPEG-TS ( Motion Picture Expert Group-Transport Stream)等の符号化データである。また 、コンテンツは、 MPEGにおける Iピクチャのように自フレーム内の情報のみで符号化 されたフレーム内符号化画像とその他の符号化画像を含んで!/ヽる。その他の画像と しては、例えば、 MPEGにおける Pピクチャのような時間的に過去に位置するピクチ ャ力 予測して作られるフレーム間順方向予測符号ィ匕画像および Zまたは Bピクチャ のような時間的に前後に位置するピクチャ力 予測して作られるフレーム間双方向予 測符号化画像などが想定される。 MPEGでは、 Iピクチャ、 Pピクチャおよび Bピクチャ の組み合わせによって符号化単位である GOP (Group of picture)が構成される。 G OPには各種の方式があるが、 1つの GOPには、少なくとも 1つの Iピクチャが必ず存 在する。 [0012] [Embodiment] In the present embodiment, the content to be subjected to encryption processing is encoded data such as MPEG-TS (Motion Picture Expert Group-Transport Stream). In addition, the content includes an intra-frame encoded image encoded only with information in the own frame, such as an I picture in MPEG, and other encoded images! Examples of other images include, for example, a picture force located in the past in time, such as a P picture in MPEG, and an inter-frame forward prediction code created by predicting a picture, and a time, such as a Z or B picture. Inter-frame bi-directional predictive coded images that are created by predicting the picture powers located in front of and behind the image are expected. In MPEG, a GOP (Group of picture), which is a coding unit, is composed of a combination of an I picture, a P picture, and a B picture. There are various types of GOPs, but one GOP always has at least one I-picture.

[0013] 一方、暗号化方式としては、 DES (Data Encryption Standard)、 3DES、 AES ( Advanced Encryption Standard)などのよう【こ、所定のデータ長(64、 128、 256ノ イト)毎に暗号ィ匕する方式を採用し、さらに、平文の保護の観点から暗号ブロック連鎖 方式(Cipher Block chaining:CBC)を採用する。また、暗号鍵は、 1一複数の CBC ブロック単位に変更される。すなわち、本実施の形態においては、 MPEG— TSなど の符号ィ匕データを所定の暗号ィ匕単位毎に暗号ィ匕するとともに暗号鍵を 1一複数の暗 号ィ匕単位毎に変更するような暗号ィ匕処理が行われる。  [0013] On the other hand, encryption methods such as DES (Data Encryption Standard), 3DES, and AES (Advanced Encryption Standard) are used, and encryption is performed every predetermined data length (64, 128, 256 knots). The cipher block chaining method (Cipher Block Chaining: CBC) is adopted from the viewpoint of plaintext protection. The encryption key is changed in units of one or more CBC blocks. That is, in the present embodiment, encoding data such as MPEG-TS is encrypted for each predetermined encryption unit, and the encryption key is changed for each one or more encryption units. An encryption process is performed.

[0014] このような符号ィ匕データを所定の暗号ィ匕単位毎に暗号ィ匕して記録メディアに記録 するとき、符号ィ匕データで意味のある区間と、暗号ィ匕単位の長さとの間には、何の相 関性もない。符号ィ匕データで意味のある区間とは、 MPEGの場合は、ピクチャや GO Pの切れ目のことを指す。  [0014] When such encoded data is encrypted on a predetermined encryption unit basis and recorded on a recording medium, a section meaningful in the encoded data and a length of the encryption unit are defined. There is no correlation between them. The meaningful section in the encoding data indicates a break in a picture or a GOP in the case of MPEG.

[0015] したがって、一定期間毎に暗号鍵を変更する手法では、 1つのフレーム内符号ィ匕 画像 (MPEGでは、 Iピクチャ)を暗号ィ匕して 、る時に暗号鍵の変更が行われる場合 がある。すなわち、 1つのフレーム内符号ィ匕画像が複数の暗号鍵で暗号ィ匕されること となり、この箇所を再生する際には、複数の復号鍵を要することとなる。早送り再生、 サーチ等では、フレーム内符号ィ匕画像 (Iピクチャ)のみを抽出して再生する力 1つ のフレーム内符号ィ匕画像再生中に、復号鍵の変更処理が介入すると、スムーズな映 像表示ができない。 [0015] Therefore, in the method of changing the encryption key at regular intervals, the encryption key may be changed when one intra-frame encoded image (I-picture in MPEG) is encrypted. is there. That is, one intra-frame encoded image is encrypted using a plurality of encryption keys, and a plurality of decryption keys are required to reproduce this portion. In fast-forward playback, search, etc., the ability to extract and reproduce only intra-frame encoded images (I-pictures). Image cannot be displayed.

[0016] そこで、本実施の形態においては、少なくとも 1つのフレーム内符号ィ匕画像を含む 符号ィ匕画像を同一の暗号鍵をもって暗号ィ匕するようにして 、る。  [0016] Therefore, in the present embodiment, an encoded image including at least one intra-frame encoded image is encrypted using the same encryption key.

[0017] 例えば、符号ィ匕データを暗号ィ匕する際の暗号鍵を変更するタイミングである暗号鍵 変更タイミングがフレーム内符号ィ匕画像を暗号ィ匕する途中となる場合は、暗号鍵変 更タイミングがフレーム内符号ィ匕画像を暗号ィ匕する途中とならないよう前記変更タイミ ングを遅延させることにより、フレーム内符号ィ匕画像を同一の暗号鍵で暗号ィ匕したり、 あるいは暗号鍵変更タイミングがフレーム内符号ィ匕画像を含む前記符号ィ匕単位を暗 号ィ匕する途中となる場合は、暗号鍵変更タイミングが前記符号化単位を暗号化する 途中とならな 、よう NULLパケット、ランダムデータなどの意味をもたな 、情報を挿入 することにより、少なくとも 1つのフレーム内符号ィ匕画像を含む符号ィ匕画像を単一の 暗号鍵をもって暗号ィ匕する。  [0017] For example, when the encryption key change timing, which is the timing for changing the encryption key when encrypting the encoded data, is in the middle of encrypting the intra-frame encoded image, the encryption key change is performed. By delaying the change timing so that the timing is not in the middle of encrypting the intra-frame encoded image, the intra-frame encoded image is encrypted with the same encryption key, or the encryption key change timing is changed. When the encoding unit including the intra-frame encoding image is in the middle of encryption, the encryption key change timing is not in the middle of encrypting the encoding unit. By inserting information having a meaning such as the above, the encoded image including at least one intra-frame encoded image is encrypted with a single encryption key.

[0018] このように、実施の形態においては、暗号鍵を変更するタイミングがフレーム内符号 化画像の途中とならないようにしているので、少なくとも 1つのフレーム内符号ィ匕画像 を同一の暗号鍵で暗号化することができ、これにより少なくとも 1つのフレーム内符号 化画像を同一の復号鍵で復号ィ匕することができる。したがって、早送り再生やサーチ 時にスムーズな映像表示が可能となる。  As described above, in the embodiment, since the timing for changing the encryption key is not set in the middle of the intra-frame encoded image, at least one intra-frame encoded image is changed using the same encryption key. Encryption can be performed, so that at least one intra-frame encoded image can be decrypted with the same decryption key. Therefore, smooth video display can be performed during fast-forward playback or search.

[0019] [実施例 1]  [Example 1]

図 1は、本発明の実施例 1にかかる暗号ィ匕記録装置の構成を説明するためのプロ ック図である。 iVDR (Intelligent Video Digital Recorder)などに適用される暗号化 記録装置 10は、 MPEG— TS等の符号ィ匕データをリアルタイムに暗号ィ匕して記録す るものであり、情報供給手段 20、暗号化処理手段 100、記録手段 40、制御手段とし ての CPU (Central Processing Unit) 60および記憶手段(RAM) 62を備えている。 暗号化処理手段 100は、暗号化手段 30、暗号鍵供給手段 70および暗号鍵生成手 段 80を備えている。また、暗号ィ匕記録装置 10は記録媒体 50と接続されている。  FIG. 1 is a block diagram for explaining a configuration of the encryption device according to the first embodiment of the present invention. An encryption recording device 10 applied to an iVDR (Intelligent Video Digital Recorder) or the like is a device that encodes and encodes encoded data such as MPEG-TS in real time and records the information. It comprises a processing means 100, a recording means 40, a CPU (Central Processing Unit) 60 as a control means, and a storage means (RAM) 62. The encryption processing means 100 includes an encryption means 30, an encryption key supply means 70, and an encryption key generation means 80. The encryption device 10 is connected to a recording medium 50.

[0020] 情報供給手段 20は、外部から符号化データが入力される入力手段であり、暗号化 手段 30、暗号鍵供給手段 70、 CPU60に接続されている。情報供給手段 20は、 CP U60からの制御信号によって動作の開始や停止が制御されており、外部入力される パーシャル TS (Transport Stream)信号を、暗号化手段 30にお!/、て暗号化されるデ ータサイズ毎にバッファリングしながら所定のタイミングで暗号ィ匕手段 30に供給する。 パーシャル TS信号は、 MPEG— TS信号のうち録画再生に必要な情報が抽出された ものである。 [0020] The information supply means 20 is an input means to which encoded data is input from the outside, and is connected to the encryption means 30, the encryption key supply means 70, and the CPU 60. The start and stop of the operation of the information supply means 20 are controlled by a control signal from the CPU 60, and the information supply means 20 is externally input. The partial TS (Transport Stream) signal is supplied to the encrypting means 30 at a predetermined timing while buffering for each data size to be encrypted by the encrypting means 30! The partial TS signal is obtained by extracting information necessary for recording and reproduction from the MPEG-TS signal.

[0021] また、情報供給手段 20は、入力されたパーシャル TS信号に基づ ヽて鍵変更を禁 止するか否かを判定するデータ識別手段(図示せず)を有して!/ゝる。データ識別手段 は、その判定結果に応じて、暗号鍵の変更を禁止する否かを識別させる識別フラグと しての鍵変更禁止フラグの状態を変化させる。鍵変更禁止フラグは、鍵変更を禁止 する場合は、「1」とし、鍵変更を許可する場合は、「0」とする。  [0021] Further, the information supply means 20 has data identification means (not shown) for determining whether to prohibit key change based on the input partial TS signal! / Puru. The data identification means changes the state of the key change prohibition flag as an identification flag for identifying whether or not to prohibit the change of the encryption key, according to the determination result. The key change prohibition flag is set to “1” when key change is prohibited, and set to “0” when key change is permitted.

[0022] ここで、 MPEGでエンコード(符号化)された映像データは 188バイトあるいは 192 バイトのように所定のサイズでパケットィ匕されている。 MPEGでのエンコードでは、映 像データなどに応じて情報圧縮率が異なり、映像データはデータ長が不定長の Iピク チヤ、 Bピクチャ、 Pピクチャ等によって構成されている。  Here, the video data encoded (encoded) by MPEG is packetized with a predetermined size such as 188 bytes or 192 bytes. In MPEG encoding, the information compression ratio differs depending on video data and the like, and video data is composed of I-pictures, B-pictures, P-pictures, etc., whose data length is indefinite.

[0023] Iピクチャは、前述したように、自フレーム内の情報のみで符号ィ匕されたフレーム内 符号化画像であり、時間的に前後する他の画面の相関情報を用いない。 Iピクチャは 映像データの中に一定周期で配置されている。 Pピクチャは、時間的に過去に位置 する Iピクチャや Pピクチヤから予測して作られるフレーム間順方向予測符号ィ匕画像で ある。 Bピクチャは、時間的に前後に位置する Iピクチャや Pピクチヤ力も予測して作ら れるフレーム間双方向予測符号ィ匕画像である。  As described above, an I picture is an intra-frame coded image that is encoded only with information in its own frame, and does not use correlation information of another screen that precedes and follows in time. I-pictures are arranged at regular intervals in video data. The P picture is an inter-frame forward predictive coding image created by prediction from an I picture or a P picture located in the past in time. The B picture is an inter-frame bidirectional predictive encoded image created by also predicting the I picture and the P picture power located before and after in time.

[0024] また、これら Iピクチャ、 Pピクチャおよび Bピクチャの組み合わせによって GOP ( [0024] In addition, a GOP (

Group of picture)が構成される。 GOPには、各種の方式があり、例えば、 IBBPBB PBBPBBPBBの 15ピクチャ(フレーム)で 1つの GOPを構成したり、ある!/、は IBBPB BPBBPBBPBBPBBの 18ピクチャ(フレーム)で 1つの GOPを構成したりする。 1つ の GOPには、少なくとも 1つの Iピクチャが必ず存在する。 Group of picture). There are various types of GOPs. For example, one GOP is composed of 15 pictures (frames) of IBBPBB PBBPBBPBB, and one! / Is composed of 18 pictures (frames) of IBBPB BPBBPBBPBBPBB. I do. There is always at least one I-picture in one GOP.

[0025] 情報供給手段 20は、暗号ィ匕手段 30で暗号ィ匕されるピクチャが Iピクチャである力否 かの判断を行うために、入力されたパーシャル TS信号中の Iピクチャを検出し、 Iピク チヤを検出している期間中は、鍵変更禁止フラグを「1」とし、 Iピクチャを検出していな い期間中は、鍵変更禁止フラグを「0」とする。情報供給手段 20は、例えば、 Iピクチャ の先頭、またはそれに類するシーケンスヘッダコード(SHC)、 GOPヘッダ等を検出 した時点力 他の Bピクチャや Pピクチヤの先頭を検出した時点までの間を、 Iピクチャ の検出期間とし、この Iピクチャの検出期間中は、鍵変更禁止フラグを「1」とし、 Iピク チヤの検出期間以外の期間は、鍵変更禁止フラグを「0」とする。この鍵変更禁止フラ グは、暗号鍵供給手段 70で参照することができる。 [0025] The information supply means 20 detects an I picture in the input partial TS signal in order to determine whether or not the picture to be encrypted by the encryption means 30 is an I picture. The key change prohibition flag is set to “1” while the I picture is detected, and set to “0” during the period when no I picture is detected. The information supply means 20 is, for example, an I picture The time until the beginning of another B-picture or P-picture is detected is the I-picture detection period. The key change prohibition flag is set to “1” during the detection period, and set to “0” during periods other than the I-picture detection period. This key change prohibition flag can be referred to by the encryption key supply means 70.

[0026] 暗号鍵生成手段 80は、 CPU60から鍵生成通知信号を受信すると、新たな暗号鍵 を生成し、生成した暗号鍵を暗号鍵供給手段 70に送る。 CPU60から暗号鍵生成手 段 80に送られる鍵生成通知信号は、暗号鍵変更タイミングを示すものであり、タイマ やカウンタなどによってその送出時間間隔を設定することで、例えば、一定時間間隔 であるいは一定の CBCブロック数毎に鍵生成通知信号が発生される。すなわち、暗 号鍵生成手段 80では、鍵生成通知信号に応答して異なる暗号鍵を順次生成し、生 成した暗号鍵を暗号鍵供給手段 70に送る。  When receiving the key generation notification signal from CPU 60, encryption key generation means 80 generates a new encryption key and sends the generated encryption key to encryption key supply means 70. The key generation notification signal sent from the CPU 60 to the encryption key generation means 80 indicates the encryption key change timing, and the transmission time interval is set by a timer, a counter, or the like. A key generation notification signal is generated for each CBC block number. That is, the encryption key generation means 80 sequentially generates different encryption keys in response to the key generation notification signal, and sends the generated encryption keys to the encryption key supply means 70.

[0027] 暗号鍵供給手段 70は、暗号鍵生成手段 80から入力された暗号鍵を保持し、保持 した暗号鍵を、鍵変更禁止フラグの状態に応じて決定したタイミングで暗号ィ匕手段 3 0および記憶手段 62に出力する。すなわち、暗号鍵供給手段 70は、鍵変更禁止フラ グが「0」のときには、暗号鍵生成手段 80から入力された暗号鍵を即座に暗号ィ匕手段 30に出力するが、鍵変更禁止フラグ力「l」のときには、暗号鍵生成手段 80から暗号 鍵が入力されても、この時点では暗号鍵を暗号ィ匕手段 30に出力せず、暗号鍵を保 持しておき、鍵変更禁止フラグが「1」から「0」となった時点の後の、最初の暗号化ブ ロック間の境界位置に対応する時点で暗号鍵を暗号化手段 30に出力する。このよう に、この場合は、暗号鍵供給手段 70が暗号ィ匕手段 30における暗号ィ匕の際の鍵変更 タイミングを調整している。  [0027] The encryption key supply means 70 holds the encryption key input from the encryption key generation means 80, and transfers the held encryption key at a timing determined according to the state of the key change prohibition flag. And output to the storage means 62. That is, when the key change prohibition flag is “0”, the encryption key supply means 70 immediately outputs the encryption key input from the encryption key generation means 80 to the encryption means 30. In the case of "l", even if the encryption key is input from the encryption key generation means 80, the encryption key is not output to the encryption means 30 at this point, the encryption key is retained, and the key change prohibition flag is set. The encryption key is output to the encryption means 30 at the time corresponding to the boundary position between the first encryption blocks after the time when the value changes from “1” to “0”. As described above, in this case, the encryption key supply unit 70 adjusts the key change timing at the time of encryption in the encryption unit 30.

[0028] 暗号化手段 30は、暗号化単位である暗号化ブロック(CBCブロック)の個数をカウ ントする CBC (Cipher Block Chaining)カウンタ 31を備えており、情報供給手段 20、 暗号鍵供給手段 70、記録手段 40および CPU60と接続されている。暗号化手段 30 は、暗号鍵供給手段 70から入力される暗号鍵を用いて情報供給手段 20から入力さ れるパーシャル TS信号に対し固定長の暗号ィ匕ブロック毎に暗号ィ匕を行うものであり 、暗号ィ匕されたパーシャル TS信号 (以下暗号ィ匕データという)を記録手段 40に出力 する。 CBCカウンタ 31は、暗号化を行った CBCブロックの個数をカウントするもので あり、そのカウント結果を CPU60を介して記憶手段 62に出力する。なお、 CBCとは、 前述したように、現時点の平文に 1つ前の暗号文を加え、この加えた結果を DES ( Data Encryption Standard)、 3DES、 AES (Advanced Encryption Standard)等で 暗号化する暗号ブロック連鎖方式である。 The encryption means 30 includes a CBC (Cipher Block Chaining) counter 31 that counts the number of encryption blocks (CBC blocks), which are encryption units. The information supply means 20 and the encryption key supply means 70 , Recording means 40 and CPU 60. The encryption means 30 performs encryption on the partial TS signal input from the information supply means 20 for each fixed-length encryption block using the encryption key input from the encryption key supply means 70. Output the encrypted partial TS signal (hereinafter referred to as encrypted data) to the recording means 40 To do. The CBC counter 31 counts the number of encrypted CBC blocks, and outputs the count result to the storage means 62 via the CPU 60. As described above, the CBC is a cipher that adds the previous ciphertext to the current plaintext and encrypts the result using DES (Data Encryption Standard), 3DES, AES (Advanced Encryption Standard), etc. It is a block chain method.

[0029] 記録手段 40は、暗号化手段 30から得た暗号化データと、 CPU60から得た暗号ィ匕 データの管理情報 (記憶手段 62に一時記憶される)を記録媒体 50に記録させる。記 録媒体 50は、ハードディスク, DVDなどの光記録媒体等の記録メディアであり、記録 媒体 50には、記録手段 40から送られる暗号化データおよび暗号化データの管理情 報が記録される。 [0029] The recording means 40 causes the recording medium 50 to record the encrypted data obtained from the encryption means 30 and the management information of the encrypted data obtained from the CPU 60 (temporarily stored in the storage means 62). The recording medium 50 is a recording medium such as an optical recording medium such as a hard disk or a DVD, and the recording medium 50 records the encrypted data sent from the recording means 40 and management information of the encrypted data.

[0030] CPU60は、暗号化記録装置 10の各構成要素(情報供給手段 20、暗号化手段 30 、記録手段 40、暗号鍵供給手段 70、暗号鍵生成手段 80)を統括的に制御するとと もに、暗号化手段 30で暗号化された暗号化データの管理情報を記憶手段 62に一 時的に記憶する。また、 CPU60は、前述した暗号鍵変更タイミング信号としての鍵生 成通知信号を、例えば、所定個数の CBCブロック数に対応する一定時間間隔で、暗 号鍵生成手段 80に出力する。  The CPU 60 controls the components (the information supply means 20, the encryption means 30, the recording means 40, the encryption key supply means 70, and the encryption key generation means 80) of the encryption recording device 10 as a whole. Then, the management information of the encrypted data encrypted by the encryption means 30 is temporarily stored in the storage means 62. Further, the CPU 60 outputs the above-mentioned key generation notifying signal as the encryption key change timing signal to the encryption key generation means 80 at a constant time interval corresponding to a predetermined number of CBC blocks, for example.

[0031] つぎに、記憶手段 62に記憶される管理情報について説明する。図 2は、記憶手段 62に記憶される管理情報の具体例を示すものである。管理情報は、鍵適用数 Aと鍵 適用範囲情報 B1— Bn (nは自然数)からなる。鍵適用数 Aは、暗号化手段 30での暗 号ィ匕の際に用いた鍵数 n、すなわち鍵適用範囲情報 B1— Bnの個数を示すものであ る。鍵適用範囲情報 B1— Bnは、鍵情報 X、鍵適用開始 CBC番号 Y、鍵適用 CBC 数 Zカゝらなる。鍵情報 Xは、暗号化手段 30での暗号化の際に用いた暗号鍵、すなわ ち暗号鍵生成手段 80で生成された暗号鍵を示す情報であり、この暗号鍵が復号ィ匕 の際の復号鍵となる。  Next, management information stored in the storage unit 62 will be described. FIG. 2 shows a specific example of the management information stored in the storage means 62. The management information includes a key application number A and key application range information B1—Bn (n is a natural number). The key application number A indicates the number n of keys used at the time of encryption by the encryption means 30, that is, the number of key application range information B1 to Bn. Key application range information B1—Bn consists of key information X, key application start CBC number Y, and key application CBC number Z. The key information X is information indicating the encryption key used at the time of encryption by the encryption means 30, that is, the encryption key generated by the encryption key generation means 80. Will be the decryption key of

[0032] 鍵適用開始 CBC番号 Yは、鍵 Xの適用が開始される CBCブロックの番号である。  The key application start CBC number Y is the number of the CBC block where the application of the key X is started.

例えば、 10番目の CBCブロック力も鍵 Xが適用される場合、適用開始 CBC番号 Yは 10となる。鍵適用 CBC数 Zは、鍵 Xが適用される CBCの個数を示すものである。例え ば、 10番目の CBCブロックから 15番目の CBCブロックまで鍵 Xが適用される場合、 適用 CBC数 Zは 6となる。 For example, if key X is also applied to the 10th CBC blocking force, the starting CBC number Y will be 10. The key application CBC number Z indicates the number of CBCs to which key X is applied. For example, if key X is applied from the 10th CBC block to the 15th CBC block, Applicable CBC number Z is 6.

[0033] つぎに、記録媒体 50に記録される情報について説明する。図 3は、記録媒体 50内 に記録される情報を示すものある。記録媒体 50に書き込まれる情報は、前述した管 理情報ファイルと暗号化データから構成されて 、る。  Next, information recorded on the recording medium 50 will be described. FIG. 3 shows information recorded in the recording medium 50. The information written to the recording medium 50 is composed of the above-mentioned management information file and encrypted data.

[0034] 管理情報ファイルは、記録媒体 50に記録された暗号化データを管理するための情 報を含んでおり、記憶手段 62に一時記憶される管理情報と同様、鍵適用数 A、鍵適 用範囲情報 B1— Bnを有している。そして、各鍵適用範囲情報 B1— Bnは、前記同 様、鍵情報 X、鍵適用開始 CBC番号 Y、鍵適用 CBC数 Ζカゝらなっている。記録媒体 50に記録される暗号ィ匕データは、暗号化手段 30で暗号化されたパーシャル TS等 の情報である。  [0034] The management information file includes information for managing the encrypted data recorded on the recording medium 50. Like the management information temporarily stored in the storage unit 62, the key application number A and the key It has use range information B1—Bn. Each of the key application range information B1 to Bn is composed of key information X, key application start CBC number Y, and key application CBC number, as described above. The encrypted data recorded on the recording medium 50 is information such as a partial TS encrypted by the encrypting means 30.

[0035] つぎに、 CPU60から指令された鍵生成通知信号による暗号鍵変更タイミングを遅 延させる方法について説明する。本実施例 1においては、 Iピクチャ等を抽出して行う 早送り再生等をスムーズに行うため、 1つの Iピクチャが複数の異なる復号鍵で復号さ れることがないよう、 1つの Iピクチャは同一の暗号鍵で暗号化する。  Next, a method of delaying the encryption key change timing by the key generation notification signal instructed by the CPU 60 will be described. In the first embodiment, in order to smoothly perform fast-forward playback or the like performed by extracting an I-picture or the like, one I-picture is the same so that one I-picture is not decrypted with a plurality of different decryption keys. Encrypt with an encryption key.

[0036] MPEG— TS等を受信しながら記録する場合は、リアルタイム処理であるため、各 Iピ クチャのデータの長さを予め認識することが困難である。また、ピクチャの間に NULL (ヌル)パケット等を挿入すると元の MPEG— TSのデータに対してどのような影響を与 えるかを予測することが困難である。したがって、本実施例 1においては、 1つの Iピク チヤが異なる復号鍵で復号されることがな 、ように、鍵変更禁止フラグの状態を参照 して、鍵変更を行うタイミングを遅延させるようにして 、る。  When recording while receiving MPEG-TS or the like, it is difficult to recognize in advance the length of the data of each I-picture because of real-time processing. Also, it is difficult to predict what effect a NULL (null) packet, etc., will have between pictures in the original MPEG-TS data. Therefore, in the first embodiment, the timing for performing the key change is delayed by referring to the state of the key change prohibition flag so that one I-picture cannot be decrypted with a different decryption key. Te ru.

[0037] 図 4は、 CBCブロックとピクチャの関係を説明するための図である。図 4において、 暗号化を行うための CBCブロックは固定長であり、初期段階においては、 CPU60力 ら指令される鍵生成通知信号によって、例えば、 3個の CBCブロック毎に暗号鍵が変 更されるように鍵変更タイミングが設定されて ヽるものとする。初期段階にお ヽては、 図 4中、最初の 3つの CBCブロック 1 (CBC1)は同一の第 1の暗号鍵で暗号化が行 われ、つぎの 3つの CBCブロック 2 (CBC2)が第 1の暗号鍵とは異なる第 2の暗号鍵 で暗号ィヒが行われるように設定され、時点 aが初期段階における鍵変更タイミングで あったものとする。すなわち、鍵生成通知信号による初期段階の暗号鍵変更タイミン グでは、時点 aに暗号鍵供給手段 70から新たな第 2の暗号鍵が暗号化手段 30に入 力され、区間 bにある CBCブロックは初期段階においては、第 2の暗号鍵によって暗 号化される CBC2ブロックであったものとする。 FIG. 4 is a diagram for explaining the relationship between CBC blocks and pictures. In FIG. 4, the CBC block for encryption has a fixed length.In the initial stage, for example, an encryption key is changed every three CBC blocks by a key generation notification signal instructed by the CPU 60. It is assumed that the key change timing is set as follows. In the initial stage, in Fig. 4, the first three CBC blocks 1 (CBC1) are encrypted with the same first encryption key, and the next three CBC blocks 2 (CBC2) are encrypted. It is assumed that the encryption is performed using a second encryption key different from the encryption key of the first time, and that the time point a is the key change timing in the initial stage. That is, the encryption key change timing at the initial stage by the key generation notification signal At the time point a, a new second encryption key is input from the encryption key supply means 70 to the encryption means 30 at time point a, and the CBC block in section b is encrypted by the second encryption key in the initial stage. Suppose that it was a CBC2 block.

[0038] この場合、 CPU60から指令される鍵生成通知信号による初期の鍵変更タイミング a は、 Iピクチャの途中となる。このため、このままでは、 Iピクチャは 2種類の暗号鍵で暗 号化されてしまう。そこで、実施例 1では、 1つの Iピクチャが異なる暗号鍵を用いて暗 号ィ匕されることがないよう、鍵変更タイミングを遅らせるようにしている。ここでは、鍵変 更タイミングを暗号ィ匕単位である 1つの CBCブロック分だけ遅らせ、新たな鍵変更タ イミングを時点 cとしている。  In this case, the initial key change timing a based on the key generation notification signal instructed from the CPU 60 is in the middle of the I picture. For this reason, the I picture is encrypted with two types of encryption keys. Therefore, in the first embodiment, the key change timing is delayed so that one I picture is not encrypted using a different encryption key. Here, the key change timing is delayed by one CBC block, which is a unit of encryption, and the new key change timing is set to time point c.

[0039] すなわち、初期段階の鍵変更タイミングである時点 aでは、鍵変更禁止フラグが 1で あるので、暗号鍵供給手段 70は、この時点 aでは、新たな第 2の暗号鍵を暗号化手 段 30に入力しない。暗号鍵供給手段 70では、鍵変更禁止フラグが 0となった後の最 初の CBCブロックの境界時点 cに新たな第 2の暗号鍵を暗号ィ匕手段 30に入力する。 したがって、時点 aでは、暗号ィ匕手段 30において鍵変更は行われず、区間 bの暗号 化ブロックは第 1の暗号鍵を用 、て暗号ィ匕される B音号化ブロック CBC 1となる。そして 、時点 c以降の 3つの CBCブロックについては、第 2の暗号鍵を用いて暗号化される 暗号化ブロック CBC2となって!/、る。  In other words, at time point a, which is the key change timing in the initial stage, the key change prohibition flag is 1, so that at this time point a, the encryption key supply means 70 transmits the new second encryption key to the encryption key. Do not input to column 30. The encryption key supply means 70 inputs a new second encryption key to the encryption means 30 at the boundary time point c of the first CBC block after the key change prohibition flag becomes 0. Therefore, at time point a, no key change is performed in the encryption unit 30, and the encrypted block in section b is a B-encoded block CBC1 encrypted using the first encryption key. Then, the three CBC blocks after the time point c become an encrypted block CBC2 which is encrypted using the second encryption key! /.

[0040] このようにして、 1つの Iピクチャは CBC1の暗号化用の鍵のみによって暗号化され ることとなる。 1つの Iピクチャが 1つの暗号鍵で暗号化された場合は、 1つの Iピクチャ を 1つの復号鍵で復号することが可能となる。なお、図 4の場合は、 1つの CBC2を C BC1に変更するのみで、 1つの Iピクチャを同一の暗号鍵を用いて暗号化することが できているが、 Iピクチャの長さによっては、 2個一複数の CBC2, CBC3を CBC1に 変更することちある。  [0040] In this way, one I picture is encrypted using only the encryption key of CBC1. If one I-picture is encrypted with one encryption key, one I-picture can be decrypted with one decryption key. In the case of FIG. 4, one I-picture can be encrypted using the same encryption key only by changing one CBC2 to CBC1, but depending on the length of the I-picture, CBC2 and CBC3 may be changed to CBC1.

[0041] また、図 4の場合は、 1つの CBC2を CBC1に変更しているにも係わらず、第 2の暗 号鍵で暗号化される CBCブロック (CBC2)の個数を初期段階で設定された 3個のま まとなるよう〖こして!/、るが、 CBC2から CBC 1〖こ変更された CBCブロックの個数分(こ の場合は 1個)だけ、第 2の暗号鍵で暗号化される CBCブロック (CBC2)の個数を減 らせるようにしてもよい。その場合、図 4における CBCブロック(CBC2)の個数は 2個 となる。 In the case of FIG. 4, the number of CBC blocks (CBC2) to be encrypted with the second encryption key is set in the initial stage, even though one CBC2 is changed to CBC1. The number of CBC blocks changed from CBC2 to CBC1 (one in this case) is encrypted with the second encryption key. The number of CBC blocks (CBC2) to be used may be reduced. In that case, the number of CBC blocks (CBC2) in Fig. 4 is two It becomes.

[0042] つぎに、図 5のフローチャートを参照して、図 1に示した各構成要素の動作を詳細に 説明する。図 5は、図 1に示した各構成要素のハードフローをソフトウェア的なフロー チャートとして表したものである。  Next, the operation of each component shown in FIG. 1 will be described in detail with reference to the flowchart in FIG. Fig. 5 is a software flow chart showing the hardware flow of each component shown in Fig. 1.

[0043] 記録動作が開始されると、記憶手段 62、 CBCカウンタ 31、鍵変更禁止フラグ 21を クリアする初期化処理が行われる (ステップ S 100)。  When the recording operation is started, an initialization process for clearing the storage unit 62, the CBC counter 31, and the key change prohibition flag 21 is performed (Step S100).

[0044] つぎに、暗号鍵生成手段 80は、第 1番目の暗号鍵を生成し、生成した暗号鍵を喑 号鍵供給手段 70に供給する (ステップ S 110, S120)。暗号鍵供給手段 70は、記録 開始時点では、暗号鍵生成手段 80から供給された暗号鍵を、無条件にすなわち鍵 変更禁止フラグを参照することなく暗号ィ匕手段 30に即座に出力する。さらに、暗号鍵 供給手段 70は、暗号鍵生成手段 80から供給された暗号鍵を、 CPU60に出力する。  Next, the encryption key generation unit 80 generates a first encryption key, and supplies the generated encryption key to the encryption key supply unit 70 (Steps S 110 and S 120). At the start of recording, the encryption key supply means 70 immediately outputs the encryption key supplied from the encryption key generation means 80 to the encryption means 30 unconditionally, that is, without referring to the key change prohibition flag. Further, the encryption key supply means 70 outputs the encryption key supplied from the encryption key generation means 80 to the CPU 60.

[0045] つぎに、暗号化手段 30は、暗号鍵生成手段 80から供給された暗号鍵を用いた暗 号ィ匕処理をデータが入力されるまでの間待機するデータ入力待ちの状態となる (ステ ップ S 130)。また、記録手段 40も、記録すべきデータが入力されるまでの間記録処 理を待機するデータ入力待ちの状態となる (ステップ S 140)。  Next, the encryption unit 30 enters a state of waiting for data input to wait for data to be input in an encryption process using the encryption key supplied from the encryption key generation unit 80 ( Step S 130). Further, the recording means 40 also enters a data input waiting state of waiting for recording processing until data to be recorded is input (step S140).

[0046] つぎに、情報供給手段 20は、パーシャル TS信号が入力されると、入力されるパー シャル TS信号中のピクチャ検出動作を開始する (ステップ S 150)。  Next, when the partial TS signal is input, the information supply unit 20 starts a picture detection operation in the input partial TS signal (step S 150).

[0047] すなわち、情報供給手段 20は、パーシャル TS信号が入力されると、入力されたパ 一シャル TSを所定のデータサイズ毎にバッファリングしながら所定のタイミングで暗 号ィ匕手段 30に供給するとともに、暗号ィ匕手段 30で暗号ィ匕されるピクチャが Iピクチャ であるか否かの判断を行うため、入力されたパーシャル TS信号中の Iピクチャの先頭 を検出する (ステップ S160)。情報供給手段 20は、 Iピクチャの先頭、またはそれに 類するシーケンスヘッダコード(SHC)、 GOPヘッダ等を検出することにより、 Iピクチ ャの先頭を検出する。  That is, when the partial TS signal is input, the information supply unit 20 supplies the input partial TS to the encryption unit 30 at a predetermined timing while buffering the input partial TS for each predetermined data size. At the same time, in order to determine whether the picture to be encrypted by the encryption means 30 is an I picture, the head of the I picture in the input partial TS signal is detected (step S160). The information supply means 20 detects the head of the I picture by detecting the head of the I picture or a similar sequence header code (SHC), GOP header, or the like.

[0048] そして、情報供給手段 20は、 Iピクチャの先頭を検出すると、鍵変更禁止フラグを「0 」から「1」に立ち上げる。鍵変更禁止フラグは、他の Bピクチャや Pピクチヤの先頭を 検出するまでは、「1」に保持され、他の Bピクチャや Pピクチヤの先頭を検出した地点 で (ステップ S180)、「0」に立ち下げられる(ステップ S190)。このようにして、 Iピクチ ャが検出されている期間中は、鍵変更禁止フラグは「1」に保持され、 Iピクチャを検出 していない期間中は、鍵変更禁止フラグは「0」とされる。情報供給手段 20では、この ようなステップ S 160— S 190の処理を繰り返し実行する。 Then, upon detecting the beginning of the I picture, the information supply unit 20 raises the key change prohibition flag from “0” to “1”. The key change prohibition flag is held at `` 1 '' until the start of another B picture or P picture is detected, and `` 0 '' at the point where the start of another B picture or P picture is detected (step S180). (Step S190). In this way, I picture The key change prohibition flag is held at “1” during the period when the key is detected, and the key change prohibition flag is set to “0” during the period when no I-picture is detected. The information supply means 20 repeatedly executes the processing of steps S160 to S190.

[0049] 一方、情報供給手段 20にパーシャル TS信号が入力されると、その旨が情報供給 手段 20力も CPU60に報告される。これにより、 CPU60は、鍵適用数 Aの値を + 1し 、その + 1した結果 (この場合は鍵適用数 A= 1)を記憶手段 62の鍵適用数 Aの記憶 エリアに記憶する(ステップ S200)。  On the other hand, when the partial TS signal is input to the information supply means 20, the information supply means 20 is also notified to that effect to the CPU 60. As a result, the CPU 60 increments the value of the key application number A by +1 and stores the result of the +1 (in this case, the key application number A = 1) in the storage area of the key application number A of the storage means 62 (step S200).

[0050] さらに、 CPU60は、ステップ S 120の時点において、暗号鍵供給手段 70力も供給 されていた第 1番目の暗号鍵を、記憶手段 62の鍵情報 Xの記憶エリアに記憶する (ス テツプ S210)。さらに、 CPU60は、暗号化手段 30の CBCカウンタ 31のカウント出力 を取得し、取得したカウント結果 (この場合は、 CBCカウンタ 31の初期値)を記憶手 段 62の鍵適用開始 CBC番号 Yの記憶エリアに記憶しておく(ステップ S220)。  Further, the CPU 60 stores the first encryption key to which the encryption key supply means 70 was also supplied at the time of step S120 in the storage area of the key information X of the storage means 62 (step S210). ). Further, the CPU 60 obtains the count output of the CBC counter 31 of the encryption means 30 and stores the obtained count result (in this case, the initial value of the CBC counter 31). It is stored in the area (step S220).

[0051] つぎに、暗号鍵生成手段 80が CPU60から鍵生成通知信号を受信までの間 (ステ ップ S230、 No)、暗号ィ匕手段 30は、情報供給手段 20からパーシャル TS信号が入 力された時点から、ステップ S110において情報供給手段 20から入力された第 1番 目の暗号鍵を用いて CBCブロック単位の暗号ィ匕処理を行う。すなわち、暗号化手段 30は、情報供給手段 20から CBCブロック単位に入力されたパーシャル TS信号を、 第 1番目の暗号鍵を用いて CBCブロック単位に順次暗号ィ匕し、暗号化されたパーシ ャル TS信号すなわち暗号ィ匕データを CBCブロック単位にバッファリングしながら記 録手段 40に順次出力する(ステップ S240)。 CBCカウンタ 31は、 1つの CBCブロッ クが暗号ィ匕されると、そのカウント値を + 1し、そのカウント値を CPU60に出力する( ステップ S250)。また、記録手段 40は、暗号化手段 30から入力された暗号化データ を、順次記録媒体 50の所要のエリアに順次記録していく(ステップ S260)。以上のよ うな暗号化手段 30での第 1番目の暗号鍵を用いた暗号化処理、 CBCカウンタ 31の インクリメントおよび記録手段 40での記録動作は、 CPU60からの鍵生成通知信号が 暗号鍵生成手段 80に入力されるまで繰り返される。  Next, until the encryption key generation means 80 receives the key generation notification signal from the CPU 60 (step S230, No), the encryption key generation means 30 receives the partial TS signal from the information supply means 20. From the point in time, in step S110, encryption processing is performed in CBC block units using the first encryption key input from the information supply means 20. That is, the encryption unit 30 sequentially encrypts the partial TS signal input from the information supply unit 20 in CBC block units using the first encryption key in CBC block units, and encrypts the encrypted partial TS signal. The buffer unit sequentially outputs the TS signal, that is, the encrypted data, to the recording unit 40 while buffering the data in units of CBC blocks (step S240). When one CBC block is encrypted, the CBC counter 31 increments its count by +1 and outputs the count to the CPU 60 (step S250). Further, the recording means 40 sequentially records the encrypted data input from the encryption means 30 in a required area of the recording medium 50 sequentially (step S260). As described above, the encryption processing using the first encryption key in the encryption means 30, the increment of the CBC counter 31, and the recording operation in the recording means 40 are performed according to the key generation notification signal from the CPU 60. Repeated until 80 is entered.

[0052] その後、 CPU60からの鍵生成通知信号が暗号鍵生成手段 80に入力されると (ス テツプ S230、 Yes)、暗号鍵生成手段 80は、第 2番目の暗号鍵を生成し、生成した 第 2番目の暗号鍵を暗号鍵供給手段 70に出力する。暗号鍵供給手段 70は入力さ れた第 2番目の暗号鍵を保持するとともに、情報供給手段 20の鍵変更禁止フラグ 21 の状態を参照する (ステップ S290)。この場合、情報供給手段 20の鍵変更禁止フラ グ 21は「0」であったとする。 [0052] Thereafter, when a key generation notification signal from CPU 60 is input to encryption key generation means 80 (Step S230, Yes), encryption key generation means 80 generates and generates a second encryption key. The second encryption key is output to the encryption key supply means 70. The encryption key supply means 70 holds the input second encryption key and refers to the state of the key change prohibition flag 21 of the information supply means 20 (step S290). In this case, it is assumed that the key change prohibition flag 21 of the information supply means 20 is “0”.

[0053] 暗号鍵供給手段 70は、鍵変更禁止フラグが「0」であるので (ステップ S290、 No)、 暗号鍵生成手段 80から入力された保持している暗号鍵を即座に暗号ィ匕手段 30およ び CPU60に出力する(ステップ S330)。 CPU60は、この時点での CBCカウンタ 31 のカウント値からステップ S220で取得した鍵適用開始 CBC番号 Yの値を減算する 演算を行い、この演算結果を鍵適用 CBC数 Zとして記憶手段 62で記憶する (ステツ プ S340)。すなわち、この場合、ステップ S340では、ステップ S230— S260を繰り 返すことによって行われた第 1番目の暗号鍵による暗号ィ匕処理での鍵適用 CBC数 Z が演算される。 Since the key change prohibition flag is “0” (No in step S290), the encryption key supply unit 70 immediately converts the held encryption key input from the encryption key generation unit 80 into the encryption key. Output to 30 and CPU 60 (step S330). The CPU 60 performs an operation of subtracting the value of the key application start CBC number Y obtained in step S220 from the count value of the CBC counter 31 at this time, and stores the operation result in the storage means 62 as the key application CBC number Z. (Step S340). That is, in this case, in step S340, the key application CBC number Z in the encryption processing using the first encryption key, which is performed by repeating steps S230 to S260, is calculated.

[0054] つぎに、 CPU60は、鍵適用数 Aの値を + 1し、その + 1した結果 (この場合は鍵適 用数 A= 2となる)を記憶手段 62の鍵適用数 Aの記憶エリアに記憶する (ステップ S2 00)。  Next, the CPU 60 increments the value of the key application number A by +1 and stores the result of +1 (in this case, the key application number A = 2) in the storage unit 62 as the key application number A. It is stored in the area (step S200).

[0055] さらに、 CPU60は、ステップ S330の時点において、暗号鍵供給手段 70力も供給 されていた第 2番目の暗号鍵を、記憶手段 62の鍵情報 Xの記憶エリアに記憶する (ス テツプ S210)。さらに、 CPU60は、この時点の暗号化手段 30の CBCカウンタ 31の カウント出力を取得し、取得したカウント結果を記憶手段 62の鍵適用開始 CBC番号 Yの記憶エリアに記憶しておく(ステップ S220)。  Further, at the time of step S330, the CPU 60 stores the second encryption key to which the encryption key supply means 70 has also been supplied in the storage area of the key information X of the storage means 62 (step S210). . Further, the CPU 60 obtains the count output of the CBC counter 31 of the encryption means 30 at this time, and stores the obtained count result in the storage area of the key application start CBC number Y of the storage means 62 (step S220). .

[0056] つぎに、暗号鍵生成手段 80が CPU60から新たな鍵生成通知信号を受信するまで の間(ステップ S230、 No)、暗号化手段 30は、ステップ S330において情報供給手 段 20から入力された第 2番目の暗号鍵を用いて CBCブロック単位の暗号ィ匕処理を 行う。すなわち、暗号化手段 30は、情報供給手段 20から CBCブロック単位に入力さ れたパーシャル TS信号を、第 2番目の暗号鍵を用いて CBCブロック単位に順次暗 号化し、暗号ィ匕データを CBCブロック単位にバッファリングしながら記録手段 40に順 次出力する(ステップ S 240)。 CBCカウンタ 31は、 1つの CBCブロックが暗号化され ると、そのカウント値を + 1し、そのカウント値を CPU60に出力する(ステップ S250)。 また、記録手段 40は、暗号化手段 30から入力された暗号化データを、順次記録媒 体 50の所要のエリアに順次記録していく(ステップ S260)。以上のような暗号化手段 30での第 2番目の暗号鍵を用いた暗号化処理、 CBCカウンタ 31のインクリメントおよ び記録手段 40での記録動作を、 CPU60からの新たな鍵生成通知信号が暗号鍵生 成手段 80に入力されるまで繰り返す。 Next, until the encryption key generation means 80 receives a new key generation notification signal from the CPU 60 (step S230, No), the encryption means 30 is input from the information supply means 20 in step S330. Using the second encryption key, encryption processing is performed for each CBC block. That is, the encryption unit 30 sequentially encrypts the partial TS signal input from the information supply unit 20 in CBC block units using the second encryption key in CBC block units, and converts the encrypted data into CBC blocks. The data is sequentially output to the recording means 40 while buffering in block units (step S240). When one CBC block is encrypted, the CBC counter 31 increments its count by +1 and outputs the count to the CPU 60 (step S250). Further, the recording means 40 sequentially records the encrypted data input from the encryption means 30 in a required area of the recording medium 50 sequentially (step S260). The above-described encryption processing using the second encryption key in the encryption means 30, the increment of the CBC counter 31, and the recording operation in the recording means 40 are performed by a new key generation notification signal from the CPU 60. Repeat until input to encryption key generation means 80.

[0057] その後、 CPU60からの鍵生成通知信号が暗号鍵生成手段 80に入力されると (ス テツプ S230、 Yes)、暗号鍵生成手段 80は、第 3番目の暗号鍵を生成し、生成した 第 3番目の暗号鍵を暗号鍵供給手段 70に出力する。暗号鍵供給手段 70は入力さ れた第 3番目の暗号鍵を保持するとともに、情報供給手段 20の鍵変更禁止フラグ 21 の状態を参照する (ステップ S 290)。  [0057] Thereafter, when a key generation notification signal from CPU 60 is input to encryption key generation means 80 (Step S230, Yes), encryption key generation means 80 generates and generates a third encryption key. The third encryption key is output to the encryption key supply means 70. The encryption key supply means 70 holds the input third encryption key and refers to the state of the key change prohibition flag 21 of the information supply means 20 (step S290).

[0058] この場合、情報供給手段 20の鍵変更禁止フラグ 21は「1」であったとする。暗号鍵 供給手段 70は、鍵変更禁止フラグ力 「l」であるので (ステップ S230、 Yes)、暗号鍵 生成手段 80から入力された第 3番目の暗号鍵を、この時点では、暗号化手段 30に 出力しない。そして、暗号鍵供給手段 70では、この第 3番目の暗号鍵を保持してお き、鍵変更禁止フラグが「1」から「0」となった時点の後の、最初の暗号化ブロック間の 境界位置に対応する時点(図 4における時点 c)で、第 3番目の暗号鍵を暗号化手段 30に出力する(ステップ S330)。  In this case, it is assumed that the key change prohibition flag 21 of the information supply means 20 is “1”. Since the encryption key supply unit 70 has the key change prohibition flag power “l” (step S230, Yes), the third encryption key input from the encryption key generation unit 80 Do not output to Then, the encryption key supply means 70 holds the third encryption key, and stores the third encryption key between the first encryption blocks after the point at which the key change prohibition flag changes from “1” to “0”. At the time corresponding to the boundary position (time c in FIG. 4), the third encryption key is output to the encryption means 30 (step S330).

[0059] なお、この場合は、暗号鍵供給手段 70は、暗号鍵生成手段 80から供給された暗 号鍵を即座に暗号ィ匕手段 30に入力すれば、暗号ィ匕手段 30では CBCブロックの境 界で暗号鍵が変更されるように各部のタイミング調整が行われている。したがって、暗 号鍵供給手段 70では、暗号鍵生成手段 80から暗号鍵が入力された時点 (例えば図 4の時点 a)後の、 1一複数の CBCブロック分に対応する時間が経過した時点(図 4に おける時点 c,時点 (1,· ··)をタイマカウンタなどを用いて順次検出することで、暗号ィ匕 ブロック間の境界位置を検出し、鍵変更禁止フラグが「1」から「0」となった時点の後 に、最初の暗号ィ匕ブロック間の境界位置に対応する時点を検出した時点で、第 3番 目の暗号鍵を暗号ィ匕手段 30に出力するようにすればよい。  In this case, if the encryption key supply unit 70 immediately inputs the encryption key supplied from the encryption key generation unit 80 to the encryption unit 30, the encryption key supply unit 70 The timing of each part is adjusted so that the encryption key is changed at the boundary. Therefore, the encryption key supply means 70 sets the time (e.g., time point a in FIG. 4) after the input of the encryption key from the encryption key generation means 80, at the time when the time corresponding to one or more CBC blocks has elapsed ( By sequentially detecting the time point c and the time point (1,...) In FIG. 4 using a timer counter or the like, the boundary position between the encrypted blocks is detected, and the key change inhibition flag is changed from “1” to “1”. After detecting the time point corresponding to the boundary position between the first encryption blocks after the time point at which it becomes `` 0 '', the third encryption key is output to the encryption means 30. Good.

[0060] 上述のように、暗号鍵供給手段 70は、鍵変更禁止フラグが「1」である場合、暗号鍵 生成手段 80から入力された暗号鍵 (この場合第 3の暗号鍵)を保持し、鍵変更禁止 フラグが「1」から「0」となった時点の後の、最初の暗号化ブロック間の境界位置に対 応する時点(図 4における時点 c)で暗号鍵を暗号ィ匕手段 30に出力するようにしてい る。このようにして暗号鍵供給手段 70は、新たな暗号鍵 (この場合第 3の暗号鍵)を 暗号化手段 30に供給するタイミングを遅延させるようにして!/、る。 [0060] As described above, when the key change prohibition flag is "1", the encryption key supply unit 70 holds the encryption key (the third encryption key in this case) input from the encryption key generation unit 80. , Key change prohibited After the flag changes from “1” to “0”, the encryption key is output to the encryption unit 30 at the time corresponding to the boundary position between the first encrypted blocks (time c in FIG. 4). I am doing it. In this manner, the encryption key supply means 70 delays the timing of supplying a new encryption key (in this case, the third encryption key) to the encryption means 30!

[0061] したがって、暗号鍵生成手段 80から新たな暗号鍵 (この場合第 3の暗号鍵)が出力 されてから、暗号鍵供給手段 70から暗号ィ匕手段 30に対し暗号鍵 (この場合第 3の暗 号鍵)が供給されるまでの間の期間、すなわち暗号鍵供給手段 70による遅延時間の 間は、暗号化手段 30では、第 2の暗号鍵による暗号ィ匕が行われることになる。  [0061] Therefore, after a new encryption key (in this case, the third encryption key) is output from the encryption key generation means 80, the encryption key is supplied from the encryption key supply means 70 to the encryption means 30 (in this case, the third encryption key). During the period until the encryption key is supplied, that is, during the delay time by the encryption key supply unit 70, the encryption unit 30 performs encryption using the second encryption key.

[0062] すなわち、この遅延時間の間、暗号化手段 30は、情報供給手段 20から CBCブロッ ク単位に入力されたパーシャル TS信号を、第 2番目の暗号鍵を用いて CBCブロック 単位に順次暗号ィ匕し、暗号ィ匕データを CBCブロック単位にバッファリングしながら記 録手段 40に順次出力する(ステップ S300)。 CBCカウンタ 31は、 1つの CBCブロッ クが暗号ィ匕されると、そのカウント値を + 1し、そのカウント値を CPU60に出力する( ステップ S310)。また、記録手段 40は、暗号化手段 30から入力された暗号化データ を、順次記録媒体 50の所要のエリアに順次記録していく(ステップ S320)。  [0062] That is, during this delay time, the encryption means 30 sequentially encrypts the partial TS signal input from the information supply means 20 in CBC block units using the second encryption key in CBC block units. The data is sequentially output to the recording means 40 while buffering the encrypted data in CBC block units (step S300). When one CBC block is encrypted, the CBC counter 31 increments its count by +1 and outputs the count to the CPU 60 (step S310). Further, the recording means 40 sequentially records the encrypted data input from the encryption means 30 in a required area of the recording medium 50 (step S320).

[0063] 以上のような暗号化手段 30での第 2番目の暗号鍵を用いた暗号化処理、 CBCカウ ンタ 31のインクリメント処理および記録手段 40での記録動作は、鍵変更禁止フラグが 「1」から「0」となるまでは繰り返される。正確には、鍵変更タイミングの変更によって追 加される第 2番目の暗号鍵を用いた暗号化処理は、鍵変更禁止フラグが「1」から「0」 となった後、情報供給手段 20から新たな第 3番目の鍵が暗号ィ匕手段 30に供給され るまで、実行される。  As described above, the encryption processing using the second encryption key in the encryption means 30, the increment processing in the CBC counter 31, and the recording operation in the recording means 40 are performed when the key change prohibition flag is set to “1”. Is repeated from "" to "0". To be precise, the encryption process using the second encryption key added by changing the key change timing is performed after the key change prohibition flag changes from “1” to “0”, The process is executed until a new third key is supplied to the encryption unit 30.

[0064] この場合、暗号鍵供給手段 70は、前述したように、鍵変更禁止フラグが「1」から「0 」となった時点の後の、最初の暗号化ブロック間の境界位置に対応する時点(図 4に おける時点 c)で第 3の暗号鍵を暗号ィ匕手段 30および CPU60に出力する (ステップ S330)。  In this case, as described above, the encryption key supply unit 70 corresponds to the boundary position between the first encrypted blocks after the point at which the key change inhibition flag changes from “1” to “0”. At the time (time c in FIG. 4), the third encryption key is output to the encryption means 30 and the CPU 60 (step S330).

[0065] CPU60は、この時点での CBCカウンタ 31のカウント値からステップ S220で取得し た鍵適用開始 CBC番号 Yの値を減算する演算を行 、、この演算結果を鍵適用 CBC 数 Zとして記憶手段 62で記憶する (ステップ S340)。すなわち、この場合、ステップ S 340では、ステップ S230— S260の処理の繰り返し、およびステップ S300— S320 の処理を実行することによって行われた第 2番目の暗号鍵による暗号ィ匕処理での鍵 適用 CBC数 Zが演算される。 [0065] The CPU 60 performs an operation of subtracting the value of the key application start CBC number Y obtained in step S220 from the count value of the CBC counter 31 at this time, and stores the operation result as the key application CBC number Z. It is stored by means 62 (step S340). That is, in this case, step S At 340, the key application CBC number Z in the encryption processing using the second encryption key performed by repeating the processing of steps S230 to S260 and performing the processing of steps S300 to S320 is calculated.

[0066] つぎに、 CPU60は、鍵適用数 Aの値を + 1し、その + 1した結果 (この場合は鍵適 用数 A= 3となる)を記憶手段 62の鍵適用数 Aの記憶エリアに記憶する (ステップ S2 00)。 Next, the CPU 60 increments the value of the key application number A by +1 and stores the result of the +1 (in this case, the key application number A = 3) in the storage unit 62 as the key application number A. It is stored in the area (step S200).

[0067] さらに、 CPU60は、ステップ S330の時点において、暗号鍵供給手段 70力も供給 されていた第 3番目の暗号鍵を、記憶手段 62の鍵情報 Xの記憶エリアに記憶する (ス テツプ S210)。さらに、 CPU60は、この時点の暗号化手段 30の CBCカウンタ 31の カウント出力を取得し、取得したカウント結果を記憶手段 62の鍵適用開始 CBC番号 Yの記憶エリアに記憶しておく(ステップ S220)。  Further, the CPU 60 stores the third encryption key to which the encryption key supply means 70 was also supplied at the time of step S330 in the storage area of the key information X of the storage means 62 (step S210). . Further, the CPU 60 obtains the count output of the CBC counter 31 of the encryption means 30 at this time, and stores the obtained count result in the storage area of the key application start CBC number Y of the storage means 62 (step S220). .

[0068] つぎに、前述と同様、ステップ S230— S260の処理を繰り返すことにより、暗号ィ匕 手段 30での第 3番目の暗号鍵を用いた暗号化処理、 CBCカウンタ 31のインクリメント および記録手段 40での記録動作が実行される。  Next, similarly to the above, by repeating the processing of steps S230-S260, the encryption processing using the third encryption key in the encryption means 30, the increment of the CBC counter 31 and the recording means 40 Is performed.

[0069] その後、 CPU60からの鍵生成通知信号が暗号鍵生成手段 80に入力されると (ス テツプ S230、 Yes)、暗号鍵生成手段 80は、第 4番目の暗号鍵を生成し、生成した 第 4番目の暗号鍵を暗号鍵供給手段 70に出力する。これ以降の動作は、前述と同 様であり、情報供給手段 20の鍵変更禁止フラグ 21の状態に応じて、鍵変更タイミン グを変更するか否かが決定され、この決定結果に応じた暗号ィ匕処理が実行される。  [0069] Thereafter, when a key generation notification signal from CPU 60 is input to encryption key generation means 80 (step S230, Yes), encryption key generation means 80 generates and generates the fourth encryption key. The fourth encryption key is output to the encryption key supply means 70. The subsequent operation is the same as described above, and whether or not to change the key change timing is determined according to the state of the key change prohibition flag 21 of the information supply means 20, and the encryption according to the determination result is performed. A dani process is performed.

[0070] このように実施例 1によれば、 1つの Iピクチャの途中で暗号鍵の変更タイミングが発 生した場合は、暗号鍵の変更タイミングを遅らせて 1つの Iピクチャを同一の暗号鍵で 暗号化するようにしたので、 MPEG— TS等の符号ィ匕映像データを受信しながら暗号 化して記録媒体に記録するリアルタイム暗号ィ匕記録装置において、早送り再生ゃサ ーチ時にスムーズな映像表示が可能となる。  As described above, according to the first embodiment, when the encryption key change timing occurs in the middle of one I-picture, the change timing of the encryption key is delayed so that one I-picture is replaced by the same encryption key. Since encryption is performed, in a real-time encryption recording apparatus that encrypts while receiving encoded video data such as MPEG-TS and records it on a recording medium, smooth video display during fast-forward playback / search is achieved. It becomes possible.

[0071] なお、上記実施例 1においては、暗号鍵供給手段 70が暗号化手段 30における暗 号ィ匕の際の鍵変更タイミングを調整するようにした力 暗号ィ匕手段 30において、鍵変 更タイミングを調整するようにしてもよい。例えば、暗号化手段 30に、新旧 2つの暗号 鍵を保持するバッファを設ける。暗号鍵供給手段 70は、鍵変更禁止フラグ 21の状態 識別により、新旧 2つの暗号鍵のうちのどちらを使用するかを示す識別信号を暗号ィ匕 手段 30に入力する。暗号化手段 30では、 CBCブロックの区切りがくるたびに、識別 信号を参照して使用すべき暗号鍵を新旧 2つの暗号鍵から選択し、選択した暗号鍵 を使用して暗号ィ匕を行う。また、上記実施例 1では、 CPU60が暗号鍵を変更するタイ ミングを指令するようにしたが、暗号化処理手段 100自体に暗号鍵変更タイミングを 予め設定するようにしてもよい。要は、暗号ィ匕手段 30における暗号ィ匕の際に、暗号 鍵変更タイミングが Iピクチャの途中とならないよう暗号鍵変更タイミングを遅延させる ことができればよいのであり、それを可能とするものであれば他の任意の手法を用い るようにしてちょい。 In the first embodiment, the encryption key supply means 70 adjusts the key change timing at the time of encryption in the encryption means 30. The timing may be adjusted. For example, the encryption means 30 is provided with a buffer for holding two new and old encryption keys. The encryption key supply unit 70 sets the state of the key change prohibition flag 21 By the identification, an identification signal indicating which of the two new and old encryption keys is to be used is input to the encryption means 30. The encryption means 30 selects an encryption key to be used from the two old and new encryption keys with reference to the identification signal each time a CBC block break occurs, and performs encryption using the selected encryption key. In the first embodiment, the CPU 60 instructs the timing to change the encryption key. However, the encryption key change timing may be set in advance in the encryption processing unit 100 itself. The point is that it is only necessary to be able to delay the encryption key change timing so that the encryption key change timing is not in the middle of an I-picture during encryption by the encryption means 30. Try using any other method.

[0072] また、本実施例 1にお 、ては、 1つの Iピクチャを複数の暗号鍵で暗号ィ匕しな 、よう にした力 複数の暗号鍵で暗号ィ匕しないようにする領域は 1つの Iピクチャに限られず 、例えば 1つの Iピクチャに加えて 1つの Pピクチャまたは Bピクチャも含むような領域と してもよい。また、本実施例 1においては、暗号ィ匕の方式として CBCを用いることとし た力 暗号化の方式は CBCに限られるものではない。  Further, in the first embodiment, an area in which one I picture is not encrypted with a plurality of encryption keys is protected from being encrypted with a plurality of encryption keys. The area is not limited to one I picture, and may be, for example, an area including one P picture or B picture in addition to one I picture. Further, in the first embodiment, the power encryption method using CBC as the encryption method is not limited to CBC.

[0073] なお、 CBCブロックのサイズと記録媒体 50の物理的なアクセスサイズとをマツチン グさせ、またコンテンツへのアクセス開始位置と CBCブロックの開始位置とをマツチン グさせるようにしたほうが望ましい。すなわち、物理アクセス単位が 512バイトであって 、論理的にその倍数、例えば 6144バイト単位にしかアクセス出来ない場合は、 CBC ブロックサイズを、このアクセス単位にマッチングさせる。また、コンテンツへのァクセ スは、該当アクセス位置を含む記録メディアのセクタの先頭力も行われるので、ァクセ ス開始位置と CBCブロックの開始位置とをマッチングさせておけば、セクタへのァク セスと同時に CBCブロックに対してアクセスできることになり、復号ィ匕の処理を簡略ィ匕 することが可能となる。  It is desirable that the size of the CBC block and the physical access size of the recording medium 50 be matched, and that the access start position of the content and the start position of the CBC block be matched. That is, if the physical access unit is 512 bytes and only a logical multiple, for example, 6144 bytes, can be accessed, the CBC block size is matched to this access unit. In addition, since the access to the content is performed at the head of the sector of the recording medium including the corresponding access position, if the access start position is matched with the start position of the CBC block, the access to the sector can be performed. At the same time, the CBC block can be accessed, and the decoding process can be simplified.

[0074] [実施例 2]  [Example 2]

図 6— 8に従って実施例 2について説明する。図 6は、本発明の実施例 2にかかる暗 号ィ匕記録装置の構成を説明するためのブロック図である。なお、図 6に示す各構成 要素のうち、図 1に示す実施例 1の各構成要素と同一の機能を達成する構成要素に は同一番号を付している。本実施例 2においては、 1つの GOPが複数の復号鍵で復 号されることがないよう、 1つの GOPは 1つの暗号鍵で暗号化する。 Example 2 will be described with reference to FIGS. 6-8. FIG. 6 is a block diagram for explaining a configuration of the encryption / imagine recording apparatus according to the second embodiment of the present invention. Note that among the components shown in FIG. 6, components that achieve the same functions as the components of the first embodiment shown in FIG. 1 are denoted by the same reference numerals. In the second embodiment, one GOP is decrypted with a plurality of decryption keys. One GOP is encrypted with one encryption key so that it is not encrypted.

[0075] 前述したように、 Iピクチャ、 Pピクチャおよび Bピクチャの組み合わせによって GOP ( Group of picture)が構成される。また、 1つの GOPには、少なくとも 1つの Iピクチャ が必ず含まれている。 As described above, a combination of an I picture, a P picture, and a B picture forms a GOP (Group of picture). Also, one GOP always contains at least one I picture.

[0076] この暗号化記録装置 15は、ォーサリング処理機能を有しており、情報供給手段 20 、暗号化処理手段 100、記録手段 40、 CPU60および記憶手段 62を備えている。暗 号ィ匕処理手段 100は、暗号化手段 30および鍵生成手段 32を備えている。また、暗 号化記録装置 15は、記録媒体 50と接続されている。ォーサリング処理は非リアルタ ィム処理であるため、入力されるパーシャル TS信号のエンコード後のサイズを予め 知ることができ、また鍵変更位置も自由に決定することができる。  The encryption recording device 15 has an authoring processing function, and includes an information supply unit 20, an encryption processing unit 100, a recording unit 40, a CPU 60, and a storage unit 62. The encryption processing means 100 includes an encryption means 30 and a key generation means 32. Further, the encryption recording device 15 is connected to a recording medium 50. Since the authoring process is a non-real-time process, the size of the input partial TS signal after encoding can be known in advance, and the key change position can be freely determined.

[0077] 情報供給手段 20には、例えば、外部の記憶装置など力 パーシャル TS信号など の符号ィ匕された映像データが入力される。パーシャル TS信号は、シーケンスヘッダ コード(SHC)、データ長が不定長の複数の GOPなど力も構成されている。すなわち 、 GOPを含むデータ列の長さは、 MPEGのエンコード方式や画素数などによって変 化する。情報供給手段 20は、 CPU60からの制御信号によって動作の開始や停止が 制御されており、外部入力されるパーシャル TS (Transport Stream)信号を、暗号化 手段 30において暗号ィ匕されるデータサイズ毎にバッファリングしながら所定のタイミ ングで暗号化手段 30に供給する。  [0077] The information supply means 20 is supplied with encoded video data such as a partial TS signal from an external storage device. The partial TS signal is composed of a sequence header code (SHC), a plurality of GOPs having an indefinite data length, and the like. That is, the length of the data string including the GOP changes depending on the MPEG encoding method, the number of pixels, and the like. The information supply means 20 is controlled to start and stop the operation by a control signal from the CPU 60, and outputs an externally input partial TS (Transport Stream) signal for each data size encrypted by the encryption means 30. The data is supplied to the encryption means 30 at a predetermined timing while buffering.

[0078] また、情報供給手段 20は、暗号ィ匕手段 30で行われる暗号ィ匕処理の際の鍵変更位 置 (鍵変更タイミング)に関する情報を CPU60から取得するとともに、入力されたパー シャル TS信号における隣接する GOP間の区切り位置を検出する。そして、情報供 給手段 20は、鍵変更位置と GOP間の区切り位置が一致する力否かを判定し、不一 致の場合は、 GOPの直前に別言すれば GOPの最後に意味のないデータ、すなわ ち NULLパケット、あるいはランダムデータを含んで!/、るプライベートパケットなどを付 加する処理を実行することにより、暗号鍵変更タイミングが GOP (符号ィ匕単位)を暗 号ィ匕する途中とならな 、ようにする。  Further, the information supply means 20 acquires from the CPU 60 information on the key change position (key change timing) at the time of the encryption processing performed by the encryption means 30, and the input partial TS. Detects the break position between adjacent GOPs in the signal. Then, the information supply means 20 determines whether or not the force at which the key change position coincides with the separation position between the GOPs, and in the case of a mismatch, there is no meaning at the end of the GOP in other words immediately before the GOP. By performing a process of adding data, that is, a NULL packet, or a private packet including random data, the encryption key change timing encrypts the GOP (encoding unit). Do not be on the way.

[0079] 暗号化処理手段 100は、暗号化単位である暗号化ブロック(CBCブロック)の個数 をカウントする CBC (Cipher Block Chaining)カウンタ 31を備える暗号化手段 30と、 CPU60からの鍵生成通知信号に従って、一定時間間隔あるいは一定の CBCブロッ ク数毎に、順次異なる暗号鍵を生成する鍵生成手段 32とを有している。暗号化手段 30は、鍵生成手段 32で生成された暗号鍵を用いて情報供給手段 20から入力される パーシャル TS信号に対し固定長の暗号ィ匕ブロック毎に暗号ィ匕を行うものであり、暗 号化された暗号化データを記録手段 40に出力する。 [0079] The encryption processing means 100 includes an encryption means 30 including a CBC (Cipher Block Chaining) counter 31 for counting the number of encryption blocks (CBC blocks) as encryption units; Key generation means 32 for sequentially generating different encryption keys at predetermined time intervals or at a fixed number of CBC blocks according to a key generation notification signal from the CPU 60. The encryption unit 30 performs encryption for each fixed-length encryption block on the partial TS signal input from the information supply unit 20 using the encryption key generated by the key generation unit 32, The encrypted encrypted data is output to the recording means 40.

[0080] 記録手段 40は、暗号化手段 30から得た暗号化データと、 CPU60から得た暗号化 データの管理情報 (記憶手段 62に一時記憶される)を記録媒体 50に記録させる。記 録媒体 50は、ハードディスク, DVDなどの光記録媒体等の記録メディアであり、記録 媒体 50には、記録手段 40から送られる暗号化データおよび暗号化データの管理情 報が記録される。 The recording unit 40 causes the recording medium 50 to record the encrypted data obtained from the encryption unit 30 and the management information (temporarily stored in the storage unit 62) of the encrypted data obtained from the CPU 60. The recording medium 50 is a recording medium such as an optical recording medium such as a hard disk or a DVD, and the recording medium 50 records the encrypted data sent from the recording means 40 and management information of the encrypted data.

[0081] CPU60は、暗号化記録装置 15の各構成要素(情報供給手段 20、暗号化手段 30 、記録手段 40)を統括的に制御するとともに、暗号化手段 30で暗号化された暗号ィ匕 データの管理情報を記憶手段 62に一時的に記憶する。また、 CPU60は、暗号鍵変 更タイミング信号としての鍵生成通知信号を、例えば、所定個数の CBCブロック数に 対応する一定時間間隔で、暗号化手段 30に出力する。  The CPU 60 controls the components (the information supply means 20, the encryption means 30, and the recording means 40) of the encryption recording device 15 as a whole, and also controls the encryption performed by the encryption means 30. Data management information is temporarily stored in the storage means 62. Further, the CPU 60 outputs a key generation notification signal as an encryption key change timing signal to the encryption unit 30 at a constant time interval corresponding to, for example, a predetermined number of CBC blocks.

[0082] 記憶手段 62には、図 2に示したように、鍵適用数 Aと、鍵情報 X、鍵適用開始 CBC 番号 Yおよび鍵適用 CBC数 Zカゝらなる鍵適用範囲情報 B1— Bnが記憶される。また 、記録媒体 50には、図 3に示したように、記録された暗号化データの管理情報フアイ ルと、暗号化手段 30で暗号化された暗号化データが記録される。  [0082] As shown in Fig. 2, in the storage means 62, key application number A, key information X, key application start CBC number Y, and key application CBC number Z key application range information B1—Bn Is stored. Further, as shown in FIG. 3, a management information file of the recorded encrypted data and the encrypted data encrypted by the encryption means 30 are recorded on the recording medium 50.

[0083] つぎに、情報供給手段 20で行われる、鍵変更タイミングと GOP間の区切り(GOP の先頭)を合わせる処理について、図 7および図 8を用いて説明する。  Next, a process performed by the information supply unit 20 to match the key change timing with the delimiter between GOPs (the head of the GOP) will be described with reference to FIGS. 7 and 8.

[0084] 図 7は、 CBCと GOPの関係を説明するための図である。図 7において、暗号化を行 うための CBCブロックは固定長である。図 7中、最初の複数の CBCブロック 1 (CBC1 )は同一の第 1の暗号鍵で暗号化が行われ、つぎの複数の CBCブロック 2 (CBC2) が第 1の暗号鍵とは異なる第 2の暗号鍵で暗号ィ匕が行われるように設定されている。 すなわち、時点 aが鍵変更タイミングである。  FIG. 7 is a diagram for explaining the relationship between CBC and GOP. In Fig. 7, the CBC block for encryption has a fixed length. In FIG. 7, the first plurality of CBC blocks 1 (CBC1) are encrypted with the same first encryption key, and the next plurality of CBC blocks 2 (CBC2) are encrypted with a second encryption key different from the first encryption key. The encryption key is set so that encryption is performed. That is, the time point a is the key change timing.

[0085] 一方、情報供給手段 20に入力された初期段階でのパーシャル TS信号においては 、 1つの GOP (GOPl)とつぎの GOP (GOP2)との区切り力 時点(位置) cに存在し ていたものとする。この場合、初期段階のパーシャル TS信号においては、鍵変更タ イミング aは、 GOP2の途中となり、 GOP2は、第 1の暗号鍵および第 2の暗号鍵によ つて暗号化されてしまう。 [0085] On the other hand, in the partial TS signal in the initial stage input to the information supply means 20, it exists at the time (position) c at which the separation force between one GOP (GOPl) and the next GOP (GOP2) is generated. It is assumed that In this case, in the partial TS signal in the initial stage, the key change timing a is in the middle of GOP2, and GOP2 is encrypted with the first encryption key and the second encryption key.

[0086] そこで、実施例 2においては、情報供給手段 20が図 8に示すような処理を行うことで 、 1つの GOPが 1つの暗号鍵で暗号化されるようにしている。  Therefore, in the second embodiment, one GOP is encrypted with one encryption key by the information supply means 20 performing a process as shown in FIG.

[0087] まず、情報供給手段 20は、 CPU60からァライメント要求が入力されると、入力され たパーシャル TS信号における隣接する GOP間の区切り位置を検出するとともに、暗 号ィ匕処理の際の鍵変更位置を検出する (ステップ S510)。 GOP間の区切り位置は、 GOPヘッダ等によって検出することができる。 CBCブロックは固定長であるので、鍵 変更位置は、 CPU60から、 CBCブロック長(固定長)および同一鍵で暗号ィ匕を行う C BCブロック数などの鍵変更位置 (鍵変更タイミング)に関する情報を得ることで、導出 することができる。  [0087] First, when an alignment request is input from CPU 60, information supply means 20 detects a break position between adjacent GOPs in the input partial TS signal, and changes a key at the time of encryption / reduction processing. The position is detected (step S510). The break position between GOPs can be detected by a GOP header or the like. Since the CBC block has a fixed length, the key change position is obtained from the CPU 60 by using information on the key change position (key change timing) such as the CBC block length (fixed length) and the number of CBC blocks for performing encryption with the same key. By obtaining it, it can be derived.

[0088] 情報供給手段 20は、取得した GOP間の区切り位置と、鍵変更位置とがー致するか 否かを判定する(ステップ S520)。この判定の結果、 GOP間の区切り位置と鍵変更 位置とが不一致の場合は、図 7に示すように、鍵変更位置と GOP間の区切り位置 (G OPの先頭位置)とが一致するように、 GOP間に、別言すれば次の GOPの直前に N ULLパケットを挿入する(ステップ S530)。  [0088] The information supply means 20 determines whether or not the obtained break position between GOPs matches the key change position (step S520). As a result of this determination, if the delimiter position between GOPs and the key change position do not match, as shown in FIG. 7, the key change position and the delimiter position between GOPs (the start position of the GOP) must be matched. In other words, a NULL packet is inserted between GOPs, in other words, immediately before the next GOP (step S530).

[0089] 図 7の場合は、 GOP1と GOP2の間に、鍵変更位置 aと GOP間の区切り位置とがー 致するデータ長の NULLパケットが挿入されている。これによつて、 GOP2は、 CBC 2の暗号化用の鍵のみによって暗号化されることとなる。このように、 1つの GOPが 1 つの暗号鍵で暗号化される場合は、 1つの GOPを 1つの復号鍵で復号化することが 可能となる。  In the case of FIG. 7, a NULL packet having a data length matching the key change position a and the delimiter position between GOPs is inserted between GOP1 and GOP2. As a result, GOP2 is encrypted using only the encryption key of CBC2. Thus, when one GOP is encrypted with one encryption key, one GOP can be decrypted with one decryption key.

[0090] このように実施例 2によれば、暗号鍵変更位置に対し GOPの先頭位置が一致する ように NULLパケットなどの意味のな!ヽデータを挿入して!/ヽるので、受信した MPEG TS等の符号ィヒ映像データをォーサリン処理する機能を有する暗号ィヒ記録装置に おいて、 1つの GOPが 1つの暗号鍵で暗号化されることになり、早送り再生やサーチ などの特殊再生時にスムーズな映像表示が可能となる。  As described above, according to the second embodiment, meaningless! ヽ data such as a NULL packet is inserted so that the head position of the GOP coincides with the encryption key change position! / ヽ. In a cryptographic recording device that has a function to authorize encoded video data such as MPEG TS, one GOP is encrypted with one cryptographic key, and special playback such as fast-forward playback and search is performed. Sometimes smooth video display is possible.

[0091] なお、上記実施例 2においては、鍵変更位置と GOP間の区切り位置(GOPの先頭 位置)とを検出し、これらが一致するように GOP間に NULLパケットを挿入するように したが、つぎのような実施も可能である。 [0091] In the second embodiment, the key change position and the break position between the GOPs (the start position of the GOP) Position) and a NULL packet is inserted between GOPs so that they match. However, the following implementation is also possible.

[0092] すなわち、まず、情報供給手段 20では、入力されたパーシャル TS信号中の全ての GOPのデータ長を検出する。そして、検出した各 GOPのデータ長が CBCブロックの データ長(固定長)の整数倍である力否かを判定する。そして、そのデータ長が CBC ブロックのデータ長の整数倍でない GOPに関しては、そのデータ長が CBCブロック のデータ長の整数倍となるように、その GOPの最後に NULLパケットを挿入する。す なわち、この場合は、 GOPの先頭が CBCブロックの区切りと一致するように、直前の GOPの末尾に NULLパケットを挿入する。そして、少なくも 1つの GOPについては、 同一の鍵で暗号ィ匕されるように鍵変更位置を適宜変更する。このよう〖こすること〖こより 、少なくとも 1つの GOPを必ず 1つの暗号鍵で暗号化することができる。  That is, first, the information supply means 20 detects the data lengths of all GOPs in the input partial TS signal. Then, it is determined whether or not the detected data length of each GOP is an integral multiple of the data length (fixed length) of the CBC block. Then, for a GOP whose data length is not an integral multiple of the data length of the CBC block, a NULL packet is inserted at the end of the GOP so that the data length is an integral multiple of the data length of the CBC block. That is, in this case, a NULL packet is inserted at the end of the immediately preceding GOP so that the beginning of the GOP matches the delimiter of the CBC block. Then, at least one GOP is appropriately changed in the key change position so as to be encrypted with the same key. By doing so, at least one GOP can always be encrypted with one encryption key.

[0093] また、実施例 2にお 、て、情報供給手段 20で行った上記の処理を暗号化処理手段 100で行わせるようにしてもよ!、。  In the second embodiment, the above-described processing performed by the information supply unit 20 may be performed by the encryption processing unit 100!

Claims

請求の範囲 The scope of the claims [1] フレーム内符号化画像を少なくとも含む符号化単位により構成される符号化データ が入力される入力手段と、  [1] input means for receiving encoded data composed of encoding units including at least an intra-frame encoded image; 前記符号化データを所定の暗号化単位で暗号化するとともに、一又は複数の暗号 化単位毎に暗号鍵を変更しつつ前記符号化データを暗号化する暗号化処理手段と 前記暗号化された符号ィ匕データを記録媒体に記録する記録手段とを備えた暗号 化記録装置において、  Encryption processing means for encrypting the encoded data in a predetermined encryption unit, and encrypting the encoded data while changing an encryption key for each of one or a plurality of encryption units; and Recording means for recording the dani data on a recording medium, 前記暗号化処理手段は前記一つのフレーム内符号化画像を暗号化する途中で暗 号鍵が変更されないよう少なくとも一つのフレーム内符号ィ匕画像を単一の暗号ィ匕鍵 で暗号化すること、  The encryption processing means encrypts at least one intra-frame encoded image with a single encrypted key so that an encryption key is not changed during encryption of the one intra-coded image. を特徴とする暗号化記録装置。  An encryption recording device characterized by the above-mentioned. [2] 前記暗号化処理手段は、暗号鍵変更タイミングが前記フレーム内符号化画像を暗 号ィ匕する途中となる場合は、前記フレーム内符号ィ匕画像を暗号ィ匕する途中に暗号鍵 が変更されないよう前記暗号鍵変更タイミングを遅延させることを特徴とする請求項 1 に記載の暗号化記録装置。  [2] When the encryption key change timing is in the middle of encrypting the intra-frame encoded image, the encryption processing means may determine that the encryption key is in the middle of encrypting the intra-frame encoded image. The encryption recording device according to claim 1, wherein the encryption key change timing is delayed so as not to be changed. [3] 前記入力手段は、入力された符号化データ中からフレーム内符号化画像を検出し 、フレーム内符号ィ匕画像の検出に応じて識別フラグの状態を変化させるデータ識別 手段を有し、 前記暗号化処理手段は、前記識別フラグの状態に基づいて暗号鍵変 更タイミングを遅延させるか否かを判断することを特徴とする請求項 2に記載の暗号 化記録装置。  [3] The input unit has a data identification unit that detects an intra-frame encoded image from the input encoded data, and changes a state of an identification flag according to the detection of the intra-frame encoded image. 3. The encryption recording device according to claim 2, wherein the encryption processing means determines whether to delay the encryption key change timing based on a state of the identification flag. [4] 前記データ識別手段は、フレーム内符号化画像の先頭を検出した時点から前記フ レーム内符号ィ匕画像とは異なる符号ィ匕画像の先頭を検出した時点までの期間、前記 識別フラグを、暗号鍵の変更を禁止する状態とすることを特徴とする請求項 3に記載 の暗号化記録装置。  [4] The data identification unit sets the identification flag during a period from the time when the head of the intra-frame encoded image is detected to the time when the head of the encoded image different from the intra-frame encoded image is detected. 4. The encryption recording device according to claim 3, wherein a change of the encryption key is prohibited. [5] 前記入力手段は、暗号鍵変更タイミングが前記符号化単位を暗号化する途中とな る場合は、前記符号ィ匕単位を暗号ィ匕する途中で暗号鍵が変更されないように符号ィ匕 単位の直前に意味を持たな!ヽ情報を挿入することを特徴とする請求項 1に記載の暗 号化記録装置。 [5] When the encryption key change timing is in the middle of encrypting the encoding unit, the input unit performs encoding so that the encryption key is not changed during encryption of the encoding unit. Make no sense right before the unit!暗 The information according to claim 1, wherein information is inserted. Encryption recording device. [6] フレーム内符号化画像を少なくとも含む符号化単位により構成される符号化データ を、暗号鍵を変更しながら所定の暗号化単位で暗号化して記録する暗号化記録方 法において、 前記一つのフレーム内符号化画像を暗号化する途中で暗号鍵が変 更されないよう少なくとも一つのフレーム内符号ィ匕画像を単一の暗号ィ匕鍵で暗号ィ匕 することを特徴とする暗号化記録方法。  [6] In an encryption recording method of encoding encoded data composed of encoding units including at least an intra-frame encoded image in a predetermined encryption unit while changing an encryption key, and recording the encrypted data, An encryption recording method, wherein at least one intra-frame encoded image is encrypted with a single encryption key so that an encryption key is not changed during encryption of the intra-frame encoded image. [7] 暗号鍵変更タイミングが前記フレーム内符号ィ匕画像を暗号ィ匕する途中となる場合 は、前記フレーム内符号ィ匕画像を暗号ィ匕する途中に暗号鍵が変更されないよう前記 暗号鍵変更タイミングを遅延させることを特徴とする請求項 6に記載の暗号ィ匕記録方 法。  [7] When the encryption key change timing is in the middle of encrypting the intra-frame encoded image, the encryption key change is performed so that the encryption key is not changed during the encryption of the intra-frame encoded image. 7. The method according to claim 6, wherein the timing is delayed. [8] 暗号鍵変更タイミングが前記符号単位を暗号ィ匕する途中となる場合は、前記符号ィ匕 単位を暗号化する途中で暗号鍵が変更されないように符号化単位の直前に意味を 持たない情報を挿入することを特徴とする請求項 6に記載の暗号ィ匕記録方法。  [8] When the encryption key change timing is in the middle of encrypting the code unit, it has no meaning immediately before the coding unit so that the encryption key is not changed in the middle of encrypting the code unit. 7. The recording method according to claim 6, wherein information is inserted.
PCT/JP2004/016149 2003-10-31 2004-10-29 Encryption/recording device and method Ceased WO2005043806A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005515184A JP4361903B2 (en) 2003-10-31 2004-10-29 Encryption recording apparatus and method
US10/577,805 US20070110236A1 (en) 2004-10-29 2004-10-29 Encryption/recording device and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003-372215 2003-10-31
JP2003372215 2003-10-31

Publications (1)

Publication Number Publication Date
WO2005043806A1 true WO2005043806A1 (en) 2005-05-12

Family

ID=34543997

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/016149 Ceased WO2005043806A1 (en) 2003-10-31 2004-10-29 Encryption/recording device and method

Country Status (2)

Country Link
JP (1) JP4361903B2 (en)
WO (1) WO2005043806A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007043519A (en) * 2005-08-04 2007-02-15 Sony Corp Information processing apparatus and method, and program
JP2007043518A (en) * 2005-08-04 2007-02-15 Sony Corp Information processing apparatus and method, and program
JP2007318451A (en) * 2006-05-25 2007-12-06 Fujitsu Ltd Voice communication terminal device, voice communication control method, and voice communication terminal program
WO2010084562A1 (en) * 2009-01-21 2010-07-29 パナソニック株式会社 Portable terminal, video data repair method and program
WO2016157265A1 (en) * 2015-03-30 2016-10-06 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Reproduction method, reproduction device, and recording medium
US11756055B2 (en) * 2005-12-21 2023-09-12 Integic Technologies Llc Systems and methods for advertisement tracking

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003046973A (en) * 2001-07-31 2003-02-14 Nippon Hoso Kyokai <Nhk> Scramble method, transmission method, transmission device, and receiver

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003046973A (en) * 2001-07-31 2003-02-14 Nippon Hoso Kyokai <Nhk> Scramble method, transmission method, transmission device, and receiver

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007043519A (en) * 2005-08-04 2007-02-15 Sony Corp Information processing apparatus and method, and program
JP2007043518A (en) * 2005-08-04 2007-02-15 Sony Corp Information processing apparatus and method, and program
US7724900B2 (en) 2005-08-04 2010-05-25 Sony Corporation Method, apparatus, and program for processing information
US7822203B2 (en) 2005-08-04 2010-10-26 Sony Corporation Method, apparatus, and program for processing information
US11756055B2 (en) * 2005-12-21 2023-09-12 Integic Technologies Llc Systems and methods for advertisement tracking
JP2007318451A (en) * 2006-05-25 2007-12-06 Fujitsu Ltd Voice communication terminal device, voice communication control method, and voice communication terminal program
CN102293006B (en) * 2009-01-21 2013-10-09 松下电器产业株式会社 Portable terminal, video data repair method
US9049492B2 (en) 2009-01-21 2015-06-02 Panasonic Intellectual Property Corporation Of America Portable terminal, video data repair method and program
WO2010084562A1 (en) * 2009-01-21 2010-07-29 パナソニック株式会社 Portable terminal, video data repair method and program
WO2016157265A1 (en) * 2015-03-30 2016-10-06 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Reproduction method, reproduction device, and recording medium
JP2016192246A (en) * 2015-03-30 2016-11-10 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America REPRODUCTION METHOD, REPRODUCTION DEVICE, AND RECORDING MEDIUM
US10566025B2 (en) 2015-03-30 2020-02-18 Panasonic Intellectual Property Corporation Of America Method of playing system stream files with different recording formats
US10714140B2 (en) 2015-03-30 2020-07-14 Panasonic Intellectual Property Corporation Of America Method of playing system stream files with different recording formats
US10803901B2 (en) 2015-03-30 2020-10-13 Panasonic Intellectual Property Corporation Of America Method of playing system stream files with different recording formats
US11238897B2 (en) 2015-03-30 2022-02-01 Panasonic Intellectual Property Corporation Of America Method of playing system stream files with different recording formats

Also Published As

Publication number Publication date
JP4361903B2 (en) 2009-11-11
JPWO2005043806A1 (en) 2008-06-12

Similar Documents

Publication Publication Date Title
US6347144B1 (en) Copy prevention method and apparatus for digital video system
EP1967002B1 (en) A device for and a method of processing a data stream
US20080170687A1 (en) Device for and a Method of Processing an Encrypted Data Stream
KR101401967B1 (en) Method and apparatus for trick play of encrypted data stream
JP2008539638A (en) Apparatus and method for processing a data stream having a packet sequence and timing information about the packet
JP2004247036A (en) Method for recording scrambled digital data, recording medium and method for reading such data
JP2007511948A (en) Trick play signal playback
JP3573685B2 (en) Playback recording device
US20070110236A1 (en) Encryption/recording device and method
JP2008539639A (en) Apparatus and method for processing an encrypted data stream in a cryptographic system
JP3785642B2 (en) Encoding apparatus and decoding apparatus using encryption key included in digital watermark, and methods thereof
CN1748423A (en) Generation of encrypted video information
US8243926B2 (en) Transport stream encryption device and its editing device and method for use therein
JP4361903B2 (en) Encryption recording apparatus and method
WO2007072257A1 (en) A device for and a method of processing an encrypted data stream
JP2004007494A (en) Recording medium, recording device, reading device, program, method
KR20050010043A (en) Method and apparatus for processing a stream that contains encrypted information
JP2004260522A (en) Content transmitting device, content transmitting method, content transmitting program and content reproducing device, content reproducing method, content reproducing program
JP2004048127A (en) Digital signal recording / reproducing apparatus, transmitting / receiving apparatus and method
JP3630406B2 (en) Packet processing apparatus, packet processing method and storage medium therefor
TWI339075B (en) System, method and apparatus for embedding personal video recording functions at picture level
JP2006331483A (en) Decryption device, stream recording / playback device, and decryption method of encrypted stream
JP2004120509A (en) Recording / playback device
JP2008135845A (en) Transport stream recording / reproducing method and apparatus
JP2002287622A (en) Decoding method

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
DPEN Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed from 20040101)
WWE Wipo information: entry into national phase

Ref document number: 2005515184

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2007110236

Country of ref document: US

Ref document number: 10577805

Country of ref document: US

122 Ep: pct application non-entry in european phase
WWP Wipo information: published in national office

Ref document number: 10577805

Country of ref document: US