JP4708914B2 - Decryption method - Google Patents

Decryption method Download PDF

Info

Publication number
JP4708914B2
JP4708914B2 JP2005235212A JP2005235212A JP4708914B2 JP 4708914 B2 JP4708914 B2 JP 4708914B2 JP 2005235212 A JP2005235212 A JP 2005235212A JP 2005235212 A JP2005235212 A JP 2005235212A JP 4708914 B2 JP4708914 B2 JP 4708914B2
Authority
JP
Japan
Prior art keywords
data
key
information
encrypted
information indicating
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.)
Expired - Fee Related
Application number
JP2005235212A
Other languages
Japanese (ja)
Other versions
JP2005341625A (en
Inventor
正彦 江成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2005235212A priority Critical patent/JP4708914B2/en
Publication of JP2005341625A publication Critical patent/JP2005341625A/en
Application granted granted Critical
Publication of JP4708914B2 publication Critical patent/JP4708914B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、暗号化されることによりスクランブルされた送信データを受けて、解読するようにした解読化方法に関する。   The present invention relates to a decryption method for receiving and decrypting transmission data scrambled by being encrypted.

通信における情報を秘匿するために、送信情報を暗号化し、暗号化された送信情報を受信して解読することにより、元の情報を得るようにした暗号化・解読化方式が従来から知られている。このような暗号化・解読化方式としては、米国における標準方式であるDES(Data Encryption Standard)等の暗号アルゴリズムが知られている。   In order to conceal information in communication, there has been known an encryption / decryption method in which transmission information is encrypted, and the original information is obtained by receiving and decrypting the encrypted transmission information. Yes. As such an encryption / decryption method, an encryption algorithm such as DES (Data Encryption Standard) which is a standard method in the United States is known.

ところで、暗号アルゴリズムには多種・多様なものがあり、より安全性・高速性に優れた方式が開発されている。この一例として、米国特許第4,982,429号明細書、米国特許第5,103,479号明細書、および特開平1−276189号公報等に記載されている暗号方式(MULTI2方式)が知られている。
また、国際標準化機構(ISO)においてもISO9979/0009として登録された暗号化方式や、ISO/IEC10116として登録された暗号化利用モードがある。
By the way, there are various and various cryptographic algorithms, and a method with higher security and higher speed has been developed. As an example of this, the encryption system (MULTI2 system) described in U.S. Pat. No. 4,982,429, U.S. Pat. No. 5,103,479, and JP-A-1-276189 is known. It has been.
In the International Organization for Standardization (ISO), there are encryption schemes registered as ISO9979 / 0009 and encryption usage modes registered as ISO / IEC10116.

上記MULTI2方式の暗号化方式においては、入力データサイズが64ビット、出力データサイズが64ビットとされており、256ビットサイズのシステム鍵と64ビットのデータ鍵から、暗号化を行うために必要な256ビットサイズのワーク鍵が生成されている。さらに、暗号化段数は正の整数段とされている。
このMULTI2方式における暗号化アルゴリズムの概略構成を図17に示す。MULTI2方式は、図17に示すように64ビットのデータ鍵Ksに256ビットのシステム鍵Jを用いて暗号アルゴリズムの演算を施すことにより256ビットのワーク鍵Kwを生成する。この暗号アルゴリズムの演算は暗号アルゴリズム実行手段Cにより実行される。生成されたワーク鍵Kwは、暗号アルゴリズム実行手段Fに供給されて入力された64ビットの平文が暗号化される。なお、暗号アルゴリズム実行手段Cと暗号アルゴリズム実行手段Fとで実行される暗号アルゴリズムは、同一の暗号アルゴリズムである。
In the MULTI2 encryption method, the input data size is 64 bits and the output data size is 64 bits, which is necessary for encryption from a 256-bit system key and a 64-bit data key. A 256-bit work key is generated. Furthermore, the number of encryption stages is a positive integer stage.
A schematic configuration of an encryption algorithm in the MULTI2 system is shown in FIG. In the MULTI2 system, as shown in FIG. 17, a 256-bit work key Kw is generated by performing a cryptographic algorithm operation on a 64-bit data key Ks using a 256-bit system key J. The calculation of the encryption algorithm is executed by the encryption algorithm execution means C. The generated work key Kw is supplied to the encryption algorithm execution means F, and the 64-bit plaintext input thereto is encrypted. Note that the encryption algorithms executed by the encryption algorithm execution means C and the encryption algorithm execution means F are the same encryption algorithm.

このような暗号化がMULTI2方式の基本的な暗号化アルゴリズムであるが、これでは予め文字、あるいは単語が出現する頻度の分布を統計処理しておき、入手した暗号化文の文字列パターンの頻度分布とのマッチングを取ることにより、平文が推定されてしまうおそれがある。
そこで、暗号化された64ビットの暗号ブロックと、次に入力される64ビットの入力データとの排他的論理和を演算して暗号文を作成する手法がある。この手法を行って暗号化するモードをCBC(Cipher Block Chaining)モードとよんでいる。前記した暗号アルゴリズム実行手段Fにおいては、このようなCBCモードの暗号アルゴリズムが実行されている。
Such encryption is a basic encryption algorithm of the MULTI2 system, but with this processing, the distribution of the frequency of appearance of characters or words is statistically processed in advance, and the frequency of the character string pattern of the obtained encrypted text There is a possibility that plain text is estimated by matching with the distribution.
Therefore, there is a method of creating a ciphertext by calculating an exclusive OR of the encrypted 64-bit encryption block and the next input 64-bit input data. A mode in which this method is used for encryption is called a CBC (Cipher Block Chaining) mode. In the encryption algorithm executing means F described above, such a CBC mode encryption algorithm is executed.

また、例えばパケット通信のように通信を行うデータの単位が予め決められている通信方式があるが、64ビットを1ブロックとするようなブロック暗号化方式では、1ブロックのビット数で割り切れないデータ単位が入力された場合に、データが余ってしまうようになる。そこで、その端数処理をOFB(Output Feedback )モードで処理するようにしている。
このOFBモードでは、データの端数部分が暗号アルゴリズム実行手段Gに供給され、乱数を使用して暗号化される。この乱数は、ワーク鍵Kwを用いて暗号アルゴリズム実行手段Gにより生成されている。これにより、64ビットを1ブロックとする暗号文を得ることができるようになる。なお、CBCモードおよびOFBモードは暗号化利用モードと呼ばれる。
In addition, there is a communication method in which a unit of data to be communicated is determined in advance, such as packet communication, but in a block encryption method in which 64 bits are one block, data that cannot be divided by the number of bits of one block When a unit is entered, data will be left over. Therefore, the fraction processing is performed in the OFB (Output Feedback) mode.
In this OFB mode, the fractional part of the data is supplied to the encryption algorithm execution means G and encrypted using a random number. This random number is generated by the encryption algorithm execution means G using the work key Kw. Thereby, it becomes possible to obtain a ciphertext having 64 bits as one block. Note that the CBC mode and OFB mode are called encryption usage modes.

また、MULTI2方式における解読化アルゴリズムの概略構成を図18に示す。図18に示すように、64ビットのデータ鍵Ksに256ビットのシステム鍵Jを用いて暗号アルゴリズムの演算を施すことにより256ビットのワーク鍵Kwを生成する。この暗号アルゴリズムの演算は暗号アルゴリズム実行手段cにより実行される。生成されたワーク鍵Kwは、解読アルゴリズム実行手段fに供給されて入力された64ビットの暗号文が解読化される。
なお、OFBモードで暗号化されている暗号文は、暗号アルゴリズム実行手段gに供給され、ワーク鍵Kwを用いて暗号アルゴリズム実行手段gにより生成した乱数を使用することにより解読化される。これにより、1ブロック64ビットの暗号文を解読化して64ビットの平文を得ることができる。また、CBCモードとされている場合は、解読アルゴリズム実行手段fがCBCモードの解読アルゴリズムを実行するようにされる。
FIG. 18 shows a schematic configuration of a decryption algorithm in the MULTI2 system. As shown in FIG. 18, a 256-bit work key Kw is generated by performing a cryptographic algorithm operation on a 64-bit data key Ks using a 256-bit system key J. The calculation of the encryption algorithm is executed by the encryption algorithm execution means c. The generated work key Kw is supplied to the decryption algorithm execution means f and the input 64-bit ciphertext is decrypted.
The ciphertext encrypted in the OFB mode is supplied to the encryption algorithm executing means g and decrypted by using a random number generated by the encryption algorithm executing means g using the work key Kw. Thereby, a 64-bit plaintext can be obtained by decrypting a 64-bit ciphertext. When the CBC mode is set, the decryption algorithm executing means f executes the CBC mode decryption algorithm.

ここで、暗号化利用モードの説明を図19を参照しながら行うが、図19(a)にCBCモードの暗号化・解読化の概略構成を示し、図19(b)にOFBモードの暗号化・解読化の概略構成を示している。
CBCモードでは、図19(a)に示すようにi番目の平文ブロックM(i) は、排他的論理和回路101に入力され、レジスタ(REG)103により遅延された1ブロック前の暗号文ブロックC(i-1) との排他的論理和が演算される。演算されたデータは暗号アルゴリズム実行手段102において、データ鍵Ksに基づいて生成されたワーク鍵により暗号化される。この暗号化されたi番目の暗号文ブロックC(i) は、
C(i) =EKs(M(i) .EOR.C(i-1) )
と表せる。ただし、EKs(m)はmをKsで暗号化することを意味しており、EORは排他的論理和の演算を行うことを示している。
Here, the encryption usage mode will be described with reference to FIG. 19. FIG. 19A shows a schematic configuration of encryption / decryption in the CBC mode, and FIG. 19B shows encryption in the OFB mode.・ The outline structure of decryption is shown.
In the CBC mode, as shown in FIG. 19A, the i-th plaintext block M (i) is input to the exclusive OR circuit 101, and the ciphertext block one block before delayed by the register (REG) 103. An exclusive OR with C (i-1) is calculated. The calculated data is encrypted by the encryption algorithm executing means 102 with the work key generated based on the data key Ks. This encrypted ith ciphertext block C (i) is
C (i) = EKs (M (i) .EOR.C (i-1))
It can be expressed. However, EKs (m) means that m is encrypted with Ks, and EOR indicates that an exclusive OR operation is performed.

そして、この暗号文ブロックC(i) は送信され、受信側において受信されることになる。受信された暗号文ブロックC(i) は、解読アルゴリズム実行手段111においてデータ鍵Ksに基づいて生成されたワーク鍵を用いて解読され、排他的論和回路113に供給される。この排他的論理和回路113にはレジスタ(REG)112において遅延された、1ブロック前の暗号文ブロックC(i-1) が入力されて、両者の排他的論和が演算される。この時、送信側と受信側のデータ鍵Ksは等しく、これにより、排他的論理和回路113からi番目の平文ブロックM(i) が解読される。i番目の平文ブロックM(i) は次のように表せる。
M(i) =DKs(C(i) .EOR.C(i-1) )
ただし、DKs(c)はKsでcを解読化することを示している。
The ciphertext block C (i) is transmitted and received at the receiving side. The received ciphertext block C (i) is decrypted by the decryption algorithm execution means 111 using the work key generated based on the data key Ks and supplied to the exclusive OR circuit 113. The exclusive OR circuit 113 is inputted with the ciphertext block C (i-1) one block before delayed in the register (REG) 112, and calculates the exclusive OR of both. At this time, the data key Ks on the transmission side and the reception side are the same, whereby the i-th plaintext block M (i) is decrypted from the exclusive OR circuit 113. The i-th plaintext block M (i) can be expressed as follows.
M (i) = DKs (C (i) .EOR.C (i-1))
However, DKs (c) indicates that c is decrypted by Ks.

また、OFBモード時では、i番目の平文ブロックM(i) は排他的論理和回路105に供給される。この排他的論理和回路105には、データ鍵Ksに基づいて生成されたワーク鍵により乱数化された暗号アルゴリズム実行手段104の出力が供給されている。なお、暗号アルゴリズム実行手段104の出力は、レジスタ103により1ブロック遅延されて暗号アルゴリズム実行手段104に戻されている。これにより、排他的論理和回路105からは乱数により暗号化された暗号文ブロックC(i) が出力される。   In the OFB mode, the i-th plaintext block M (i) is supplied to the exclusive OR circuit 105. The exclusive OR circuit 105 is supplied with the output of the encryption algorithm executing means 104 randomized by the work key generated based on the data key Ks. The output of the encryption algorithm execution means 104 is delayed by one block by the register 103 and returned to the encryption algorithm execution means 104. As a result, the ciphertext block C (i) encrypted with the random number is output from the exclusive OR circuit 105.

そして、この暗号文ブロックC(i) は送信され、受信側において受信されることになる。受信された暗号文ブロックC(i) は、排他的論和回路114に供給される。この排他的論和回路114には、暗号アルゴリズム実行手段115においてデータ鍵Ksに基づいて生成されたワーク鍵を用いて乱数化された出力が供給されている。この暗号アルゴリズム実行手段115の出力は、レジスタ(REG)112において1ブロック遅延されて暗号アルゴリズム実行手段115に戻されている。この場合、排他的論理和回路114に供給される乱数は、排他的論理和回路105に供給される乱数と等しく、これにより、排他的論理和回路114からi番目の平文ブロックM(i) が得られる。   The ciphertext block C (i) is transmitted and received at the receiving side. The received ciphertext block C (i) is supplied to the exclusive OR circuit 114. The exclusive OR circuit 114 is supplied with an output randomized using the work key generated based on the data key Ks in the encryption algorithm execution means 115. The output of the encryption algorithm executing means 115 is delayed by one block in the register (REG) 112 and returned to the encryption algorithm executing means 115. In this case, the random number supplied to the exclusive OR circuit 114 is equal to the random number supplied to the exclusive OR circuit 105, so that the i-th plaintext block M (i) from the exclusive OR circuit 114 is changed. can get.

以上説明した暗号化利用モードを有する暗号化・解読化方式の概略構成を図20に示す。
この図において、送信側にはスクランブラ100が備えられており、スクランブラ100により入力データがスクランブルされて送信されている。このスクランブルされた送信データは、空間等の伝送路を伝播されて受信側で受信される。受信側には、デスクランブラ110が備えられており、このデスクランブラ110によりスクランブルされた送信データがデスクランブルされて、元のデータに戻され出力されるようになる。
FIG. 20 shows a schematic configuration of the encryption / decryption method having the encryption use mode described above.
In this figure, a scrambler 100 is provided on the transmission side, and input data is scrambled by the scrambler 100 and transmitted. The scrambled transmission data is propagated through a transmission path such as a space and received at the receiving side. On the receiving side, a descrambler 110 is provided, and the transmission data scrambled by the descrambler 110 is descrambled, returned to the original data, and output.

スクランブラ100は、入力された入力データ(平文)を暗号化する暗号アルゴリズム実行手段であるEncryptor 102と、レジスタ103と、排他的論理和回路(EX−OR)101からなるCBCモード暗号化部と、暗号アルゴリズム実行手段であるEncryptor 104と、排他的論理和回路(EX−OR)105からなるOFBモード暗号化部から構成されている。なお、データ鍵とシステム鍵からワーク鍵を生成するEncryptor 106もスクランブラ100内に備えられている。生成されたワーク鍵はEncryptor 102,104に供給される。
ところで、Encryptor 102、Encryptor 104、Encryptor 106は同一構成とされているので、1つのEncryptor により3つのEncryptor を兼用することができる。CBCモード暗号化部およびOFBモード暗号化部の動作は前述したとおりであるので、ここでは省略する。
The scrambler 100 includes an encryption algorithm executing means 102 for encrypting input data (plaintext) input, a register 103, and a CBC mode encryption unit including an exclusive OR circuit (EX-OR) 101. The encryption algorithm execution means includes an encryptor 104 and an OFB mode encryption unit including an exclusive OR circuit (EX-OR) 105. Note that an encryptor 106 that generates a work key from the data key and the system key is also provided in the scrambler 100. The generated work key is supplied to the encryptors 102 and 104.
By the way, since the encryptor 102, the encryptor 104, and the encryptor 106 have the same configuration, three encryptors can be shared by one encryptor. Since the operations of the CBC mode encryption unit and OFB mode encryption unit are the same as described above, they are omitted here.

また、デスクランブラ110は、入力された受信データ(暗号文)を解読化する解読アルゴリズム実行手段であるDecryptor 111と、レジスタ112と、排他的論理和回路(EX−OR)113からなるCBCモード解読化部と、暗号アルゴリズム実行手段であるEncryptor 115と、排他的論理和回路(EX−OR)114からなるOFBモード解読化部から構成されている。なお、データ鍵とシステム鍵からワーク鍵を生成するEncryptor 116もデスクランブラ110内に備えられている。生成されたワーク鍵はDecryptor 111と、Encryptor 115に供給される。
なお、Encryptor 115、Encryptor 116は同一構成とされているので、1つのEncryptor により2つのEncryptor を兼用することができる。また、CBCモード解読化部およびOFBモード解読化部の動作は前述したとおりであるので、ここでは省略する。
The descrambler 110 also decrypts the CBC mode, which includes a decryptor 111 that performs decryption algorithm execution means for decrypting input received data (ciphertext), a register 112, and an exclusive OR circuit (EX-OR) 113. And an OFB mode decryption unit comprising an exclusive OR circuit (EX-OR) 114 and an encryption unit 115, which is an encryption algorithm executing means. Note that an encryptor 116 that generates a work key from the data key and the system key is also provided in the descrambler 110. The generated work key is supplied to the Decryptor 111 and the Encryptor 115.
Since the encryptor 115 and the encryptor 116 have the same configuration, two encryptors can be used by one encryptor. The operations of the CBC mode decoding unit and the OFB mode decoding unit are the same as described above, and are omitted here.

ところで、上述したMULTI2方式のような高度な暗号化・解読化方式を、ソフトウェアで実現して使用する場合には、現在の演算手段の演算速度ではリアルタイム処理を行うことができない。すなわち、例えば衛星ディジタルテレビジョン放送等に適用した場合は、画像や音声を途切らせないでリアルタイム再生する必要があることから、受信側における解読化処理は高速な処理の可能なハードウェアで行わなければならないことになる。
しかしながら、受信側においてリアルタイムで全ての解読処理を完了することができるハードウェアは、複雑な処理を行うことから大型なものになるという問題点があった。
By the way, when an advanced encryption / decryption method such as the MULTI2 method described above is realized by software and used, real-time processing cannot be performed at the current calculation speed of the calculation means. In other words, for example, when applied to satellite digital television broadcasting, etc., it is necessary to reproduce images and sounds in real time without interruption, so that decoding processing on the receiving side is performed by hardware capable of high-speed processing. Will have to.
However, the hardware capable of completing all the decoding processes in real time on the receiving side has a problem that it becomes a large size because it performs complicated processes.

そこで、本発明は高度な暗号化方式でスクランブルされたデータを、受信側においてリアルタイムで全ての解読処理を小型かつ安価なハードウェアを用いて完了することができる解読化方法を提供することを目的としている。   Therefore, the present invention has an object to provide a decryption method that can complete all decryption processing in real time on the receiving side using scrambled data with a high-level encryption method using small and inexpensive hardware. It is said.

上記目的を達成するために、本発明の解読化方法は、暗号化されたデータと、該データの種類を示す情報と該データが暗号化されているか否かを示す情報とを含む送信データを受信し、前記暗号化されたデータを解読するようにした解読化方法であって、メモリ手段に一つの前記データの種類を示す情報に対して割り当てられている、互いに異なる複数の鍵情報を書き込む書き込みステップと、受信した前記送信データの中に含まれるデータの種類を示す情報とデータが暗号化されているか否かを示す情報により指示された鍵情報を、前記メモリ手段から読み出す読み出しステップと、該読み出しステップで読み出された鍵情報に基づいて前記暗号化されたデータを解読する解読ステップとを含んでおり、前記書き込みステップの実行期間と、前記読み出しステップの実行期間とが重なった場合であって、書き込みアドレスと読み出しアドレスとが一致している場合は、前記書き込みステップの実行を禁止するようにしている。

In order to achieve the above object, the decryption method of the present invention provides transmission data including encrypted data, information indicating the type of the data, and information indicating whether or not the data is encrypted. A decryption method for receiving and decrypting the encrypted data, wherein a plurality of different key information assigned to information indicating one type of the data is written in the memory means and writing step, the key information in which information and data indicating the type of data included is instructed by the information indicating whether it is encrypted in the transmission data received, and reading step of reading from said memory means A decryption step of decrypting the encrypted data based on the key information read in the read step, and an execution period of the write step , In a case where the execution period of the read step are overlapped, if the write address and the read address are coincident, so that prohibits execution of the write step.

また、上記目的を達成するために、本発明の他の解読化方法は、前記複数の鍵情報を記憶しているメモリ手段から、入力データ中の指示データに基づいていずれかの鍵情報を読み出す読み出しステップと、該読み出しステップで読み出された前記鍵情報に基づいて前記入力データを解読する解読ステップとからなり、前記読み出しステップでは、前記指示データにより鍵テーブルを参照することにより、前記メモリ手段から読み出す鍵情報をサーチしており、前記指示データに該当する前記鍵情報を読み出すための鍵アドレスが、前記鍵テーブルに2つ以上存在する場合は、最も少ない鍵アドレスを選択するようにしている。   In order to achieve the above object, another decryption method of the present invention reads any key information from the memory means storing the plurality of key information based on the instruction data in the input data. The memory means includes a reading step and a decoding step for decoding the input data based on the key information read in the reading step. In the reading step, the memory means is configured to refer to a key table by the instruction data. The key information to be read from is searched, and when there are two or more key addresses for reading the key information corresponding to the instruction data in the key table, the smallest key address is selected. .

さらにまた、上記目的を達成するために、本発明のさらに他の解読化方法は、前記複数の鍵情報を記憶しているメモリ手段から、入力データ中の指示データに基づいていずれかの鍵情報を読み出す読み出しステップと、該読み出しステップで読み出された前記鍵情報に基づいて前記入力データを解読する解読ステップとからなり、前記読み出しステップでは、前記指示データによりテーブルを参照することにより、前記メモリ手段から読み出す鍵情報の鍵アドレスをサーチしており、前記指示データにより参照される鍵アドレスが前記テーブルに存在していない場合は、鍵アドレスのサーチを行わないようにしている。   Furthermore, in order to achieve the above object, still another decryption method of the present invention provides any key information from the memory means storing the plurality of key information based on the instruction data in the input data. And a decryption step for decrypting the input data based on the key information read in the read step. In the read step, the memory is obtained by referring to the table by the instruction data. When the key address of the key information read from the means is searched and the key address referred to by the instruction data does not exist in the table, the key address is not searched.

さらにまた、上記目的を達成するために、本発明のさらに他の解読化方法は、初期設定を行う初期ステップと、メモリ手段に複数の鍵情報を書き込む書き込みステップと、前記メモリ手段から、入力データ中の指示データに基づいていずれかの鍵情報を読み出す読み出しステップと、該読み出しステップで読み出された前記鍵情報に基づいて前記入力データを解読する解読ステップとからなり、前記読み出しステップでは、前記指示データにより鍵テーブルを参照することにより、前記メモリ手段から読み出す鍵情報の鍵アドレスをサーチしており、初期化期間内においては、サーチした結果、該当する鍵アドレスがないように、前記初期ステップにおいて初期処理されるようにしている。   Furthermore, in order to achieve the above object, still another decryption method of the present invention includes an initial step of performing initial setting, a write step of writing a plurality of key information in the memory means, and input data from the memory means. A reading step of reading any key information based on the instruction data in the medium, and a decoding step of decoding the input data based on the key information read in the reading step. In the reading step, The initial step is performed so that the key address of the key information read from the memory means is searched by referring to the key table by the instruction data, and within the initialization period, there is no corresponding key address as a result of the search. Initial processing is performed in

このような本発明の解読化方法によれば、解読処理を行うために必要な鍵情報が格納されているメモリ手段の読み出しおよび書き込み制御を適切に行うことができるため、メモリ制御を容易に行うことのできる解読化方法とすることができる。したがって、受信側においてリアルタイムで全ての解読処理を行うことのできる解読化方法とすることができる。
また、このような解読化方法を実行する解読手段を備える電子機器においては、メモリ制御手段の構成を簡単化することができるので、電子機器を小型かつ安価に提供することができるようになる。
According to such a decryption method of the present invention, the memory means storing the key information necessary for performing the decryption process can be appropriately read and written, so that the memory control is easily performed. Can be a decryption method that can be used. Therefore, the decoding method can perform all decoding processes in real time on the receiving side.
In addition, in an electronic device provided with a decoding means for executing such a decoding method, the configuration of the memory control means can be simplified, so that the electronic device can be provided in a small size and at a low cost.

本発明は以上のように構成されているので、解読処理を行うための鍵情報が格納されているメモリ手段の読み出しおよび書き込み制御を適切に行うことができ、メモリ制御を容易に行うことのできる解読化方法とすることができる。したがって、受信側においてリアルタイムで全ての解読処理を実行することのできる解読化方法とすることができる。
また、このような解読化方法を実行する解読手段を備える電子機器におけるメモリ制御手段の構成を小さくすることができるので、電子機器を小型かつ安価に提供することができるようになる。
Since the present invention is configured as described above, it is possible to appropriately perform read and write control of the memory means storing the key information for performing the decryption process, and to easily perform the memory control. It can be a decryption method. Therefore, a decryption method that can execute all decryption processes in real time on the receiving side can be provided.
In addition, since the configuration of the memory control unit in the electronic device including the decoding unit that executes such a decoding method can be reduced, the electronic device can be provided in a small size and at low cost.

本発明の解読化方法の実施の形態である解読装置の構成例を示すブロック図を図1に示す。
この図において、解読装置AはCBCモードの解読化部Bと、OFBモードの解読化部Cと、パケットID(PID)テーブルを備えるデータ鍵間接検索器(IDT)16と、入力データの暗号化に使用されたデータ鍵を解読化部B,Cに渡すデュアルポートメモリ(DPMEM)17と、DPMEM17の書き込みアドレスと読み出しアドレスとを比較する比較器(COMP)11から構成されている。
FIG. 1 is a block diagram showing a configuration example of a decryption apparatus which is an embodiment of the decryption method of the present invention.
In this figure, a decryption device A includes a decryption unit B in CBC mode, a decryption unit C in OFB mode, a data key indirect searcher (IDT) 16 having a packet ID (PID) table, and encryption of input data. The dual-port memory (DPMEM) 17 that passes the data key used for the decryption to the decryption units B and C, and the comparator (COMP) 11 that compares the write address and the read address of the DPMEM 17.

解読装置Aの端子1には受信データである暗号文データが入力され、この暗号文データは切換手段3に入力される。この時、CBCモードとされた場合は、切換手段3、および切換手段4が共に端子a側に切り換えられ、入力された暗号文データはCBCモード解読化部Bに供給されて解読化されて出力される。また、OFBモードとされた時は、切換手段3、および切換手段4は共に端子b側に切り換えられて、暗号文データはOFBモード解読化部C側に入力される。そして、入力された暗号文データは、OFBモード解読化部Cにおいて解読化されて平文データが出力される。
CBCモード解読化部B、およびOFBモード解読化部Cにおいて、入力された暗号文データは解読処理されて平文データとされるが、その解読化アルゴリズムは、前記図18に示す解読化アルゴリズムと同様である。なお、この場合解読処理に必要なデータ鍵はDPMEM17から供給される。
Ciphertext data as received data is input to the terminal 1 of the decryption device A, and this ciphertext data is input to the switching means 3. At this time, when the CBC mode is set, both the switching means 3 and the switching means 4 are switched to the terminal a side, and the input ciphertext data is supplied to the CBC mode decryption unit B for decryption and output. Is done. In the OFB mode, both the switching means 3 and the switching means 4 are switched to the terminal b side, and the ciphertext data is input to the OFB mode decryption unit C side. The input ciphertext data is decrypted by the OFB mode decryption unit C, and plaintext data is output.
In the CBC mode decryption unit B and OFB mode decryption unit C, the input ciphertext data is decrypted into plain text data, and the decryption algorithm is the same as the decryption algorithm shown in FIG. It is. In this case, the data key necessary for the decryption process is supplied from the DPMEM 17.

また、端子1に入力される受信データのフォ−マットは、例えばISO/IEC13818として規定されているトランスポートストリーム(以下、TSと記す。)とされる。TSは188バイトのパケット構造とされており、通常4バイトのヘッダのあとに184バイトのペイロードが続くようにされている。さらに、伝送エラーに対するエラー訂正のためにパリティーを付加することから、16バイトのパリティ用のダミー期間が付加されて、これらの繰返しのストリームとされる。   Further, the format of the received data input to the terminal 1 is, for example, a transport stream (hereinafter referred to as TS) defined as ISO / IEC13818. The TS has a packet structure of 188 bytes, and normally a 184-byte payload follows a 4-byte header. Further, since a parity is added for error correction with respect to a transmission error, a dummy period for 16-byte parity is added to form a repeated stream.

このTSのヘッダにはパケットが映像データで構成されているのか、音声データで構成されているのか、あるいは他のデータで構成されているのかを示すPID情報や、暗号化されているTSなのか否かを示すTSC(Transport Scrambling Control)フラグ等が含まれており、図示しない解析部においてヘッダを解析することにより、これらのパケットの属性が解釈されている。
この時、TSCにより暗号化されていないパケットと解釈された場合は、解読化処理を施すことなくTSを遅延部を通してそのまま出力するようにする。この遅延部の遅延時間は、解読装置Aが解読処理に要する時間と等しくされる。
Whether the packet is composed of video data, audio data, or other data in the header of this TS, or whether it is an encrypted TS A TSC (Transport Scrambling Control) flag indicating whether or not the packet is included is included, and the attributes of these packets are interpreted by analyzing the header in an analysis unit (not shown).
At this time, if the packet is interpreted as an unencrypted packet by the TSC, the TS is output as it is through the delay unit without being decrypted. The delay time of the delay unit is made equal to the time required for the decryption apparatus A to perform decryption processing.

また、1つのPIDに対しては、データ鍵Kse(Ks_even )とデータ鍵Kso(Ks_odd)との2つが割り当てられている。これは、データ鍵が数秒ないし数十秒毎に更新されるため、更新に間に合うようにデータ鍵の書き替えを行う必要があること、および、解読処理時にはデータ鍵Kseとデータ鍵Ksoはその一方しか使用されず、使用されていないデータ鍵を更新可能として、そのデータ鍵を更新することができるからである。すなわち、データ鍵を更新する更新制御を容易に行うためである。
なお、前記解析部は図示しないが、例えばCBCモード解読化部Bに備えられており、CBCモード解読化部Bから15ビットのデータサイズのPID/TSC情報がIDT16に送られている。
Two data keys Kse (Ks_even) and data key Kso (Ks_odd) are assigned to one PID. This is because the data key is updated every few seconds to several tens of seconds, so it is necessary to rewrite the data key in time for the update, and one of the data key Kse and the data key Kso is used during the decryption process. This is because only the used data key can be updated and the data key can be updated. That is, it is for easily performing update control for updating the data key.
Although not shown, the analysis unit is provided in, for example, the CBC mode decoding unit B, and PID / TSC information having a data size of 15 bits is sent from the CBC mode decoding unit B to the IDT 16.

IDT16においては、受けた13ビットサイズのPID情報を用いてPIDテーブルを参照し、PIDから読出されたアドレス情報と、2ビットサイズのTSC情報とを組み合わせてDPMEM17の読出アドレスRA(データサイズは9ビット)を生成している。生成された読出アドレスRAはAD端子からDPMEM17のRA端子に供給され、この時にリードイネーブル(RE)信号がアクティブ状態になるよう制御して、読出アドレスRAに該当するデータ鍵をDPMEM17から読み出している。読み出されたデータ鍵は、入力されたTSの暗号化時に使用されたデータ鍵と等しく、端子RDから出力されてDecryptor 5に供給される。
Decryptor 5は、供給されたデータ鍵と、システム毎に異なるシステム鍵からワーク鍵を生成して、生成されたワーク鍵に基づいて入力された暗号文データの解読処理を行う。
なお、システム鍵は予めCPU10から解読装置Aに渡されている。
The IDT 16 refers to the PID table using the received 13-bit size PID information, combines the address information read from the PID and the 2-bit size TSC information, and reads the read address RA (data size is 9). Bit). The generated read address RA is supplied from the AD terminal to the RA terminal of the DPMEM 17, and at this time, the read enable (RE) signal is controlled to be in an active state, and the data key corresponding to the read address RA is read from the DPMEM 17. . The read data key is equal to the data key used at the time of encryption of the input TS, and is output from the terminal RD and supplied to the Decryptor 5.
The Decryptor 5 generates a work key from the supplied data key and a different system key for each system, and performs decryption processing of the ciphertext data input based on the generated work key.
The system key is passed from the CPU 10 to the decryption device A in advance.

