JP2007074506A - Encryption/decryption device, electronic apparatus and encrypting/decrypting method - Google Patents

Encryption/decryption device, electronic apparatus and encrypting/decrypting method Download PDF

Info

Publication number
JP2007074506A
JP2007074506A JP2005260636A JP2005260636A JP2007074506A JP 2007074506 A JP2007074506 A JP 2007074506A JP 2005260636 A JP2005260636 A JP 2005260636A JP 2005260636 A JP2005260636 A JP 2005260636A JP 2007074506 A JP2007074506 A JP 2007074506A
Authority
JP
Japan
Prior art keywords
encryption
decryption
information
key
processing
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.)
Withdrawn
Application number
JP2005260636A
Other languages
Japanese (ja)
Inventor
Tomonori Kumagai
友則 熊谷
Taro Tanaka
太郎 田中
Shinsuke Kubota
慎介 久保田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2005260636A priority Critical patent/JP2007074506A/en
Publication of JP2007074506A publication Critical patent/JP2007074506A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an encryption/decryption device which can protect content data, even under repeated trials, and to provide an electronic apparatus and an encrypting/decrypting method. <P>SOLUTION: The encryption/decryption device comprises a circuit for encrypting/decrypting content data, in accordance with a first algorithm, a circuit 12 for decrypting encryption/decryption information according to a second algorithm, when the encryption/decryption information stored in an external memory in a state of being encrypted, in accordance with the second algorithm is read out from the external memory, and a circuit for determining the propriety added to the encryption/decryption information. The encryption/decryption circuit 16 encrypts/decrypts the content data, based on the encryption/decryption information decrypted by the decryption circuit by determining the propriety added to the encryption/decryption information. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、暗号化/復号化装置、電子機器及び暗号化/復号化装置の制御方法に関する。   The present invention relates to an encryption / decryption device, an electronic device, and an encryption / decryption device control method.

近年、家庭においても高品質なデジタルコンテンツを利用できるようになっている。例えば、MPEG(Moving Picture Experts Group、より具体的にはMPEG2)ストリームを配信するBSデジタル放送等のデジタル放送が脚光を浴び、デジタル放送チューナやデジタル放送のコンテンツの記録/再生装置等の電子機器の普及が著しい。また記録媒体を利用したコンテンツの再生、録音、録画が可能となり、コンテンツデータを携帯機器に取り込めるようになっている。   In recent years, high-quality digital contents can be used at home. For example, digital broadcasting such as BS digital broadcasting that distributes MPEG (Moving Picture Experts Group, more specifically, MPEG2) streams has attracted attention, and electronic broadcasting such as digital broadcasting tuners and digital broadcasting content recording / playback devices The spread is remarkable. In addition, it is possible to reproduce, record, and record content using a recording medium, and content data can be taken into a portable device.

このようにコンテンツデータの普及が進む一方で、コンテンツの保護の必要性が急速に高まっている。そのため、コンテンツの内容がデジタル的に不正に複製されるのを防止すべく、コンテンツデータを処理する電子機器にはコンテンツの複製防止技術が導入されている。この複製防止技術には暗号化/復号化処理において鍵が利用されるため、この鍵を機密情報として管理することが求められる。   As content data spreads in this way, the need for content protection is rapidly increasing. For this reason, in order to prevent the contents of content from being illegally duplicated digitally, content duplication prevention technology has been introduced to electronic devices that process content data. Since this anti-duplication technique uses a key in encryption / decryption processing, it is required to manage this key as confidential information.

このような機密情報については、例えば暗号化/復号化装置としての半導体装置内に書き換え可能な不揮発性メモリを内蔵させ、該不揮発性メモリに機密情報を書き込んだり、予め固定的に機密情報を埋め込んだりすることが考えられる。また特許文献1には、複数のユーザ間で予め定められた共通の情報を合成し、該情報を入力することで共通の鍵生成関数に基づいてハッシングを行って鍵を生成する技術が開示されている。   For such confidential information, for example, a rewritable nonvolatile memory is built in a semiconductor device as an encryption / decryption device, and the confidential information is written into the nonvolatile memory, or the confidential information is embedded in advance in a fixed manner. It is conceivable that Patent Document 1 discloses a technique for generating a key by synthesizing common information predetermined among a plurality of users and performing hashing based on a common key generation function by inputting the information. ing.

また単に鍵の情報が正しい場合であっても、想定した相手の鍵の情報を用いて処理しなければ、不正にコンテンツが復号化されてしまうという問題がある。そこで特許文献2には、暗号化して送信すべきデータに妥当性チェックデータを付加して、復号化したデータの妥当性チェックデータの部分を判定することで、妥当性を判別する技術が開示されている。
特開平2−56136号公報 特開平7−312593号公報
Further, even if the key information is simply correct, there is a problem that if the processing is not performed using the assumed partner's key information, the content is illegally decrypted. Therefore, Patent Document 2 discloses a technique for determining validity by adding validity check data to data to be encrypted and transmitting and determining a part of the validity check data of the decrypted data. ing.
JP-A-2-56136 JP-A-7-312593

しかしながら、半導体装置に内蔵させた不揮発性メモリに機密情報を書き込むようにすると、半導体装置自体のコスト高を招いてしまう。また半導体装置内に固定的に機密情報を埋め込むと、半導体装置毎に機密情報を異ならせることが困難となる。更に特許文献1に開示されている技術では、ユーザ数が増加した場合に複数のユーザ間で共通の情報を変更する必要が生じ、量産される半導体装置内で扱う機密情報を埋め込みには適さないと考えられる。そしてユーザの機密情報については、半導体装置の製造メーカ側に対して完全に秘匿できないという問題がある。   However, if confidential information is written in a nonvolatile memory built in the semiconductor device, the cost of the semiconductor device itself is increased. If confidential information is embedded in a semiconductor device in a fixed manner, it becomes difficult to make the confidential information different for each semiconductor device. Furthermore, in the technique disclosed in Patent Document 1, when the number of users increases, it is necessary to change common information among a plurality of users, and confidential information handled in a mass-produced semiconductor device is not suitable for embedding. it is conceivable that. And there is a problem that the confidential information of the user cannot be completely kept secret from the manufacturer of the semiconductor device.

また特許文献2に開示されている技術では、妥当性の判別ができるかもしれないが、繰り返し試行された場合に最終的に復号化したデータを不正に複製されてしまう。   Further, with the technique disclosed in Patent Document 2, it may be possible to determine the validity. However, when repeated attempts are made, the finally decrypted data is illegally copied.

本発明は、以上のような技術的課題に鑑みてなされたものであり、その第1の目的とするところは、繰り返し試行された場合であってもコンテンツを保護できる暗号化/復号化装置、電子機器及び暗号化/復号化装置の制御方法を提供することにある。   The present invention has been made in view of the technical problems as described above, and a first object of the present invention is an encryption / decryption device that can protect content even when repeated attempts are made, An object of the present invention is to provide a method for controlling an electronic device and an encryption / decryption device.

また本発明の第2の目的は、製造メーカ側に対し機密情報を秘匿でき、且つ低コストでコンテンツデータを保護できる暗号化/復号化装置、電子機器及び暗号化/復号化装置の制御方法を提供することにある。   A second object of the present invention is to provide an encryption / decryption device, an electronic device, and a control method for the encryption / decryption device that can conceal confidential information from the manufacturer and can protect content data at a low cost. It is to provide.

上記課題を解決するために本発明は、
第1のアルゴリズムに従ってコンテンツデータの暗号化/復号化処理を行う暗号化/復号化回路と、
第2のアルゴリズムに従って暗号化された状態で外部メモリに記憶されている前記暗号化/復号化処理用の暗号化/復号化情報が該外部メモリから読み出された場合に、該暗号化/復号化情報に対し前記第2のアルゴリズムに従って復号化処理を行う復号化回路と、
前記復号化処理の結果の妥当性を判定するための妥当性判定回路とを含み、
前記復号化回路が、
前記暗号化/復号化情報を復号化することで前記第2のアルゴリズムで暗号化される前に該暗号化/復号化情報に付加された妥当性チェック値を復号化し、
前記妥当性判定回路が、
事前に用意された確認値と前記復号化回路によって復号化された妥当性チェック値とを比較し、
前記確認値と前記妥当性チェック値とが一致したことを条件に、前記暗号化/復号化回路が、コンテンツデータに対し、前記復号化回路によって復号化された前記暗号化/復号化情報に基づいて前記暗号化/復号化処理を行う暗号化/復号化装置に関係する。
In order to solve the above problems, the present invention
An encryption / decryption circuit for performing encryption / decryption processing of content data in accordance with the first algorithm;
When the encryption / decryption information for encryption / decryption processing stored in the external memory in an encrypted state according to the second algorithm is read from the external memory, the encryption / decryption is performed. A decoding circuit that performs a decoding process on the conversion information according to the second algorithm;
A validity determination circuit for determining the validity of the result of the decoding process,
The decoding circuit comprises:
Decrypting the validity check value added to the encryption / decryption information before being encrypted by the second algorithm by decrypting the encryption / decryption information,
The validity determination circuit includes:
Compare the confirmation value prepared in advance with the validity check value decrypted by the decryption circuit,
On the condition that the confirmation value matches the validity check value, the encryption / decryption circuit is based on the encryption / decryption information decrypted by the decryption circuit for content data. The present invention relates to an encryption / decryption device that performs the encryption / decryption processing.

本発明においては、第2のアルゴリズムに従って暗号化された状態の暗号化/復号化情報とこれに付加された妥当性チェック値を外部メモリに格納しておき、復号化回路において、復号化することで暗号化/復号化情報に付加された妥当性チェック値を抽出している。そして、妥当性判定回路により、予め用意された確認値と妥当性チェック値とが一致したことを条件に、暗号化/復号化回路が、コンテンツデータに対し、復号化回路によって復号化された暗号化/復号化情報に基づいてコンテンツデータの暗号化/復号化処理を行う。これにより、想定した相手方で付加された妥当性チェック値でない限り、コンテンツデータの暗号化/復号化処理が行われず、不正な相手との暗号化/復号化処理を回避できる。   In the present invention, the encryption / decryption information encrypted according to the second algorithm and the validity check value added thereto are stored in the external memory, and decrypted by the decryption circuit. The validity check value added to the encryption / decryption information is extracted. Then, the encryption / decryption circuit encrypts the content data decrypted by the decryption circuit on the condition that the confirmation value prepared in advance matches the validity check value by the validity determination circuit. The content data is encrypted / decrypted based on the encryption / decryption information. As a result, unless the validity check value is added by the assumed counterpart, the content data is not encrypted / decrypted, and the encryption / decryption processing with an illegal partner can be avoided.

また本発明に係る暗号化/復号化装置では、
前記確認値と前記妥当性チェック値とが不一致のとき、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記暗号化/復号化回路の動作を停止させることができる。
In the encryption / decryption device according to the present invention,
When the confirmation value and the validity check value do not match, the operation of the encryption / decryption circuit can be stopped until a hardware reset of the encryption / decryption device becomes active.

本発明によれば、妥当性チェック値を変更しながら繰り返し試行されても、妥当性判定回路により確認値と妥当性チェック値とが不一致であることが検出されるたびに、暗号化/復号化装置を初期状態に戻すことができる。従って、妥当性判定回路により確認値と妥当性チェック値とが一致するまでに膨大な時間を費やし、妥当性チェック値や鍵の情報等の解読をより困難にさせることができる。   According to the present invention, even when the validity check value is repeatedly changed and tried repeatedly, each time the validity determination circuit detects that the confirmation value and the validity check value do not match, the encryption / decryption is performed. The device can be returned to the initial state. Therefore, it takes an enormous amount of time until the confirmation value and the validity check value coincide with each other by the validity judgment circuit, making it difficult to decipher the validity check value and the key information.

また本発明に係る暗号化/復号化装置では、
前記妥当性判定回路が前記確認値と前記妥当性チェック値とを比較した後、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記復号化回路の動作を停止させることができる。
In the encryption / decryption device according to the present invention,
After the validity determination circuit compares the confirmation value with the validity check value, the operation of the decryption circuit can be stopped until a hardware reset of the encryption / decryption device becomes active.

本発明によれば、妥当性チェック値を変更しながら繰り返し試行されても、妥当性判定回路により確認値と妥当性チェック値とが不一致であることが検出されるたびに、暗号化/復号化装置を初期状態に戻すことができる。従って、妥当性判定回路により確認値と妥当性チェック値とが一致するまでに膨大な時間を費やし、妥当性チェック値や鍵の情報等の解読をより困難にさせることができる。また、復号化回路の動作期間を短くして低消費電力化を図ることも可能になる。   According to the present invention, even when the validity check value is repeatedly changed and tried repeatedly, each time the validity determination circuit detects that the confirmation value and the validity check value do not match, the encryption / decryption is performed. The device can be returned to the initial state. Therefore, it takes an enormous amount of time until the confirmation value and the validity check value coincide with each other by the validity judgment circuit, making it difficult to decipher the validity check value and the key information. It is also possible to reduce power consumption by shortening the operation period of the decoding circuit.

また本発明に係る暗号化/復号化装置では、
前記復号化回路によって復号化された前記暗号化/復号化情報を記憶するメモリを含み、
前記暗号化/復号化回路が、
コンテンツデータに対し、前記メモリに記憶された暗号化/復号化情報に基づいて前記暗号化/復号化処理を行うことができる。
In the encryption / decryption device according to the present invention,
A memory for storing the encryption / decryption information decrypted by the decryption circuit;
The encryption / decryption circuit comprises:
The encryption / decryption process can be performed on the content data based on the encryption / decryption information stored in the memory.

また本発明に係る暗号化/復号化装置では、
前記暗号化/復号化情報が、
暗号化対象情報と事前共有鍵と乱数データとに基づいて生成され、
前記暗号化/復号化情報と前記乱数データとが対となって前記外部メモリから読み出され、
前記復号化回路が、
前記暗号化/復号化情報の前記事前共有鍵に基づいて生成された共有鍵と前記乱数データとを用いて前記復号化処理を行い、
前記暗号化/復号化回路が、
前記復号化回路によって復号化された前記暗号化対象情報に基づいて前記暗号化/復号化処理を行うことができる。
In the encryption / decryption device according to the present invention,
The encryption / decryption information is
Generated based on encryption target information, pre-shared key and random number data,
The encryption / decryption information and the random number data are read from the external memory as a pair,
The decoding circuit comprises:
Performing the decryption process using the shared key generated based on the pre-shared key of the encryption / decryption information and the random number data;
The encryption / decryption circuit comprises:
The encryption / decryption process can be performed based on the encryption target information decrypted by the decryption circuit.

本発明においては、事前共有鍵とユーザ側が勝手に決めることができる乱数データとを用いて暗号化/復号化情報を生成し、外部メモリに暗号化/復号化情報として格納し、暗号化/復号化回路が、復号化回路によって復号化された暗号化対象情報に基づいてコンテンツデータに対する暗号化/復号化処理を行う。これにより、ユーザ側が管理すべき情報量を削減した状態でより秘匿性を向上させ、例えば製造メーカ側に対し機密情報を秘匿でき、且つ低コストでコンテンツデータを保護できる暗号化/復号化装置を提供できる。   In the present invention, encryption / decryption information is generated using a pre-shared key and random data that can be arbitrarily determined by the user, and stored in the external memory as encryption / decryption information. The encryption circuit performs encryption / decryption processing on the content data based on the encryption target information decrypted by the decryption circuit. Thus, an encryption / decryption device that can improve confidentiality in a state where the amount of information to be managed by the user side is reduced, can conceal confidential information from the manufacturer side, and can protect content data at low cost, for example. Can be provided.

また本発明に係る暗号化/復号化装置では、
前記共有鍵は、
前記乱数データの一部に基づいて、複数の事前共有鍵を用いて生成され、
前記復号化回路が、
前記乱数データの一部に基づいて、予め暗号化/復号化装置内に用意された複数の事前共有鍵を用いて生成された共有鍵を用いて前記復号化処理を行うことができる。
In the encryption / decryption device according to the present invention,
The shared key is
Based on a part of the random number data, generated using a plurality of pre-shared keys,
The decoding circuit comprises:
Based on a part of the random number data, the decryption process can be performed using a shared key generated using a plurality of pre-shared keys prepared in advance in the encryption / decryption device.

本発明によれば、簡易な構成で、解読が困難な暗号化/復号化処理を実現する暗号化/復号化装置を提供できる。   ADVANTAGE OF THE INVENTION According to this invention, the encryption / decryption apparatus which implement | achieves the encryption / decryption process with a simple structure and difficult to decipher can be provided.

また本発明に係る暗号化/復号化装置では、
前記暗号化/復号化情報が、
前記暗号化/復号化処理の制御プログラム情報を含み、
前記暗号化/復号化回路が、
該制御プログラム情報に基づいて前記暗号化/復号化処理を行うことができる。
In the encryption / decryption device according to the present invention,
The encryption / decryption information is
Including control program information for the encryption / decryption processing,
The encryption / decryption circuit comprises:
The encryption / decryption process can be performed based on the control program information.