また、CPU10は解読化部B,Cで必要とされる更新されるデータ鍵を、解読処理において必要になる前にDPMEM17に書き込むようにされており、書き込む場合には、ライトイネーブル(WE)をアクティブ状態とすると共に、9ビットのデータサイズの書込アドレス(WA)と、8ビットのデータサイズのデータ鍵の書込データ(WD)をDPMEM17に供給している。この場合、CPU10にはROMやRAMが備えられており、これらのメモリに解読装置Aに与えるデータが書き込まれている。
なお、DPMEM17にデータ鍵情報を書き込む時に、書込アドレスと同一の読出アドレスでIDT16がデータ鍵を読み出すようになった場合は、読み出されたデータが不定となることから、この時はDPMEM17への書き込みを禁止している。
Further, the CPU 10 writes the updated data key required by the decryption units B and C into the DPMEM 17 before it becomes necessary in the decryption process. When writing, the write enable (WE) is set. While being in an active state, a write address (WA) having a data size of 9 bits and write data (WD) of a data key having a data size of 8 bits are supplied to the DPMEM 17. In this case, the CPU 10 is provided with a ROM and a RAM, and data to be given to the decrypting device A is written in these memories.
When the data key information is written to DPMEM 17, if IDT 16 reads the data key at the same read address as the write address, the read data becomes indefinite. Writing is prohibited.

このために、比較器11とアンドゲート12、オアゲート13,14、インバータ15が設けられている。この動作を説明すると、IDT16から出力される読出アドレスRAと、CPU10から出力される書込アドレスWAとが比較器11のP端子およびQ端子にそれぞれ入力される。そして、P端子の入力データとQ端子の入力データとが一致(P=Q)した時に、比較器11からハイレベル信号が出力される。この時、反転REがローレベルでアクティブ状態になっていると、インバータ15からハイレベルが出力されるので、結局のところアンドゲート12からハイレベルが出力されることになる。このアンドゲート12の出力はオアゲート13に入力されて、オアゲート13の出力がハイレベルとされるので、反転WEは非アクティブ状態となり、DPMEM17への書き込みが禁止されることになる。   For this purpose, a comparator 11, an AND gate 12, OR gates 13 and 14, and an inverter 15 are provided. Explaining this operation, the read address RA output from the IDT 16 and the write address WA output from the CPU 10 are input to the P terminal and the Q terminal of the comparator 11, respectively. When the input data at the P terminal matches the input data at the Q terminal (P = Q), the comparator 11 outputs a high level signal. At this time, if the inversion RE is at the low level and is in the active state, the inverter 15 outputs a high level, and eventually the AND gate 12 outputs a high level. Since the output of the AND gate 12 is input to the OR gate 13 and the output of the OR gate 13 is set to the high level, the inverted WE becomes inactive and writing to the DPMEM 17 is prohibited.