本発明によれば、暗号化/復号化装置の製造メーカ側が、ユーザ側に秘匿した状態で暗号化/復号化処理の少なくとも一部のシーケンスを変更できるようになり、処理の変更等を容易に行うことができる。また勝手にユーザ側でシーケンスが変更されて悪用される事態を回避できるようになる。   According to the present invention, it becomes possible for the manufacturer of the encryption / decryption device to change at least a part of the sequence of the encryption / decryption process while keeping it secret from the user side, so that the process can be easily changed. It can be carried out. In addition, it is possible to avoid situations where the sequence is changed on the user's side and abused.

また本発明に係る暗号化/復号化装置では、
前記制御プログラム情報の暗号化/復号化処理用の制御プログラム情報用事前共有鍵が保持される制御プログラム情報用事前共有鍵保持レジスタを含み、
前記暗号化/復号化情報が、
第1の乱数データと前記暗号化/復号化処理の制御プログラム情報とに基づいて生成された第1の処理情報と、
第2の乱数データとデバイス鍵とに基づいて生成された第2の処理情報とを含み、
前記復号化回路が、
前記制御プログラム情報用事前共有鍵保持レジスタに保持された前記制御プログラム情報用事前共有鍵を用いて前記制御プログラム情報の復号化処理を行うと共に、
前記第1の乱数データに基づいて複数のデバイス鍵用事前供給鍵を用いて生成されたデバイス鍵用共有鍵を用いて前記デバイス鍵の復号化処理を行うことができる。
In the encryption / decryption device according to the present invention,
A pre-shared key holding register for control program information in which a pre-shared key for control program information for encryption / decryption processing of the control program information is held;
The encryption / decryption information is
First processing information generated based on first random number data and control program information of the encryption / decryption processing;
Second processing information generated based on the second random number data and the device key,
The decoding circuit comprises:
While performing the control program information decryption process using the control program information pre-shared key held in the control program information pre-shared key holding register,
The device key can be decrypted using a device key shared key generated using a plurality of device key pre-supplied keys based on the first random number data.

本発明によれば、例えばユーザに秘匿した状態で製造メーカの機密情報を反映させて暗号化/復号化装置を動作させることができる。更に製造メーカ側に秘匿した状態でユーザの機密情報を反映させて暗号化/復号化装置を動作させることができる。   According to the present invention, for example, the encryption / decryption device can be operated by reflecting the confidential information of the manufacturer in a state of being kept secret from the user. Furthermore, the encryption / decryption device can be operated by reflecting the confidential information of the user in a state of being kept secret from the manufacturer.

また本発明に係る暗号化/復号化装置では、
前記外部メモリからデータの読み出しを行うホストとのインタフェース処理を行うホストインタフェースと、
前記第2のアルゴリズムに従って暗号化されたコンテンツデータが格納される記録媒体とのインタフェース処理を行う記録媒体インタフェースとを含み、
前記復号化回路が、
前記ホストインタフェースを介して入力された暗号化/復号化情報に対し前記復号化処理を行い、
前記暗号化/復号化回路が、
前記記録媒体インタフェースを介して入力された前記コンテンツデータに対して該暗号化/復号化情報に基づいて復号化処理を行い、又は該暗号化/復号化情報に基づいて暗号化処理されたコンテンツデータを前記記録媒体インタフェースを介して前記記録媒体に出力することができる。
In the encryption / decryption device according to the present invention,
A host interface that performs interface processing with a host that reads data from the external memory;
A recording medium interface that performs interface processing with a recording medium in which content data encrypted according to the second algorithm is stored,
The decoding circuit comprises:
Performing the decryption process on the encryption / decryption information input via the host interface;
The encryption / decryption circuit comprises:
Content data that has been decrypted based on the encryption / decryption information for the content data input via the recording medium interface, or content data that has been encrypted based on the encryption / decryption information Can be output to the recording medium via the recording medium interface.

本発明によれば、繰り返し試行された場合であっても記録媒体に格納されたコンテンツを保護できる上に、例えば製造メーカ側に対し機密情報を秘匿でき、且つ低コストで保護できる暗号化/復号化装置を提供できる。   According to the present invention, the contents stored in the recording medium can be protected even when repeated attempts are made, and the encryption / decryption that can conceal confidential information from the manufacturer and can be protected at a low cost, for example. Can be provided.

また本発明は、
ホストと、
上記のいずれか記載の暗号化/復号化装置と、
前記第2のアルゴリズムに従って暗号化されたコンテンツデータが格納される記録媒体に接続するための媒体接続部とを含む電子機器に関係する。
The present invention also provides
With the host,
Any one of the encryption / decryption devices described above;
The present invention relates to an electronic device including a medium connecting unit for connecting to a recording medium in which content data encrypted according to the second algorithm is stored.

本発明は、繰り返し試行された場合であってもコンテンツを保護できる暗号化/復号化装置が適用された電子機器を提供できる。また本発明によれば、製造メーカ側に対し機密情報を秘匿でき、且つ低コストでコンテンツデータを保護できる暗号化/復号化装置が適用された電子機器を提供できる。   The present invention can provide an electronic device to which an encryption / decryption device that can protect content even when repeated attempts are applied. Further, according to the present invention, it is possible to provide an electronic device to which an encryption / decryption device that can conceal confidential information from a manufacturer and can protect content data at a low cost.

また本発明は、
外部メモリに記憶されている暗号化/復号化情報に基づいてコンテンツデータを保護するための暗号化/復号化装置の制御方法であって、
第2のアルゴリズムに従って暗号化された状態で外部メモリに記憶されている前記暗号化/復号化情報を該外部メモリから読み出し、
前記暗号化/復号化情報を復号化することで前記第2のアルゴリズムで暗号化される前に該暗号化/復号化情報に付加された妥当性チェック値を復号化し、
事前に用意された確認値と前記妥当性チェック値とを比較し、
前記確認値と前記妥当性チェック値とが一致したことを条件に、第1のアルゴリズムに従ってコンテンツデータに対し、復号化された前記暗号化/復号化情報に基づいて暗号化/復号化処理を行う暗号化/復号化装置の制御方法に関係する。
The present invention also provides
An encryption / decryption device control method for protecting content data based on encryption / decryption information stored in an external memory,
Reading the encryption / decryption information stored in the external memory in an encrypted state according to the second algorithm from the external memory;
Decrypting the validity check value added to the encryption / decryption information before being encrypted by the second algorithm by decrypting the encryption / decryption information,
Compare the confirmation value prepared in advance with the validity check value,
On the condition that the confirmation value matches the validity check value, content data is encrypted / decrypted based on the decrypted encryption / decryption information according to the first algorithm. The present invention relates to an encryption / decryption device control method.

また本発明に係る暗号化/復号化装置の制御方法では、
前記確認値と前記妥当性チェック値とが不一致のとき、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記暗号化/復号化処理を停止させることができる。
In the control method of the encryption / decryption device according to the present invention,
When the confirmation value does not match the validity check value, the encryption / decryption process can be stopped until a hardware reset of the encryption / decryption device becomes active.

また本発明に係る暗号化/復号化装置の制御方法では、
前記確認値と前記妥当性チェック値とを比較した後、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記復号化処理を停止させることができる。
In the control method of the encryption / decryption device according to the present invention,
After the confirmation value and the validity check value are compared, the decryption process can be stopped until a hardware reset of the encryption / decryption device becomes active.

また本発明に係る暗号化/復号化装置の制御方法では、
前記暗号化/復号化情報が、
暗号化対象情報と事前共有鍵と乱数データとに基づいて生成され、
前記暗号化/復号化情報と前記乱数データとが対となって前記外部メモリから読み出され、
前記暗号化/復号化情報の前記事前共有鍵に基づいて生成された共有鍵と前記乱数データとを用いて前記復号化処理を行い、該復号化回路によって復号化された前記暗号化対象情報に基づいて前記暗号化/復号化処理を行うことができる。
In the control method of the encryption / decryption device according to the present invention,
The encryption / decryption information is
Generated based on encryption target information, pre-shared key and random number data,
The encryption / decryption information and the random number data are read from the external memory as a pair,
The encryption target information decrypted by the decryption circuit by performing the decryption process using the shared key generated based on the pre-shared key of the encryption / decryption information and the random number data The encryption / decryption process can be performed based on the above.

また本発明に係る暗号化/復号化装置の制御方法では、
前記共有鍵は、
前記乱数データの一部に基づいて、複数の事前共有鍵を用いて生成され、
前記乱数データの一部に基づいて、予め暗号化/復号化装置内に用意された複数の事前共有鍵を用いて生成された共有鍵を用いて前記復号化処理を行うことができる。
In the control method of the encryption / decryption device according to the present invention,
The shared key is
Based on a part of the random number data, generated using a plurality of pre-shared keys,
Based on a part of the random number data, the decryption process can be performed using a shared key generated using a plurality of pre-shared keys prepared in advance in the encryption / decryption device.

また本発明に係る暗号化/復号化装置の制御方法では、
前記暗号化/復号化情報が、
前記暗号化/復号化処理の制御プログラム情報を含み、
該制御プログラム情報に基づいて前記暗号化/復号化処理を行うことができる。
In the control method of the encryption / decryption device according to the present invention,
The encryption / decryption information is
Including control program information for the encryption / decryption processing,
The encryption / decryption process can be performed based on the control program information.

また本発明に係る暗号化/復号化装置の制御方法では、
予め前記制御プログラム情報の暗号化/復号化処理用の制御プログラム情報用事前共有鍵共有鍵を保持し、
前記暗号化/復号化情報が、
第1の乱数データと前記暗号化/復号化処理の制御プログラム情報とに基づいて生成された第1の処理情報と、
第2の乱数データとデバイス鍵とに基づいて生成された第2の処理情報とを含み、
前記制御プログラム情報用事前共有鍵を用いて前記制御プログラム情報の復号化処理を行うと共に、前記第1の乱数データに基づいて複数のデバイス鍵用事前共有鍵を用いて生成されたデバイス鍵用共有鍵を用いて前記デバイス鍵の復号化処理を行うことができる。
In the control method of the encryption / decryption device according to the present invention,
Holding a pre-shared key shared key for control program information for encryption / decryption processing of the control program information beforehand,
The encryption / decryption information is
First processing information generated based on first random number data and control program information of the encryption / decryption processing;
Second processing information generated based on the second random number data and the device key,
Device key sharing generated using a plurality of device key pre-shared keys based on the first random number data while performing the control program information decryption processing using the control program information pre-shared key The device key can be decrypted using the key.

以下、本発明の実施の形態について図面を用いて詳細に説明する。なお、以下に説明する実施の形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また以下で説明される構成のすべてが本発明の必須構成要件であるとは限らない。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiments described below do not unduly limit the contents of the present invention described in the claims. Also, not all of the configurations described below are essential constituent requirements of the present invention.

1. 暗号化/復号化装置
図1に、本実施形態の暗号化/復号化装置の原理的な構成を示す。
1. Encryption / Decryption Device FIG. 1 shows the basic configuration of the encryption / decryption device of this embodiment.

本実施形態における暗号化/復号化装置10は、復号化回路12、メモリ14、暗号化/復号化回路16、妥当性判定回路18を含む。そして暗号化/復号化装置10は、暗号化/復号化装置10の外部に設けられた外部メモリ20に格納された暗号化/復号化情報に基づいて、コンテンツデータの暗号化/復号化処理を行う。例えばコンテンツデータが第1のアルゴリズムに従って暗号化されている状態のとき、暗号化/復号化装置10は、暗号化/復号化情報に基づいて第1のアルゴリズム(例えば公知のC2(Cryptomeria Cipher))に従って復号化処理を行う。また例えばコンテンツデータが暗号化されていない状態のとき、暗号化/復号化装置10は、暗号化/復号化情報に基づいて、第1のアルゴリズムに従って暗号化処理を行う。このような暗号化/復号化情報は、第1のアルゴリズムの暗号化/復号化処理を行うための鍵の情報とすることができる。また暗号化/復号化情報は、該鍵の情報と該暗号化/復号化処理の少なくとも一部のシーケンスを変更するための制御プログラム情報とすることができる。   The encryption / decryption device 10 in this embodiment includes a decryption circuit 12, a memory 14, an encryption / decryption circuit 16, and a validity determination circuit 18. The encryption / decryption device 10 performs content data encryption / decryption processing based on the encryption / decryption information stored in the external memory 20 provided outside the encryption / decryption device 10. Do. For example, when the content data is encrypted according to the first algorithm, the encryption / decryption device 10 uses the first algorithm (for example, known C2 (Cryptomeria Cipher)) based on the encryption / decryption information. The decryption process is performed according to For example, when the content data is not encrypted, the encryption / decryption device 10 performs an encryption process according to the first algorithm based on the encryption / decryption information. Such encryption / decryption information can be key information for performing encryption / decryption processing of the first algorithm. The encryption / decryption information may be control program information for changing the key information and at least a part of the sequence of the encryption / decryption processing.

このとき、暗号化/復号化情報の機密性を維持させるために、外部メモリ20には、第2のアルゴリズム(例えば公知のAES(Advanced Encryption Standard))に従って暗号化された状態で該暗号化/復号化情報が格納される。そのため、復号化回路12は、外部メモリ20から読み出された暗号化/復号化情報に対し、第2のアルゴリズムに従って復号化処理を行う。ここで、第1及び第2のアルゴリズムは、異なる鍵を用いるのであれば同じアルゴリズムであってもよい。   At this time, in order to maintain the confidentiality of the encryption / decryption information, the encryption / decryption information is stored in the external memory 20 in an encrypted state in accordance with a second algorithm (for example, known AES (Advanced Encryption Standard)). Decryption information is stored. Therefore, the decryption circuit 12 performs a decryption process on the encryption / decryption information read from the external memory 20 according to the second algorithm. Here, the first and second algorithms may be the same algorithm as long as different keys are used.

メモリ14には、復号化回路12によって復号化された暗号化/復号化情報が格納される。このメモリ14に格納された暗号化/復号化情報の記憶領域は、暗号化/復号化装置10の外部からアクセス不可能な領域である。そして、メモリ14から読み出された暗号化/復号化情報が暗号化/復号化回路16に供給され、暗号化/復号化回路16は該暗号化/復号化情報に基づいて、第1のアルゴリズムに従ってコンテンツデータの暗号化/復号化処理を行う。   The memory 14 stores the encryption / decryption information decrypted by the decryption circuit 12. The storage area of the encryption / decryption information stored in the memory 14 is an area that cannot be accessed from the outside of the encryption / decryption apparatus 10. Then, the encryption / decryption information read from the memory 14 is supplied to the encryption / decryption circuit 16, and the encryption / decryption circuit 16 uses the first algorithm based on the encryption / decryption information. The content data is encrypted / decrypted according to

こうすることで、コンテンツデータの暗号化/復号化処理に必要な暗号化/復号化情報の機密性を維持できる。また鍵の情報の変更等の暗号化/復号化情報の変更が必要になった場合でも、量産される半導体装置内で機密性を維持しながら機密情報を扱うことができる。   By doing so, the confidentiality of the encryption / decryption information necessary for the encryption / decryption processing of the content data can be maintained. Even when encryption / decryption information needs to be changed, such as changing key information, confidential information can be handled while maintaining confidentiality within a mass-produced semiconductor device.

更に、妥当性判定回路18は、復号化処理の結果の妥当性を判定することができる。即ち、平文としての暗号化/復号化情報に妥当性チェック値が付加され、該暗号化/復号化情報及び妥当性チェック値が第2のアルゴリズムに従って暗号化処理された状態で外部メモリ20に格納される。復号化回路12は、暗号化/復号化装置10に入力された暗号化/復号化情報を復号化することで第2のアルゴリズムで暗号化される前に該暗号化/復号化情報に付加された妥当性チェック値を復号化する。妥当性判定回路18は、事前に暗号化/復号化装置10に埋め込まれて用意された確認値と復号化回路12によって復号化された妥当性チェック値とを比較する。そして、確認値と妥当性チェック値とが一致したことを条件に、暗号化/復号化回路16が、コンテンツデータに対し、復号化回路12によって復号化された暗号化/復号化情報に基づいて暗号化/復号化処理を行う。従って、想定した相手方で付加された妥当性チェック値でない限り、コンテンツデータの暗号化/復号化処理が行われない。   Furthermore, the validity determination circuit 18 can determine the validity of the result of the decoding process. That is, the validity check value is added to the encryption / decryption information as plain text, and the encryption / decryption information and the validity check value are stored in the external memory 20 in a state of being encrypted according to the second algorithm. Is done. The decryption circuit 12 decrypts the encryption / decryption information input to the encryption / decryption device 10 so as to be added to the encryption / decryption information before being encrypted by the second algorithm. Decrypt validity check value. The validity determination circuit 18 compares the confirmation value embedded in advance in the encryption / decryption device 10 and the validity check value decrypted by the decryption circuit 12. Then, on the condition that the confirmation value matches the validity check value, the encryption / decryption circuit 16 performs the content data based on the encryption / decryption information decrypted by the decryption circuit 12. Perform encryption / decryption processing. Accordingly, the content data is not encrypted / decrypted unless the validity check value is added by the assumed counterpart.

このとき、妥当性判定回路18の処理結果に応じて、又は妥当性判定回路18の動作前後に応じて、暗号化/復号化装置10を以下のように制御することが望ましい。   At this time, it is desirable to control the encryption / decryption device 10 as follows according to the processing result of the validity determination circuit 18 or before and after the operation of the validity determination circuit 18.

図2に、本実施形態の暗号化/復号化装置10の制御方法の一例のタイミング図を示す。ここで暗号化/復号化装置10は、ハードウェア的に入力されるハードウェアリセットRSTがアクティブになったとき、初期状態に設定されるものとする。また、暗号化/復号化回路16は、妥当性判定回路18の比較結果に基づいて生成されるイネーブル信号EN1により動作のイネーブル状態又は動作のディセーブル状態に設定されるものとする。   FIG. 2 shows a timing chart of an example of a control method of the encryption / decryption device 10 of this embodiment. Here, it is assumed that the encryption / decryption device 10 is set to the initial state when the hardware reset RST input in hardware is activated. Further, the encryption / decryption circuit 16 is set to an operation enable state or an operation disable state by an enable signal EN1 generated based on the comparison result of the validity determination circuit 18.

復号化回路12により、暗号化/復号化装置10に入力された暗号化/復号化情報を復号化することで該暗号化/復号化情報に付加された妥当性チェック値を復号化する(SEQ1)。その後、妥当性判定回路18は、事前に暗号化/復号化装置10に埋め込まれて用意された確認値と復号化回路12によって復号化された妥当性チェック値とを比較することで妥当性判定処理を行う(SEQ2)。そして、妥当性判定回路18により確認値と妥当性チェック値とが一致したことが検出されたとき、イネーブル信号EN1を非アクティブからアクティブに変化させて暗号化/復号化回路12をディセーブル状態からイネーブル状態に切り替える(SEQ3)。このディセーブル状態は、ハードウェアリセットがアクティブにならない限りイネーブル状態に遷移しないようになっている。   The decryption circuit 12 decrypts the validity check value added to the encryption / decryption information by decrypting the encryption / decryption information input to the encryption / decryption device 10 (SEQ1). ). Thereafter, the validity determination circuit 18 compares the confirmation value embedded in advance in the encryption / decryption device 10 with the validity check value decrypted by the decryption circuit 12 to determine the validity. Processing is performed (SEQ2). When the validity determination circuit 18 detects that the confirmation value matches the validity check value, the enable signal EN1 is changed from inactive to active to bring the encryption / decryption circuit 12 from the disabled state. Switch to enable state (SEQ3). This disabled state does not transition to the enabled state unless a hardware reset is activated.

一方、妥当性判定回路18により確認値と妥当性チェック値とが不一致であることが検出されたとき、暗号化/復号化装置10のハードウェアリセットがアクティブになるまでイネーブル信号EN1を非アクティブにしたまま暗号化/復号化回路16をディセーブル状態にさせる(SEQ4)。この結果、暗号化/復号化装置10のハードウェアリセットがアクティブになるまで暗号化/復号化回路16の動作を停止させることができる。その後、ハードウェアリセットRSTがアクティブになると、イネーブル信号EN1をアクティブ、又はイネーブル信号EN1をアクティブに変更可能な状態(イネーブル状態に変更可能な状態)に設定する(SEQ5)。即ち、ハードウェアリセットRSTがアクティブになったことを条件に、イネーブル信号EN1を再びアクティブに設定できるようになっている。こうすることで、妥当性チェック値を変更しながら繰り返し試行されても、妥当性判定回路18により確認値と妥当性チェック値とが不一致であることが検出されるたびに、暗号化/復号化装置10を初期状態に戻すことができる。従って、妥当性判定回路18により確認値と妥当性チェック値とが一致するまでに膨大な時間を費やし、妥当性チェック値や鍵の情報等の解読をより困難にさせることができる。   On the other hand, when the validity determination circuit 18 detects that the confirmation value and the validity check value do not match, the enable signal EN1 is deactivated until the hardware reset of the encryption / decryption device 10 becomes active. In this state, the encryption / decryption circuit 16 is disabled (SEQ4). As a result, the operation of the encryption / decryption circuit 16 can be stopped until the hardware reset of the encryption / decryption device 10 becomes active. Thereafter, when the hardware reset RST becomes active, the enable signal EN1 is set to an active state or the enable signal EN1 can be changed to an active state (a state that can be changed to an enabled state) (SEQ5). That is, the enable signal EN1 can be set to active again on condition that the hardware reset RST becomes active. In this way, even when repeated attempts are made while changing the validity check value, each time the validity judgment circuit 18 detects that the confirmation value does not match the validity check value, the encryption / decryption is performed. The device 10 can be returned to the initial state. Therefore, it takes an enormous amount of time for the validity judgment circuit 18 to match the confirmation value with the validity check value, making it more difficult to decipher the validity check value and key information.

図3に、本実施形態の暗号化/復号化装置10の制御方法の他の例のタイミング図を示す。ここで暗号化/復号化装置10は、ハードウェア的に入力されるハードウェアリセットRSTがアクティブになったとき、初期状態に設定されるものとする。また、復号化回路12は、妥当性判定回路18の比較結果に基づいて生成されるイネーブル信号EN2により動作イネーブル状態又は動作ディセーブル状態に設定されるものとする。   FIG. 3 shows a timing chart of another example of the control method of the encryption / decryption device 10 of this embodiment. Here, it is assumed that the encryption / decryption device 10 is set to the initial state when the hardware reset RST input in hardware is activated. The decoding circuit 12 is set to the operation enable state or the operation disable state by the enable signal EN2 generated based on the comparison result of the validity determination circuit 18.

復号化回路12により、暗号化/復号化装置10に入力された暗号化/復号化情報を復号化することで該暗号化/復号化情報に付加された妥当性チェック値を復号化する(SEQ10)。その後、妥当性判定回路18は、事前に暗号化/復号化装置10に埋め込まれて用意された確認値と復号化回路12によって復号化された妥当性チェック値とを比較することで妥当性判定処理を行う(SEQ11)。そして妥当性判定回路18が確認値と妥当性チェック値とを比較した後、その比較結果にかかわらず、イネーブル信号EN2により復号化回路12をイネーブル状態からディセーブル状態に設定する(SEQ12)。その後、ハードウェアリセットRSTがアクティブになると、イネーブル信号EN2をアクティブ、又はイネーブル信号EN2をアクティブに変更可能な状態(イネーブル状態に変更可能な状態)に設定する(SEQ13)。即ち、ハードウェアリセットRSTがアクティブになったことを条件に、イネーブル信号EN2を再びアクティブに設定できるようになっている。言い換えれば、妥当性判定回路18の比較後、その比較結果にかかわらず、暗号化/復号化装置10のハードウェアリセットRSTがアクティブになるまで前記復号化回路の動作を停止させる。   The decryption circuit 12 decrypts the validity check value added to the encryption / decryption information by decrypting the encryption / decryption information input to the encryption / decryption device 10 (SEQ10). ). Thereafter, the validity determination circuit 18 compares the confirmation value embedded in advance in the encryption / decryption device 10 with the validity check value decrypted by the decryption circuit 12 to determine the validity. Processing is performed (SEQ11). Then, after the validity determination circuit 18 compares the confirmation value with the validity check value, the decoding circuit 12 is set from the enabled state to the disabled state by the enable signal EN2 regardless of the comparison result (SEQ12). Thereafter, when the hardware reset RST becomes active, the enable signal EN2 is set to active or the enable signal EN2 can be changed to an active state (a state that can be changed to an enable state) (SEQ13). In other words, the enable signal EN2 can be set to active again on condition that the hardware reset RST becomes active. In other words, after the validity determination circuit 18 is compared, the operation of the decryption circuit is stopped until the hardware reset RST of the encryption / decryption device 10 becomes active regardless of the comparison result.

こうすることで、妥当性チェック値を変更しながら繰り返し試行されても、妥当性判定回路18により確認値と妥当性チェック値とが不一致であることが検出されるたびに、暗号化/復号化装置10を初期状態に戻すことができる。従って、妥当性判定回路18により確認値と妥当性チェック値とが一致するまでに膨大な時間を費やし、妥当性チェック値や鍵の情報等の解読をより困難にさせることができる。また、復号化回路12の動作期間を短くして低消費電力化を図ることも可能になる。   In this way, even when repeated attempts are made while changing the validity check value, each time the validity judgment circuit 18 detects that the confirmation value does not match the validity check value, the encryption / decryption is performed. The device 10 can be returned to the initial state. Therefore, it takes an enormous amount of time for the validity judgment circuit 18 to match the confirmation value with the validity check value, making it more difficult to decipher the validity check value and key information. It is also possible to reduce the power consumption by shortening the operation period of the decoding circuit 12.

更に、例えば本実施形態の暗号化/復号化装置を半導体装置として製造する製造メーカが関知しないように、該半導体装置のユーザ(顧客)が乱数データを用いて暗号化/復号化情報を外部メモリ20に格納させてもよい。このとき、暗号化/復号化情報が、暗号化対象情報と予め用意された事前共有鍵と乱数データとに基づいて生成される。そして、外部メモリ20から暗号化/復号化情報と乱数データとが対となって読み出され、復号化回路12が、暗号化/復号化情報の事前共有鍵に基づいて生成された共有鍵と乱数データとに基づいて復号化処理を行い、暗号化/復号化回路16が、復号化された暗号化対象情報に基づいて暗号化/復号化処理を行う。この場合、暗号化対象情報としてコンテンツデータの暗号化/復号化処理に必要な鍵の情報等のユーザの機密情報を採用することで、製造メーカ側に対して完全にユーザの機密情報を秘匿できる暗号化/復号化装置10を提供できる。   Further, for example, the user (customer) of the semiconductor device uses the random number data to store the encryption / decryption information in the external memory so that the manufacturer who manufactures the encryption / decryption device of the present embodiment as a semiconductor device is not concerned. 20 may be stored. At this time, the encryption / decryption information is generated based on the encryption target information, the pre-shared key prepared in advance, and the random number data. Then, the encryption / decryption information and the random number data are read from the external memory 20 as a pair, and the decryption circuit 12 generates the shared key generated based on the pre-shared key of the encryption / decryption information. The decryption process is performed based on the random number data, and the encryption / decryption circuit 16 performs the encryption / decryption process based on the decrypted encryption target information. In this case, by using user confidential information such as key information necessary for encryption / decryption processing of content data as encryption target information, the user confidential information can be completely hidden from the manufacturer. The encryption / decryption device 10 can be provided.

以下では、本実施形態の暗号化/復号化装置10が適用される暗号化/復号化システムの構成例について説明する。   Below, the structural example of the encryption / decryption system to which the encryption / decryption apparatus 10 of this embodiment is applied is demonstrated.

2. 暗号化/復号化システム
暗号化/復号化システムでは、ユーザの機密情報の他に、暗号化/復号化装置(半導体装置)の製造メーカの機密情報(ユーザによる変更を望まない情報)も、互いに秘匿した状態で暗号化/復号化装置に設定できるようになっている。従って、ユーザに秘匿した状態で製造メーカの機密情報を反映させて暗号化/復号化装置を動作させることができる。また、製造メーカ側に秘匿した状態でユーザの機密情報を反映させて暗号化/復号化装置を動作させることができる。以下では、ユーザの機密情報が、CPRM(Content Protection for Recordable Media)のデバイス鍵の情報であるものとするが、本実施形態ではこれに限定されるものではない。また製造メーカの機密情報が、暗号化/復号化回路の動作制御を行うための制御プログラム情報としてのシーケンスコードであるものとするが、本実施形態ではこれに限定されるものではない。
2. Encryption / Decryption System In the encryption / decryption system, in addition to the confidential information of the user, confidential information of the manufacturer of the encryption / decryption device (semiconductor device) (information that the user does not want to change) The encryption / decryption device can be set in a secret state. Therefore, the encryption / decryption device can be operated while reflecting the confidential information of the manufacturer in a state of being kept secret from the user. In addition, the encryption / decryption device can be operated while reflecting the confidential information of the user in a state of being kept secret from the manufacturer. In the following, it is assumed that the confidential information of the user is the device key information of CPRM (Content Protection for Recordable Media), but the present embodiment is not limited to this. Further, the confidential information of the manufacturer is a sequence code as control program information for controlling the operation of the encryption / decryption circuit. However, the present embodiment is not limited to this.

図4に、本実施形態の暗号化/復号化システムの構成例のブロック図を示す。ここでは、第1のアルゴリズムとしてC2のアルゴリズム、第2のアルゴリズムとしてAESのアルゴリズムが採用されるものとする。   FIG. 4 shows a block diagram of a configuration example of the encryption / decryption system of this embodiment. Here, the C2 algorithm is adopted as the first algorithm, and the AES algorithm is adopted as the second algorithm.

本実施形態の暗号化/復号化システム100は、シーケンスコード暗号化装置200、デバイス鍵用事前共有鍵生成装置300、デバイス鍵暗号化装置400、外部メモリ20としての不揮発性メモリ500、中央演算処理装置(Central Processing Unit:CPU)を含むホスト600、暗号化/復号化装置10としての暗号化/復号化装置700を含む。製造メーカ側では、シーケンスコード暗号化装置200及びデバイス鍵用事前共有鍵生成装置300が用いられる。シーケンスコード暗号化装置200及びデバイス鍵用事前共有鍵生成装置300の機能は、パーソナルコンピュータ上で動作するアプリケーションプログラム(ソフトウェア)によって実現される。ユーザ側では、デバイス鍵暗号化装置400が、不揮発性メモリ500、ホスト600及び暗号化/復号化装置700と同様に用いられる。デバイス鍵暗号化装置400の機能は、パーソナルコンピュータ上で動作するアプリケーションプログラム(ソフトウェア)によって実現される。   The encryption / decryption system 100 of this embodiment includes a sequence code encryption device 200, a device key pre-shared key generation device 300, a device key encryption device 400, a non-volatile memory 500 as an external memory 20, and a central processing unit. A host 600 including a device (Central Processing Unit: CPU) and an encryption / decryption device 700 as the encryption / decryption device 10 are included. On the manufacturer side, the sequence code encryption device 200 and the device key pre-shared key generation device 300 are used. The functions of the sequence code encryption device 200 and the device key pre-shared key generation device 300 are realized by an application program (software) that runs on a personal computer. On the user side, the device key encryption device 400 is used in the same manner as the nonvolatile memory 500, the host 600, and the encryption / decryption device 700. The function of the device key encryption apparatus 400 is realized by an application program (software) that operates on a personal computer.

(製造メーカ側)
シーケンスコード暗号化装置200は、予めシーケンスコード用事前共有鍵KEY−S0、IV−S0(初期値)を有している。このシーケンスコード用事前共有鍵KEY−S0、IV−S0はシーケンスコードの暗号化/復号化処理の共有鍵の生成に用いられ、同じシーケンスコード用事前共有鍵KEY−S0、IV−S0が暗号化/復号化装置700に埋め込まれている。
(Manufacturer side)
The sequence code encryption device 200 has sequence code pre-shared keys KEY-S0 and IV-S0 (initial values) in advance. The sequence code pre-shared keys KEY-S0 and IV-S0 are used to generate a shared key for sequence code encryption / decryption processing, and the same sequence code pre-shared keys KEY-S0 and IV-S0 are encrypted. Embedded in the decoding device 700.

まず製造メーカ側では、独自に決めた所定ビットの第1の乱数データRN1をシーケンスコード暗号化装置200に設定する。この第1の乱数データRN1は、製造メーカ側においてユーザ毎に管理することが望ましい。シーケンスコード暗号化装置200では、AES部220において、シーケンスコード用事前共有鍵KEY−S0、IV−S0に対応したシーケンスコード用暗号化処理の鍵KEY−S及びシーケンスコード用暗号化処理の初期値IV−Sが、第1の乱数データRN1に基づいて生成される。即ち、AES部220は、第1の乱数データRN1の長さだけCBCモードのAESアルゴリズムの暗号化処理を行い、最後のブロックの出力を鍵KEY−Sとして設定し、最後から1つ前のブロックを初期値IV−Sと設定する。   First, the manufacturer sets the first random number data RN1 having a predetermined predetermined bit in the sequence code encryption apparatus 200. The first random number data RN1 is desirably managed for each user on the manufacturer side. In sequence code encryption apparatus 200, in AES section 220, sequence code encryption key KEY-S corresponding to sequence code pre-shared keys KEY-S0 and IV-S0 and initial values of sequence code encryption processing IV-S is generated based on the first random number data RN1. That is, the AES unit 220 performs encryption processing of the AES algorithm in the CBC mode for the length of the first random number data RN1, sets the output of the last block as the key KEY-S, and blocks the block immediately before the last Is set to an initial value IV-S.