次に、CPU10から見た解読装置Aのレジスタのメモリ空間を図3に示すが、9ビットのデータサイズのアドレス(HADD)の上位6ビットが”000100”とされた64bit ×1のエリアが、CBCモードの初期値テーブル(CBC Initial value table )に割り当てられている。この初期値テーブルに記憶される初期値は、電源投入時等に実行される初期処理時に、CBCモード解読化部Bに供給されてレジスタ6にセットされる。
また、アドレス(HADD)の上位4ビットが”0010”とされた256bit ×1のエリアが、システム鍵テーブル(SYSTEM_Key table)に割り当てられている。このシステム鍵はシステム毎に異なるものとされるが、1つのシステムでは固定された鍵である。
Next, the memory space of the register of the decryption device A as seen from the CPU 10 is shown in FIG. 3. An area of 64 bits × 1 in which the upper 6 bits of the 9-bit data size address (HADD) is “000100” It is assigned to an initial value table (CBC Initial value table) in the CBC mode. The initial values stored in the initial value table are supplied to the CBC mode decoding unit B and set in the register 6 at the time of initial processing executed when the power is turned on.
In addition, an area of 256 bits × 1 in which the upper 4 bits of the address (HADD) are “0010” is assigned to the system key table (SYSTEM_Key table). This system key is different for each system, but is a fixed key in one system.

さらに、アドレス(HADD)の上位4ビットが”0100”とされた13bit ×12のエリアが、PIDテーブル(PID value table )に割り当てられている。このPIDテーブルはパケット化されたデータ種類を示す情報であり、1チャンネルでは最大12種類とされデータ種類毎に異なるPIDとされる。
なお、システム鍵テーブルは所定のレジスタに、PIDテーブルの情報はIDT16に、初期処理時にCPU10から書き込まれる。
Furthermore, an area of 13 bits × 12 in which the upper 4 bits of the address (HADD) are “0100” is assigned to the PID table (PID value table). This PID table is information indicating packetized data types, and a maximum of 12 types per channel is set to a different PID for each data type.
The system key table is written to a predetermined register, and the information of the PID table is written to the IDT 16 from the CPU 10 during the initial processing.

さらにまた、アドレス(HADD)の上位2ビットが”10”とされた64bit ×12のエリアが、データ鍵Kseテーブル(Ks_even value table )に割り当てられ、アドレス(HADD)の上位2ビットが”11”とされた64bit ×12のエリアが、データ鍵Ksoテーブル(Ks_odd value table)に割り当てられている。このデータ鍵Kseテーブル、およびデータ鍵Ksoテーブルの情報はDPMEM17に書き込まれるが、数秒ないし数10秒の所定タイミング毎に、CPU10により更新されている。   Furthermore, an area of 64 bits × 12 in which the upper 2 bits of the address (HADD) is “10” is allocated to the data key Kse table (Ks_even value table), and the upper 2 bits of the address (HADD) is “11”. The 64-bit × 12 area is assigned to the data key Kso table (Ks_odd value table). Information on the data key Kse table and the data key Kso table is written in the DPMEM 17, but is updated by the CPU 10 at predetermined timings of several seconds to several tens of seconds.

次に、IDT16の詳細構成の一例を示すブロック図を図2に示す。この図において、41〜52はそれぞれ13ビット幅を有する12個のフリップフロップ(DF0〜DF11)であり、61〜72はそれぞれ13ビット幅を有する12個の比較器(CP0〜CP11)である。また、40はアドレスデコーダ(ADEC)であり、9ビットのデータサイズのアドレス情報が入力されると、12本の出力のうちの1本だけに、DF0〜DF11のいずれかをアクティブにする出力が出される。さらに、39はプライオリティ・エンコーダ(PE)であり、TSC情報と組み合わされるアドレス情報TMP0〜TMP3が出力される。   Next, a block diagram showing an example of a detailed configuration of the IDT 16 is shown in FIG. In this figure, 41 to 52 are twelve flip-flops (DF0 to DF11) each having a 13-bit width, and 61 to 72 are twelve comparators (CP0 to CP11) each having a 13-bit width. Reference numeral 40 denotes an address decoder (ADEC). When 9-bit data size address information is input, only one of the 12 outputs has an output that activates one of DF0 to DF11. Is issued. Further, 39 is a priority encoder (PE), which outputs address information TMP0 to TMP3 combined with TSC information.

このIDT16において、端子30にはCPU10から出力された8ビットのデータサイズのPID情報が、13ビットのデータサイズに展開されて入力される。また、端子32にはCPU10から出力された9ビットのデータサイズのアドレス情報が入力され、ADEC40においてデコードされる。このデコード出力はストローブ信号としてDF0〜DF11に入力され、DF0〜DF11のうちのいずれか1つのみがラッチ可能とされる。
この時、入力された13ビットのデータサイズのPID情報は、12個のDF0〜DF11に共通に入力されており、ADEC40のデコード出力によりDF0〜DF11が順次1つづつ選択されて、供給されているPID情報がラッチされる。このようにして、DF0〜DF11に最大12種類のPID情報をラッチすることができ、DF0〜DF11によりPIDテーブルが構成されるようになる。
In the IDT 16, the 8-bit data size PID information output from the CPU 10 is developed into a 13-bit data size and input to the terminal 30. Further, the address information having a data size of 9 bits output from the CPU 10 is input to the terminal 32 and decoded by the ADEC 40. This decoded output is input to DF0 to DF11 as a strobe signal, and only one of DF0 to DF11 can be latched.
At this time, the input PID information having a data size of 13 bits is input in common to 12 DF0 to DF11, and DF0 to DF11 are sequentially selected and supplied one by one by the decode output of ADEC40. PID information is latched. In this way, a maximum of 12 types of PID information can be latched in DF0 to DF11, and a PID table is configured by DF0 to DF11.

また、端子33には13ビットのデータサイズのPID情報が入力され、比較器CP0〜CP11のB入力端子に共通に入力される。このPID情報は、CBCモード解読化部Bにおいて、受信データであるパケットのヘッダから抽出されてIDT16に供給された15ビットのデータサイズのPID/TSC情報のうちの13ビットのデータサイズのPID情報である。
この場合、比較器CP0〜CP11にはDF0〜DF11よりのPID情報がそれぞれA端子に入力されており、端子33より入力されたPID情報と一致するPID情報がA端子に入力されている比較器から一致信号が出力される。従って、PIDテーブルにあるPID情報が端子33から入力されると、CP0〜CP11のいずれか1つから一致信号が出力される。
In addition, PID information having a data size of 13 bits is input to the terminal 33 and is input in common to the B input terminals of the comparators CP0 to CP11. This PID information is extracted from the header of the packet, which is received data, in the CBC mode decoding unit B, and PID information having a 13-bit data size out of the 15-bit PID / TSC information supplied to the IDT 16 It is.
In this case, the comparators CP0 to CP11 have the PID information from DF0 to DF11 input to the A terminal, respectively, and the PID information that matches the PID information input from the terminal 33 is input to the A terminal. A match signal is output from. Therefore, when the PID information in the PID table is input from the terminal 33, a coincidence signal is output from any one of CP0 to CP11.

このCP0〜CP11の論理表を図4に示すが、CP0〜CP11のA端子およびB端子にオール”1”が入力されていない時は、一致した時(A=B)に”1”信号が出力される。また、一致してない時は”0”が出力される。
さらに、PE39の論理表を図5に示す。このPE39の論理表において、例えば、CP2から”1”信号が出力された時は、PE39からは”0010”の4ビット(TMP0〜TMP3)のデータが出力される。このPE39では図5に示すように、D0が最も優先された入力とされ、D11が最下位の優先度の入力とされる。
ところで、DF0〜DF11に設定されたPIDテーブルのPID情報と一致しないPID情報が入力されることがあるが、この場合にはPEにオール”0”が入力されることになる。この時、PEのNK出力が”1”となる。なお、NK出力が”1”の時には、後述するデータ鍵の鍵テーブルを読みに行くことが禁止される。
FIG. 4 shows a logical table of CP0 to CP11. When all “1” s are not input to the A terminal and B terminal of CP0 to CP11, a “1” signal is output when they coincide (A = B). Is output. If they do not match, “0” is output.
Furthermore, the logical table of PE39 is shown in FIG. In the logic table of PE39, for example, when a "1" signal is output from CP2, "0010" 4-bit (TMP0 to TMP3) data is output from PE39. In this PE 39, as shown in FIG. 5, D0 is the input with the highest priority, and D11 is the input with the lowest priority.
Incidentally, PID information that does not match the PID information in the PID table set in DF0 to DF11 may be input. In this case, all “0” is input to the PE. At this time, the NK output of PE becomes “1”. When the NK output is “1”, reading a key table of a data key described later is prohibited.