またシーケンスコード暗号化装置200には、製造メーカ側の機密情報としてシーケンスコードが入力される。このシーケンスコードは、予め決められた妥当性チェック値VCK1が付加されて、AES部220に入力される。AES部220は、例えば公知のCBC(Cipher Block Chaining)モードのAES方式で妥当性チェック値VCK1が付加されたシーケンスコードの暗号化処理を行う。この暗号化処理では、シーケンスコード用暗号化処理の鍵KEY−S及びシーケンスコード用暗号化処理の初期値IV−Sが用いられる。CBCモードでは、処理中のブロック以外のブロックのデータを当該ブロックの処理に反映させるため、初期値を異ならせることで入力データが同じであっても出力データを異ならせることができる。   The sequence code encryption apparatus 200 receives a sequence code as confidential information on the manufacturer side. This sequence code is added with a predetermined validity check value VCK 1 and input to the AES unit 220. The AES unit 220 performs encryption processing of the sequence code to which the validity check value VCK1 is added, for example, in a known CBC (Cipher Block Chaining) mode AES scheme. In this encryption process, the key KEY-S of the sequence code encryption process and the initial value IV-S of the sequence code encryption process are used. In the CBC mode, data of blocks other than the block being processed is reflected in the processing of the block, so that the output data can be made different even if the input data is the same by changing the initial value.

第1の乱数データRN1とAES部220によって生成された暗号化処理後のデータとを連結することで第1の処理情報が生成され、該第1の処理情報が不揮発性メモリ500に書き込まれる。   First processing information is generated by concatenating the first random number data RN1 and the data after encryption processing generated by the AES unit 220, and the first processing information is written into the nonvolatile memory 500.

このように第1の乱数データRN1を用いて初期値IV−S、鍵KEY−Sを生成することで、鍵の解読を困難にさせることができる。また、第1の乱数データRN1と暗号化処理後のデータとを連結するようにしたので、乱数データとシーケンスコードとの境界を判別しにくくして、不揮発性メモリ500に格納される第1の処理情報の解読を格段に困難にさせることができる。   Thus, by generating the initial value IV-S and the key KEY-S using the first random number data RN1, it is possible to make it difficult to decrypt the key. In addition, since the first random number data RN1 and the data after the encryption processing are connected, it is difficult to determine the boundary between the random number data and the sequence code, and the first random number data RN1 is stored in the nonvolatile memory 500. Decoding processing information can be made extremely difficult.

更に製造メーカ側では、デバイス鍵用事前共有鍵生成装置300において、デバイス鍵用事前共有鍵KEY−D0、IV−D0が生成される。このデバイス鍵用事前共有鍵KEY−D0、IV−D0を用いて、ユーザ側の機密情報であるCPRMのデバイス鍵の暗号化/復号化処理に用いられる鍵KEY−Dと初期値IV−Dとが生成される。デバイス鍵用事前共有鍵生成装置300では、複数の事前共有鍵と第1の乱数データRN1の一部(例えば第1の乱数データRN1内の特定のMビット(Mは整数)のデータ)とを用いて共有鍵を生成する。即ち、共有鍵は、乱数データの一部に基づいて、複数の事前共有鍵を用いて生成され、復号化回路においては、乱数データの一部に基づいて、複数の事前共有鍵を用いて生成された共有鍵を用いて復号化処理が行われる。   Further, on the manufacturer side, the device key pre-shared key generation device 300 generates device key pre-shared keys KEY-D0 and IV-D0. Using the device key pre-shared keys KEY-D0 and IV-D0, a key KEY-D and an initial value IV-D used for encryption / decryption processing of a CPRM device key, which is confidential information on the user side, Is generated. In the device key pre-shared key generation apparatus 300, a plurality of pre-shared keys and a part of the first random number data RN1 (for example, data of specific M bits (M is an integer) in the first random number data RN1). To generate a shared key. That is, the shared key is generated using a plurality of pre-shared keys based on a part of random number data, and the decryption circuit is generated using a plurality of pre-shared keys based on a part of random number data. Decryption processing is performed using the shared key.

図5に、デバイス鍵用事前共有鍵生成装置300の機能ブロックの例を示す。   FIG. 5 shows an example of functional blocks of the device key pre-shared key generation apparatus 300.

デバイス鍵用事前共有鍵生成装置300は、セレクタ310、第1〜第Nの事前共有鍵320−1〜320−N(Nは整数)を含む。   The device key pre-shared key generation apparatus 300 includes a selector 310 and first to Nth pre-shared keys 320-1 to 320-N (N is an integer).

第1〜第Nの事前共有鍵320−1〜320−Nのいずれかが、セレクタ310に供給される第1の乱数データRN1内の特定のMビット(Mは整数)に基づいて、1組のデバイス鍵用事前共有鍵KEY−D0、IV−D0としてデバイス鍵暗号化装置400に設定される。   Any one of the first to N-th pre-shared keys 320-1 to 320 -N is set based on specific M bits (M is an integer) in the first random number data RN <b> 1 supplied to the selector 310. Device key pre-shared keys KEY-D0 and IV-D0 are set in the device key encryption apparatus 400.

ここで、第1〜第Nの事前共有鍵320−1〜Nは、乱数データRN1内の特定ビット数Mで選択されるため、N≦2とする。 Here, since the first to N-th pre-shared keys 320-1 to 320-N are selected with the specific number of bits M in the random number data RN1, N ≦ 2M .

なお暗号化/復号化装置700もまた、このデバイス鍵用事前共有鍵生成装置300と同じ機能を実現できる回路を有する。   The encryption / decryption device 700 also includes a circuit that can realize the same function as the device key pre-shared key generation device 300.

(ユーザ側)
図4に戻って説明を続ける。一方、ユーザ側のデバイス鍵暗号化装置400には、上述のデバイス鍵用事前共有鍵KEY−D0、IV−D0が設定される。このデバイス鍵用事前共有鍵KEY−D0、IV−D0はデバイス鍵の暗号化/復号化処理の共有鍵の生成に用いられる。
(User side)
Returning to FIG. 4, the description will be continued. On the other hand, the above-described device key pre-shared keys KEY-D0 and IV-D0 are set in the device key encryption device 400 on the user side. The device key pre-shared keys KEY-D0 and IV-D0 are used to generate a shared key for device key encryption / decryption processing.

ユーザ側では、製造メーカ側が関知しないように独自に決めた所定ビットの第2の乱数データRN2をデバイス鍵暗号化装置400に設定する。デバイス鍵暗号化装置400では、AES部420において、デバイス鍵用事前共有鍵KEY−D0,IV−D0に対応したデバイス鍵用暗号化処理の鍵KEY−D及びデバイス鍵用暗号化処理の初期値IV−Dが、第2の乱数データRN2に基づいて生成される。即ち、AES部420は、第2の乱数データRN2の長さだけCBCモードのAESアルゴリズムの暗号化処理を行い、最後のブロックの出力を鍵KEY−Dとして設定し、最後から1つ前のブロックを初期値IV−Dと設定する。   On the user side, the second random number data RN2 having a predetermined bit uniquely determined so as not to be known by the manufacturer is set in the device key encryption apparatus 400. In the device key encryption apparatus 400, the AES unit 420 uses the device key encryption key KEY-D corresponding to the device key pre-shared keys KEY-D0 and IV-D0 and the initial value of the device key encryption processing. IV-D is generated based on the second random number data RN2. That is, the AES unit 420 performs encryption processing of the AES algorithm in the CBC mode for the length of the second random number data RN2, sets the output of the last block as the key KEY-D, and blocks the block immediately before the last Is set to an initial value IV-D.

またデバイス鍵暗号化装置400には、ユーザ側の機密情報としてCPRMのデバイス鍵が入力される。このデバイス鍵は、予め決められた妥当性チェック値VCK2が付加されて、AES部420に入力される。AES部420は、例えば公知のCBCモードのAES方式で妥当性チェック値VCK2が付加されたデバイス鍵の暗号化処理を行う。この暗号化処理では、デバイス鍵用暗号化処理の鍵KEY−D及びデバイス鍵用暗号化処理の初期値IV−Dが用いられる。   Further, the device key encryption apparatus 400 receives a CPRM device key as confidential information on the user side. This device key is added with a predetermined validity check value VCK 2 and input to the AES unit 420. The AES unit 420 performs, for example, encryption processing of a device key to which the validity check value VCK2 is added by a known CBC mode AES method. In this encryption processing, a key KEY-D for device key encryption processing and an initial value IV-D for device key encryption processing are used.

第2の乱数データRN2とAES部420によって生成された暗号化処理後のデータとを連結することで第2の処理情報が生成され、該第2の処理情報が不揮発性メモリ500に書き込まれる。   Second processing information is generated by concatenating the second random number data RN2 and the encrypted data generated by the AES unit 420, and the second processing information is written into the nonvolatile memory 500.

このように第2の乱数データRN2を用いて初期値IV−D、鍵KEY−Dを生成することで、鍵の解読を困難にさせることができる。また、第2の乱数データRN2と暗号化処理後のデータとを連結するようにしたので、乱数データとデバイス鍵との境界を判別しにくくして、不揮発性メモリ500に格納される第2の処理情報の解読を格段に困難にさせることができる。   Thus, by generating the initial value IV-D and the key KEY-D using the second random number data RN2, it is possible to make it difficult to decrypt the key. In addition, since the second random number data RN2 and the data after encryption processing are connected, it is difficult to determine the boundary between the random number data and the device key, and the second random number data RN2 stored in the nonvolatile memory 500 is stored. Decoding processing information can be made extremely difficult.

以上のように不揮発性メモリ500に設定された第1及び第2の処理情報は、所定の順序でホスト600によって読み出され、暗号化/復号化装置700に出力される。   As described above, the first and second processing information set in the nonvolatile memory 500 is read by the host 600 in a predetermined order and output to the encryption / decryption device 700.

図6に、暗号化/復号化装置700のうちシーケンスコード及びデバイス鍵の復号化処理に関わるブロック構成の一例を示す。   FIG. 6 shows an example of a block configuration related to the decryption processing of the sequence code and the device key in the encryption / decryption device 700.

暗号化/復号化装置700は、AESマクロ部710、メモリ部750を含む。AESマクロ部710は、ホスト600によって不揮発性メモリ500から順次読み出された第1及び第2の処理情報を解析する。即ち、AESマクロ部710は、まず、抽出した第1の乱数データRN1に基づいてシーケンスコード用の復号化処理のための初期値、鍵を生成後、該初期値及び鍵を用いてシーケンスコードの復号化処理を行って復号化したシーケンスコードをメモリ部750に格納する。次に、AESマクロ部710は、抽出した第2の乱数データRN2に基づいてデバイス鍵用の復号化処理のための初期値、鍵を生成後、該初期値及び鍵を用いてデバイス鍵の復号化処理を行って復号化したデバイス鍵をメモリ部750に格納する。   The encryption / decryption device 700 includes an AES macro unit 710 and a memory unit 750. The AES macro unit 710 analyzes the first and second processing information sequentially read from the nonvolatile memory 500 by the host 600. That is, the AES macro unit 710 first generates an initial value and a key for decoding processing for a sequence code based on the extracted first random number data RN1, and then uses the initial value and the key to generate a sequence code. The sequence code decoded by performing the decoding process is stored in the memory unit 750. Next, the AES macro unit 710 generates an initial value and a key for the device key decryption process based on the extracted second random number data RN2, and then decrypts the device key using the initial value and the key. The device key decrypted by performing the encryption process is stored in the memory unit 750.

このようなAESマクロ部710は、デバイス鍵用事前共有鍵生成部712、シーケンスコード用事前共有鍵保持レジスタ(制御プログラム情報用事前共有鍵保持レジスタ)714、AESコア部716、シーケンスコード用復号化処理レジスタ718、デバイス鍵用復号化処理レジスタ724、妥当性判定回路726を含むことができる。   Such an AES macro unit 710 includes a device key pre-shared key generation unit 712, a sequence code pre-shared key holding register (control program information pre-shared key holding register) 714, an AES core unit 716, and a sequence code decryption. A processing register 718, a device key decryption processing register 724, and a validity determination circuit 726 can be included.

デバイス鍵用事前共有鍵生成部712は、図5に示す製造メーカ側のデバイス鍵用事前共有鍵生成装置300と同じ機能を有し、フリップフロップや組み合わせ回路等のハードウェア回路により実現される。シーケンスコード用事前共有鍵保持レジスタ714には、製造メーカ側のシーケンスコード暗号化装置200に設定されるシーケンスコード用事前共有鍵KEY−S0、IV−S0が設定されている。AESコア部716は、AESのアルゴリズムに従って復号化処理を行う。   The device key pre-shared key generation unit 712 has the same function as the device key pre-shared key generation device 300 on the manufacturer side illustrated in FIG. 5 and is realized by a hardware circuit such as a flip-flop or a combinational circuit. In the sequence code pre-shared key holding register 714, sequence code pre-shared keys KEY-S0 and IV-S0 set in the sequence code encryption apparatus 200 on the manufacturer side are set. The AES core unit 716 performs a decoding process according to the AES algorithm.

シーケンスコード用復号化処理レジスタ718には、AESコア部716による暗号化処理において順次生成されるシーケンスコード用復号化処理の初期値IV−S及びシーケンスコード用復号化処理の鍵KEY−Sが設定される。またデバイス鍵用復号化処理レジスタ724には、AESコア部716による暗号化処理において順次生成されるデバイス鍵用復号化処理の初期値IV−D及びデバイス鍵用復号化処理の鍵KEY−Dが設定される。   In the sequence code decryption processing register 718, the initial value IV-S of the sequence code decryption process and the key KEY-S of the sequence code decryption process which are sequentially generated in the encryption process by the AES core unit 716 are set. Is done. In the device key decryption processing register 724, the initial value IV-D of the device key decryption process and the key KEY-D of the device key decryption process which are sequentially generated in the encryption process by the AES core unit 716 are stored. Is set.

AESコア部716では、シーケンスコード用の復号化処理後にデバイス鍵用の復号化処理が行われる。即ち、まずホスト600は、不揮発性メモリ500から第1の乱数データRN1とAESのアルゴリズムで暗号化されたシーケンスコード及び妥当性チェック値VCK1とを読み出し、暗号化/復号化装置700に対し、第1の乱数データRN1、シーケンスコード及び妥当性チェック値VCK1の順に設定する。続いて、ホスト600は、不揮発性メモリ500から第2の乱数データRN2とAESのアルゴリズムで暗号化されたデバイス鍵及び妥当性チェック値VCK2とを読み出し、暗号化/復号化装置700に対し、第2の乱数データRN2、デバイス鍵及び妥当性チェック値VCK2の順に設定する。   The AES core unit 716 performs a device key decryption process after the sequence code decryption process. That is, first, the host 600 reads the first random number data RN1 and the sequence code encrypted by the AES algorithm and the validity check value VCK1 from the nonvolatile memory 500, and sends the first random number data RN1 and the validity check value VCK1 to the encryption / decryption device 700. 1 random number data RN1, sequence code and validity check value VCK1 are set in this order. Subsequently, the host 600 reads out the second random number data RN2 and the device key and the validity check value VCK2 encrypted by the AES algorithm from the nonvolatile memory 500, and sends the second encryption data to the encryption / decryption device 700. 2 random number data RN2, device key, and validity check value VCK2.

暗号化/復号化装置700に入力された第1の乱数データRN1内の特定のMビット(Mは整数)はデバイス鍵用事前共有鍵生成部712に供給される。デバイス鍵用事前共有鍵生成部712は、図5のデバイス鍵用事前共有鍵生成装置300と同様に1組のデバイス鍵用事前共有鍵KEY−D0、IV−D0を生成する。   The specific M bits (M is an integer) in the first random number data RN1 input to the encryption / decryption device 700 are supplied to the device key pre-shared key generation unit 712. The device key pre-shared key generation unit 712 generates a set of device key pre-shared keys KEY-D0 and IV-D0 in the same manner as the device key pre-shared key generation device 300 of FIG.

AESコア部716は、シーケンスコード用事前共有鍵保持レジスタ714に保持されたシーケンスコード用事前共有鍵KEY−S0、IV−S0に対応したシーケンスコード用復号化処理の鍵KEY−S及びシーケンスコード用復号化処理の初期値IV−Sを、第1の乱数データRN1に基づいて生成し、シーケンスコード用復号化処理レジスタ718に設定する。より具体的には、第1の乱数データRN1の長さだけCBCモードのAESアルゴリズムの暗号化処理を行い、最後のブロックの出力を鍵KEY−Sとし、最後から1つ前のブロックを初期値IV−Sとして、シーケンスコード用復号化処理レジスタ718に設定する。即ち、AESマクロ部(復号化回路)710が、シーケンスコード用事前共有鍵(制御プログラム情報用事前共有鍵)を用いてシーケンスコードの復号化処理を行う。   The AES core unit 716 uses the sequence code pre-shared key KEY-S0 and IV-S0 corresponding to the sequence code pre-shared key holding register 714 and the sequence key decryption key KEY-S and the sequence code. The initial value IV-S of the decoding process is generated based on the first random number data RN1 and set in the sequence code decoding process register 718. More specifically, the CES mode AES algorithm is encrypted for the length of the first random number data RN1, the output of the last block is the key KEY-S, and the block immediately before the last is the initial value. As the IV-S, the sequence code decoding processing register 718 is set. That is, the AES macro unit (decryption circuit) 710 performs a sequence code decryption process using the sequence code pre-shared key (control program information pre-shared key).