また、電源投入時等の初期処理時には端子31のレベルが”0”となり、DF0〜DF11が全てプリセットされることから、DF0〜DF11から”1”が出力される。従って、この場合はCP0〜CP11からオール”0”が出力されることになり、上述のようにデータ鍵の鍵テーブルを読みに行くことが禁止される。
なお、鍵テーブルを読みに行くことが禁止されている時は、鍵テーブルが使用されないので、この鍵テーブルにCPU10からデータ鍵を書き込むことができる。すなわち、データ鍵の初期設定をすることができる。また、端子31はパワーオンリセット端子であり、所定時間後にそのレベルは”1”に復帰する。
Further, at the time of initial processing such as when the power is turned on, the level of the terminal 31 becomes “0”, and all of DF0 to DF11 are preset, so “1” is output from DF0 to DF11. Accordingly, in this case, all “0” is output from CP0 to CP11, and reading the key table of the data key as described above is prohibited.
When reading the key table is prohibited, the key table is not used, so that the data key can be written from the CPU 10 to this key table. That is, the data key can be initialized. The terminal 31 is a power-on reset terminal, and its level returns to “1” after a predetermined time.

次に、受信データ中のPID情報とTSC情報により、データ鍵の鍵テーブルをサーチする動作を図6を参照しながら説明する。
図6に示すステップS20にて、受信データのヘッダから13ビットのデータサイズのPID情報として”PID−F”が、2ビットのデータサイズのTSC情報として”10”が入力されたとする。この”10”は、データ鍵Kseでスクランブルされていることを示しているものとする。
次いで、ステップS21にてこのPID情報はCP0〜CP11のA端子に入力されて、DF0〜DF11に格納されているPID情報と比較される。この結果、CP5から”1”信号が出力され、PE39のTEMP3〜TEMP0の出力TMP[3..0]が、”0101”となる。すなわち、”PID−F”がサーチされる。この、PE39の出力である”0101”は、アドレスHADDの第4ビットから第1ビットとされる。
Next, an operation for searching a key table of data keys based on PID information and TSC information in received data will be described with reference to FIG.
In step S20 shown in FIG. 6, it is assumed that “PID-F” is input as PID information having a 13-bit data size and “10” is input as TSC information having a 2-bit data size from the header of the received data. This “10” indicates that it is scrambled with the data key Kse.
Next, in step S21, the PID information is input to the A terminals of CP0 to CP11 and compared with the PID information stored in DF0 to DF11. As a result, a “1” signal is output from CP5, and the outputs TMP [3. . 0] becomes “0101”. That is, “PID-F” is searched. “0101”, which is the output of PE39, is changed from the fourth bit to the first bit of the address HADD.

次いで、ステップS22にてTSC情報TSC[1..0]の2ビット(”10”)がHADDの第5ビット,第6ビットとされて、6ビットサイズのアドレスHADD[8..3]が生成される。したがって、アドレスHADD[8..3]は”100101”となる。
そして、ステップS23にて、生成された”100101”のアドレスHADD[8..3]により鍵テーブルを参照すると、Ks_even Table から64ビット幅のデータ鍵Kse−Fが得られるようになる。そして、得られたデータ鍵Kse−Fに基づいて入力された暗号文の解読が解読装置Aで実行される。
このように、本発明の解読化方法では間接的にデータ鍵を検索する間接検索方法としているので、PID情報に対応する13ビット幅のテーブルを用意することなく、6ビット幅の鍵テーブルを用意すればよいのでメモリの容量を削減して小型化することができる。
Next, in step S22, the TSC information TSC [1. . 0] 2 bits (“10”) are the 5th and 6th bits of the HADD, and an address HADD [8. . 3] is generated. Therefore, the address HADD [8. . 3] becomes “100101”.
In step S23, the address HADD [8. . 3], the 64-bit data key Kse-F can be obtained from Ks_even Table. Then, the decryption apparatus A executes decryption of the ciphertext input based on the obtained data key Kse-F.
Thus, since the decryption method of the present invention uses an indirect search method for indirectly searching for a data key, a 6-bit key table is prepared without preparing a 13-bit table corresponding to PID information. Therefore, the memory capacity can be reduced and the size can be reduced.

なお、このように解読中では鍵テーブルのKs_even Table ,Ks_odd Table の一方しか使用されないため、使用していない鍵テーブルのデータ鍵を更新することができる。これは、前述したようにCPU10が実行するが、CPU10のタイミングと解読装置Aのタイミングとは非同期で動作するので、CPU10は非同期で更新するデータ鍵を書き込みに行く。
このため、鍵テーブルの格納されるデュアルポートメモリ17においては、前述したように書き込みと読み出しが同時に同一アドレスで行われる場合が生じるのである。この時のタイミング例を図9に示すが、図示するタイミングで8クロック幅の反転REが発生した場合には、この8クロック期間においては、前述したようにCPU10からの同一アドレスの書き込みが禁止される。
Since only one of the key tables Ks_even Table and Ks_odd Table is used during decryption in this way, the data key of the unused key table can be updated. This is executed by the CPU 10 as described above. Since the timing of the CPU 10 and the timing of the decryption device A operate asynchronously, the CPU 10 goes to write the data key to be updated asynchronously.
For this reason, in the dual port memory 17 in which the key table is stored, there are cases where writing and reading are simultaneously performed at the same address as described above. FIG. 9 shows an example of the timing at this time. When an inversion RE of 8 clock width occurs at the timing shown in the figure, writing of the same address from the CPU 10 is prohibited during the 8 clock period as described above. The

ところで、何らかの原因によりPIDテーブルに同一のPIDが格納されている場合が生じる。例えば、1チャンネル当り最大12種類のPID情報とされるが、12種類のPIDを必要としない場合はPIDテーブルには12種類のPIDを書き込む必要はなく、必要する種類のPIDだけを書き込むことになる。すると、書き込まれていないPIDの欄のデータが偶然PIDと同じデータになることがある。
このような場合には、誤ったデータ鍵を読み出して解読できなくなってしまう恐れがあるので、本発明においては次のようにしてこれを防止している。
By the way, there is a case where the same PID is stored in the PID table for some reason. For example, although the maximum 12 types of PID information per channel is not required, when 12 types of PID are not required, it is not necessary to write 12 types of PID in the PID table, and only the required types of PID are written. Become. Then, the data in the PID column that has not been written may accidentally become the same data as the PID.
In such a case, there is a possibility that an incorrect data key may be read and cannot be decrypted. Therefore, in the present invention, this is prevented as follows.

図7に示すようにPIDテーブルに複数の”PID−F”がある場合は、その内のアドレスHADDが小さい方を優先するようにしている。これは、アドレスHADDの小さい方からPIDテーブルに書き込みに行くので、アドレスHADDの大きい方が誤っている確率が高いからである。
これにより、PID情報として”PID−F”が入力されると、アドレスHADD[8..1]として”01000101”が得られるようになり、前述した処理と同様の処理が行われ、Ks_even Table から64ビット幅のデータ鍵Kse−Fが得られるようになる。
As shown in FIG. 7, when there are a plurality of “PID-F” in the PID table, priority is given to the smaller one of the addresses HADD. This is because writing to the PID table starts from the smaller address HADD, and the higher the address HADD is, the higher the probability of being wrong.
Thus, when “PID-F” is input as PID information, the address HADD [8. . 1] is obtained, the same processing as described above is performed, and a 64-bit data key Kse-F is obtained from the Ks_even table.

また、入力データのヘッダからのPID情報により、PIDテーブルを参照しても該当するPIDがない場合がある。例えば、図8に示すようにPID情報として”PID−F”が入力されても、PIDテーブル中には”PID−F”に該当するPIDがない。
このような場合には、鍵テーブルのKs_even Table ,Ks_odd Table のいずれも読みに行くことなく、データ鍵を読み出さない。この場合は、入力データであるTSはそのまま出力することになる。
Further, there may be no corresponding PID even if the PID table is referred to by the PID information from the header of the input data. For example, as shown in FIG. 8, even if “PID-F” is input as PID information, there is no PID corresponding to “PID-F” in the PID table.
In such a case, neither the key table Ks_even Table nor Ks_odd Table is read, and the data key is not read. In this case, the input data TS is output as it is.

次に、図1に示す解読装置Aの解読フローを図10に示すが、トランスポートストリーム(TS)が入力されると、ステップS10にてスクランブルされているか否かが判定される。この判定はスクランブルされたことを示すヘッダ中のフラグが立っているか否かを検出することにより判定される。この場合、フラグが立っている場合はスクランブルonと判定されて、ステップS11に進み、ここで所望のフラグ等の書き換えが行われる。次いで、ステップS12にてヘッダからPID情報が抽出されて、鍵テーブルが参照される。この場合の鍵テーブルは、鍵テーブル処理のステップS16にてホストインターフェース処理が行われて、ステップS17にて書き込まれた鍵テーブルが参照される。
なお、ステップS12の処理は、前記図6に示す処理である。
Next, the decoding flow of the decoding apparatus A shown in FIG. 1 is shown in FIG. 10. When a transport stream (TS) is input, it is determined in step S10 whether or not it is scrambled. This determination is made by detecting whether or not a flag in the header indicating that it is scrambled is set. In this case, if the flag is set, it is determined that the scramble is on, and the process proceeds to step S11, where a desired flag or the like is rewritten. Next, in step S12, PID information is extracted from the header, and the key table is referred to. For the key table in this case, host interface processing is performed in step S16 of the key table processing, and the key table written in step S17 is referred to.
The process of step S12 is the process shown in FIG.

以上のステップS10ないしステップS12の処理がヘッダコントロール処理である。なお、ステップS10にてスクランブルoffと判定された場合には、TSはそのまま出力される。
次いで、ステップS13にてCBCモードの解読処理が行われ、ステップS14にて解読処理される暗号文が64ビットの整数倍か否かが判定される。暗号文に端数がありNoと判定された場合は、ステップS15にて端数部分についてOFBモードの解読処理が行われ、解読処理された平文が出力される。また、ステップS14にて64ビットの整数倍と判定された場合は、解読処理された64ビットの平文が出力されるようになる。
The process from step S10 to step S12 is the header control process. If it is determined in step S10 that the scramble is off, TS is output as it is.
Next, CBC mode decryption processing is performed in step S13, and it is determined in step S14 whether or not the ciphertext to be decrypted is an integer multiple of 64 bits. If the ciphertext has a fraction and it is determined No, in step S15, the decryption processing in the OFB mode is performed on the fractional portion, and the decrypted plaintext is output. If it is determined in step S14 that the integer multiple of 64 bits, the decrypted 64-bit plain text is output.