続いて、AESコア部716は、デバイス鍵用事前共有鍵生成部712によって生成されたデバイス鍵用事前共有鍵KEY−D0、IV−D0に対応したデバイス鍵用復号化処理の鍵KEY−D及びデバイス鍵用復号化処理の初期値IV−Dを、第2の乱数データRN2に基づいて生成し、デバイス鍵用復号化処理レジスタ724に設定する。より具体的には、第2の乱数データRN2の長さだけCBCモードのAESアルゴリズムの暗号化処理を行い、最後のブロックの出力を鍵KEY−Dとし、最後から1つ前のブロックを初期値IV−Dとして、デバイス鍵用復号化処理レジスタ724に設定する。即ち、AESマクロ部(復号化回路)710が、第1の乱数データRN1に基づいて複数のデバイス鍵用事前供給鍵を用いて生成されたデバイス鍵用共有鍵を用いてデバイス鍵の復号化処理を行う。   Subsequently, the AES core unit 716 includes device key pre-shared keys KEY-D0 and IV-D0 generated by the device key pre-shared key generation unit 712. An initial value IV-D of the device key decryption process is generated based on the second random number data RN2, and is set in the device key decryption process register 724. More specifically, the AES algorithm in the CBC mode is encrypted for the length of the second random number data RN2, the last block output is set as the key KEY-D, and the block immediately before the last is the initial value. It is set in the device key decryption processing register 724 as IV-D. That is, the AES macro unit (decryption circuit) 710 performs a device key decryption process using a device key shared key generated using a plurality of device key advance supply keys based on the first random number data RN1. I do.

その後、AESコア部716では、シーケンスコード用復号化処理レジスタ718に設定された初期値IV−S、鍵KEY−Sを用いて、CBCモードのAESアルゴリズムに従って、シーケンスコード及び妥当性チェック値VCK1の復号化処理を行う。次に、AESコア部716では、デバイス鍵用復号化処理レジスタ724に設定された初期値IV−D、鍵KEY−Dを用いて、CBCモードのAESアルゴリズムに従って、デバイス鍵及び妥当性チェック値VCK2の復号化処理を行う。そしてメモリ部750に、AESコア部716で復号化されたシーケンスコード及びデバイス鍵を書き込む。   Thereafter, the AES core unit 716 uses the initial value IV-S and the key KEY-S set in the sequence code decryption processing register 718, and the sequence code and the validity check value VCK1 according to the AES algorithm in the CBC mode. Decryption processing is performed. Next, the AES core unit 716 uses the initial value IV-D and the key KEY-D set in the device key decryption processing register 724, and according to the CES mode AES algorithm, the device key and the validity check value VCK2 Is decrypted. Then, the sequence code and device key decrypted by the AES core unit 716 are written in the memory unit 750.

このとき妥当性判定回路726には、事前に妥当性チェック値の正当性を判定するために妥当性確認値VCK1、VCK2が埋め込まれており、AESコア部716で復号化された妥当性チェック値VCK1と妥当性確認値VCK1が一致し、且つAESコア部716で復号化された妥当性チェック値VCK2と妥当性確認値VCK2が一致したことを条件に、正当性であると判断する。正当性が否定された場合、暗号化/復号化装置700の少なくとも一部の機能を停止させる。   At this time, validity check values VCK1 and VCK2 are embedded in the validity determination circuit 726 in advance to determine the validity of the validity check value, and the validity check value decoded by the AES core unit 716 is embedded. It is determined as valid on the condition that VCK1 matches the validity check value VCK1 and that the validity check value VCK2 decoded by the AES core unit 716 matches the validity check value VCK2. When the validity is denied, at least a part of the functions of the encryption / decryption device 700 is stopped.

正当性が肯定された場合、暗号化/復号化装置700では、図示しない暗号化/復号化回路において、メモリ部750に格納されたデバイス鍵を用いて、メモリ部750に格納されたシーケンスコードに従ったコンテンツデータの暗号化処理又は復号化処理が行われる。より具体的には、妥当性判定回路で正当性が肯定されたことを条件に、暗号化/復号化装置700は、図示しない暗号化/復号化回路において、メモリ部750に格納されたデバイス鍵を用いて、メモリ部750に格納されたシーケンスコードに従ったコンテンツデータの暗号化処理又は復号化処理を行う。   When the validity is affirmed, the encryption / decryption device 700 uses the device key stored in the memory unit 750 to convert the sequence code stored in the memory unit 750 into the sequence code in an encryption / decryption circuit (not shown). The content data is encrypted or decrypted accordingly. More specifically, on the condition that the validity is affirmed by the validity determination circuit, the encryption / decryption device 700 uses the device key stored in the memory unit 750 in the encryption / decryption circuit (not shown). The content data is encrypted or decrypted according to the sequence code stored in the memory unit 750.