ところで、図10に示すような解読フローの実行は、前記図18に示す解読化アルゴリズムにより実行されている。図18に示す解読化アルゴリズムは前述したとおりであるのでここでは省略するが、解読化アルゴリズム中の解読アルゴリズムおよび暗号アルゴリズムを実行する構成の詳細を図11ないし図15を参照して説明する。
図11は暗号アルゴリズムを実行する暗号処理の構成を示す。図11において、64ビット幅の入力データは、上位32ビットのデータと下位の32ビットのデータに分割されて最初の暗号8段に入力される。この暗号8段は、関数の演算を行う4段の演算段が2回繰り返された構成とされる。そして、入力された上位32ビットのデータと下位の32ビットのデータに、演算段20の初段において関数π1の演算が施される。ついで、第2段において初段の出力に関数π2の演算が施される。この場合、第2段には32ビット幅のワーク鍵K1が入力され、このワーク鍵K1を用いて第2段の演算が行われている。
By the way, the execution of the decoding flow as shown in FIG. 10 is executed by the decoding algorithm shown in FIG. The decryption algorithm shown in FIG. 18 is the same as described above, and is omitted here. Details of the configuration for executing the decryption algorithm and the encryption algorithm in the decryption algorithm will be described with reference to FIGS.
FIG. 11 shows a configuration of cryptographic processing for executing a cryptographic algorithm. In FIG. 11, 64-bit wide input data is divided into upper 32-bit data and lower 32-bit data and input to the first eight ciphers. The eight encryption stages have a configuration in which a four-stage operation stage for calculating a function is repeated twice. Then, the calculation of the function π1 is performed on the input upper 32 bits data and lower 32 bits data in the first stage of the operation stage 20. Next, in the second stage, the function π2 is calculated on the output of the first stage. In this case, a 32-bit work key K1 is input to the second stage, and the second-stage operation is performed using the work key K1.

さらに、第3段において第2段の出力に関数π3の演算が施される。この場合、第3段には32ビット幅のワーク鍵K2,K3が入力され、このワーク鍵K2,K3を用いて演算が行われている。続いて、第4段において第3段の出力に関数π4の演算が施される。この場合、第4段には32ビット幅のワーク鍵K4が入力され、このワーク鍵K4を用いて演算が行われている。
さらに残る4段の演算を行う演算段21において、演算段20からの出力に初段において関数π1の演算が施される。ついで、第2段において初段の出力に関数π2の演算が施される。この場合、第2段には32ビット幅のワーク鍵K5が入力され、このワーク鍵K5を用いて演算が行われている。
Further, the function π3 is calculated on the output of the second stage in the third stage. In this case, 32-bit work keys K2 and K3 are input to the third stage, and calculations are performed using the work keys K2 and K3. Subsequently, the function π4 is calculated on the output of the third stage in the fourth stage. In this case, a 32-bit work key K4 is input to the fourth stage, and calculation is performed using this work key K4.
Further, in the operation stage 21 that performs the remaining 4 stages of operations, the output of the operation stage 20 is subjected to the calculation of the function π1 in the first stage. Next, in the second stage, the function π2 is calculated on the output of the first stage. In this case, the work key K5 having a 32-bit width is input to the second stage, and calculation is performed using the work key K5.

さらに、第3段において第2段の出力に関数π3の演算が施される。この場合、第3段には32ビット幅のワーク鍵K6,K7が入力され、このワーク鍵K6,K7を用いて演算が行われている。続いて、第4段において第3段の出力に関数π4の演算が施される。この場合、第4段には32ビット幅のワーク鍵K8が入力され、このワーク鍵K8を用いて演算が行われている。
このようにして暗号処理の行われた上位32ビット、下位32ビットの合計64ビット幅のデータは、さらに暗号8段22に入力される。この暗号8段22において、上述した暗号8段の演算と同様の演算が施されて、上位32ビット、下位32ビットの合計64ビット幅のランダム化された出力データが得られる。
Further, the function π3 is calculated on the output of the second stage in the third stage. In this case, 32-bit work keys K6 and K7 are input to the third stage, and operations are performed using the work keys K6 and K7. Subsequently, the function π4 is calculated on the output of the third stage in the fourth stage. In this case, a work key K8 having a 32-bit width is input to the fourth stage, and calculation is performed using the work key K8.
The data having a total 64-bit width of the upper 32 bits and the lower 32 bits subjected to the encryption process in this way is further input to the cipher 8 stage 22. In the cipher 8 stage 22, the same operation as that of the above-described cipher 8 stage is performed, and randomized output data having a total of 64 bits width of upper 32 bits and lower 32 bits is obtained.

なお図示しているように、暗号8段の繰返し数は2回に限らず、所望の回数繰り返すことができる。この回数を多く繰り返すほど、出力データは高度にランダム化されて、暗号強度を強いものとすることができる。
なお、演算段の格段で行われている関数の演算は、一定の規則に従ってある文字を他の文字に置き換える換字と、文字の順序を入れ替える転置を行う演算とされている。
As shown in the figure, the number of repetitions of the eight encryption stages is not limited to two, but can be repeated as many times as desired. As the number of times is repeated, the output data is highly randomized and the encryption strength can be increased.
In addition, the calculation of the function that is performed in the operation stage is an operation that performs substitution that replaces a character with another character according to a certain rule, and transposes that replaces the order of the characters.

次に、解読アルゴリズムを実行する解読処理の構成を図12に示すが、前述した暗号処理と異なる点は、暗号処理の構成の出力側から逆に演算を行うようにしている点である。すなわち、暗号8段のうちの最初の4段の演算段23においては、上位32ビットと下位32ビットに分割された64ビット幅の暗号化されている入力データに、32ビット幅のワーク鍵K8を用いて関数π4の演算を施している。次いで、第2段目において、初段の出力データにワーク鍵K7を用いて関数π3の演算を施している。さらに、第3段目において、第2段の出力データにワーク鍵K6,K7を用いて関数π2の演算を施している。さらにまた第3段目において、第2段の出力データにワーク鍵K5を用いて関数π2の演算を施し、第4段目において、第3段の出力データに関数π1の演算を施している。   Next, FIG. 12 shows the configuration of the decryption process for executing the decryption algorithm. The difference from the encryption process described above is that the operation is performed in reverse from the output side of the structure of the encryption process. That is, in the first four operation stages 23 of the eight encryption stages, the 32-bit work key K8 is added to the 64-bit encrypted input data divided into the upper 32 bits and the lower 32 bits. Is used to calculate the function π4. Next, in the second stage, the function π3 is calculated using the work key K7 for the output data of the first stage. Further, in the third stage, the function π2 is calculated using the work keys K6 and K7 on the output data of the second stage. Furthermore, in the third stage, the function π2 is calculated using the work key K5 for the second stage output data, and in the fourth stage, the function π1 is calculated for the third stage output data.

このような4段の演算が、演算24においてワーク鍵K4〜K1を用いて同様に行われる。
さらに、上記した暗号8段の演算が縦続されている暗号8段25においても実行されて、解読化された上位32ビット、下位32ビットの計64ビット幅の出力データが得られるようになる。なお、暗号8段の繰り返し回数は、暗号処理において実行された暗号8段の繰返し回数と同じ回数とされる。
Such a four-stage calculation is similarly performed in the calculation 24 using the work keys K4 to K1.
Furthermore, the above-described 8-stage cipher operation is also executed in the 8-stage cipher 8 stage, and the decrypted upper 32 bits and lower 32 bits total 64-bit output data is obtained. It should be noted that the number of repetitions of the eight encryption steps is the same as the number of repetitions of the eight encryption steps executed in the encryption process.

次に、演算段で行われている演算の詳細を暗号処理の演算段20を例に上げて図13を参照しながらに詳細に説明する。
初段の関数π1の演算では、入力された32ビットに分割された上位ビットは、演算されることなくそのまま出力され、上位ビットと下位ビットの排他的論理和が演算されて下位ビットとして出力される。
続く、第2段の関数π2の演算では、下位32ビットのデータxにワーク鍵K1が加算されて、x+K1がまず演算される。次いで、x+K1をyとした時に、yを1ビット左巡回シフトし、その値にy−1を加算してzを得る。次に、zを4ビット左巡回シフトし、その値とzとの排他的論理和を得る。この演算結果と、上位32ビットの排他的論理和が演算されて、演算された上位32ビットのデータが出力される。この場合、下位32ビットは入力されたデータが、演算されることなくそのまま出力される。
Next, details of the calculation performed in the calculation stage will be described in detail with reference to FIG. 13 by taking the calculation stage 20 of the cryptographic process as an example.
In the calculation of the function π1 at the first stage, the input upper bits divided into 32 bits are output as they are without being calculated, and the exclusive OR of the upper bits and the lower bits are calculated and output as the lower bits. .
In the subsequent calculation of the function π2 in the second stage, the work key K1 is added to the lower-order 32-bit data x, and x + K1 is calculated first. Next, when x + K1 is y, y is cyclically shifted by 1 bit to the left, and y-1 is added to the value to obtain z. Next, z is shifted left by 4 bits, and an exclusive OR of the value and z is obtained. The operation result and the upper 32 bits exclusive OR are calculated, and the calculated upper 32 bits of data are output. In this case, in the lower 32 bits, the input data is output as it is without being calculated.

また、第3段の関数π3の演算では、上位32ビットのデータxにワーク鍵K2が加算されて、x+K2がまず演算される。次いで、x+K2をyとした時に、yを2ビット左巡回シフトし、その値にy+1を加算してzを得る。次に、zを8ビット左巡回シフトし、その値とzとの排他的論理和aを得る。
さらに、aにワーク鍵K3が加算されて、a+K3が演算される。次いで、a+K3をbとした時に、bを1ビット左巡回シフトし、その値に−bを加算してcを得る。次に、aとxのビット毎の論理和と、cを16ビット左巡回シフトした値との排他的論理和を演算する。この演算結果と、下位32ビットのデータとの排他的論理和を演算して、演算された下位32ビットのデータを出力する。なお、上位32ビットのデータは、演算されることなくそのまま上位32ビットの出力データとなる。
Further, in the calculation of the function π3 in the third stage, the work key K2 is added to the upper 32 bits of data x, and x + K2 is first calculated. Next, when x + K2 is set to y, y is cyclically shifted by 2 bits and y + 1 is added to the value to obtain z. Next, z is cyclically shifted by 8 bits to obtain an exclusive OR a between the value and z.
Further, the work key K3 is added to a, and a + K3 is calculated. Next, when a + K3 is b, b is cyclically shifted by 1 bit to the left, and -b is added to the value to obtain c. Next, an exclusive logical sum of a logical sum for each bit of a and x and a value obtained by cyclically shifting c by 16 bits is calculated. The exclusive OR of this operation result and the lower 32 bits of data is calculated, and the calculated lower 32 bits of data are output. The upper 32 bits of data become the upper 32 bits of output data without being calculated.

さらにまた、第4段の関数π4の演算では、下位32ビットのデータxにワーク鍵K4が加算されて、x+K4がまず演算される。次いで、x+K4をyとした時に、yを2ビット左巡回シフトし、その値にy+1を加算する。この演算結果と、上位32ビットの排他的論理和が演算されて、演算された上位32ビットのデータが出力される。この場合、下位32ビットのデータは演算されることなく、そのまま下位32ビットのデータとして出力される。   Furthermore, in the calculation of the function π4 in the fourth stage, the work key K4 is added to the lower-order 32-bit data x, and x + K4 is first calculated. Next, when x + K4 is set to y, y is cyclically shifted by 2 bits to the left, and y + 1 is added to the value. The operation result and the upper 32 bits exclusive OR are calculated, and the calculated upper 32 bits of data are output. In this case, the lower 32 bits of data are output as they are without being calculated.

上記演算において、ワーク鍵K1〜K4をデータに加算することにより、文字を他の文字で置き換える換字処理が行われ、データを巡回シフトさせることにより文字の位置を入れ替える転置が行われる。このように、換字と転置のアルゴリズムを行うことにより平文が暗号文に暗号化される。
また、解読化する場合には、暗号化と逆の換字と転置のアルゴリズムを行うことにより元の平文に解読することができる。
In the above calculation, by adding the work keys K1 to K4 to the data, substitution processing for replacing the character with another character is performed, and transposition for replacing the position of the character is performed by cyclically shifting the data. In this way, plain text is encrypted into cipher text by performing substitution and transposition algorithms.
In the case of decryption, the original plaintext can be decrypted by performing a substitution and transposition algorithm reverse to the encryption.

次に、上述した関数の演算を行う構成をさらに詳細に説明するが、関数π2の例を図14に上げて説明するものとする。
図14において、第1加算器Add80において、下位32ビットの入力データxと32ビットのワーク鍵K1とが加算され、加算データyが出力される。この加算データyは第1左巡回シフター81において1ビット左巡回シフトされると共に、第2加算器82において、第1左巡回シフター81の出力と加算される。この加算結果に第3加算器84において−1が加算されて、データzが演算される。このデータzは第2左巡回シフター85において4ビット左巡回シフトされると共に、排他的論理和回路86に供給される。この排他的論理和回路86には第2左巡回シフター85の出力データ、データz、上位32ビット入力データが入力され、3つのデータの排他的論理和が演算される。
この演算結果は、次段に入力される上位32ビット入力データとなる。また、下位32ビット入力データは、演算されることなく次段に入力される下位32ビット入力データとなる。
Next, a configuration for performing the above-described calculation of the function will be described in more detail. An example of the function π2 will be described with reference to FIG.
In FIG. 14, the first adder Add80 adds the lower 32 bits of the input data x and the 32 bits of the work key K1, and outputs the added data y. The added data y is shifted by 1 bit to the left in the first left cyclic shifter 81 and is added to the output of the first left cyclic shifter 81 in the second adder 82. The addition result is added with -1 by the third adder 84 to calculate the data z. The data z is 4-bit left-round shifted in the second left cyclic shifter 85 and supplied to the exclusive OR circuit 86. The exclusive OR circuit 86 receives the output data of the second left cyclic shifter 85, the data z, and the upper 32 bits of input data, and calculates the exclusive OR of the three data.
The calculation result is the upper 32 bits input data input to the next stage. The lower 32 bits input data becomes lower 32 bits input data that is input to the next stage without being calculated.

次に、64ビット幅のデータ鍵と256ビット幅のシステム鍵から256ビット幅のワーク鍵を生成する鍵スケジュール処理の構成を図15に示す。
鍵スケジュール処理は図15に示すように4段の演算段26,27が2段と、1段の演算段28が1段縦続接続された構成とされている。また、4段の演算段26,27においては、初段において関数π1の演算が行われ、2段目において関数π2の演算が行われ、3段目において関数π3の演算が行われ、4段目において関数π4の演算が行われている。
Next, FIG. 15 shows a configuration of key schedule processing for generating a 256-bit work key from a 64-bit data key and a 256-bit system key.
As shown in FIG. 15, the key schedule process has a configuration in which four operation stages 26 and 27 are connected in two stages and one operation stage 28 is connected in one cascade. In the four operation stages 26 and 27, the function π1 is calculated in the first stage, the function π2 is calculated in the second stage, and the function π3 is calculated in the third stage. The function π4 is calculated in FIG.

このような演算アルゴリズムは、前述した暗号処理のアルゴリズムと同じであるのでその説明は省略するが、鍵スケジュール処理においては、入力データが64ビットのデータ鍵とされ、それぞれ32ビットのシステム鍵J1〜J8を用いて関数π1ないし関数π4の演算が行われて、それぞれ32ビットの8つのワーク鍵K1〜K8が生成されている。ただし、全体で9段の演算を行っており、最終段において関数π1の演算を行う点で、前述した暗号処理のアルゴリズムと相違している。   Since such an arithmetic algorithm is the same as the above-described cryptographic processing algorithm, the description thereof will be omitted. However, in the key schedule processing, the input data is a 64-bit data key, and each of the 32-bit system keys J1 to J1. The functions π1 to π4 are calculated using J8, and eight 32-bit work keys K1 to K8 are generated. However, it is different from the above-described encryption processing algorithm in that the calculation of 9 stages is performed as a whole and the function π1 is calculated in the final stage.

なお、演算段26の関数π2演算後の上位32ビット出力データがワーク鍵K1として出力され、関数π3演算後の下位32ビット出力データがワーク鍵K2として出力され、関数π4演算後の上位32ビット出力データがワーク鍵K3として出力されている。
さらに、演算段27の関数π1演算後の下位32ビット出力データがワーク鍵K4として出力され、関数π2演算後の上位32ビット出力データがワーク鍵K5として出力され、関数π3演算後の上位32ビット出力データがワーク鍵K6として出力され、関数π4演算後の上位32ビット出力データがワーク鍵K7として出力され、最終段28の関数π1演算後の下位32ビット出力データがワーク鍵K8として出力されている。
The upper 32 bits output data after the calculation of the function π2 of the calculation stage 26 is output as the work key K1, the lower 32 bits of output data after the calculation of the function π3 is output as the work key K2, and the upper 32 bits after the calculation of the function π4. Output data is output as the work key K3.
Further, the lower 32-bit output data after the calculation of the function π1 in the calculation stage 27 is output as the work key K4, the upper 32-bit output data after the calculation of the function π2 is output as the work key K5, and the upper 32 bits after the calculation of the function π3. The output data is output as the work key K6, the upper 32-bit output data after the function π4 operation is output as the work key K7, and the lower 32-bit output data after the function π1 operation in the final stage 28 is output as the work key K8. Yes.

上述した、図11に示す暗号処理と図13に示す鍵スケジュール処理を参照すると、4段の演算段の構成、すなわち演算アルゴリズムは等しくされており、この4段の演算段の演算を繰り返し行うことにより、暗号処理あるいは鍵スケジュール処理を実行することができる。このことから、演算コアを図16(a)に示すように、関数π1の演算段、関数π2の演算段、関数π3の演算段、関数π4の演算段を縦続接続した構成とすれば、演算コアを繰返し実行することで、暗号処理あるいは鍵スケジュール処理を実行することができる。
なお、この演算コアは、図20に示すデータ鍵とシステム鍵からワーク鍵を生成すると共に、CBCモードおよびOFBモードで暗号処理を行っているEncryptor に相当し、Encryptor コアとされる。この場合、Encryptor コアにはデータ鍵Ks1〜Ks4とデータ鍵Ks5〜Ks8とが時分割で供給される。
Referring to the encryption process shown in FIG. 11 and the key schedule process shown in FIG. 13 described above, the configuration of the four operation stages, that is, the operation algorithm is made equal, and the operation of the four operation stages is repeated. Thus, encryption processing or key schedule processing can be executed. Therefore, if the computation core has a configuration in which the computation stage of the function π1, the computation stage of the function π2, the computation stage of the function π3, and the computation stage of the function π4 are cascaded as shown in FIG. By repeatedly executing the core, encryption processing or key schedule processing can be executed.
This computing core corresponds to an Encryptor that generates a work key from the data key and system key shown in FIG. 20 and performs encryption processing in the CBC mode and OFB mode, and is an Encryptor core. In this case, data keys Ks1 to Ks4 and data keys Ks5 to Ks8 are supplied to the Encryptor core in a time division manner.

また、図12を参照すると、4段の演算段の構成、すなわち演算アルゴリズムは等しくされており、この4段の演算段の演算を繰り返し行うことにより、解読処理を実行することができる。このことから、解読演算コアを図16(b)に示すように、関数π4の演算段、関数π3の演算段、関数π2の演算段、関数π1の演算段を縦続接続した構成とすれば、解読演算コアを繰返し実行することで、解読処理を実行することができる。
なお、この解読演算コアは、図20に示すCBCモードおよびOFBモードの解読処理を行っているDecryptor に相当し、Decryptor コアとされる。この場合、Decryptor コアにはデータ鍵Ks8〜Ks5とデータ鍵Ks4〜Ks1とが時分割で供給される。
このように、Encryptor コアを繰返し実行することにより暗号処理および鍵スケジュールのアルゴリズムを実行することができ、Decryptor コアを繰返し実行することにより解読アルゴリズムを実行することができる。
Referring to FIG. 12, the configuration of the four operation stages, that is, the operation algorithm is made equal, and the decoding process can be executed by repeatedly performing the operation of the four operation stages. Therefore, as shown in FIG. 16 (b), if the decoding operation core has a configuration in which the calculation stage of function π4, the calculation stage of function π3, the calculation stage of function π2, and the calculation stage of function π1 are cascaded, By repeatedly executing the decoding operation core, the decoding process can be executed.
Note that this decryption operation core corresponds to the Decryptor performing decryption processing in the CBC mode and OFB mode shown in FIG. 20, and is a Decryptor core. In this case, data keys Ks8 to Ks5 and data keys Ks4 to Ks1 are supplied to the Decryptor core in a time division manner.
As described above, the encryption process and the key schedule algorithm can be executed by repeatedly executing the Encryptor core, and the decryption algorithm can be executed by repeatedly executing the Decryptor core.

以上、本発明の解読化方法を実行する解読装置の説明をしたが、本発明の電子機器は、このような解読装置を少なくとも備えているチューナーやテレビジョン装置等である。
また、以上の説明では64ビットブロックの暗号文を64ビットのデータ鍵、および256ビットのシステム鍵を用いて64ビットブロックの平文を生成するものとして説明したが、本発明がこれらの数値に限定されるものではなく、任意の数値とすることができる。
さらに、本発明は上述した転置および換字を繰り返すような暗号化・解読化方式に限定されるものではなく、他の暗号化・解読化方式にも適用することができる。
Although the decryption device that executes the decryption method of the present invention has been described above, the electronic apparatus of the present invention is a tuner, a television device, or the like that includes at least such a decryption device.
In the above description, ciphertext of a 64-bit block has been described as generating a plaintext of a 64-bit block using a 64-bit data key and a 256-bit system key. However, the present invention is limited to these numerical values. It is not intended to be an arbitrary numerical value.
Furthermore, the present invention is not limited to the encryption / decryption method that repeats the above transposition and substitution, and can be applied to other encryption / decryption methods.