なお、妥当性判定回路726において妥当性確認値と妥当性チェック値とが不一致のとき(正当性が否定されたとき)、暗号化/復号化装置700のハードウェアリセットがアクティブになるまで、(例えば図7のイネーブル信号EN2により)図示しない暗号化/復号化回路の動作を停止させることが望ましい。こうすることで、不正に妥当性チェック値を変更しながら繰り返し試行されて、最終的に正当性が肯定されてしまうことを困難にできる。不正に正当性が肯定されてしまうと、デバイス鍵やシーケンスコードの秘匿性が低下してしまう。   When the validity check value and the validity check value do not match in the validity determination circuit 726 (when the validity is denied), until the hardware reset of the encryption / decryption device 700 becomes active ( It is desirable to stop the operation of an encryption / decryption circuit not shown (for example, by the enable signal EN2 in FIG. 7). By doing so, it is possible to make it difficult to repeatedly try while illegally changing the validity check value and finally to affirm the validity. If the legitimacy is positively affirmed, the confidentiality of the device key or sequence code is lowered.

或いは、妥当性判定回路726において妥当性確認値と妥当性チェック値とを比較した後、その比較結果にかかわらず、暗号化/復号化装置700のハードウェアリセットがアクティブになるまで、(例えば図7のイネーブル信号EN1により)復号化回路としてのAESマクロ部の動作を停止させることが望ましい。こうすることでも、本来であれば復号化処理は一度だけで済む点に着目し、不正に妥当性チェック値を変更しながら繰り返し試行されて、最終的に正当性が肯定されてしまうことを困難にできる。   Alternatively, after the validity check value is compared with the validity check value in the validity determination circuit 726, the hardware reset of the encryption / decryption device 700 becomes active regardless of the comparison result (for example, FIG. It is desirable to stop the operation of the AES macro section as a decoding circuit (by an enable signal EN1 of 7). Even in this way, paying attention to the fact that the decryption process only needs to be performed once, it is difficult to try repeatedly while illegally changing the validity check value and finally to affirm the validity. Can be.

或いはまた、暗号化/復号化装置700のハードウェアリセットがアクティブになった後にAES_DMAC(第1の転送制御回路)780が一度ディセーブル状態になったとき、(例えば図7のイネーブル信号EN1により)AESマクロ部(復号化回路)710の動作を停止させてもよい。AESマクロ部710は、一旦シーケンスコード及びデバイス鍵を復号化してRAM750に書き込んだ後は動作させる必要がなくなるからであり、無駄な消費電力を削減できる効果がある。   Alternatively, when the AES_DMAC (first transfer control circuit) 780 is once disabled after the hardware reset of the encryption / decryption device 700 becomes active (for example, by the enable signal EN1 in FIG. 7). The operation of the AES macro unit (decoding circuit) 710 may be stopped. This is because the AES macro unit 710 does not need to be operated after the sequence code and device key are once decrypted and written in the RAM 750, and there is an effect that wasteful power consumption can be reduced.

以上のように、暗号化/復号化情報として、暗号化/復号化処理のシーケンスコード(制御プログラム情報)を含み、暗号化/復号化回路が、該シーケンスコードに基づいて暗号化/復号化処理を行うことができる。   As described above, the encryption / decryption information includes a sequence code (control program information) for encryption / decryption processing, and the encryption / decryption circuit performs encryption / decryption processing based on the sequence code. It can be performed.

なお図4では、シーケンスコード及びデバイス鍵をそれぞれ暗号化した状態で不揮発性メモリ500に設定するものとして説明したが、シーケンスコード及びデバイス鍵の一方を暗号化した状態で不揮発性メモリ500に設定してもよい。   In FIG. 4, the sequence code and the device key are set in the nonvolatile memory 500 in an encrypted state. However, one of the sequence code and the device key is set in the nonvolatile memory 500 in an encrypted state. May be.

2.1 暗号化/復号化装置の構成例
図7に、図6の暗号化/復号化装置700のハードウェア構成例のブロック図を示す。図7において、図6と同一部分には同一符号を付し、適宜説明を省略する。
2.1 Configuration Example of Encryption / Decryption Device FIG. 7 shows a block diagram of a hardware configuration example of the encryption / decryption device 700 of FIG. 7, the same parts as those in FIG. 6 are denoted by the same reference numerals, and the description thereof is omitted as appropriate.

暗号化/復号化装置700は、ホスト600とのインタフェース処理を行うホストインタフェース(Interface:I/F)720、C2のアルゴリズムに従って暗号化処理又は復号化処理を行うC2マクロ部730(暗号化/復号化回路)、記録媒体としてのSDメモリカード900とのインタフェース処理を行うSDメモリカードI/F(記録媒体I/F)740を含む。ホストI/F720とSDメモリカードI/F740は、内部バス760に接続される。この内部バス760には、AESマクロ部710、C2マクロ部730もまた接続される。   The encryption / decryption device 700 includes a host interface (Interface: I / F) 720 that performs interface processing with the host 600, and a C2 macro unit 730 that performs encryption processing or decryption processing according to an algorithm of C2. And an SD memory card I / F (recording medium I / F) 740 that performs an interface process with the SD memory card 900 as a recording medium. The host I / F 720 and the SD memory card I / F 740 are connected to the internal bus 760. An AES macro unit 710 and a C2 macro unit 730 are also connected to the internal bus 760.

また暗号化/復号化装置700は、メモリ部(メモリ)としてのRAM750との間でインタフェース処理を行うRAMI/F(メモリI/F)770を含む。RAMI/F770とAESマクロ部710との間にはAES_DMAC(第1の転送制御回路)780が設けられる。RAMI/F770は、C2マクロ部730に接続される。更に暗号化/復号化装置700では、内部バス760をバイパスするためにC2マクロ部730とSDメモリカードI/F740との間にSD_DMAC(第2の転送制御回路)790が設けられる。このような暗号化/復号化装置700は、制御部800を有し、制御部800が暗号化/復号化装置700の各部の制御を司る。   The encryption / decryption device 700 includes a RAM I / F (memory I / F) 770 that performs interface processing with the RAM 750 serving as a memory unit (memory). An AES_DMAC (first transfer control circuit) 780 is provided between the RAM I / F 770 and the AES macro unit 710. The RAM I / F 770 is connected to the C2 macro unit 730. Further, in the encryption / decryption device 700, an SD_DMAC (second transfer control circuit) 790 is provided between the C2 macro unit 730 and the SD memory card I / F 740 in order to bypass the internal bus 760. Such an encryption / decryption device 700 includes a control unit 800, and the control unit 800 controls each unit of the encryption / decryption device 700.

SDメモリカード900には、暗号化された状態でコンテンツデータが格納される。暗号化/復号化装置700は、SDメモリカード900に格納されたコンテンツデータを復号化処理したり、コンテンツデータを暗号化処理してSDメモリカード900に格納したりする。   Content data is stored in the SD memory card 900 in an encrypted state. The encryption / decryption device 700 decrypts the content data stored in the SD memory card 900 or encrypts the content data and stores it in the SD memory card 900.

このような暗号化/復号化装置700の処理に先立って、まずホスト600は、RAM610に格納されたプログラムに従って、まず不揮発性メモリとしてのフラッシュROM500から、上記の第1及び第2の処理情報(第1の乱数データRN1、シーケンスコード及び妥当性チェック値VCK1、第2の乱数データRN2、デバイス鍵及び妥当性チェック値VCK2)を読み出し、ホストI/F720を介してAESマクロ部710で復号化処理を行う。復号化処理結果は、AES_DMAC780により、RAMI/F770を介してRAM750に転送され、RAM750に書き込まれる。即ち、AES_DMAC780は、イネーブル状態のときに、復号化回路としてのAESマクロ部710によって復号化されたシーケンスコードをRAMI/F770に転送する。この結果、図6に示すように、RAM750には、復号化処理されたシーケンスコード及びCPRMのデバイス鍵が書き込まれる。   Prior to the processing of the encryption / decryption device 700, first, the host 600 firstly reads the first and second processing information (from the flash ROM 500 as a nonvolatile memory) according to a program stored in the RAM 610. First random number data RN1, sequence code and validity check value VCK1, second random number data RN2, device key and validity check value VCK2) are read out and decrypted by the AES macro unit 710 via the host I / F 720 I do. The decryption result is transferred to the RAM 750 via the RAM I / F 770 by the AES_DMAC 780 and written to the RAM 750. That is, when enabled, AES_DMAC 780 transfers the sequence code decoded by AES macro unit 710 as a decoding circuit to RAM I / F 770. As a result, as shown in FIG. 6, the decrypted sequence code and the CPRM device key are written in the RAM 750.

そして、RAMI/F770は、イネーブル信号DMARunningによりAES_DMAC780がイネーブル状態からディセーブル状態に変化したとき、RAM750からシーケンスコードを読み出す制御を行ってC2マクロ部730に出力する。或いは、RAMI/F770は、復号化回路としてのAESマクロ部710によって復号化されたシーケンスコードをRAM750に書き込む制御を行った後に、該RAM750からシーケンスコードを読み出す制御を行ってC2マクロ部730に出力する。   When the AES_DMAC 780 changes from the enable state to the disable state by the enable signal DMARunning, the RAM I / F 770 performs control to read the sequence code from the RAM 750 and outputs the sequence code to the C2 macro unit 730. Alternatively, the RAM I / F 770 performs control to write the sequence code decoded by the AES macro unit 710 as a decoding circuit into the RAM 750 and then performs control to read the sequence code from the RAM 750 and outputs the sequence code to the C2 macro unit 730. To do.

図8に、図7のAESマクロ部710のハードウェア構成例を示す。但し、図8において、図7と同一部分には同一符号を付し、適宜説明を省略する。   FIG. 8 shows a hardware configuration example of the AES macro unit 710 in FIG. However, in FIG. 8, the same parts as those in FIG.

AESマクロ部710は、入力FIFO760、出力FIFO762、AES演算部764を含む。入力FIFO760には、ホストI/F720からのデータが入力される。出力FIFO762には、AES演算部764の出力データが入力され、RAMI/F770にデータを出力する。出力FIFO762に格納されたデータは、妥当性判定回路726において妥当性確認値VCK1、VCK2との比較が行われ、妥当性判定回路726において正当性が否定された場合に、入力FIFO760へのデータの書き込みを禁止する(データ入力をディセーブル状態に設定する)。   The AES macro unit 710 includes an input FIFO 760, an output FIFO 762, and an AES calculation unit 764. Data from the host I / F 720 is input to the input FIFO 760. The output FIFO 762 receives the output data of the AES calculation unit 764 and outputs the data to the RAM I / F 770. The data stored in the output FIFO 762 is compared with the validity confirmation values VCK1 and VCK2 in the validity determination circuit 726, and when the validity is denied in the validity determination circuit 726, Disable writing (set data input to disabled state).

AES演算部764は、AESコア部716の他に、カウンタ765、組み込み回路766、鍵レジスタ767、初期値レジスタ768を含む。カウンタ765は、所定ビット数を単位としてデータ数をカウントし、そのカウント値に応じた制御信号cnt2を出力する。制御信号cnt2は、AES演算部764内のスイッチ回路のスイッチ制御を行うものである。組み込み回路766は、図6のデバイス鍵用事前共有鍵生成部712、シーケンスコード用事前共有鍵保持レジスタ714の機能を有する。鍵レジスタ767及び初期値レジスタ768には、AESコア部716の暗号化処理において求められる共有鍵及び初期値がそれぞれ格納される。   In addition to the AES core unit 716, the AES calculation unit 764 includes a counter 765, an embedded circuit 766, a key register 767, and an initial value register 768. The counter 765 counts the number of data in units of a predetermined number of bits and outputs a control signal cnt2 corresponding to the count value. The control signal cnt2 performs switch control of the switch circuit in the AES calculation unit 764. The built-in circuit 766 has the functions of the device key pre-shared key generation unit 712 and the sequence code pre-shared key holding register 714 in FIG. The key register 767 and the initial value register 768 store a shared key and an initial value obtained in the encryption process of the AES core unit 716, respectively.

AES演算部764には、制御部800から、シーケンスコードの復号化処理又はデバイス鍵の復号化処理を指定する制御信号cnt1が入力される。制御信号cnt1は、組み込み回路766内のスイッチ回路のスイッチ制御を行うものである。   A control signal cnt1 designating sequence code decryption processing or device key decryption processing is input from the control unit 800 to the AES calculation unit 764. The control signal cnt1 performs switch control of the switch circuit in the built-in circuit 766.

図9及び図10に、図8のAESマクロ部710のシーケンスコードの復号処理の動作フローの一例を示す。   9 and 10 show an example of an operation flow of the sequence code decoding process of the AES macro unit 710 in FIG.

まず、カウンタ765のカウント値が初期化され(ステップS10)、ホスト600からの第1の乱数データRN1を所定ビット単位で受け取る(ステップS11)。カウンタ765のカウント値が0のとき(ステップS12:Y)、第1の乱数データRN1内の特定のMビット(Mは整数)を組み込み回路766に出力する(ステップS13)。組み込み回路766では、第1の乱数データRN1内の特定のMビット(Mは整数)に基づいて、デバイス鍵用復号化処理の鍵と初期値が用意される。   First, the count value of the counter 765 is initialized (step S10), and the first random number data RN1 from the host 600 is received in predetermined bit units (step S11). When the count value of the counter 765 is 0 (step S12: Y), specific M bits (M is an integer) in the first random number data RN1 are output to the built-in circuit 766 (step S13). The built-in circuit 766 prepares a device key decryption key and initial value based on specific M bits (M is an integer) in the first random number data RN1.

ステップS12においてカウント値が0ではないとき(ステップS12:N)、又はステップS13以降では、AESコア部716でAESの暗号化処理が行われる(ステップS14)。このときカウンタ765は、所定のビット数を単位としてカウント値をインクリメントする。   When the count value is not 0 in step S12 (step S12: N), or after step S13, the AES core unit 716 performs AES encryption processing (step S14). At this time, the counter 765 increments the count value in units of a predetermined number of bits.

次に、カウンタ765のカウント値が7より小さいとき(ステップS15:Y)、ステップS11に戻り、カウント値が7以上のとき(ステップS15:N)、カウント値が7であれば(ステップS16:Y)、AESコア部716の出力を初期値レジスタ768に格納するように制御信号cnt2を生成し(ステップS17)、ステップS11に戻る。またカウント値が8であれば(ステップS18:Y)、AESコア部716の出力を鍵レジスタ767に格納するように制御信号cnt2を生成し(ステップS21)、ステップS11に戻る。   Next, when the count value of the counter 765 is smaller than 7 (step S15: Y), the process returns to step S11. When the count value is 7 or more (step S15: N), if the count value is 7, (step S16: Y) The control signal cnt2 is generated so as to store the output of the AES core unit 716 in the initial value register 768 (step S17), and the process returns to step S11. If the count value is 8 (step S18: Y), the control signal cnt2 is generated so that the output of the AES core unit 716 is stored in the key register 767 (step S21), and the process returns to step S11.

こうしてカウント値が8を超えて鍵レジスタ767への格納が終了すると、AESコア部716が初期化され(ステップS24)、シーケンスコードの復号化処理が開始される(ステップS25)。そして、データ終了となるまで(ステップS27:N)、AES暗号化処理が行われる(ステップS26)。データ終了のとき(ステップS27:Y)、妥当性判定回路726において妥当性判定が行われる(ステップS28)。   Thus, when the count value exceeds 8 and the storage in the key register 767 is completed, the AES core unit 716 is initialized (step S24), and the sequence code decoding process is started (step S25). Until the end of data (step S27: N), AES encryption processing is performed (step S26). When the data is finished (step S27: Y), the validity determination circuit 726 performs validity determination (step S28).

妥当性判定において正当性が肯定されたとき(ステップS29:Y)、デバイス鍵処理(ステップS30)を行い、正当性が否定されたとき(ステップS29:N)、暗号化/復号化装置700の機能が無効化されて(ステップS31)、一連の処理が終了する(エンド)。   When the validity is affirmed in the validity determination (step S29: Y), device key processing (step S30) is performed, and when the validity is denied (step S29: N), the encryption / decryption device 700 The function is invalidated (step S31), and a series of processing ends (end).

図10及び図12に、図8のAESマクロ部710により行われる図10のデバイス鍵処理の動作フローの一例を示す。   10 and 12 show an example of an operation flow of the device key process of FIG. 10 performed by the AES macro unit 710 of FIG.

まず、カウンタ765のカウント値が初期化され(ステップS40)、ホスト600からのデータを所定ビット単位で受け取る(ステップS41)。   First, the count value of the counter 765 is initialized (step S40), and data from the host 600 is received in predetermined bit units (step S41).

続いてAESコア部716でAESの暗号化処理が行われる(ステップS42)。このときカウンタ765は、所定のビット数を単位としてカウント値をインクリメントする。   Subsequently, the AES core unit 716 performs AES encryption processing (step S42). At this time, the counter 765 increments the count value in units of a predetermined number of bits.

次に、カウンタ765のカウント値が7より小さいとき(ステップS43:Y)、ステップS41に戻り、カウント値が7以上のとき(ステップS43:N)、カウント値が7であれば(ステップS44:Y)、AESコア部716の出力を初期値レジスタ768に格納するように制御信号cnt2を生成し(ステップS45)、ステップS41に戻る。またカウント値が8であれば(ステップS46:Y)、AESコア部716の出力を鍵レジスタ767に格納するように制御信号cnt2を生成し(ステップS49)、ステップS41に戻る。   Next, when the count value of the counter 765 is smaller than 7 (step S43: Y), the process returns to step S41. When the count value is 7 or more (step S43: N), if the count value is 7, (step S44: Y) The control signal cnt2 is generated so that the output of the AES core unit 716 is stored in the initial value register 768 (step S45), and the process returns to step S41. If the count value is 8 (step S46: Y), the control signal cnt2 is generated so that the output of the AES core unit 716 is stored in the key register 767 (step S49), and the process returns to step S41.

こうしてカウント値が8を超えて鍵レジスタ767への格納が終了すると、AESコア部716が初期化され(ステップS52)、デバイス鍵の復号化処理が開始される(ステップS53)。そして、データ終了となるまで(ステップS55:N)、AES暗号化処理が行われる(ステップS54)。データ終了のとき(ステップS55:Y)、妥当性判定回路726において妥当性判定が行われる(ステップS56)。   When the count value exceeds 8 and the storage in the key register 767 is completed, the AES core unit 716 is initialized (step S52), and the device key decryption process is started (step S53). Then, AES encryption processing is performed (step S54) until the end of data (step S55: N). When the data is finished (step S55: Y), the validity determination circuit 726 performs validity determination (step S56).

妥当性判定において正当性が肯定されたとき(ステップS57:Y)、暗号化/復号化装置700ではコンテンツデータの暗号化/復号化処理(ステップS58)が開始される。一方、正当性が否定されたとき(ステップS57:N)、暗号化/復号化装置700の機能が無効化されて(ステップS59)、一連の処理が終了する(エンド)。   When the validity is affirmed in the validity determination (step S57: Y), the encryption / decryption device 700 starts content data encryption / decryption processing (step S58). On the other hand, when the validity is denied (step S57: N), the function of the encryption / decryption device 700 is invalidated (step S59), and a series of processing ends (end).

以上のようにAESマクロ部710によってRAM750に書き込まれたシーケンスコード及びデバイス鍵は、RAMI/F770を介してC2マクロ部730に出力される。C2マクロ部730は、シーケンスコードに従って、デバイス鍵を用いて暗号化処理又は復号化処理を行う。   The sequence code and device key written in the RAM 750 by the AES macro unit 710 as described above are output to the C2 macro unit 730 via the RAM I / F 770. The C2 macro unit 730 performs encryption processing or decryption processing using a device key in accordance with the sequence code.

例えばSDメモリカードI/F740、ホストI/F720を介してホスト600のRAM610に転送されたSDメモリカード900のコンテンツデータは、ホスト600により順次暗号化/復号化装置700に送られ、上述のようにC2マクロ部730において、シーケンスコードに従って、デバイス鍵を用いた復号化処理が施される。   For example, the content data of the SD memory card 900 transferred to the RAM 610 of the host 600 via the SD memory card I / F 740 and the host I / F 720 is sequentially sent to the encryption / decryption device 700 by the host 600, as described above. In the C2 macro unit 730, the decryption process using the device key is performed according to the sequence code.

なお、C2マクロ部730は、SDメモリカードI/F740、SD_DMAC790を介して、直接SDメモリカード900からコンテンツデータを受け取り、上述のように、シーケンスコードに従って、デバイス鍵を用いた復号化処理を行ってもよい。この場合、ホスト600の処理負荷を軽減できる。   The C2 macro unit 730 receives content data directly from the SD memory card 900 via the SD memory card I / F 740 and the SD_DMAC 790, and performs the decryption process using the device key according to the sequence code as described above. May be. In this case, the processing load on the host 600 can be reduced.

また、例えばC2マクロ部730において、シーケンスコードに従って、デバイス鍵を用いた暗号化処理が施されたコンテンツデータが、ホストI/F720を介して一旦RAM610に保持され、ホスト600から順次ホストI/F720、SDメモリカードI/F740を介し、SDメモリカード900に格納する。   Also, for example, in the C2 macro unit 730, the content data that has been encrypted using the device key according to the sequence code is temporarily held in the RAM 610 via the host I / F 720, and sequentially from the host 600 to the host I / F 720. The data is stored in the SD memory card 900 via the SD memory card I / F 740.

なお、C2マクロ部730は、上述のようにシーケンスコードに従って、デバイス鍵を用いた暗号化処理後のコンテンツデータを、SD_DMAC790、SDメモリカードI/F740を介して、直接SDメモリカード900に格納するようにしてもよい。この場合、ホスト600の処理負荷を軽減できる。   The C2 macro unit 730 stores the content data after the encryption processing using the device key directly in the SD memory card 900 via the SD_DMAC 790 and the SD memory card I / F 740 according to the sequence code as described above. You may do it. In this case, the processing load on the host 600 can be reduced.

2.2 シーケンスコードの復号
次に、本実施形態におけるシーケンスコードについて説明する。
2.2 Decoding of Sequence Code Next, the sequence code in the present embodiment will be described.

図13に、本実施形態におけるシーケンスコードの説明図を示す。   FIG. 13 is an explanatory diagram of a sequence code in the present embodiment.

図7のC2マクロ部730は、C2のアルゴリズムに従った暗号化/復号化処理のうちソフトウェア処理部分を実行するシーケンサ732(広義にはソフトウェア処理部、処理部)と、該暗号化/復号化処理のうちハードウェア処理部分を実行するハードウェア回路734とを含む。シーケンサ732は、RAM750に格納されたシーケンスコードを解読し、該シーケンスコードに対応した処理を行う。ハードウェア回路734は、C2演算回路736、C2_DMAC737、C2I/F(暗号化I/F)738を含む。C2演算回路736は、公知のC2アルゴリズムに従った暗号化/復号化処理を行う。C2_DMAC737は、C2演算回路736とC2I/F378との間のデータ転送を制御する。   The C2 macro unit 730 in FIG. 7 includes a sequencer 732 (software processing unit, processing unit in a broad sense) that executes a software processing portion of the encryption / decryption processing according to the algorithm of C2, and the encryption / decryption And a hardware circuit 734 that executes a hardware processing portion of the processing. The sequencer 732 decodes the sequence code stored in the RAM 750 and performs processing corresponding to the sequence code. The hardware circuit 734 includes a C2 arithmetic circuit 736, C2_DMAC 737, and C2 I / F (encrypted I / F) 738. The C2 arithmetic circuit 736 performs encryption / decryption processing according to a known C2 algorithm. The C2_DMAC 737 controls data transfer between the C2 arithmetic circuit 736 and the C2I / F 378.

C2I/F738は、シーケンサ(処理部)732からの指示に基づいてハードウェア回路734からの生成情報をホストI/F720に出力するか、RAMI/F770に出力するかを切り替えることができる。従って、C2マクロ部730は、処理結果をRAM750に出力したり、ホストI/F720に出力したりすることができる。   The C2I / F 738 can switch whether to output the generation information from the hardware circuit 734 to the host I / F 720 or the RAM I / F 770 based on an instruction from the sequencer (processing unit) 732. Therefore, the C2 macro unit 730 can output the processing result to the RAM 750 or the host I / F 720.

RAM750には、復号化処理されたシーケンスコードの記憶領域やデバイス鍵の記憶領域の他に、暗号化/復号化処理のテンポラリ領域が確保されている。シーケンスコードは、インデックスとシーケンスブロックとからなる。シーケンスコードの記憶領域には、一連の命令の並びが記述されたシーケンスブロックを指定するインデックスが複数種類、記憶されている。   In the RAM 750, a temporary area for encryption / decryption processing is secured in addition to the storage area for the decrypted sequence code and the storage area for the device key. The sequence code is composed of an index and a sequence block. In the sequence code storage area, a plurality of types of indexes specifying sequence blocks in which a series of instructions are described are stored.

図14に、インデックスとシーケンスブロックの一例を示す。   FIG. 14 shows an example of an index and a sequence block.

インデックスは、該インデックスが指定するシーケンスブロックの命令数と、該シーケンスブロックの先頭の命令の記憶領域を特定するためのオフセットアドレスとを含む。このようなインデックスにより指定されるシーケンスブロックは、命令列が順番に記憶されている。   The index includes the number of instructions in the sequence block specified by the index and an offset address for specifying the storage area of the first instruction in the sequence block. In the sequence block specified by such an index, instruction sequences are stored in order.

各命令は、入力指定データ、鍵指定データ、出力指定データを含む。入力指定データは、RAM750の所定の領域を指定したり、ホスト600からの入力データを指定したり、直前の演算結果等を指定できる。鍵指定データは、予め決められたRAM750の記憶領域に格納された鍵のうち、どの鍵を使用するかを指定できる。出力指定データは、RAM750の所定の領域を指定したり、所定のレジスタを指定したりできる。従って、各命令により、入力指定データで指定された場所のデータに対し、鍵指定データで特定された鍵を用いて各命令に対応した処理を行って、出力指定データで指定された場所に処理結果を格納できる。   Each command includes input designation data, key designation data, and output designation data. As the input designation data, a predetermined area of the RAM 750 can be designated, input data from the host 600 can be designated, the previous calculation result, and the like can be designated. The key designation data can designate which key to use among keys stored in a predetermined storage area of the RAM 750. The output designation data can designate a predetermined area of the RAM 750 or can designate a predetermined register. Therefore, each command performs processing corresponding to each command using the key specified by the key specification data on the data specified by the input specification data, and processes to the location specified by the output specification data. The result can be stored.

そのため、例えばホスト600によって1つのインデックスが指定されると、シーケンサ732は、そのインデックスで指定された記憶領域に記憶された命令を順次読み出し、各命令に対応した処理を行うことができる。こうすることで、ホスト600は、例えばホストからのコマンドによりインデックスを指定するだけで、簡単にシーケンスブロックの指定を変更できる。即ち、C2マクロ部730は、RAM750に展開されたシーケンスコードの中からホスト600が指定した処理を実行できる。そして、シーケンスコードの復号化処理において、複数のインデックスと、各インデックスに対応したシーケンスブロックの命令列とをRAM750に展開することで、C2マクロ部730における処理の変更、調整等が容易に行えるようになる。   Therefore, for example, when one index is designated by the host 600, the sequencer 732 can sequentially read the instructions stored in the storage area designated by the index and perform processing corresponding to each instruction. By doing so, the host 600 can easily change the designation of the sequence block simply by designating the index by a command from the host, for example. That is, the C2 macro unit 730 can execute processing designated by the host 600 from the sequence codes developed in the RAM 750. In the sequence code decoding process, a plurality of indexes and an instruction sequence of a sequence block corresponding to each index are expanded in the RAM 750 so that the processing change, adjustment, etc. in the C2 macro unit 730 can be easily performed. become.

2.3 CPRMへの適用例
次に、本実施形態の暗号化/復号化装置700をSDメモリカードを用いたCPRMによる暗号化/復号化処理に適用した例について説明する。
2.3 Application Example to CPRM Next, an example in which the encryption / decryption apparatus 700 according to the present embodiment is applied to the encryption / decryption process by CPRM using an SD memory card will be described.

図15に、CPRMによる暗号化/復号化処理のフローの一例を示す。   FIG. 15 shows an example of the flow of encryption / decryption processing by CPRM.

図15において暗号化/復号化装置700の電源が投入されて初期化されると、上述のように、まずシーケンスコード及びCPRMのデバイス鍵のダウンロードが行われる(ステップS60)。   In FIG. 15, when the encryption / decryption device 700 is powered on and initialized, first, as described above, the sequence code and CPRM device key are downloaded (step S60).

そしてSDメモリカードの挿入の有無を監視し(ステップS62:N)、SDメモリカードの挿入が検出されたとき(ステップS62:Y)、認証と鍵交換処理が行われる(ステップS63)。   Then, the presence / absence of an SD memory card is monitored (step S62: N). When the insertion of an SD memory card is detected (step S62: Y), authentication and key exchange processing are performed (step S63).

認証及び鍵交換が終了すると、SDメモリカード内のコンテンツデータの暗号化/復号化処理を行う(ステップS65)。その後、終了するまで(ステップS66:N)、処理を継続し、終了すると(ステップS66:Y)、一連の処理を終了する(エンド)。   When the authentication and key exchange are completed, the content data in the SD memory card is encrypted / decrypted (step S65). Thereafter, the process is continued until the process is finished (step S66: N), and when the process is finished (step S66: Y), a series of processes is finished (end).

図16に、図15のCPRMによる暗号化/復号化処理を行う暗号化/復号化装置700を模式的に示す。   FIG. 16 schematically shows an encryption / decryption device 700 that performs encryption / decryption processing by CPRM in FIG.

暗号化/復号化装置700は、シーケンサ732、メモリ部としてのRAM750を含み、SDメモリカード900との間で認証処理を行った後、該SDメモリカード900に記録されたコンテンツの復号化処理を行ってRAM750に展開したり、RAM750のコンテンツデータの暗号化処理を行ってSDメモリカード900に格納したりする。   The encryption / decryption device 700 includes a sequencer 732 and a RAM 750 serving as a memory unit. After performing authentication processing with the SD memory card 900, the encryption / decryption device 700 performs decryption processing of content recorded on the SD memory card 900. The data is expanded in the RAM 750, or the content data in the RAM 750 is encrypted and stored in the SD memory card 900.

図17に、処理を実現するシーケンスコードの一例の概略説明図を示す。   FIG. 17 shows a schematic explanatory diagram of an example of a sequence code for realizing the processing.

例えば認証、鍵交換処理を行う際は、ホスト600はシーケンス番号1を選択する。シーケンサ732は、シーケンス番号1を実行するために、まず認証演算1を実施する。認証演算1ではSDメモリカード900から入力された認証用データに対し、デバイス鍵を鍵として利用し、その演算結果をRAM750の記憶領域(Area1)に格納する。続いて、シーケンサ732は認証演算2を実施する。認証演算2ではホスト600から入力された認証用データに対し、先ほど演算しRAM750の記憶領域(Area1)に格納しておいたデータを鍵として利用し、その演算結果をRAMの記憶領域(Area2)に格納する。以上のような処理により、認証、鍵交換処理を終了する。   For example, the host 600 selects the sequence number 1 when performing authentication and key exchange processing. The sequencer 732 first performs an authentication operation 1 in order to execute the sequence number 1. In the authentication calculation 1, the device key is used as a key for the authentication data input from the SD memory card 900, and the calculation result is stored in the storage area (Area 1) of the RAM 750. Subsequently, the sequencer 732 performs an authentication calculation 2. In the authentication calculation 2, the data previously calculated for the authentication data input from the host 600 and stored in the storage area (Area 1) of the RAM 750 is used as a key, and the calculation result is stored in the RAM storage area (Area 2). To store. With the above processing, the authentication and key exchange processing is completed.

また、引き続きコンテンツの暗号処理を実施する際は、ホスト600はシーケンス番号2を選択する。シーケンサ732は、シーケンス番号2を実行するために、C2暗号演算を実施する。C2暗号演算ではホスト600から入力されたコンテンツデータを、先ほど演算しRAMの記憶領域(Area2)に格納しておいたデータを鍵として利用し、その演算結果をSDメモリカード900に転送する。以上のような処理により、コンテンツデータの暗号処理を終了する。   Further, when the content encryption process is continuously performed, the host 600 selects the sequence number 2. The sequencer 732 performs a C2 cryptographic operation to execute the sequence number 2. In the C2 cryptographic calculation, the content data input from the host 600 is calculated and stored in the RAM storage area (Area2) as a key, and the calculation result is transferred to the SD memory card 900. Through the processing as described above, the content data encryption processing is terminated.

コンテンツの復号処理についてもまた、同様である。   The same applies to the content decryption processing.

なお、ここに挙げたシーケンスコードの処理の一例は、あくまでも概要を説明する為に簡略化した例であり、実際の製品においては、CPRMの規格に準拠した処理を実現する為にさらに複雑なシーケンス処理を実施することができる。   An example of the processing of the sequence code listed here is a simplified example for the purpose of explaining the outline. In an actual product, a more complicated sequence is required to realize processing conforming to the CPRM standard. Processing can be performed.

2.4 変形例
図19に、本実施形態の変形例における暗号化/復号化装置のハードウェア構成例のブロック図を示す。
2.4 Modification FIG. 19 shows a block diagram of a hardware configuration example of an encryption / decryption device according to a modification of the present embodiment.

図7の暗号化/復号化装置700では、暗号化/復号化回路としてC2マクロ部730を備えていたが、本実施形態の変形例では図7のC2マクロ部を第1のC2マクロ部730(第1の暗号化/復号化回路)とする一方、更に第2のC2マクロ部820(第2の暗号化/復号化回路)を備えることができる。第1及び第2のC2マクロ部730、820は同じ構成を有し、それぞれ個別に制御される。   The encryption / decryption device 700 of FIG. 7 includes the C2 macro unit 730 as the encryption / decryption circuit. However, in the modification of the present embodiment, the C2 macro unit of FIG. On the other hand, a second C2 macro unit 820 (second encryption / decryption circuit) can be further provided. The first and second C2 macro units 730 and 820 have the same configuration and are individually controlled.

この場合、本変形例における暗号化/復号化装置1000は制御部810を含み、制御部810は暗号化/復号化装置1000の各部を制御する。更に暗号化/復号化装置1000は、セレクタ1010、アービタ1020を含むことができる。セレクタ1010は、SD_DMAC790と第1及び第2のC2マクロ部730、820との間に設けられ、SDメモリカードI/F740と第1のC2マクロ部730との間のデータ転送、又はSDメモリカードI/F740と第2のC2マクロ部820との間のデータ転送を切り替えることができる。アービタ1020は、RAMI/F770と第1及び第2のC2マクロ部730、820との間に設けられる。アービタ1020は、第1及び第2のマクロ部730、820のRAM750に対するアクセス要求を調停し、第1及び第2のマクロ部730、820の1つのRAM750に対するアクセスを、RAMI/F770を介して実現させる。このような構成を有することで、ホスト600を介さずに、SDメモリカードI/F740と第1又は第2のC2マクロ部730、820との間でデータの転送が可能となる。この場合も、C2マクロ部730、820のそれぞれは、RAM750に展開されたシーケンスコードの中からホスト600が指定した処理を実行できる。   In this case, the encryption / decryption device 1000 in this modification includes a control unit 810, and the control unit 810 controls each unit of the encryption / decryption device 1000. Further, the encryption / decryption device 1000 can include a selector 1010 and an arbiter 1020. The selector 1010 is provided between the SD_DMAC 790 and the first and second C2 macro units 730 and 820, and transfers data between the SD memory card I / F 740 and the first C2 macro unit 730, or the SD memory card. Data transfer between the I / F 740 and the second C2 macro unit 820 can be switched. The arbiter 1020 is provided between the RAM I / F 770 and the first and second C2 macro units 730 and 820. The arbiter 1020 arbitrates access requests to the RAM 750 of the first and second macro units 730 and 820, and realizes access to one RAM 750 of the first and second macro units 730 and 820 via the RAM I / F 770. Let With this configuration, data can be transferred between the SD memory card I / F 740 and the first or second C2 macro units 730 and 820 without using the host 600. Also in this case, each of the C2 macro units 730 and 820 can execute processing designated by the host 600 from the sequence codes developed in the RAM 750.

そして、第2のC2マクロ部820でAKEを行い、第1のC2マクロ部730でコンテンツデータの暗号化/復号化処理を行うことが可能となる。或いは第1及び第2のC2マクロ部730、820の一方でコンテンツの暗号化処理を行い、第1及び第2のC2マクロ部730、820の他方でコンテンツの復号化処理を行うことができる。   The second C2 macro unit 820 can perform AKE, and the first C2 macro unit 730 can perform content data encryption / decryption processing. Alternatively, one of the first and second C2 macro units 730 and 820 can perform content encryption processing, and the other of the first and second C2 macro units 730 and 820 can perform content decryption processing.

この場合、図示しない妥当性判定回路において妥当性確認値と妥当性チェック値とが不一致のとき(正当性が否定されたとき)、暗号化/復号化装置1000のハードウェアリセットがアクティブになるまで、(例えば図7のイネーブル信号EN21、EN22により)第1及び第2のC2マクロ部730、820の動作を停止させることが望ましい。こうすることで、不正に妥当性チェック値を変更しながら繰り返し試行されて、最終的に正当性が肯定されてしまうことを困難にできる。不正に正当性が肯定されてしまうと、デバイス鍵やシーケンスコードの秘匿性が低下してしまう。   In this case, when the validity check value does not match the validity check value in the validity determination circuit (not shown) (when the validity is denied), until the hardware reset of the encryption / decryption device 1000 becomes active. It is desirable to stop the operation of the first and second C2 macro units 730 and 820 (for example, by the enable signals EN21 and EN22 in FIG. 7). By doing so, it is possible to make it difficult to repeatedly try while illegally changing the validity check value and finally to affirm the validity. If the legitimacy is positively affirmed, the confidentiality of the device key or sequence code is lowered.

3. 電子機器
図19に、本実施形態又はその変形例における暗号化/復号化装置が適用された電子機器の構成例のブロック図を示す。
3. Electronic Device FIG. 19 shows a block diagram of a configuration example of an electronic device to which the encryption / decryption device according to the present embodiment or its modification is applied.

電子機器1200は、不揮発性メモリ1210、ホスト1220、暗号化/復号化装置1230、記録媒体接続部1240を含む。不揮発性メモリ1210は、図7のフラッシュROM500の機能を実現する。ホスト1220は、図7のホスト600の機能を実現する。暗号化/復号化装置1230は、図7の暗号化/復号化装置700又は図18の暗号化/復号化装置1000の機能を実現する。記録媒体接続部1240は、SDメモリカード等の記録媒体を電気的に接続するための物理的な形状及び電気的なインタフェース仕様を有する。   The electronic device 1200 includes a nonvolatile memory 1210, a host 1220, an encryption / decryption device 1230, and a recording medium connection unit 1240. The nonvolatile memory 1210 implements the function of the flash ROM 500 of FIG. The host 1220 implements the function of the host 600 in FIG. The encryption / decryption device 1230 implements the functions of the encryption / decryption device 700 in FIG. 7 or the encryption / decryption device 1000 in FIG. The recording medium connection unit 1240 has a physical shape and an electrical interface specification for electrically connecting a recording medium such as an SD memory card.

まず、暗号化/復号化装置1230では、不揮発性メモリ1210に格納されたシーケンスコード及びデバイス鍵を、上述のように展開する。その後、記録媒体1250が記録媒体接続部1240に接続されたとき、例えば記録媒体1250に格納されたコンテンツデータがホスト1220に読み出されて、図示しないRAMに格納される。そして、暗号化/復号化装置1230が、該RAMからコンテンツデータを読み出しながら、既に展開したシーケンスコード及びデバイス鍵を用いて復号化処理を行う。この復号化処理されたコンテンツデータは、電子機器1200の図示しない再生装置において再生される。   First, the encryption / decryption device 1230 expands the sequence code and device key stored in the nonvolatile memory 1210 as described above. Thereafter, when the recording medium 1250 is connected to the recording medium connection unit 1240, for example, content data stored in the recording medium 1250 is read out to the host 1220 and stored in a RAM (not shown). Then, the encryption / decryption device 1230 performs decryption processing using the sequence code and device key that have already been developed while reading the content data from the RAM. The decrypted content data is played back on a playback device (not shown) of the electronic device 1200.

また電子機器1200の図示しない録音録画装置により取り込まれたコンテンツデータは、暗号化/復号化装置1230により、既に展開されたシーケンスコード及びデバイス鍵を用いて暗号化処理され、ホスト1220の図示しないRAMに書き込まれる。その後、ホスト1220は、該RAMから暗号化処理されたコンテンツデータを読み出し、該コンテンツデータを、記録媒体接続部1240を介して記録媒体1250に書き込む。   The content data captured by the recording / recording device (not shown) of the electronic device 1200 is encrypted by the encryption / decryption device 1230 using the sequence code and device key that have already been developed, and the RAM of the host 1220 (not shown). Is written to. Thereafter, the host 1220 reads the encrypted content data from the RAM and writes the content data to the recording medium 1250 via the recording medium connection unit 1240.

なお、本発明は上述した実施の形態に限定されるものではなく、本発明の要旨の範囲内で種々の変形実施が可能である。   The present invention is not limited to the above-described embodiment, and various modifications can be made within the scope of the gist of the present invention.

また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。   In the invention according to the dependent claims of the present invention, a part of the constituent features of the dependent claims can be omitted. Moreover, the principal part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.

本実施形態の暗号化/復号化装置の原理的な構成図。1 is a principle configuration diagram of an encryption / decryption device according to an embodiment. 本実施形態の暗号化/復号化装置の制御方法の一例のタイミング図。FIG. 5 is a timing chart illustrating an example of a control method of the encryption / decryption device according to the embodiment. 本実施形態の暗号化/復号化装置の制御方法の他の例のタイミング図。The timing diagram of the other example of the control method of the encryption / decryption apparatus of this embodiment. 本実施形態の暗号化/復号化システムの構成例のブロック図。The block diagram of the structural example of the encryption / decryption system of this embodiment. デバイス鍵用事前共有鍵生成装置の機能ブロックの例を示す図。The figure which shows the example of the functional block of the pre-shared key generation apparatus for device keys. 暗号化/復号化装置のうちシーケンスコード及びデバイス鍵の復号化処理に関わるブロック構成の一例を示す図。The figure which shows an example of the block structure in connection with the decoding process of a sequence code and a device key among encryption / decryption apparatuses. 図6の暗号化/復号化装置のハードウェア構成例のブロック図。The block diagram of the hardware structural example of the encryption / decryption apparatus of FIG. 図7のAESマクロ部のハードウェア構成例を示す図。The figure which shows the hardware structural example of the AES macro part of FIG. 図8のAESマクロ部のシーケンスコードの復号処理の動作フローの一例を示す図。The figure which shows an example of the operation | movement flow of the decoding process of the sequence code of the AES macro part of FIG. 図8のAESマクロ部のシーケンスコードの復号処理の動作フローの一例を示す図。The figure which shows an example of the operation | movement flow of the decoding process of the sequence code of the AES macro part of FIG. 図8のAESマクロ部により行われる図10のデバイス鍵処理の動作フローの一例を示す図。The figure which shows an example of the operation | movement flow of the device key process of FIG. 10 performed by the AES macro part of FIG. 図8のAESマクロ部により行われる図10のデバイス鍵処理の動作フローの一例を示す図。The figure which shows an example of the operation | movement flow of the device key process of FIG. 10 performed by the AES macro part of FIG. 本実施形態におけるシーケンスコードの説明図。Explanatory drawing of the sequence code in this embodiment. インデックスとシーケンスブロックの一例を示す図。The figure which shows an example of an index and a sequence block. CPRMによる暗号化/復号化処理のフローの一例を示す図。The figure which shows an example of the flow of the encryption / decryption process by CPRM. 図15のCPRMによる暗号化/復号化処理を行う暗号化/復号化装置の模式的な構成図。The typical block diagram of the encryption / decryption apparatus which performs encryption / decryption processing by CPRM of FIG. シーケンスコードの一例の説明図。FIG. 4 is an explanatory diagram of an example of a sequence code. 本実施形態の変形例における暗号化/復号化装置のハードウェア構成例のブロック図。The block diagram of the hardware structural example of the encryption / decryption apparatus in the modification of this embodiment. 本実施形態における電子機器の構成例のブロック図。1 is a block diagram of a configuration example of an electronic device according to an embodiment.

符号の説明Explanation of symbols

10、700 暗号化/復号化装置、 12 復号化回路、 14 メモリ、
16 暗号化/復号化回路、 18 妥当性判定回路、 20 外部メモリ、
100 暗号化/復号化システム、 200 シーケンスコード暗号化装置、
220、420 AES部、 300 デバイス鍵用事前共有鍵生成装置、
400 デバイス鍵暗号化装置、 500 不揮発性メモリ(フラッシュROM)、
600 ホスト、 610 RAM、 710 AESマクロ部、
720 ホストI/F、 730 C2マクロ部、 740 SDメモリカードI/F、
750 メモリ部(RAM)、 770 RAMI/F、 780 AES_DMAC、
790 SD_DMAC、 800、810 制御部、 900 SDメモリカード
10, 700 encryption / decryption device, 12 decryption circuit, 14 memory,
16 encryption / decryption circuit, 18 validity determination circuit, 20 external memory,
100 encryption / decryption system, 200 sequence code encryption device,
220, 420 AES unit, 300 device key pre-shared key generation device,
400 device key encryption device, 500 non-volatile memory (flash ROM),
600 host, 610 RAM, 710 AES macro part,
720 Host I / F, 730 C2 Macro Unit, 740 SD Memory Card I / F,
750 memory unit (RAM), 770 RAM I / F, 780 AES_DMAC,
790 SD_DMAC, 800, 810 control unit, 900 SD memory card

Claims (17)

第1のアルゴリズムに従ってコンテンツデータの暗号化/復号化処理を行う暗号化/復号化回路と、
第2のアルゴリズムに従って暗号化された状態で外部メモリに記憶されている前記暗号化/復号化処理用の暗号化/復号化情報が該外部メモリから読み出された場合に、該暗号化/復号化情報に対し前記第2のアルゴリズムに従って復号化処理を行う復号化回路と、
前記復号化処理の結果の妥当性を判定するための妥当性判定回路とを含み、
前記復号化回路が、
前記暗号化/復号化情報を復号化することで前記第2のアルゴリズムで暗号化される前に該暗号化/復号化情報に付加された妥当性チェック値を復号化し、
前記妥当性判定回路が、
事前に用意された確認値と前記復号化回路によって復号化された妥当性チェック値とを比較し、
前記確認値と前記妥当性チェック値とが一致したことを条件に、前記暗号化/復号化回路が、コンテンツデータに対し、前記復号化回路によって復号化された前記暗号化/復号化情報に基づいて前記暗号化/復号化処理を行うことを特徴とする暗号化/復号化装置。
An encryption / decryption circuit for performing encryption / decryption processing of content data in accordance with the first algorithm;
When the encryption / decryption information for encryption / decryption processing stored in the external memory in an encrypted state according to the second algorithm is read from the external memory, the encryption / decryption is performed. A decoding circuit that performs a decoding process on the conversion information according to the second algorithm;
A validity determination circuit for determining the validity of the result of the decoding process,
The decoding circuit comprises:
Decrypting the validity check value added to the encryption / decryption information before being encrypted by the second algorithm by decrypting the encryption / decryption information,
The validity determination circuit includes:
Compare the confirmation value prepared in advance with the validity check value decrypted by the decryption circuit,
On the condition that the confirmation value matches the validity check value, the encryption / decryption circuit is based on the encryption / decryption information decrypted by the decryption circuit for content data. And performing the encryption / decryption processing.
請求項1において、
前記確認値と前記妥当性チェック値とが不一致のとき、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記暗号化/復号化回路の動作を停止させることを特徴とする暗号化/復号化装置。
In claim 1,
When the confirmation value and the validity check value do not match, the operation of the encryption / decryption circuit is stopped until a hardware reset of the encryption / decryption device becomes active / Decoding device.
請求項1又は2において、
前記妥当性判定回路が前記確認値と前記妥当性チェック値とを比較した後、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記復号化回路の動作を停止させることを特徴とする暗号化/復号化装置。
In claim 1 or 2,
After the validity determination circuit compares the confirmation value with the validity check value, the operation of the decryption circuit is stopped until a hardware reset of the encryption / decryption device becomes active. An encryption / decryption device.
請求項1乃至3のいずれかにおいて、
前記復号化回路によって復号化された前記暗号化/復号化情報を記憶するメモリを含み、
前記暗号化/復号化回路が、
コンテンツデータに対し、前記メモリに記憶された暗号化/復号化情報に基づいて前記暗号化/復号化処理を行うことを特徴とする暗号化/復号化装置。
In any one of Claims 1 thru | or 3,
A memory for storing the encryption / decryption information decrypted by the decryption circuit;
The encryption / decryption circuit comprises:
An encryption / decryption device that performs the encryption / decryption processing on content data based on encryption / decryption information stored in the memory.
請求項4において、
前記暗号化/復号化情報が、
暗号化対象情報と事前共有鍵と乱数データとに基づいて生成され、
前記暗号化/復号化情報と前記乱数データとが対となって前記外部メモリから読み出され、
前記復号化回路が、
前記暗号化/復号化情報の前記事前共有鍵に基づいて生成された共有鍵と前記乱数データとを用いて前記復号化処理を行い、
前記暗号化/復号化回路が、
前記復号化回路によって復号化された前記暗号化対象情報に基づいて前記暗号化/復号化処理を行うことを特徴とする暗号化/復号化装置。
In claim 4,
The encryption / decryption information is
Generated based on encryption target information, pre-shared key and random number data,
The encryption / decryption information and the random number data are read from the external memory as a pair,
The decoding circuit comprises:
Performing the decryption process using the shared key generated based on the pre-shared key of the encryption / decryption information and the random number data;
The encryption / decryption circuit comprises:
An encryption / decryption device that performs the encryption / decryption processing based on the encryption target information decrypted by the decryption circuit.
請求項5において、
前記共有鍵は、
前記乱数データの一部に基づいて、複数の事前共有鍵を用いて生成され、
前記復号化回路が、
前記乱数データの一部に基づいて、予め暗号化/復号化装置内に用意された複数の事前共有鍵を用いて生成された共有鍵を用いて前記復号化処理を行うことを特徴とする暗号化/復号化装置。
In claim 5,
The shared key is
Based on a part of the random number data, generated using a plurality of pre-shared keys,
The decoding circuit comprises:
An encryption, wherein the decryption process is performed using a shared key generated using a plurality of pre-shared keys prepared in advance in an encryption / decryption device based on a part of the random number data / Decoding device.
請求項4乃至6のいずれかにおいて、
前記暗号化/復号化情報が、
前記暗号化/復号化処理の制御プログラム情報を含み、
前記暗号化/復号化回路が、
該制御プログラム情報に基づいて前記暗号化/復号化処理を行うことを特徴とする暗号化/復号化装置。
In any one of Claims 4 thru | or 6.
The encryption / decryption information is
Including control program information for the encryption / decryption processing,
The encryption / decryption circuit comprises:
An encryption / decryption device that performs the encryption / decryption processing based on the control program information.
請求項7において、
前記制御プログラム情報の暗号化/復号化処理用の制御プログラム情報用事前共有鍵が保持される制御プログラム情報用事前共有鍵保持レジスタを含み、
前記暗号化/復号化情報が、
第1の乱数データと前記暗号化/復号化処理の制御プログラム情報とに基づいて生成された第1の処理情報と、
第2の乱数データとデバイス鍵とに基づいて生成された第2の処理情報とを含み、
前記復号化回路が、
前記制御プログラム情報用事前共有鍵保持レジスタに保持された前記制御プログラム情報用事前共有鍵を用いて前記制御プログラム情報の復号化処理を行うと共に、
前記第1の乱数データに基づいて複数のデバイス鍵用事前供給鍵を用いて生成されたデバイス鍵用共有鍵を用いて前記デバイス鍵の復号化処理を行うことを特徴とする暗号化/復号化装置。
In claim 7,
A pre-shared key holding register for control program information in which a pre-shared key for control program information for encryption / decryption processing of the control program information is held;
The encryption / decryption information is
First processing information generated based on first random number data and control program information of the encryption / decryption processing;
Second processing information generated based on the second random number data and the device key,
The decoding circuit comprises:
While performing the control program information decryption process using the control program information pre-shared key held in the control program information pre-shared key holding register,
Encryption / decryption characterized in that the device key decryption process is performed using a device key shared key generated using a plurality of device key advance supply keys based on the first random number data apparatus.
請求項1乃至8のいずれかにおいて、
前記外部メモリからデータの読み出しを行うホストとのインタフェース処理を行うホストインタフェースと、
前記第2のアルゴリズムに従って暗号化されたコンテンツデータが格納される記録媒体とのインタフェース処理を行う記録媒体インタフェースとを含み、
前記復号化回路が、
前記ホストインタフェースを介して入力された暗号化/復号化情報に対し前記復号化処理を行い、
前記暗号化/復号化回路が、
前記記録媒体インタフェースを介して入力された前記コンテンツデータに対して該暗号化/復号化情報に基づいて復号化処理を行い、又は該暗号化/復号化情報に基づいて暗号化処理されたコンテンツデータを前記記録媒体インタフェースを介して前記記録媒体に出力することを特徴とする暗号化/復号化装置。
In any one of Claims 1 thru | or 8.
A host interface that performs interface processing with a host that reads data from the external memory;
A recording medium interface that performs interface processing with a recording medium in which content data encrypted according to the second algorithm is stored,
The decoding circuit comprises:
Performing the decryption process on the encryption / decryption information input via the host interface;
The encryption / decryption circuit comprises:
Content data that has been decrypted based on the encryption / decryption information for the content data input via the recording medium interface, or content data that has been encrypted based on the encryption / decryption information Is output to the recording medium via the recording medium interface.
ホストと、
請求項1乃至9のいずれか記載の暗号化/復号化装置と、
前記第2のアルゴリズムに従って暗号化されたコンテンツデータが格納される記録媒体に接続するための媒体接続部とを含むことを特徴とする電子機器。
With the host,
The encryption / decryption device according to any one of claims 1 to 9,
An electronic apparatus comprising: a medium connecting unit for connecting to a recording medium storing content data encrypted according to the second algorithm.
外部メモリに記憶されている暗号化/復号化情報に基づいてコンテンツデータを保護するための暗号化/復号化装置の制御方法であって、
第2のアルゴリズムに従って暗号化された状態で外部メモリに記憶されている前記暗号化/復号化情報を該外部メモリから読み出し、
前記暗号化/復号化情報を復号化することで前記第2のアルゴリズムで暗号化される前に該暗号化/復号化情報に付加された妥当性チェック値を復号化し、
事前に用意された確認値と前記妥当性チェック値とを比較し、
前記確認値と前記妥当性チェック値とが一致したことを条件に、第1のアルゴリズムに従ってコンテンツデータに対し、復号化された前記暗号化/復号化情報に基づいて暗号化/復号化処理を行うことを特徴とする暗号化/復号化装置の制御方法。
An encryption / decryption device control method for protecting content data based on encryption / decryption information stored in an external memory,
Reading the encryption / decryption information stored in the external memory in an encrypted state according to the second algorithm from the external memory;
Decrypting the validity check value added to the encryption / decryption information before being encrypted by the second algorithm by decrypting the encryption / decryption information,
Compare the confirmation value prepared in advance with the validity check value,
On the condition that the confirmation value matches the validity check value, content data is encrypted / decrypted based on the decrypted encryption / decryption information according to the first algorithm. A control method for an encryption / decryption device.
請求項11において、
前記確認値と前記妥当性チェック値とが不一致のとき、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記暗号化/復号化処理を停止させることを特徴とする暗号化/復号化装置の制御方法。
In claim 11,
The encryption / decryption process is stopped when a hardware reset of the encryption / decryption device becomes active when the confirmation value does not match the validity check value Control method.
請求項11又は12において、
前記確認値と前記妥当性チェック値とを比較した後、前記暗号化/復号化装置のハードウェアリセットがアクティブになるまで前記復号化処理を停止させることを特徴とする暗号化/復号化装置の制御方法。
In claim 11 or 12,
An encryption / decryption device, comprising: comparing the confirmation value with the validity check value, and stopping the decryption process until a hardware reset of the encryption / decryption device becomes active. Control method.
請求項13において、
前記暗号化/復号化情報が、
暗号化対象情報と事前共有鍵と乱数データとに基づいて生成され、
前記暗号化/復号化情報と前記乱数データとが対となって前記外部メモリから読み出され、
前記暗号化/復号化情報の前記事前共有鍵に基づいて生成された共有鍵と前記乱数データとを用いて前記復号化処理を行い、該復号化回路によって復号化された前記暗号化対象情報に基づいて前記暗号化/復号化処理を行うことを特徴とする暗号化/復号化装置の制御方法。
In claim 13,
The encryption / decryption information is
Generated based on encryption target information, pre-shared key and random number data,
The encryption / decryption information and the random number data are read from the external memory as a pair,
The encryption target information decrypted by the decryption circuit by performing the decryption process using the shared key generated based on the pre-shared key of the encryption / decryption information and the random number data The encryption / decryption device control method is characterized in that the encryption / decryption processing is performed based on the method.
請求項14において、
前記共有鍵は、
前記乱数データの一部に基づいて、複数の事前共有鍵を用いて生成され、
前記乱数データの一部に基づいて、予め暗号化/復号化装置内に用意された複数の事前共有鍵を用いて生成された共有鍵を用いて前記復号化処理を行うことを特徴とする暗号化/復号化装置の制御方法。
In claim 14,
The shared key is
Based on a part of the random number data, generated using a plurality of pre-shared keys,
An encryption, wherein the decryption process is performed using a shared key generated using a plurality of pre-shared keys prepared in advance in an encryption / decryption device based on a part of the random number data Control method for encoding / decoding device.
請求項11乃至15のいずれかにおいて、
前記暗号化/復号化情報が、
前記暗号化/復号化処理の制御プログラム情報を含み、
該制御プログラム情報に基づいて前記暗号化/復号化処理を行うことを特徴とする暗号化/復号化装置の制御方法。
In any of claims 11 to 15,
The encryption / decryption information is
Including control program information for the encryption / decryption processing,
An encryption / decryption device control method, wherein the encryption / decryption processing is performed based on the control program information.
請求項16において、
予め前記制御プログラム情報の暗号化/復号化処理用の制御プログラム情報用事前共有鍵共有鍵を保持し、
前記暗号化/復号化情報が、
第1の乱数データと前記暗号化/復号化処理の制御プログラム情報とに基づいて生成された第1の処理情報と、
第2の乱数データとデバイス鍵とに基づいて生成された第2の処理情報とを含み、
前記制御プログラム情報用事前共有鍵を用いて前記制御プログラム情報の復号化処理を行うと共に、前記第1の乱数データに基づいて複数のデバイス鍵用事前共有鍵を用いて生成されたデバイス鍵用共有鍵を用いて前記デバイス鍵の復号化処理を行うことを特徴とする暗号化/復号化装置の制御方法。
In claim 16,
The control program information pre-shared key shared key for encryption / decryption processing of the control program information is held in advance,
The encryption / decryption information is
First processing information generated based on first random number data and control program information of the encryption / decryption processing;
Second processing information generated based on the second random number data and the device key,
Device key sharing generated using a plurality of device key pre-shared keys based on the first random number data while performing the control program information decryption processing using the control program information pre-shared key A control method for an encryption / decryption device, wherein the device key is decrypted using a key.
JP2005260636A 2005-09-08 2005-09-08 Encryption/decryption device, electronic apparatus and encrypting/decrypting method Withdrawn JP2007074506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005260636A JP2007074506A (en) 2005-09-08 2005-09-08 Encryption/decryption device, electronic apparatus and encrypting/decrypting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005260636A JP2007074506A (en) 2005-09-08 2005-09-08 Encryption/decryption device, electronic apparatus and encrypting/decrypting method

Publications (1)

Publication Number Publication Date
JP2007074506A true JP2007074506A (en) 2007-03-22

Family

ID=37935549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005260636A Withdrawn JP2007074506A (en) 2005-09-08 2005-09-08 Encryption/decryption device, electronic apparatus and encrypting/decrypting method

Country Status (1)

Country Link
JP (1) JP2007074506A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009126345A1 (en) * 2008-04-09 2009-10-15 Lockheed Martin Corporation Organic keyed encryption
CN116495725A (en) * 2023-05-19 2023-07-28 重庆中润新材料股份有限公司 Carbon nanotube growth system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009126345A1 (en) * 2008-04-09 2009-10-15 Lockheed Martin Corporation Organic keyed encryption
US8077869B2 (en) 2008-04-09 2011-12-13 Lockheed Martin Corporation Organic keyed encryption
US8488784B2 (en) 2008-04-09 2013-07-16 Lockheed Martin Corporation Organic keyed encryption
CN116495725A (en) * 2023-05-19 2023-07-28 重庆中润新材料股份有限公司 Carbon nanotube growth system

Similar Documents

Publication Publication Date Title
JP4555046B2 (en) Data transfer system and data transfer method
JP4856400B2 (en) Storage device and information processing terminal
TWI298591B (en) System and method for securing executable code
US20040172538A1 (en) Information processing with data storage
US20090125726A1 (en) Method and Apparatus of Providing the Security and Error Correction Capability for Memory Storage Devices
US20040177257A1 (en) Data processing device and data processing method
JP2010268417A (en) Recording device, and content-data playback system
WO2006013924A1 (en) Recording/reproducing device, recording medium processing device, reproducing device, recording medium, contents recording/reproducing system, and contents recording/reproducing method
JP2003233795A (en) Semiconductor memory card and reading device
WO2013031270A1 (en) Authenticator, authenticatee and authentication method
JP2008009631A (en) Storage device and storage method
EP1143656B1 (en) Copyright protection system, encryption device, decryption device, and recording medium
JP5118494B2 (en) Memory system having in-stream data encryption / decryption function
JP2003505752A (en) Methods and systems for providing copy protection on storage media and storage media used in such systems
US7657034B2 (en) Data encryption in a symmetric multiprocessor electronic apparatus
US20100241870A1 (en) Control device, storage device, data leakage preventing method
US20010034715A1 (en) Decryption device
JP2008287488A (en) Data distributing and preserving unit
JP2007074507A (en) Encryption/decryption device, and electronic apparatus and control method of encryption/decryption device
JP2007074506A (en) Encryption/decryption device, electronic apparatus and encrypting/decrypting method
JP2003195758A (en) Data processor, interface board and data concealing method
JP2010092202A (en) Storage device using usb interface
JP2007336446A (en) Data encryption apparatus
JP2007074505A (en) Encryption/decryption device, electronic apparatus and encrypting/decrypting method
JP2004199689A (en) Secure media card operation over unsecured pci bus

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081202