本発明の解読化方法の実施の形態である解読装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the decoding apparatus which is embodiment of the decoding method of this invention. 図1に示す解読装置におけるIDTの構成を示すブロック図である。It is a block diagram which shows the structure of IDT in the decoding apparatus shown in FIG. 図1に示すCPUから見た解読装置におけるレジスタのメモリ空間を示す図表である。It is a chart which shows the memory space of the register | resistor in the decoding apparatus seen from CPU shown in FIG. 図2に示すIDTの比較器CP0〜CP11の論理表を示す図表である。3 is a chart showing a logic table of comparators CP0 to CP11 of the IDT shown in FIG. 図2に示すIDTのPEの論理表を示す図表である。FIG. 3 is a diagram showing a logical table of IDT PEs shown in FIG. 2. 図1に示す解読装置において、入力データのヘッダ中の情報から間接検索方法によりデータ鍵をサーチする方法を説明するための図である。FIG. 2 is a diagram for explaining a method for searching for a data key by an indirect search method from information in a header of input data in the decryption device shown in FIG. 1. PIDテーブル中にPIDが重複している場合の動作を説明するための図である。It is a figure for demonstrating operation | movement when PID overlaps in a PID table. PIDテーブル中に該当するPIDが存在しない場合の動作を説明するための図である。It is a figure for demonstrating operation | movement when the applicable PID does not exist in a PID table. 図1に示す解読装置におけるDPMEMのリードタイミングの例を示す図である。It is a figure which shows the example of the read timing of DPMEM in the decoding apparatus shown in FIG. 図1に示す解読装置の解読フローを示すフローチャートである。It is a flowchart which shows the decoding flow of the decoding apparatus shown in FIG. 暗号処理の構成を示す図である。It is a figure which shows the structure of an encryption process. 解読処理の構成を示す図である。It is a figure which shows the structure of a decoding process. 暗号処理における基本関数の詳細を示す図である。It is a figure which shows the detail of the basic function in a cryptographic process. 基本関数中の関数π2を演算するための詳細な構成を示す図である。It is a figure which shows the detailed structure for calculating the function (pi) 2 in a basic function. 鍵スケジュール処理の構成を示す図である。It is a figure which shows the structure of a key schedule process. Encryptor コアとDecryptor コアの構成を示す図である。It is a figure which shows the structure of Encryptor core and Decryptor core. 従来の暗号化のアルゴリズムを示す図である。It is a figure which shows the algorithm of the conventional encryption. 従来の解読化のアルゴリズムを示す図である。It is a figure which shows the algorithm of the conventional decoding. CBCモードとOFBモードの暗号化利用モードの構成を示す図である。It is a figure which shows the structure of the encryption utilization mode of CBC mode and OFB mode. 従来の暗号化・解読化方式の構成を示す図である。It is a figure which shows the structure of the conventional encryption / decryption system.

符号の説明Explanation of symbols

1 受信データ、2 出力データ、3,4 切り換え手段、5 Decryptor 、6 レジスタ、7,9,86 排他的論理和回路、8 Encryptor 、10 CPU、11 比較器、12 アンドゲート、13,14 オアゲート、15 インバータ、16 IDT、17 DPMEM、20〜28 演算段、39 PE、40 ADEC、41〜52 フリップフロップ、61〜72 比較器、80,82,84 加算器、81,85 左巡回シフター 1 received data, 2 output data, 3, 4 switching means, 5 Decryptor, 6 registers, 7, 9, 86 exclusive OR circuit, 8 Encryptor, 10 CPU, 11 comparator, 12 AND gate, 13, 14 OR gate, 15 Inverter, 16 IDT, 17 DPMEM, 20-28 operation stage, 39 PE, 40 ADEC, 41-52 flip-flop, 61-72 comparator, 80, 82, 84 Adder, 81, 85 Left cyclic shifter

Claims (4)

暗号化されたデータと、該データの種類を示す情報と該データが暗号化されているか否かを示す情報とを含む送信データを受信し、前記暗号化されたデータを解読するようにした解読化方法であって、
メモリ手段に一つの前記データの種類を示す情報に対して割り当てられている、互いに異なる複数の鍵情報を書き込む書き込みステップと、
受信した前記送信データの中に含まれるデータの種類を示す情報とデータが暗号化されているか否かを示す情報により指示された鍵情報を、前記メモリ手段から読み出す読み出しステップと、
該読み出しステップで読み出された鍵情報に基づいて前記暗号化されたデータを解読する解読ステップとを含んでおり、
前記書き込みステップの実行期間と、前記読み出しステップの実行期間とが重なった場合であって、書き込みアドレスと読み出しアドレスとが一致している場合は、前記書き込みステップの実行を禁止するようにした
解読化方法。
A decryption unit that receives transmission data including encrypted data, information indicating the type of the data, and information indicating whether the data is encrypted, and decrypts the encrypted data. A method of
A writing step of writing a plurality of different pieces of key information assigned to information indicating one type of data in the memory means;
Received key information in which information and data indicating the type of data included is instructed by the information indicating whether it is encrypted in the transmission data, a reading step of reading from said memory means,
Decrypting the encrypted data based on the key information read in the reading step, and
When the execution period of the write step and the execution period of the read step overlap, and the write address and the read address match, execution of the write step is prohibited. Method.
暗号化されたデータと、該データの種類を示す情報と該データが暗号化されているか否かを示す情報とを含む送信データを受信し、前記暗号化されたデータを解読するようにした解読化方法であって、
一つの前記データの種類を示す情報に対して割り当てられている、互いに異なる複数の鍵情報を記憶しているメモリ手段から、前記受信した送信データ中のデータの種類を示す情報とデータが暗号化されているか否かを示す情報による指示データに基づいていずれかの鍵情報を読み出す読み出しステップと、
該読み出しステップで読み出された前記鍵情報に基づいて前記暗号化されたデータを解読する解読ステップとからなり、
前記読み出しステップでは、前記指示データにより前記データの種類を示す情報の鍵テーブルを参照することにより、前記メモリ手段から読み出す鍵情報をサーチしており、前記指示データのデータの種類を示す情報に該当する前記鍵情報を読み出すための鍵アドレスが、前記鍵テーブルに2つ以上存在する場合は、最も小さい鍵アドレスを選択する
解読化方法。
A decryption unit that receives transmission data including encrypted data, information indicating the type of the data, and information indicating whether the data is encrypted, and decrypts the encrypted data. A method of
The information and data indicating the data type in the received transmission data are encrypted from the memory means storing a plurality of different key information assigned to the information indicating the one data type . A reading step of reading any key information based on instruction data by information indicating whether or not
A decrypting step for decrypting the encrypted data based on the key information read in the reading step,
In the reading step, key information to be read from the memory means is searched by referring to a key table of information indicating the data type by the instruction data, and corresponds to information indicating the data type of the instruction data A decryption method for selecting the smallest key address when there are two or more key addresses for reading the key information in the key table.
暗号化されたデータと、該データの種類を示す情報と該データが暗号化されているか否かを示す情報とを含む送信データを受信し、前記暗号化されたデータを解読するようにした解読化方法であって、
一つの前記データの種類を示す情報に対して割り当てられている、互いに異なる複数の鍵情報を記憶しているメモリ手段から、前記受信した送信データ中のデータの種類を示す情報とデータが暗号化されているか否かを示す情報による指示データに基づいていずれかの鍵情報を読み出す読み出しステップと、
該読み出しステップで読み出された前記鍵情報に基づいて前記暗号化されたデータを解読する解読ステップとからなり、
前記読み出しステップでは、前記指示データにより前記データの種類を示す情報の鍵テーブルを参照することにより、前記メモリ手段から読み出す鍵情報の鍵アドレスをサーチしており、前記指示データのデータの種類を示す情報により参照される鍵アドレスが前記データの種類を示す情報の鍵テーブルに存在していない場合は、鍵アドレスのサーチを行わないようにした
解読化方法。
A decryption unit that receives transmission data including encrypted data, information indicating the type of the data, and information indicating whether the data is encrypted, and decrypts the encrypted data. A method of
The information and data indicating the data type in the received transmission data are encrypted from the memory means storing a plurality of different key information assigned to the information indicating the one data type . A reading step of reading any key information based on instruction data by information indicating whether or not
A decrypting step for decrypting the encrypted data based on the key information read in the reading step,
In the reading step, the key address of the key information read from the memory means is searched by referring to a key table of information indicating the data type by the instruction data , and the data type of the instruction data is indicated. If the key addresses referenced by the information does not exist in the key table of information indicating the type of the data, decrypting method is not performed search key address.
暗号化されたデータと、該データの種類を示す情報と該データが暗号化されているか否かを示す情報とを含む送信データを受信し、前記暗号化されたデータを解読するようにした解読化方法であって、
初期設定を行う初期ステップと、
メモリ手段に一つの前記データの種類を示す情報に対して割り当てられている、互いに異なる複数の鍵情報を書き込む書き込みステップと、
前記メモリ手段から、前記受信した送信データ中のデータの種類を示す情報とデータが暗号化されているか否かを示す情報による指示データに基づいていずれかの鍵情報を読み出す読み出しステップと、
該読み出しステップで読み出された前記鍵情報に基づいて前記暗号化されたデータを解読する解読ステップとからなり、
前記読み出しステップでは、前記指示データによりデータの種類を示す情報の鍵テーブルを参照することにより、前記メモリ手段から読み出す鍵情報の鍵アドレスをサーチしており、初期化期間内においては、サーチした結果、該当する鍵アドレスがないように、前記初期ステップにおいて初期処理される
解読化方法。
A decryption unit that receives transmission data including encrypted data, information indicating the type of the data, and information indicating whether the data is encrypted, and decrypts the encrypted data. A method of
An initial step for initial settings;
A writing step of writing a plurality of different pieces of key information assigned to information indicating one type of data in the memory means;
A step of reading out any key information from the memory means based on information indicating the type of data in the received transmission data and instruction data based on information indicating whether the data is encrypted ;
A decrypting step for decrypting the encrypted data based on the key information read in the reading step,
In the reading step, the key address of the key information to be read from the memory means is searched by referring to a key table of information indicating the type of data by the instruction data, and the search result is within the initialization period. The decryption method is initially processed in the initial step so that there is no corresponding key address.
JP2005235212A 2005-08-15 2005-08-15 Decryption method Expired - Fee Related JP4708914B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005235212A JP4708914B2 (en) 2005-08-15 2005-08-15 Decryption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005235212A JP4708914B2 (en) 2005-08-15 2005-08-15 Decryption method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP03909996A Division JP3769804B2 (en) 1996-02-02 1996-02-02 Decoding method and electronic device

Publications (2)

Publication Number Publication Date
JP2005341625A JP2005341625A (en) 2005-12-08
JP4708914B2 true JP4708914B2 (en) 2011-06-22

Family

ID=35494581

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005235212A Expired - Fee Related JP4708914B2 (en) 2005-08-15 2005-08-15 Decryption method

Country Status (1)

Country Link
JP (1) JP4708914B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11838402B2 (en) 2019-03-13 2023-12-05 The Research Foundation For The State University Of New York Ultra low power core for lightweight encryption

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11838402B2 (en) 2019-03-13 2023-12-05 The Research Foundation For The State University Of New York Ultra low power core for lightweight encryption

Also Published As

Publication number Publication date
JP2005341625A (en) 2005-12-08

Similar Documents

Publication Publication Date Title
US10171231B2 (en) Flexible architecture and instruction for advanced encryption standard (AES)
US8346839B2 (en) Efficient advanced encryption standard (AES) datapath using hybrid rijndael S-box
US8391475B2 (en) Method and apparatus for advanced encryption standard (AES) block cipher
US8913740B2 (en) Method and apparatus for generating an Advanced Encryption Standard (AES) key schedule
WO2008083365A1 (en) Architecture and instruction set for implementing advanced encryption standard (aes)
JP3769804B2 (en) Decoding method and electronic device
JP4708914B2 (en) Decryption method
JP2002297031A (en) Method/device for decoding and method/device for receiving digital broadcasting using the decoding method/ device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090210

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090410

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090805

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091026

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20091112

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20091218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101007

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110317

LAPS Cancellation because of no payment of annual fees