JP6094255B2 - Cryptographic processing apparatus and information processing apparatus - Google Patents

Cryptographic processing apparatus and information processing apparatus Download PDF

Info

Publication number
JP6094255B2
JP6094255B2 JP2013032862A JP2013032862A JP6094255B2 JP 6094255 B2 JP6094255 B2 JP 6094255B2 JP 2013032862 A JP2013032862 A JP 2013032862A JP 2013032862 A JP2013032862 A JP 2013032862A JP 6094255 B2 JP6094255 B2 JP 6094255B2
Authority
JP
Japan
Prior art keywords
data
encryption
random number
unit
code data
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
JP2013032862A
Other languages
Japanese (ja)
Other versions
JP2014165570A (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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2013032862A priority Critical patent/JP6094255B2/en
Publication of JP2014165570A publication Critical patent/JP2014165570A/en
Application granted granted Critical
Publication of JP6094255B2 publication Critical patent/JP6094255B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、入力した元データに対して暗号化もしくは復号のための暗号処理を行い、処理済データを出力する暗号処理装置およびこれを用いた情報処理装置に関する。   The present invention relates to an encryption processing apparatus that performs encryption processing for encryption or decryption on input original data and outputs processed data, and an information processing apparatus using the same.

現代社会では、パソコン、スマートフォン、電子タブレット、ICカードなど、様々な情報処理装置が社会生活に欠かせない電子機器として普及している。このように、社会生活に組み込まれて利用される情報処理装置には、セキュリティを確保する上で、暗号処理が欠かせない機能となってきており、多くの情報処理装置には暗号処理機能が組み込まれている。   In the modern society, various information processing devices such as personal computers, smartphones, electronic tablets, and IC cards are widely used as electronic devices indispensable for social life. In this way, information processing devices incorporated and used in social life have become an indispensable function for ensuring security, and many information processing devices have an encryption processing function. It has been incorporated.

多くの情報処理装置は、基本的に、コンピュータプログラムを実行することにより所望の情報処理を実行する装置であり、この情報処理装置に組み込まれた暗号処理装置の機能も、コンピュータプログラムによって実現される。一般的な情報処理装置では、その本来の機能を果たすためのメインプログラムとは別に、暗号処理装置としての機能を果たすための暗号処理サブルーチンが組み込まれており、メインプログラムの実行上、暗号処理が必要になったときに、適宜、暗号処理サブルーチンを呼び出して暗号処理を依頼する形式が採られる。   Many information processing apparatuses basically execute desired information processing by executing a computer program, and the functions of the cryptographic processing apparatus incorporated in the information processing apparatus are also realized by the computer program. . A general information processing apparatus incorporates a cryptographic processing subroutine for performing a function as a cryptographic processing apparatus separately from a main program for performing its original function. When necessary, a format is adopted in which an encryption processing subroutine is called to request encryption processing.

たとえば、メインプログラムにおいて暗号化を行う必要が生じた場合には、メインプログラムから暗号処理サブルーチンに平文データを引き渡し、暗号処理サブルーチンにおいて、当該平文データを暗号データに変換する処理を行い、得られた暗号データをメインプログラムに引き渡す処理が行われる。また、メインプログラムにおいて復号を行う必要が生じた場合には、メインプログラムから暗号処理サブルーチンに暗号データを引き渡し、暗号処理サブルーチンにおいて、当該暗号データを元の平文データに変換する処理を行い、得られた平文データをメインプログラムに引き渡す処理が行われる。   For example, when it is necessary to perform encryption in the main program, the plain text data is transferred from the main program to the encryption processing subroutine, and the encryption processing subroutine converts the plain text data into encryption data. Processing to deliver the encrypted data to the main program is performed. When it is necessary to perform decryption in the main program, the encrypted data is transferred from the main program to the encryption processing subroutine, and the encryption processing subroutine converts the encryption data into the original plaintext data. Processing to transfer the plain text data to the main program is performed.

暗号の秘密性を維持するためには、暗号処理サブルーチン内で実行される処理を秘密に保つ必要がある。このため、暗号処理サブルーチン内では、固有の秘密暗号アルゴリズムが採用され、かつ、固有の暗号鍵を用いた暗号処理が実行される。したがって、どのような暗号鍵を用いてどのようなアルゴリズムで暗号処理が行われたかが秘匿されている限り、暗号の秘密性は維持されることになる。   In order to maintain the confidentiality of encryption, it is necessary to keep the processing executed in the encryption processing subroutine secret. For this reason, a unique secret encryption algorithm is adopted in the encryption processing subroutine, and encryption processing using a unique encryption key is executed. Therefore, as long as the encryption key and the algorithm used to perform the encryption process are kept secret, the confidentiality of the encryption is maintained.

任意の暗号鍵を用いた暗号処理を行うには、メインプログラムから暗号処理サブルーチンに対して、処理対象となる元データとともに暗号鍵を引き渡し、暗号処理サブルーチンでは、当該暗号鍵を用いた暗号処理を実施し、処理済データをメインプログラムへ戻す処理を行うことになるが、この際、暗号鍵の秘密性が維持されるような配慮が必要になる。すなわち、クラッカーの不正行為により、暗号処理に用いられた暗号鍵が漏洩してしまうと、暗号処理サブルーチン内で実行された暗号処理の内容が解析されるおそれがあり、暗号処理装置の耐タンパ性が損なわれることになる。   In order to perform encryption processing using an arbitrary encryption key, the encryption key is transferred from the main program to the encryption processing subroutine together with the original data to be processed, and the encryption processing subroutine performs encryption processing using the encryption key. In this case, processing for returning processed data to the main program is performed. At this time, consideration must be given to maintaining the confidentiality of the encryption key. That is, if the cryptographic key used for cryptographic processing is leaked due to an illegal act of a cracker, the content of the cryptographic processing executed in the cryptographic processing subroutine may be analyzed, and the tamper resistance of the cryptographic processing device Will be damaged.

そこで、たとえば、下記の特許文献1には、移動体通信端末などの通信機器において暗号処理を実行する際に、必要となる暗号鍵を当該通信機器の内部に格納する代わりに、メモリモジュールを組み込んだ指輪に格納しておき、暗号処理が必要なときには、この指輪から暗号鍵を読み出して利用する技術が開示されている。この技術を採用すれば、通信機器が盗難にあったとしても、一緒に指輪が盗まれない限り、暗号鍵が漏洩することはなく、耐タンパ性を確保することができる。   Therefore, for example, in Patent Document 1 below, a memory module is incorporated instead of storing an encryption key required when performing encryption processing in a communication device such as a mobile communication terminal. A technique is disclosed in which an encryption key is stored in a ring and an encryption key is read from the ring when encryption processing is necessary. If this technology is adopted, even if the communication device is stolen, the encryption key will not leak and the tamper resistance can be ensured unless the ring is stolen together.

一方、特許文献2には、移動体通信端末などの通信機器において暗号処理を実行する際に、必要となる暗号鍵を外部の管理サーバからダウンロードするようにし、一定時間が経過したときに、当該情報処理装置内から暗号鍵を消去することにより、暗号鍵の漏洩を防ぎ、耐タンパ性を確保する技術が開示されている。また、特許文献3には、暗号鍵を複数に分割し、一方の分割暗号鍵を情報処理装置内に格納しておき、他方の分割暗号鍵を外部の管理サーバに格納しておき、暗号処理に必要な時点で、管理サーバから他方の分割暗号鍵をダウンロードして、元の暗号鍵を復元する方法が提案されている。   On the other hand, in Patent Document 2, when performing encryption processing in a communication device such as a mobile communication terminal, a necessary encryption key is downloaded from an external management server. A technique for preventing leakage of an encryption key and ensuring tamper resistance by erasing the encryption key from the information processing apparatus is disclosed. In Patent Document 3, the encryption key is divided into a plurality of pieces, one of the divided encryption keys is stored in the information processing apparatus, and the other divided encryption key is stored in an external management server. A method has been proposed in which the other divided encryption key is downloaded from the management server and the original encryption key is restored when it is necessary.

特開2000−68997号公報JP 2000-68997 A 特開2011−77740号公報JP 2011-77740 A 特開2012−65123号公報JP2012-65123A

上述したとおり、暗号処理機能を備えた情報処理装置において、暗号処理に利用する暗号鍵を当該装置の内部に格納しておくと、クラッカーの不正行為により暗号鍵が漏洩する可能性があり、耐タンパ性を損なう要因になる。そこで、前掲の特許文献1では、メモリモジュールを組み込んだ指輪に暗号鍵を格納しておく方法が提案されているが、ユーザは、通信機器を利用する際に常に指輪を携行する必要があり、実用上、利用の便宜性は著しく低下してしまう。   As described above, in an information processing apparatus having an encryption processing function, if an encryption key used for encryption processing is stored inside the apparatus, the encryption key may be leaked due to an illegal act of a cracker. It becomes a factor that impairs tampering. Therefore, in Patent Document 1 described above, a method of storing an encryption key in a ring incorporating a memory module is proposed, but the user must always carry the ring when using a communication device. In practical use, convenience of use is significantly reduced.

一方、前掲の特許文献2,3には、暗号鍵もしくはその一部の部分暗号鍵を、外部の管理サーバからダウンロードして入手する方法が提案されており、この方法を採用すれば、情報処理装置から暗号鍵が直接的に盗まれてしまうことを防止することはできるが、クラッカーは、ダウンロード経路から間接的に暗号鍵を盗み取ることが可能であり、また、情報処理装置自体を入手したクラッカーは、管理サーバからダウンロードした上で暗号鍵を盗み取ることもできるので、十分な耐タンパ性を確保することができない。   On the other hand, Patent Documents 2 and 3 listed above propose a method of downloading an encryption key or a partial encryption key thereof from an external management server, and if this method is adopted, information processing will be performed. Although it is possible to prevent the encryption key from being stolen directly from the device, the cracker can indirectly steal the encryption key from the download path, and the information processing device itself has been obtained. Since the cracker can also steal the encryption key after downloading from the management server, it cannot secure sufficient tamper resistance.

そこで本発明は、暗号鍵を用いた暗号処理を実行する際に、利便性を損なうことなしに、耐タンパ性を確保することが可能な暗号処理装置およびこれを組み込んだ情報処理装置を提供することを目的とする。   Accordingly, the present invention provides an encryption processing apparatus capable of ensuring tamper resistance without impairing convenience when executing encryption processing using an encryption key, and an information processing apparatus incorporating the encryption processing apparatus. For the purpose.

(1) 本発明の第1の態様は、入力した元データに対して暗号化もしくは復号のための暗号処理を行い、処理済データを出力する暗号処理装置において、
暗号処理の対象となる元データと暗号処理に必要な符号データとを外部から入力するデータ入力部と、
所定の暗号鍵を用いた所定の暗号アルゴリズムに基づいて、データ入力部が入力した元データに対して暗号処理を実施し、処理済データを生成する暗号処理部と、
生成された処理済データを外部に出力するデータ出力部と、
それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値を収容した乱数テーブルを格納する乱数テーブル格納部と、
乱数テーブルを参照することにより、データ入力部が入力した符号データに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、当該変換処理を経て得られるデータを暗号鍵として暗号処理部に与える符号変換部と、
を設けるようにしたものである。
(1) A first aspect of the present invention is an encryption processing apparatus that performs encryption processing for encryption or decryption on input original data and outputs processed data.
A data input unit for inputting the original data to be encrypted and the code data necessary for the encryption from the outside;
Based on a predetermined encryption algorithm using a predetermined encryption key, an encryption processing unit that performs encryption processing on the original data input by the data input unit and generates processed data;
A data output unit for outputting the generated processed data to the outside;
A random number table storage unit for storing a random number table containing N (M ≧ N) numerical values randomly in a plurality of M cells each having a unique cell number;
By referring to the random number table, a conversion process is performed in which each numeric value included in the code data input by the data input unit is replaced with a numeric value stored in a cell having the numeric value as the cell number. A code conversion unit that gives the obtained data to the encryption processing unit as an encryption key;
Is provided.

(2) 本発明の第2の態様は、上述した第1の態様に係る暗号処理装置において、
暗号処理部が、0〜(N−1)の範囲の値をもった整数を羅列した暗号鍵を用いて暗号処理を行い、
乱数テーブル格納部が、0〜(M−1)の範囲の連続したセル番号が付与された複数M個のセルに、0〜(N−1)の範囲の連続するN通りの整数を重複を許してランダムに収容した乱数テーブルを格納しており、
符号変換部が、0〜(M−1)の範囲の値をもった整数を羅列した符号データを、0〜(N−1)の範囲の値をもった整数を羅列した暗号鍵に置き換える変換処理を行うようにしたものである。
(2) According to a second aspect of the present invention, in the cryptographic processing device according to the first aspect described above,
The cryptographic processing unit performs cryptographic processing using an encryption key in which integers having values in the range of 0 to (N−1) are enumerated;
The random number table storage unit overlaps a plurality of M cells assigned consecutive cell numbers in the range of 0 to (M−1) with N consecutive integers in the range of 0 to (N−1). Stores a random number table that allows and accommodates randomly,
Conversion in which the code conversion unit replaces code data in which integers having values in the range of 0 to (M-1) are listed with encryption keys in which integers having values in the range of 0 to (N-1) are listed. Processing is performed.

(3) 本発明の第3の態様は、上述した第2の態様に係る暗号処理装置において、
M=Nに設定し、
乱数テーブル格納部に、N個のセルにN通りの整数をそれぞれ1個ずつ収容した乱数テーブルを格納するようにしたものである。
(3) According to a third aspect of the present invention, in the cryptographic processing device according to the second aspect described above,
Set M = N,
In the random number table storage unit, a random number table storing N integers in N cells is stored.

(4) 本発明の第4の態様は、上述した第3の態様に係る暗号処理装置において、
M=N=256に設定し、
乱数テーブル格納部が、0〜255の連続セル番号が付与された256個のセルに、0〜255の整数をそれぞれ1個ずつランダムに収容した乱数テーブルを格納しており、
符号変換部が、1バイトのデータをL個羅列したLバイトの符号データを、個々のバイトごとに置換して、1バイトのデータをL個羅列したLバイトの暗号鍵に置き換える変換処理を行い、
暗号処理部が、Lバイトの暗号鍵を用いて暗号処理を行うようにしたものである。
(4) According to a fourth aspect of the present invention, in the cryptographic processing device according to the third aspect described above,
Set M = N = 256,
The random number table storage unit stores a random number table in which 256 integers each assigned with a continuous cell number from 0 to 255 are randomly stored, each having an integer from 0 to 255,
The code conversion unit performs conversion processing in which L bytes of code data obtained by arranging L bytes of 1-byte data are replaced for each individual byte, and 1 byte of data is replaced by L bytes of encryption keys. ,
The cryptographic processing unit performs cryptographic processing using an L-byte cryptographic key.

(5) 本発明の第5の態様は、上述した第2の態様に係る暗号処理装置において、
M>Nに設定し、
乱数テーブル格納部が、M個のセルにN通りの整数がそれぞれ少なくとも1個ずつ収容され、一部のセルには他のセルと同一の整数が重複して収容されている乱数テーブルを格納しているようにしたものである。
(5) According to a fifth aspect of the present invention, in the cryptographic processing device according to the second aspect described above,
Set M> N,
The random number table storage unit stores a random number table in which at least one of N kinds of integers is accommodated in each of M cells, and some of the same integers as other cells are accommodated in some cells. It is what you have done.

(6) 本発明の第6の態様は、上述した第5の態様に係る暗号処理装置において、
N=256、M>256に設定し、
乱数テーブル格納部が、0〜(M−1)の連続セル番号が付与されたM個のセルに、0〜255の整数をそれぞれ少なくとも1個ずつランダムに収容した乱数テーブルを格納しており、
符号変換部が、所定ビット長のデータをL個羅列した符号データを、個々のデータごとに置換して、1バイトのデータをL個羅列したLバイトの暗号鍵に置き換える変換処理を行い、
暗号処理部が、Lバイトの暗号鍵を用いて暗号処理を行うようにしたものである。
(6) According to a sixth aspect of the present invention, in the cryptographic processing device according to the fifth aspect described above,
Set N = 256, M> 256,
The random number table storage unit stores a random number table in which at least one integer of 0 to 255 is randomly stored in M cells to which consecutive cell numbers of 0 to (M−1) are assigned,
The code conversion unit performs a conversion process of replacing the code data obtained by enumerating L pieces of data having a predetermined bit length for each piece of data, and replacing the 1-byte data with L pieces of L-byte encryption keys,
The cryptographic processing unit performs cryptographic processing using an L-byte cryptographic key.

(7) 本発明の第7の態様は、上述した第1〜第6の態様に係る暗号処理装置において、
乱数テーブル格納部が、複数K通りの乱数テーブルを格納しており、
データ入力部が、元データおよび符号データとともに、特定の乱数テーブルを指定するテーブル指定子を外部から入力し、
符号変換部が、テーブル指定子で指定された乱数テーブルを参照することにより変換処理を行うようにしたものである。
(7) According to a seventh aspect of the present invention, in the cryptographic processing device according to the first to sixth aspects described above,
The random number table storage unit stores a plurality of K random number tables,
The data input unit inputs a table designator for specifying a specific random number table from the outside together with the original data and the code data,
The code conversion unit performs the conversion process by referring to the random number table specified by the table designator.

(8) 本発明の第8の態様は、上述した第7の態様に係る暗号処理装置において、
データ入力部が、元データと、1バイトのデータをL個羅列したLバイトの符号データと、このLバイトの符号データを構成する個々のバイトごとに、もしくは、複数バイトからなる個々のバイト群ごとに、それぞれ特定の乱数テーブルを指定する固有のテーブル指定子と、を外部から入力し、
符号変換部が、符号データの個々のバイトごとに、もしくは、複数バイトからなる個々のバイト群ごとに、それぞれ固有のテーブル指定子で指定された乱数テーブルを参照することにより変換処理を行うようにしたものである。
(8) According to an eighth aspect of the present invention, in the cryptographic processing device according to the seventh aspect described above,
The data input unit includes original data, L-byte code data obtained by arranging L 1-byte data, and each byte constituting the L-byte code data, or each byte group including a plurality of bytes. For each, a unique table designator that specifies a specific random number table is entered from the outside,
The code conversion unit performs the conversion process by referring to the random number table specified by the unique table designator for each byte of the code data or for each byte group consisting of a plurality of bytes. It is a thing.

(9) 本発明の第9の態様は、上述した第1〜第6の態様に係る暗号処理装置において、
乱数テーブル格納部が、複数K通りの乱数テーブルを格納しており、
符号変換部が、このK通りの乱数テーブルを所定の規則で順次指定するテーブル指定パターンを複数通り記憶しており、
データ入力部が、元データと、1バイトのデータをL個羅列したLバイトの符号データと、特定のテーブル指定パターンを選択するパターン選択子と、を外部から入力し、
符号変換部が、パターン選択子によって選択されたテーブル指定パターンに基づいて、符号データの個々のバイトごとに乱数テーブルを指定し、指定された乱数テーブルを参照することにより変換処理を行うようにしたものである。
(9) According to a ninth aspect of the present invention, in the cryptographic processing device according to the first to sixth aspects described above,
The random number table storage unit stores a plurality of K random number tables,
The code conversion unit stores a plurality of table designation patterns for sequentially designating the K random number tables according to a predetermined rule,
The data input unit externally inputs the original data, L-byte code data obtained by arranging L 1-byte data, and a pattern selector for selecting a specific table designating pattern,
The code conversion unit specifies a random number table for each byte of code data based on the table specification pattern selected by the pattern selector, and performs conversion processing by referring to the specified random number table Is.

(10) 本発明の第10の態様は、上述した第1〜第9の態様に係る暗号処理装置において、
データ入力部が、元データおよび符号データとともに、乱数テーブルの各セル内の数値をシフトさせる規則を示すシフト指示子を外部から入力し、
符号変換部が、乱数テーブル内の各数値をシフト指示子によって示される規則に基づいてシフトさせ、シフト後の数値を用いて変換処理を行うようにしたものである。
(10) According to a tenth aspect of the present invention, in the cryptographic processing device according to the first to ninth aspects described above,
The data input unit inputs a shift indicator indicating the rule for shifting the numerical value in each cell of the random number table together with the original data and the code data from the outside,
The code conversion unit shifts each numerical value in the random number table based on the rule indicated by the shift indicator, and performs conversion processing using the shifted numerical value.

(11) 本発明の第11の態様は、上述した第10の態様に係る暗号処理装置において、
データ入力部が、正もしくは負のいずれかのシフト方向とシフト量dとを示すシフト指示子を入力し、
符号変換部が、シフト方向が正の場合には、乱数テーブルの第i番目のセル番号をもつセル内の数値を第(i+d)番目のセル番号をもつセルにシフトさせ、シフト方向が負の場合には、乱数テーブルの第i番目のセル番号をもつセル内の数値を第(i−d)番目のセル番号をもつセルにシフトさせるシフト処理(但し、シフト後のセルが、セル番号の範囲から外れる場合には、シフト後のセル番号にセルの総数Mを加算もしくは減算してセル番号の範囲内となるようにする処理)を行うようにしたものである。
(11) According to an eleventh aspect of the present invention, in the cryptographic processing device according to the tenth aspect described above,
The data input unit inputs a shift indicator indicating either a positive or negative shift direction and a shift amount d,
When the sign conversion unit has a positive shift direction, the numerical value in the cell having the i-th cell number in the random number table is shifted to the cell having the (i + d) -th cell number, and the shift direction is negative. In this case, a shift process for shifting the numerical value in the cell having the i-th cell number in the random number table to the cell having the (id) cell number (however, the cell after the shift has the cell number If the cell number is out of the range, the total cell number M is added to or subtracted from the shifted cell number so as to be within the cell number range.

(12) 本発明の第12の態様は、上述した第10の態様に係る暗号処理装置において、
乱数テーブル格納部に、複数K通りの乱数テーブルを格納しておき、
データ入力部が、元データおよび符号データとともに、特定の乱数テーブルを指定するテーブル指定子と、複数の乱数テーブルを跨いでシフトさせる規則を示すシフト指示子と、を外部から入力し、
符号変換部が、シフト指示子によって示される規則に基づくシフト処理を行い、当該シフト処理後に、テーブル指定子で指定された乱数テーブルを参照することにより変換処理を行うようにしたものである。
(12) According to a twelfth aspect of the present invention, in the cryptographic processing device according to the tenth aspect described above,
The random number table storage unit stores a plurality of K random number tables,
The data input unit inputs from the outside a table designator that designates a specific random number table together with the original data and code data, and a shift indicator that indicates a rule for shifting across a plurality of random number tables,
The code conversion unit performs a shift process based on the rule indicated by the shift indicator, and performs the conversion process by referring to the random number table specified by the table specifier after the shift process.

(13) 本発明の第13の態様は、上述した第1〜第12の態様に係る暗号処理装置において、
符号変換部が、データ入力部が入力した符号データに含まれる個々の数値を所定の並び替え規則に従って並び替え、並び替え後の数値を用いて乱数テーブルを参照することにより変換処理を行い、変換後のデータを暗号鍵として暗号処理部に与えるようにしたものである。
(13) According to a thirteenth aspect of the present invention, in the cryptographic processing device according to the first to twelfth aspects described above,
The code conversion unit rearranges individual numerical values included in the code data input by the data input unit according to a predetermined sorting rule, performs conversion processing by referring to the random number table using the rearranged numerical values, and performs conversion The later data is given to the encryption processing unit as an encryption key.

(14) 本発明の第14の態様は、上述した第1〜第12の態様に係る暗号処理装置において、
符号変換部が、乱数テーブルを参照して置き換える変換処理により変換後のデータを得た後、当該変換後のデータに含まれる個々の数値を所定の並び替え規則に従って並び替え、並び替え後のデータを暗号鍵として暗号処理部に与えるようにしたものである。
(14) According to a fourteenth aspect of the present invention, in the cryptographic processing device according to the first to twelfth aspects described above,
After the code conversion unit obtains data after conversion by conversion processing with reference to the random number table, the numerical values included in the converted data are rearranged according to a predetermined rearrangement rule, and the rearranged data Is given to the encryption processing unit as an encryption key.

(15) 本発明の第15の態様は、上述した第1〜第14の態様に係る暗号処理装置において、
暗号処理部が複数通りの暗号アルゴリズムの中の任意の暗号アルゴリズムを用いて暗号処理を実施する機能を有し、
データ入力部が、複数通りの暗号アルゴリズムの中の1つを指定するアルゴリズム指定子を入力し、
暗号処理部がアルゴリズム指定子によって指定された暗号アルゴリズムを用いて暗号処理を実施するようにしたものである。
(15) According to a fifteenth aspect of the present invention, in the cryptographic processing device according to the first to fourteenth aspects described above,
The cryptographic processing unit has a function of performing cryptographic processing using an arbitrary cryptographic algorithm among a plurality of cryptographic algorithms,
The data input unit inputs an algorithm specifier that specifies one of a plurality of cryptographic algorithms,
The cryptographic processing unit performs cryptographic processing using the cryptographic algorithm specified by the algorithm specifier.

(16) 本発明の第16の態様は、上述した第1〜第15の態様に係る暗号処理装置において、
所定の方法で暗号化された暗号化符号データを復号して、元の符号データを得る符号データ復号部を更に設け、
データ入力部が、暗号化符号データを外部から入力し、
符号データ復号部が、データ入力部が入力した暗号化符号データを復号し、復号された符号データを符号変換部に与え、
符号変換部が、復号された符号データを暗号鍵に変換する変換処理を行うようにしたものである。
(16) According to a sixteenth aspect of the present invention, in the cryptographic processing device according to the first to fifteenth aspects described above,
A code data decoding unit for decoding the encrypted code data encrypted by a predetermined method and obtaining the original code data;
The data input unit inputs the encrypted code data from the outside,
The code data decoding unit decodes the encrypted code data input by the data input unit, and provides the decoded code data to the code conversion unit.
The code conversion unit performs a conversion process for converting the decrypted code data into an encryption key.

(17) 本発明の第17の態様は、上述した第16の態様に係る暗号処理装置において、
符号データ復号部が複数H通りの復号鍵を記憶しており、
データ入力部が、この複数H通りの復号鍵のうちの第i番目の復号鍵を用いて復号が可能な状態で暗号化された暗号化符号データと、第i番目の復号鍵を指定する復号鍵指定子と、を外部から入力し、
符号データ復号部が、復号鍵指定子で指定された復号鍵を用いた復号を行うようにしたものである。
(17) According to a seventeenth aspect of the present invention, in the cryptographic processing device according to the sixteenth aspect described above,
The code data decryption unit stores a plurality of H kinds of decryption keys,
The data input unit designates the encrypted code data encrypted in a state where the decryption is possible using the i-th decryption key of the plurality of H types of decryption keys, and the i-th decryption key Input the key specifier from the outside,
The code data decryption unit performs decryption using the decryption key designated by the decryption key specifier.

(18) 本発明の第18の態様は、上述した第17の態様に係る暗号処理装置において、
符号データ復号部が、公開鍵暗号方式に利用可能な公開鍵および秘密鍵を構成する複数H組の鍵ペアーのそれぞれについて、公開鍵および秘密鍵のうちの一方の鍵を記憶しており、
データ入力部が、このH組の鍵ペアーのうちの第i番目の鍵ペアーについての他方の鍵を用いて暗号化された暗号化符号データと、第i番目の鍵ペアーを指定する復号鍵指定子と、を外部から入力し、
符号データ復号部が、復号鍵指定子で指定された鍵ペアーについての上記一方の鍵を復号鍵として用いた復号を行うようにしたものである。
(18) According to an eighteenth aspect of the present invention, in the cryptographic processing device according to the seventeenth aspect described above,
The code data decryption unit stores one of the public key and the private key for each of a plurality of H pairs of public keys and private keys that can be used in the public key cryptosystem;
The data input unit designates the encrypted code data encrypted using the other key of the i-th key pair of the H key pairs and the decryption key designation for designating the i-th key pair Child and input from the outside,
The code data decryption unit performs decryption using the one key as a decryption key for the key pair designated by the decryption key specifier.

(19) 本発明の第19の態様は、上述した第1〜第15の態様に係る暗号処理装置と、この暗号処理装置に暗号処理を依頼する主装置と、によって情報処理装置を構成し、
主装置には、
所定の情報処理を実行する情報処理部と、
情報処理部から引き渡された元データと、予め記憶されていたもしくは外部から受け取った符号データと、必要に応じて、更に、テーブル指定子、パターン選択子、シフト指示子、アルゴリズム指示子の群の中から選択された1つもしくは複数の項目を、暗号処理装置のデータ入力部に与える暗号処理依頼部と、
暗号処理装置のデータ出力部から出力された処理済データを受け取り、情報処理部に引き渡す暗号処理結果受信部と、
を設けるようにしたものである。
(19) According to a nineteenth aspect of the present invention, an information processing apparatus includes the cryptographic processing apparatus according to the first to fifteenth aspects described above, and a main apparatus that requests the cryptographic processing apparatus to perform cryptographic processing,
In the main unit,
An information processing unit for executing predetermined information processing;
The original data delivered from the information processing unit, code data stored in advance or received from the outside, and, if necessary, a table specifier, pattern selector, shift indicator, algorithm indicator group An encryption processing requesting unit that gives one or more items selected from the data input unit of the cryptographic processing device;
Receiving the processed data output from the data output unit of the cryptographic processing device, and delivering the processed data to the information processing unit; and
Is provided.

(20) 本発明の第20の態様は、上述した第16または第17の態様に係る暗号処理装置と、この暗号処理装置に暗号処理を依頼する主装置と、によって情報処理装置を構成し、
主装置には、
所定の情報処理を実行する情報処理部と、
情報処理部から引き渡された元データと、予め記憶されていたもしくは外部から受け取った暗号化符号データと、必要に応じて、更に、テーブル指定子、パターン選択子、シフト指示子、アルゴリズム指示子の群の中から選択された1つもしくは複数の項目を、暗号処理装置のデータ入力部に与える暗号処理依頼部と、
暗号処理装置のデータ出力部から出力された処理済データを受け取り、情報処理部に引き渡す暗号処理結果受信部と、
を設けるようにしたものである。
(20) According to a twentieth aspect of the present invention, an information processing apparatus includes the cryptographic processing apparatus according to the sixteenth or seventeenth aspect described above and a main apparatus that requests the cryptographic processing apparatus to perform cryptographic processing,
In the main unit,
An information processing unit for executing predetermined information processing;
The original data delivered from the information processing unit, the encrypted code data stored in advance or received from the outside, and, if necessary, a table specifier, pattern selector, shift indicator, algorithm indicator A cryptographic processing requesting unit that gives one or more items selected from the group to the data input unit of the cryptographic processing device;
Receiving the processed data output from the data output unit of the cryptographic processing device, and delivering the processed data to the information processing unit; and
Is provided.

(21) 本発明の第21の態様は、上述した第18の態様に係る暗号処理装置と、この暗号処理装置に暗号処理を依頼する主装置と、によって情報処理装置を構成し、
主装置には、
所定の情報処理を実行する情報処理部と、
情報処理部から引き渡された元データと、予め記憶されていたもしくは外部から受け取った暗号化符号データと、復号鍵指定子と、必要に応じて、更に、テーブル指定子、パターン選択子、シフト指示子、アルゴリズム指示子の群の中から選択された1つもしくは複数の項目を、暗号処理装置のデータ入力部に与える暗号処理依頼部と、
暗号処理装置のデータ出力部から出力された処理済データを受け取り、情報処理部に引き渡す暗号処理結果受信部と、
を設けるようにし、
復号鍵指定子は、暗号処理装置の符号データ復号部に記憶されている「H組の鍵ペアーについての復号鍵として用いる一方の鍵」の第i番目を指定する情報であり、
暗号化符号データは、所定の符号データに対して、第i番目の一方の鍵に対応する他方の鍵を用いて暗号化を行って得られるデータであるようにしたものである。
を設けるようにしたものである。
(21) According to a twenty-first aspect of the present invention, an information processing apparatus includes the cryptographic processing apparatus according to the eighteenth aspect described above and a main apparatus that requests the cryptographic processing apparatus to perform cryptographic processing,
In the main unit,
An information processing unit for executing predetermined information processing;
Original data delivered from the information processing unit, encrypted code data stored in advance or received from the outside, a decryption key specifier, and a table specifier, pattern selector, shift instruction as necessary A cryptographic processing requesting unit that gives one or more items selected from the group of children and algorithm indicators to the data input unit of the cryptographic processing device;
Receiving the processed data output from the data output unit of the cryptographic processing device, and delivering the processed data to the information processing unit; and
So that
The decryption key specifier is information for designating the i-th of “one key used as the decryption key for the H key pairs” stored in the code data decryption unit of the cryptographic processing device,
The encrypted code data is data obtained by encrypting predetermined code data using the other key corresponding to the i-th key.
Is provided.

(22) 本発明の第22の態様は、上述した第1〜第15の態様に係る暗号処理装置に与える符号データを生成する暗号処理用符号データ生成装置において、
暗号処理装置内の乱数テーブル格納部に格納されている乱数テーブルと同一の乱数テーブルを記憶した乱数テーブル記憶部と、
暗号処理装置内の暗号処理部による暗号処理に利用させる暗号鍵を入力する暗号鍵入力部と、
乱数テーブル記憶部に記憶されている乱数テーブルを用いて、暗号処理装置内の符号変換部によって行われる変換処理とは逆の変換処理を行い、暗号鍵入力部が入力した暗号鍵に対応する符号データを生成する符号データ生成部と、
を設けるようにしたものである。
(22) According to a twenty-second aspect of the present invention, in the code data generation device for cryptographic processing that generates code data to be given to the cryptographic processing device according to the first to fifteenth aspects described above,
A random number table storage unit storing the same random number table as the random number table stored in the random number table storage unit in the cryptographic processing device;
An encryption key input unit for inputting an encryption key to be used for encryption processing by the encryption processing unit in the encryption processing device;
Using the random number table stored in the random number table storage unit, a conversion process opposite to the conversion process performed by the code conversion unit in the encryption processing device is performed, and the code corresponding to the encryption key input by the encryption key input unit A code data generation unit for generating data;
Is provided.

(23) 本発明の第23の態様は、上述した第16または第17の態様に係る暗号処理装置に与える暗号化符号データを生成する暗号処理用符号データ生成装置において、
暗号処理装置内の乱数テーブル格納部に格納されている乱数テーブルと同一の乱数テーブルを記憶した乱数テーブル記憶部と、
暗号処理装置内の暗号処理部による暗号処理に利用させる暗号鍵を入力する暗号鍵入力部と、
乱数テーブル記憶部に記憶されている乱数テーブルを用いて、暗号処理装置内の符号変換部によって行われる変換処理とは逆の変換処理を行い、暗号鍵入力部が入力した暗号鍵に対応する符号データを生成する符号データ生成部と、
符号データ生成部によって生成された符号データに対して、暗号処理装置内の符号データ復号部によって復号可能な方法で暗号化を行って暗号化符号データを生成する暗号化符号データ生成部と、
を設けるようにしたものである。
(23) According to a twenty-third aspect of the present invention, in the code data generation device for cryptographic processing that generates the encrypted code data to be given to the cryptographic processing device according to the sixteenth or seventeenth aspect described above,
A random number table storage unit storing the same random number table as the random number table stored in the random number table storage unit in the cryptographic processing device;
An encryption key input unit for inputting an encryption key to be used for encryption processing by the encryption processing unit in the encryption processing device;
Using the random number table stored in the random number table storage unit, a conversion process opposite to the conversion process performed by the code conversion unit in the encryption processing device is performed, and the code corresponding to the encryption key input by the encryption key input unit A code data generation unit for generating data;
An encrypted code data generation unit that generates encrypted code data by encrypting the code data generated by the code data generation unit by a method that can be decrypted by the code data decoding unit in the encryption processing device;
Is provided.

(24) 本発明の第24の態様は、上述した第18の態様に係る暗号処理装置に与える暗号化符号データを生成する暗号処理用符号データ生成装置において、
暗号処理装置内の乱数テーブル格納部に格納されている乱数テーブルと同一の乱数テーブルを記憶した乱数テーブル記憶部と、
暗号処理装置内の暗号処理部による暗号処理に利用させる暗号鍵を入力する暗号鍵入力部と、
乱数テーブル記憶部に記憶されている乱数テーブルを用いて、暗号処理装置内の符号変換部によって行われる変換処理とは逆の変換処理を行い、暗号鍵入力部が入力した暗号鍵に対応する符号データを生成する符号データ生成部と、
暗号処理装置内の符号データ復号部に記憶されている「H組の鍵ペアーのうち一方の鍵」にそれぞれ対応する「H組の鍵ペアーのうちの他方の鍵」を記憶しており、符号データ生成部によって生成された符号データに対して、「H組の鍵ペアーのうちの他方の鍵」の中の任意の第i番目の鍵を用いて暗号化を行って暗号化符号データを生成する暗号化符号データ生成部と、
を設けるようにしたものである。
(24) According to a twenty-fourth aspect of the present invention, in the code data generation device for cryptographic processing for generating the encrypted code data to be given to the cryptographic processing device according to the eighteenth aspect described above,
A random number table storage unit storing the same random number table as the random number table stored in the random number table storage unit in the cryptographic processing device;
An encryption key input unit for inputting an encryption key to be used for encryption processing by the encryption processing unit in the encryption processing device;
Using the random number table stored in the random number table storage unit, a conversion process opposite to the conversion process performed by the code conversion unit in the encryption processing device is performed, and the code corresponding to the encryption key input by the encryption key input unit A code data generation unit for generating data;
“The other key of the H key pairs” corresponding to the “one key of the H key pairs” stored in the code data decrypting unit in the encryption processing device is stored. Encrypted code data generated by the data generation unit is encrypted using an arbitrary i-th key in “the other key of the H key pairs” to generate encrypted code data An encrypted code data generation unit,
Is provided.

(25) 本発明の第25の態様は、上述した第1〜第18の態様に係る暗号処理装置を、コンピュータにプログラムを組み込むことにより構成したものである。   (25) In a twenty-fifth aspect of the present invention, the cryptographic processing apparatus according to the first to eighteenth aspects described above is configured by incorporating a program into a computer.

(26) 本発明の第26の態様は、上述した第19〜第21の態様に係る暗号処理装置を、コンピュータにプログラムを組み込むことにより構成したものである。   (26) In a twenty-sixth aspect of the present invention, the cryptographic processing apparatus according to the nineteenth to twenty-first aspects described above is configured by incorporating a program into a computer.

(27) 本発明の第27の態様は、上述した第26の態様に係る暗号処理装置において、
主装置としてコンピュータを機能させるためのメインプログラムと、暗号処理装置としてコンピュータを機能させるための暗号処理サブルーチンプログラムと、をコンピュータに組み込むようにし、メインプログラムを、高級言語もしくは中間言語によって記述し、暗号処理サブルーチンプログラムを、マシン語によって記述するようにしたものである。
(27) According to a twenty-seventh aspect of the present invention, in the cryptographic processing device according to the twenty-sixth aspect described above,
A main program for causing the computer to function as a main device and a cryptographic processing subroutine program for causing the computer to function as a cryptographic processing device are incorporated into the computer, and the main program is described in a high-level language or an intermediate language, and the encryption is performed. A processing subroutine program is written in machine language.

(28) 本発明の第28の態様は、上述した第22〜第24の態様に係る暗号処理用符号データ生成装置を、コンピュータにプログラムを組み込むことにより構成したものである。   (28) According to a twenty-eighth aspect of the present invention, the code data generating apparatus for cryptographic processing according to the twenty-second to twenty-fourth aspects is configured by incorporating a program into a computer.

(29) 本発明の第29の態様は、メインプログラムと暗号処理サブルーチンプログラムとが組み込まれたコンピュータが、暗号化もしくは復号のための暗号処理を行う暗号処理方法において、
コンピュータが、メインプログラムを実行することにより、暗号処理の対象となる元データと暗号処理に必要な符号データとを暗号処理サブルーチンプログラムに引き渡す前処理段階と、
コンピュータが、暗号処理サブルーチンプログラムを実行することにより、それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値が収容された乱数テーブルを参照して、符号データに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、当該変換処理を経て得られるデータを暗号鍵として用いる所定の暗号アルゴリズムに基づいて、元データに対して暗号処理を実施し、処理済データをメインプログラムに引き渡す暗号処理段階と、
コンピュータが、メインプログラムを実行することにより、処理済みデータを用いて所定の処理を続行する後処理段階と、
を行うようにしたものである。
(29) According to a twenty-ninth aspect of the present invention, in a cryptographic processing method in which a computer in which a main program and a cryptographic processing subroutine program are incorporated performs cryptographic processing for encryption or decryption,
A pre-processing stage in which the computer executes the main program to deliver the original data to be subjected to encryption processing and the code data necessary for encryption processing to the encryption processing subroutine program;
By executing a cryptographic processing subroutine program, the computer refers to a random number table in which N (M ≧ N) numerical values are randomly stored in a plurality of M cells each having a unique cell number. A conversion process is performed in which each numerical value included in the code data is replaced with a numerical value contained in a cell having the numerical value as a cell number, and the data obtained through the conversion process is used as a predetermined encryption algorithm. On the basis of the cryptographic processing for the original data, and the cryptographic processing stage for passing the processed data to the main program,
A post-processing stage in which the computer executes predetermined processing using the processed data by executing the main program;
Is to do.

(30) 本発明の第30の態様は、上述した第29の態様に係る暗号処理方法において、
前処理段階で、0〜(M−1)の範囲の値をもった整数を羅列した符号データを暗号処理サブルーチンプログラムに引き渡す処理を行い、
暗号処理段階で、0〜(M−1)の範囲の連続したセル番号が付与された複数M個のセルに、0〜(N−1)の範囲の連続するN通りの整数をランダムに収容した乱数テーブルを用い、符号データを、0〜(N−1)の範囲の値をもった整数を羅列した暗号鍵に置き換える変換処理を行うようにしたものである。
(30) According to a thirty aspect of the present invention, in the cryptographic processing method according to the twenty-ninth aspect described above,
In the pre-processing stage, a process of delivering code data enclosing integers having values in the range of 0 to (M−1) to the cryptographic processing subroutine program is performed.
In the cryptographic processing stage, N consecutive integers in the range of 0 to (N-1) are randomly accommodated in a plurality of M cells assigned consecutive cell numbers in the range of 0 to (M-1). Using the random number table, conversion processing is performed in which the code data is replaced with an encryption key in which integers having values in the range of 0 to (N-1) are enumerated.

(31) 本発明の第31の態様は、上述した第29または第30の態様に係る暗号処理方法において、
前処理段階で、符号データの代わりに、当該符号データに対して所定の方法で暗号化を行って生成された暗号化符号データを暗号処理サブルーチンプログラムに引き渡す処理を行い、
暗号処理段階で、暗号化符号データを復号して得られる元の符号データを暗号鍵に変換する変換処理を行うようにしたものである。
(31) According to a thirty-first aspect of the present invention, in the cryptographic processing method according to the twenty-ninth or thirtieth aspect described above,
In the preprocessing stage, instead of the code data, a process of transferring the encrypted code data generated by encrypting the code data by a predetermined method to the encryption subroutine program,
In the encryption processing stage, a conversion process for converting the original code data obtained by decrypting the encrypted code data into an encryption key is performed.

本発明に係る暗号処理装置には、乱数テーブルと、この乱数テーブルを用いて、与えられた符号データを暗号鍵に変換する符号変換部と、が備わっているため、暗号処理に必要な暗号鍵そのものではなく、上記乱数テーブルを利用して作成した符号データを用いて暗号処理の依頼を行うことができる。処理依頼を受けた暗号処理装置は、与えられた符号データを上記乱数テーブルを利用して内部で暗号鍵に変換した上で、暗号処理を実行することになる。このため、当該暗号処理装置を組み込んで構成される情報処理装置には、暗号鍵の代わりに上記符号データを用意しておけば足り、クラッカーによる不正行為が行われても、暗号鍵が漏洩することを防ぐことができる。かくして、利便性を損なうことなしに、耐タンパ性を確保することが可能になる。   Since the cryptographic processing apparatus according to the present invention includes a random number table and a code conversion unit that converts given code data into an encryption key using the random number table, the cryptographic key necessary for cryptographic processing is provided. A request for cryptographic processing can be made using code data created using the random number table instead of the random number table. The cryptographic processing apparatus that has received the processing request performs the cryptographic processing after converting the given code data into the cryptographic key using the random number table. For this reason, it is sufficient to prepare the code data in place of the encryption key in the information processing apparatus configured by incorporating the encryption processing apparatus, and the encryption key is leaked even if an illegal act by a cracker is performed. Can be prevented. Thus, tamper resistance can be secured without impairing convenience.

また、本発明に係る暗号処理用符号データ生成装置を用いれば、上記乱数テーブルを利用して、任意の暗号鍵に対応した符号データを生成することができるので、本発明に係る暗号処理装置および本発明に係る情報処理装置の利便性を向上させることができる。   Further, if the code data generation device for encryption processing according to the present invention is used, code data corresponding to an arbitrary encryption key can be generated using the random number table. The convenience of the information processing apparatus according to the present invention can be improved.

一般的な情報処理装置において、メインプログラムからサブルーチンを呼び出すことにより暗号処理を実行する形態を示すブロック図である。FIG. 11 is a block diagram illustrating a form in which a cryptographic process is executed by calling a subroutine from a main program in a general information processing apparatus. 図1に示すサブルーチンにおいて、暗号鍵を利用した暗号化処理および復号処理の形態を示すブロック図である。It is a block diagram which shows the form of the encryption process and decryption process using an encryption key in the subroutine shown in FIG. アンドロイドOSにおけるJAVA(登録商標)実行環境を示す模式図である。It is a schematic diagram which shows JAVA (trademark) execution environment in Android OS. 図3に示すJAVA(登録商標)実行環境において、JAVA(登録商標)アプリとして用意されたメインプログラムMから、「Shared Object」として用意された暗号処理サブルーチンRに暗号処理を依頼する形態を示すブロック図である。In the JAVA (registered trademark) execution environment shown in FIG. 3, the main program M prepared as a JAVA (registered trademark) application is a block showing a form of requesting encryption processing to the encryption processing subroutine R prepared as “Shared Object” FIG. 本発明の第1の実施形態に係る暗号処理装置120およびこれを含む情報処理装置100の構成を示すブロック図である。It is a block diagram which shows the structure of the encryption processing apparatus 120 which concerns on the 1st Embodiment of this invention, and the information processing apparatus 100 containing this. 図5に示す乱数テーブルTの具体例を示す表である。It is a table | surface which shows the specific example of the random number table T shown in FIG. 図6に示す乱数テーブルTを参照することにより、暗号鍵Kと符号データFとの間の相互変換を行った例を示す図である。It is a figure which shows the example which performed the mutual conversion between the encryption key K and the code data F with reference to the random number table T shown in FIG. 本発明に用いられる暗号鍵Kを構成するデータと符号データFを構成するデータの具体的な数値範囲の一例を示す図である。It is a figure which shows an example of the concrete numerical value range of the data which comprises the encryption key K used for this invention, and the data which comprises the code data F. FIG. 本発明に用いられる乱数テーブルTを構成する個々のセルに付されたセル番号と、当該セルに収容される数値との関係を示す図である。It is a figure which shows the relationship between the cell number attached | subjected to each cell which comprises the random number table T used for this invention, and the numerical value accommodated in the said cell. 本発明の第2の実施形態に係る暗号処理装置120Aおよびこれを含む情報処理装置100Aの構成を示すブロック図である。It is a block diagram which shows the structure of encryption processing apparatus 120A which concerns on the 2nd Embodiment of this invention, and information processing apparatus 100A containing this. 図10に示す第2の実施形態で利用されるテーブル指定子tの具体例を示す図である。It is a figure which shows the specific example of the table designator t utilized in 2nd Embodiment shown in FIG. 本発明の第3の実施形態に係る暗号処理装置120Bおよびこれを含む情報処理装置100Bの構成を示すブロック図である。It is a block diagram which shows the structure of the encryption processing apparatus 120B which concerns on the 3rd Embodiment of this invention, and information processing apparatus 100B containing this. 図12に示す第3の実施形態で利用されるテーブル指定パターンによって定義される指定規則の一例を示す図である。It is a figure which shows an example of the designation | designated rule defined by the table designation | designated pattern utilized in 3rd Embodiment shown in FIG. 図12に示す第3の実施形態で利用されるテーブル指定パターンによる指定結果の具体例を示す図である。It is a figure which shows the specific example of the designation | designated result by the table designation | designated pattern utilized in 3rd Embodiment shown in FIG. 本発明の第4の実施形態に係る暗号処理装置120Cおよびこれを含む情報処理装置100Cの構成を示すブロック図である。It is a block diagram which shows the structure of the encryption processing apparatus 120C which concerns on the 4th Embodiment of this invention, and information processing apparatus 100C containing this. 図15に示す第4の実施形態で利用されるシフト指示子sの具体例を示す図である。It is a figure which shows the specific example of the shift indicator s utilized in 4th Embodiment shown in FIG. 図16に示すシフト指示子sに基づいて、乱数テーブルTに対して行われるシフト処理の一例を示す図である。It is a figure which shows an example of the shift process performed with respect to the random number table T based on the shift indicator s shown in FIG. 本発明の第5の実施形態に係る暗号処理装置120Dおよびこれを含む情報処理装置100Dの構成を示すブロック図である。It is a block diagram which shows the structure of encryption processing apparatus 120D which concerns on the 5th Embodiment of this invention, and information processing apparatus 100D containing this. 本発明の第6の実施形態に係る暗号処理装置120Eおよびこれを含む情報処理装置100Eの構成を示すブロック図である。It is a block diagram which shows the structure of the encryption processing apparatus 120E which concerns on the 6th Embodiment of this invention, and the information processing apparatus 100E containing this. 一般的な公開鍵暗号方式に利用可能なペアー鍵を示す表である。It is a table | surface which shows the pair key which can be used for a general public key cryptosystem. 本発明に係る符号データ生成装置の基本構成を示すブロック図である。It is a block diagram which shows the basic composition of the code data generation apparatus which concerns on this invention. 本発明に係る符号データ生成装置の変形例を示すブロック図である。It is a block diagram which shows the modification of the code data generation apparatus which concerns on this invention.

以下、本発明を図示する実施形態に基づいて説明する。   Hereinafter, the present invention will be described based on the illustrated embodiments.

<<< §0. 情報処理装置における暗号処理形態 >>>
はじめに、一般的な情報処理装置において利用されている暗号処理形態を簡単に説明しておく。前述したように、パソコン、スマートフォン、電子タブレット、ICカードなど、一般的な情報処理装置は、コンピュータプログラムを実行することにより所望の情報処理を実行する装置であり、この情報処理装置に組み込まれた暗号処理装置の機能は、通常、メインプログラムとは別個に設けられた暗号処理サブルーチンにより実現される。
<<< §0. Encryption processing form in information processing apparatus >>
First, an encryption processing form used in a general information processing apparatus will be briefly described. As described above, general information processing apparatuses such as a personal computer, a smartphone, an electronic tablet, and an IC card are apparatuses that execute desired information processing by executing a computer program, and are incorporated in the information processing apparatus. The function of the cryptographic processing apparatus is usually realized by a cryptographic processing subroutine provided separately from the main program.

図1は、一般的な情報処理装置において、メインプログラムからサブルーチンを呼び出すことにより暗号処理を実行する形態を示すブロック図である。ここで、メインプログラムは、当該情報処理装置の本来の機能を果たすためのプログラムであり、サブルーチンプログラムは、必要なときに適宜メインプログラムから呼び出され、メインプログラムから依頼された個別処理を実行するプログラムである。   FIG. 1 is a block diagram showing a form in which encryption processing is executed by calling a subroutine from a main program in a general information processing apparatus. Here, the main program is a program for performing the original function of the information processing apparatus, and the subroutine program is called from the main program as needed, and executes individual processing requested from the main program. It is.

図1(a) には、メインプログラムMが、平文データPを暗号化して暗号データCを得る必要が生じたときに、当該暗号化処理を、暗号化処理サブルーチンR1を呼び出して実行させる処理形態が示されている。すなわち、メインプログラムMは、平文データPに対して暗号化する必要が生じると、暗号化処理サブルーチンR1を呼び出して平文データPを引き渡す処理を行う。暗号化処理サブルーチンR1は、この平文データPに対して、所定のアルゴリズムに基づく暗号化処理を行った後、得られた暗号データCをメインプログラムMに引き渡す処理を行う。メインプログラムMは、受け取った暗号データCを用いて、その後の処理を実行する。   In FIG. 1 (a), when the main program M needs to encrypt the plaintext data P to obtain the encrypted data C, the encryption program is executed by calling the encryption processing subroutine R1. It is shown. That is, when it becomes necessary to encrypt the plaintext data P, the main program M performs a process of calling the encryption processing subroutine R1 and delivering the plaintext data P. The encryption processing subroutine R1 performs an encryption process on the plaintext data P based on a predetermined algorithm, and then performs a process of delivering the obtained encrypted data C to the main program M. The main program M executes subsequent processing using the received encrypted data C.

同様に、図1(b) には、メインプログラムMが、暗号データCを復号して元の平文データPを得る必要が生じたときに、当該復号処理を、復号処理サブルーチンR2を呼び出して実行させる処理形態が示されている。すなわち、メインプログラムMは、暗号データCを復号する必要が生じると、復号処理サブルーチンR2を呼び出して暗号データCを引き渡す処理を行う。復号処理サブルーチンR2は、この暗号データCに対して、所定のアルゴリズムに基づく復号処理を行った後、得られた平文データPをメインプログラムMに引き渡す処理を行う。メインプログラムMは、受け取った平文データPを用いて、その後の処理を実行する。   Similarly, in FIG. 1B, when the main program M needs to decrypt the encrypted data C to obtain the original plaintext data P, the decryption processing is executed by calling the decryption processing subroutine R2. The processing form to be performed is shown. That is, when it becomes necessary to decrypt the encrypted data C, the main program M performs a process of calling the decryption processing subroutine R2 and delivering the encrypted data C. The decryption process subroutine R2 performs a process of delivering the obtained plaintext data P to the main program M after performing a decryption process based on a predetermined algorithm for the encrypted data C. The main program M executes subsequent processing using the received plaintext data P.

暗号化処理サブルーチンR1が暗号化処理を行う場合や、復号処理サブルーチンR2が復号処理を行う場合、固有の暗号アルゴリズムAとともに固有の暗号鍵Kが用いられる(暗号鍵Kは、暗号化処理だけでなく、復号処理にも利用される)。たとえば、簡単な例を示せば、アルファベット26文字からなる英文を平文データとして暗号化処理を行う場合、「アルファベットの並び順に従ってn文字だけシフトして暗号を作成する」という暗号アルゴリズムAと、「n=+2」という暗号鍵Kと、を用いることにより、「DOG」という英単語は、各文字をアルファベット順に2文字ずらすことにより、「FQI」という暗号に変換されることになり、逆に「FQI」という暗号は「DOG」という英単語に復号されることになる。この場合、暗号化や復号を行うには、暗号アルゴリズムAと暗号鍵Kとが必須である。   When the encryption processing subroutine R1 performs encryption processing, or when the decryption processing subroutine R2 performs decryption processing, a unique encryption key K is used together with a unique encryption algorithm A (the encryption key K is only encrypted). Not used for decryption). For example, when performing an encryption process using English alphabets consisting of 26 alphabetic characters as plain text data, an encryption algorithm A “shifts n characters according to the alphabetical order and creates a cipher” and “ By using the encryption key K of “n = + 2”, the English word “DOG” is converted to the encryption of “FQI” by shifting each character in alphabetical order by two. The encryption “FQI” is decrypted into the English word “DOG”. In this case, the encryption algorithm A and the encryption key K are essential for encryption and decryption.

図2は、図1に示す各サブルーチンR1,R2において、暗号鍵Kを利用した暗号化処理および復号処理を行う場合の形態を示すブロック図である。図2(a) に示す暗号化処理サブルーチンR1は、入力した平文データPを暗号化して、暗号データCを出力する暗号化処理を行うが、当該暗号化処理には、所定の暗号アルゴリズムAと所定の暗号鍵Kが用いられる。これに対して、図2(b) に示す復号処理サブルーチンR2は、サブルーチンR1により出力された暗号データCを入力し、これを復号して、元の平文データPに戻して出力する復号処理を行うが、当該復号処理にも、所定の暗号アルゴリズムAと所定の暗号鍵Kが用いられる。   FIG. 2 is a block diagram showing a form in the case where the encryption process and the decryption process using the encryption key K are performed in each of the subroutines R1 and R2 shown in FIG. The encryption processing subroutine R1 shown in FIG. 2 (a) encrypts the input plaintext data P and performs encryption processing to output the encrypted data C. The encryption processing includes a predetermined encryption algorithm A and A predetermined encryption key K is used. On the other hand, the decryption processing subroutine R2 shown in FIG. 2 (b) performs decryption processing in which the encrypted data C output by the subroutine R1 is input, decrypted, and returned to the original plaintext data P for output. However, a predetermined encryption algorithm A and a predetermined encryption key K are also used for the decryption process.

ここで、サブルーチンR1,R2では、同一の暗号アルゴリズムAおよび同一の暗号鍵Kが用いられる(もちろん、暗号アルゴリズムAに基づいて暗号化処理を行う手順と、同じ暗号アルゴリズムAに基づいて復号処理を行う手順とは、アルゴリズムを逆に適用した手順ということになる)。   Here, in the subroutines R1 and R2, the same encryption algorithm A and the same encryption key K are used (of course, the procedure for performing the encryption process based on the encryption algorithm A and the decryption process based on the same encryption algorithm A are performed). The procedure to be performed is the procedure in which the algorithm is applied in reverse).

別言すれば、暗号アルゴリズムAおよび暗号鍵Kを用いた暗号化処理によって得られた暗号データCを、元の平文データPに戻すためには、同じ暗号アルゴリズムAおよび暗号鍵Kを用いた復号処理を行う必要があるので、どのような暗号アルゴリズムAを採用して、どのような暗号鍵Kを用いて暗号化が行われたかを知らなければ、暗号データCに対する復号処理を行うことはできない。結局、暗号処理の耐タンパ性を確保するには、用いる暗号アルゴリズムAおよび暗号鍵Kの秘密性が維持されればよいことになる。   In other words, in order to return the encrypted data C obtained by the encryption process using the encryption algorithm A and the encryption key K to the original plaintext data P, the decryption using the same encryption algorithm A and the encryption key K is performed. Since it is necessary to perform processing, the decryption processing cannot be performed on the encrypted data C without knowing what encryption algorithm A is used and what encryption key K is used for encryption. . After all, in order to ensure tamper resistance of cryptographic processing, it is only necessary to maintain the confidentiality of the cryptographic algorithm A and the cryptographic key K used.

図1に示すとおり、一般的な情報処理装置では、本来の機能を果たすためのメインプログラムMから、暗号化処理サブルーチンR1や復号処理サブルーチンR2を呼び出すことにより、暗号化や復号の処理が行われる。通常、メインプログラムMとしては、高級言語もしくは中間言語によって記述されたプログラムが用いられ、各サブルーチンR1,R2としては、マシン語によって記述されたプログラムが用いられる。これは、暗号化処理サブルーチンR1や復号処理サブルーチンR2は、予め定められた暗号アルゴリズムに基づく定型論理演算を高速に実行する必要があるため、マシン語によって記述するのが適しているためである。また、後述するように、マシン語によって記述しておけば、リバースエンジニアリング(プログラムの解析)が困難なため、不正な解析を受けにくいというメリットも得られる。一方、メインプログラムMは、要望に応じて多様かつ複雑な処理を実行する必要があり、しかも頻繁にアップデートして適宜改良を加えてゆく必要もあるため、高級言語もしくは中間言語によって記述するのが適している。   As shown in FIG. 1, in a general information processing apparatus, encryption or decryption processing is performed by calling an encryption processing subroutine R1 or a decryption processing subroutine R2 from a main program M for performing an original function. . Usually, a program written in a high-level language or an intermediate language is used as the main program M, and a program written in a machine language is used as each of the subroutines R1 and R2. This is because the encryption processing subroutine R1 and the decryption processing subroutine R2 need to execute a fixed logic operation based on a predetermined encryption algorithm at a high speed, and are therefore preferably described in machine language. Further, as described later, if described in machine language, reverse engineering (program analysis) is difficult, and therefore, there is an advantage that it is difficult to receive unauthorized analysis. On the other hand, the main program M needs to execute various and complicated processes according to demands, and needs to be updated frequently and improved accordingly. Is suitable.

たとえば、アンドロイドOS(登録商標)が組み込まれたスマートフォンの場合、通常、メインプログラムとしては、中間言語を採用したJAVA(登録商標)アプリが用いられ、サブルーチンとしては、マシン語によって記述された様々なプログラムが用いられる。図3は、アンドロイドOSにおけるJAVA(登録商標)実行環境を示す模式図である。図示のとおり、アンドロイドOS(Android OS)が組み込まれた情報処理装置には、JAVA(登録商標)アプリの実行環境である「JAVA(登録商標) Virtual Machine」と、様々なサブルーチン群の集合体である「Shared Object」とが用意されており、JAVA(登録商標)アプリとしてインストールされたメインプログラムは、図示の処理実行ルートxで示すように、「JAVA (登録商標)Virtual Machine」を介して「Android OS」に命令を伝達して所望の処理を実行して処理結果を受け取ることもできるし、図示の処理実行ルートyで示すように、「Shared Object」として用意されたサブルーチンを呼び出して所望の処理を実行し、処理結果を受け取ることもできる。   For example, in the case of a smartphone incorporating an Android OS (registered trademark), a JAVA (registered trademark) application adopting an intermediate language is usually used as a main program, and various subroutines described in machine language are used as subroutines. A program is used. FIG. 3 is a schematic diagram showing a JAVA (registered trademark) execution environment in an Android OS. As shown in the figure, an information processing apparatus incorporating an Android OS ("Android OS") includes "JAVA (registered trademark) Virtual Machine" which is the execution environment of JAVA (registered trademark) and a collection of various subroutine groups. A “Shared Object” is prepared, and a main program installed as a JAVA (registered trademark) application, as indicated by a process execution route x shown in the figure, passes through “JAVA (registered trademark) Virtual Machine”. It is also possible to transmit a command to “Android OS” to execute a desired process and receive a processing result, or to call a subroutine prepared as “Shared Object” by calling a desired subroutine as shown by a process execution route y shown in the figure. It is also possible to execute processing and receive processing results.

したがって、アンドロイドOSが組み込まれたスマートフォンの場合、通常、暗号化処理サブルーチンR1や復号処理サブルーチンR2は、「Shared Object」として用意され、メインプログラムMとしてのJAVA(登録商標)アプリから呼び出されて利用される。   Therefore, in the case of a smartphone incorporating an Android OS, normally, the encryption processing subroutine R1 and the decryption processing subroutine R2 are prepared as “Shared Object” and used by being called from the JAVA (registered trademark) application as the main program M. Is done.

なお、暗号化処理は、図2(a) に示すように、平文データPを暗号データCに変換する処理であり、復号処理は、図2(b) に示すように、暗号データCを平文データPに戻す処理であるが、いずれも所定の暗号鍵Kを利用して所定の暗号アルゴリズムAに基づく演算を行う処理であり、その実体に根本的な違いはない。そこで、本願では、「暗号化処理」と「復号処理」とを包括して「暗号処理」と呼ぶことにする。別言すれば、本願における「暗号処理」とは、平文データPを暗号データCに変換する「暗号化処理」のみを意味するものではなく、暗号データCを平文データPに戻す「復号処理」も含んだ処理を言う。   As shown in FIG. 2 (a), the encryption process is a process of converting plaintext data P into encrypted data C, and the decryption process is performed by converting the encrypted data C into plaintext as shown in FIG. 2 (b). The process of returning to the data P is a process of performing an operation based on a predetermined encryption algorithm A using a predetermined encryption key K, and there is no fundamental difference in its substance. Therefore, in the present application, “encryption processing” and “decryption processing” are collectively referred to as “encryption processing”. In other words, “encryption processing” in the present application does not mean only “encryption processing” for converting plaintext data P into encrypted data C, but “decryption processing” for returning encrypted data C to plaintext data P. It also includes processing.

そこで、本願では、暗号化処理サブルーチンR1および復号処理サブルーチンR2を包括して、暗号処理サブルーチンRと呼ぶことにする。したがって、本願において、暗号処理サブルーチンRと言った場合、暗号化処理サブルーチンR1のみを指す場合もあれば、復号処理サブルーチンR2のみを指す場合もあれば、その両方の機能を備えたサブルーチンを指す場合もある。ただ、便宜上、以下の説明では、暗号処理サブルーチンRが暗号化処理サブルーチンR1である場合を例にとり、暗号処理サブルーチンRにより、平文データPを暗号データCに変換する暗号化処理が実行される場合について説明を行うことにする。   Therefore, in the present application, the encryption processing subroutine R1 and the decryption processing subroutine R2 are collectively referred to as an encryption processing subroutine R. Accordingly, in the present application, the encryption processing subroutine R may refer only to the encryption processing subroutine R1, may refer only to the decryption processing subroutine R2, or may refer to a subroutine having both functions. There is also. However, for the sake of convenience, in the following description, the case where the encryption processing subroutine R is the encryption processing subroutine R1 is taken as an example, and the encryption processing subroutine R executes encryption processing for converting the plaintext data P into encrypted data C. Will be described.

図4は、図3に示すJAVA(登録商標)実行環境において、JAVA(登録商標)アプリとして用意されたメインプログラムMから、「Shared Object」として用意された暗号処理サブルーチンRに対して暗号処理を依頼する場合の2通りの形態を示すブロック図である。   FIG. 4 illustrates a cryptographic process subroutine R prepared as “Shared Object” from a main program M prepared as a JAVA (registered trademark) application in the JAVA (registered trademark) execution environment shown in FIG. It is a block diagram which shows two forms in the case of requesting.

図4(a) に示す第1の形態は、暗号処理サブルーチンR内に、暗号アルゴリズムAと暗号鍵Kとの双方を組み込んだ例である。この第1の形態を採る場合は、メインプログラムMから暗号処理サブルーチンRに対して平文データPを引き渡して暗号処理を依頼すればよい。暗号処理サブルーチンRは、受け取った平文データPに対して、組み込まれている暗号鍵Kを用いて、組み込まれている暗号アルゴリズムAに基づく暗号化処理を行い、得られた暗号データCをメインプログラムMに返す処理を行うことになる。   The first form shown in FIG. 4A is an example in which both the encryption algorithm A and the encryption key K are incorporated in the encryption processing subroutine R. In the case of adopting the first form, the plain text data P may be delivered from the main program M to the encryption processing subroutine R to request encryption processing. The encryption processing subroutine R performs encryption processing on the received plaintext data P based on the embedded encryption algorithm A using the embedded encryption key K, and the obtained encryption data C is stored in the main program. Processing to return to M is performed.

これに対して、図4(b) に示す第2の形態は、暗号処理サブルーチンR内に暗号アルゴリズムAを組み込み、メインプログラムM内に暗号鍵Kを組み込んだ例である。この第2の形態を採る場合は、メインプログラムMから暗号処理サブルーチンRに対して、平文データPとともに暗号鍵Kを引き渡して暗号処理を依頼することになる。暗号処理サブルーチンRは、受け取った平文データPに対して、受け取った暗号鍵Kを用いて、組み込まれている暗号アルゴリズムAに基づく暗号化処理を行い、得られた暗号データCをメインプログラムMに返す処理を行うことになる。   On the other hand, the second form shown in FIG. 4B is an example in which the encryption algorithm A is incorporated in the encryption processing subroutine R and the encryption key K is incorporated in the main program M. In the case of adopting the second form, the main program M sends the encryption key K together with the plaintext data P to the encryption processing subroutine R to request the encryption processing. The encryption processing subroutine R performs encryption processing based on the incorporated encryption algorithm A on the received plaintext data P using the received encryption key K, and the obtained encryption data C is transferred to the main program M. The process to return will be performed.

上述したとおり、アンドロイドOSを採用した電子機器の場合、通常、メインプログラムMとしては、中間言語を採用したJAVA(登録商標)アプリが用いられ、暗号処理サブルーチンRとしては、マシン語によって記述された「Shared Object」が用いられる。一般に、マシン語によって記述されたプログラムの解析は困難であるが、中間言語によって記述されたプログラムの解析は容易である。このため、上記構成を採用した電子機器の場合、メインプログラムM(中間言語で記述されたJAVA(登録商標)アプリ)は、ソースコードに戻して内容の解析(リバースエンジニアリング)を行うことが容易であるのに対して、暗号処理サブルーチンR(マシン語で記述されたShared Object)は内容の解析が困難である。したがって、耐タンパ性を考慮した場合、暗号鍵Kを暗号処理サブルーチンR内に組み込んだ第1の形態(図4(a) )の方が、暗号鍵KをメインプログラムM内に組み込んだ第2の形態(図4(b) )に比べて、クラッカーの不正解析を受けにくいために好ましい、と言える。すなわち、第2の形態では、クラッカーにより暗号鍵Kが盗み取られやすい。   As described above, in the case of an electronic device that employs an Android OS, a JAVA (registered trademark) application that employs an intermediate language is typically used as the main program M, and the encryption processing subroutine R is described in machine language. “Shared Object” is used. In general, it is difficult to analyze a program written in a machine language, but it is easy to analyze a program written in an intermediate language. For this reason, in the case of an electronic device adopting the above configuration, the main program M (JAVA (registered trademark) application written in an intermediate language) can be easily returned to the source code and analyzed (reverse engineering). On the other hand, it is difficult to analyze the contents of the cryptographic processing subroutine R (Shared Object described in machine language). Therefore, in consideration of tamper resistance, the first mode (FIG. 4 (a)) in which the encryption key K is incorporated in the encryption processing subroutine R is the second in which the encryption key K is incorporated in the main program M. Compared to this form (FIG. 4 (b)), it is preferable because it is less susceptible to cracker fraud analysis. That is, in the second embodiment, the encryption key K is easily stolen by a cracker.

しかしながら、利便性を考慮した場合、図4(a) に示す第1の形態は使い勝手が悪く、実用上は、図4(b) に示す第2の形態が利用されることが多い。これは、暗号処理サブルーチンRが「Shared Object」として電子機器に組み込まれ、多数のアプリケーションプログラム(メインプログラム)から共通して利用されるプログラムであるため、暗号鍵KについてはメインプログラムMによって任意の鍵を指定して自由度を高めたいという要望があるためである。   However, in consideration of convenience, the first form shown in FIG. 4A is not easy to use, and the second form shown in FIG. 4B is often used in practice. This is a program in which the cryptographic processing subroutine R is incorporated in an electronic device as a “Shared Object” and is commonly used by a large number of application programs (main programs). This is because there is a desire to increase the degree of freedom by specifying a key.

たとえば、図4(a) に示す第1の形態を採用した場合、業者Xが提供するアプリケーションプログラムMx(メインプログラム)も、業者Yが提供するアプリケーションプログラムMy(メインプログラム)も、「Shared Object」として用意された暗号処理サブルーチンR内の共通の暗号アルゴリズムAと共通の暗号鍵Kとを用いて暗号処理を行うことになる。このように、他社と同じ暗号鍵Kを用いた暗号処理は、セキュリティ上好ましくない。また、図4(a) に示す第1の形態を採用した場合、毎回、同じ暗号鍵Kが利用されることになり、この点においても、セキュリティの低下を招くことになる。   For example, when the first form shown in FIG. 4A is adopted, the application program Mx (main program) provided by the trader X and the application program My (main program) provided by the trader Y are both “Shared Object”. Encryption processing is performed using the common encryption algorithm A and the common encryption key K in the encryption processing subroutine R prepared as follows. As described above, encryption processing using the same encryption key K as that of other companies is not preferable in terms of security. Further, when the first form shown in FIG. 4A is adopted, the same encryption key K is used every time, and this also causes a decrease in security.

図4(b) に示す第2の形態を採用すれば、業者Xが提供するアプリケーションプログラムMxでは暗号鍵Kxを用い、業者Yが提供するアプリケーションプログラムMyでは暗号鍵Kyを用いる、というように、各社で個別の暗号鍵を用いることができる。また、同じアプリケーションプログラムMxでも、暗号鍵Kx1,Kx2,Kx3,... ,というように、毎回、異なる暗号鍵を用いることも可能になる。   If the 2nd form shown in FIG.4 (b) is employ | adopted, encryption key Kx will be used in the application program Mx which the trader X provides, and encryption key Ky will be used in the application program My which the trader Y provides, and so on. Individual companies can use individual encryption keys. Even in the same application program Mx, different encryption keys can be used every time, such as encryption keys Kx1, Kx2, Kx3,.

このように、実用上は、第2の形態を採り、暗号処理に用いる暗号鍵Kに自由度をもたせた方が、利便性が向上することになる。ただ、上述したとおり、この第2の形態は、耐タンパ性に問題があり、メインプログラムM内に組み込まれた暗号鍵Kが外部に漏洩しやすい。   Thus, practically, the convenience is improved if the second mode is adopted and the encryption key K used for the encryption process has a degree of freedom. However, as described above, the second form has a problem in tamper resistance, and the encryption key K incorporated in the main program M is likely to leak outside.

そこで、前掲の特許文献1では、メインプログラムM内ではなく、指輪に暗号鍵を格納しておく方法が提案されているが、ユーザは、常に指輪を携行する必要があり、利便性は著しく低下してしまう。また、前掲の特許文献2,3には、暗号鍵を外部の管理サーバからダウンロードして入手する方法が提案されているが、クラッカーはダウンロード経路から暗号鍵を盗み取ることが可能であり、十分な耐タンパ性を確保することができない。   Therefore, in the above-mentioned Patent Document 1, a method for storing an encryption key in a ring instead of in the main program M has been proposed, but the user must always carry the ring and the convenience is significantly reduced. Resulting in. Also, in Patent Documents 2 and 3 listed above, a method of downloading and obtaining an encryption key from an external management server has been proposed, but the cracker can steal the encryption key from the download path. Tamper resistance cannot be ensured.

本発明は、このような実情を鑑み、暗号鍵を用いた暗号処理を実行する際に、利便性を損なうことなしに、耐タンパ性を確保することが可能な暗号処理装置およびこれを組み込んだ情報処理装置を提供することを目的とするものである。以下、本発明を、いくつかの実施形態について詳述する。   In view of such circumstances, the present invention incorporates an encryption processing apparatus capable of ensuring tamper resistance without impairing convenience when executing encryption processing using an encryption key, and the same. An object of the present invention is to provide an information processing apparatus. Hereinafter, the present invention will be described in detail with reference to several embodiments.

<<< §1. 本発明の第1の実施形態 >>>
図5は、本発明の第1の実施形態に係る情報処理装置100の構成を示すブロック図である。この第1の実施形態は、本発明の最も基本的な実施形態である。図示のとおり、この情報処理装置100は、主装置110と暗号処理装置120とによって構成されている。
<<< §1. First embodiment of the present invention >>>
FIG. 5 is a block diagram showing the configuration of the information processing apparatus 100 according to the first embodiment of the present invention. This first embodiment is the most basic embodiment of the present invention. As illustrated, the information processing apparatus 100 includes a main apparatus 110 and a cryptographic processing apparatus 120.

もっとも、実際には、この情報処理装置100は、パソコン、スマートフォン、電子タブレット、ICカードなど、コンピュータを含む電子機器に、所定のプログラムを組み込むことによって構成される。図示の例の場合、主装置110の機能は、この電子機器にアプリケーションプログラム(もしくは、OSプログラムでもよい)として組み込まれたメインプログラムMを実行することにより得られ、暗号処理装置120の機能は、この電子機器にサブルーチンプログラムの1つとして組み込まれた暗号処理サブルーチンRを実行することにより得られる。   However, in practice, the information processing apparatus 100 is configured by incorporating a predetermined program into an electronic device including a computer, such as a personal computer, a smartphone, an electronic tablet, or an IC card. In the case of the illustrated example, the function of the main device 110 is obtained by executing a main program M incorporated as an application program (or an OS program) in this electronic device, and the function of the cryptographic processing device 120 is It is obtained by executing a cryptographic processing subroutine R incorporated as one of subroutine programs in this electronic device.

たとえば、§0で述べたアンドロイドOSが組み込まれたスマートフォンを情報処理装置100として利用する場合、主装置110の機能は、JAVA(登録商標)アプリとしてインストールされたメインプログラムMによって実現され、暗号処理装置120の機能は、「Shared Object」として用意された暗号処理サブルーチンRによって実現されることになる。このように、ここに示す実施例の場合、図5に示す個々のブロックは、実際には、コンピュータのハードウエア資源を利用したソフトウエアの機能として実現されるものである。   For example, when a smartphone incorporating the Android OS described in §0 is used as the information processing apparatus 100, the function of the main apparatus 110 is realized by the main program M installed as a JAVA (registered trademark) application, and is subjected to cryptographic processing. The function of the device 120 is realized by a cryptographic processing subroutine R prepared as “Shared Object”. Thus, in the case of the embodiment shown here, the individual blocks shown in FIG. 5 are actually realized as software functions utilizing the hardware resources of the computer.

すなわち、主装置110として機能するメインプログラムMにおいて、暗号処理(暗号化処理もしくは復号処理)が必要になった場合、暗号処理装置120として機能する暗号処理サブルーチンRを呼び出し、必要な暗号処理を依頼することになる。その際、図示のとおり、元データDと符号データFとが暗号処理装置120(暗号処理サブルーチンR)に引き渡されることになる。暗号処理装置120は、この依頼に基づき暗号処理を実行し、その結果として得られる処理済データEを、主装置110(メインプログラムM)に戻すことになる。主装置110は、この処理済データEを用いて、必要な処理を続行する。   That is, when encryption processing (encryption processing or decryption processing) is required in the main program M functioning as the main device 110, the encryption processing subroutine R functioning as the encryption processing device 120 is called to request the necessary encryption processing. Will do. At that time, as shown in the drawing, the original data D and the code data F are delivered to the cryptographic processing device 120 (cryptographic processing subroutine R). The cryptographic processing device 120 executes cryptographic processing based on this request, and returns the processed data E obtained as a result to the main device 110 (main program M). The main apparatus 110 continues the necessary processing using the processed data E.

図示のとおり、メインプログラムMによって実現される主装置110は、情報処理部111、暗号処理依頼部112、暗号処理結果受信部113を有している。ここで、情報処理部111は、メインプログラムMの目的となる所定の情報処理を実行する構成要素であり、実行される情報処理の内容は、メインプログラムMの目的により様々である。たとえば、当該メインプログラムMが、何らかの決済処理を行うアプリケーションプログラムである場合は、情報処理部111の指示に基づいて、外部の決済サーバと通信が行われ、ユーザの認証や決済金額の送信などの情報処理が実行されることになる。   As illustrated, the main apparatus 110 realized by the main program M includes an information processing unit 111, an encryption processing request unit 112, and an encryption processing result reception unit 113. Here, the information processing unit 111 is a component that executes predetermined information processing that is the purpose of the main program M, and the content of the information processing that is executed varies depending on the purpose of the main program M. For example, when the main program M is an application program that performs some kind of payment processing, communication with an external payment server is performed based on an instruction from the information processing unit 111, and user authentication, payment amount payment, and the like are performed. Information processing is executed.

情報処理部111が情報処理を行う際に、何らかのデータに対して暗号処理が必要になると、暗号処理の対象となるデータを暗号処理依頼部112に引き渡して暗号処理を行うよう指示する。ここでは、暗号処理の対象となるデータを元データDと呼ぶことにする。なお、前述したように、本願における「暗号処理」とは、「暗号化処理(平文データPを暗号データCに変換する処理)」と「復号処理(暗号データCを平文データPに戻す処理)」との双方を意味するものである。したがって、元データDが平文データPの場合に行われる「暗号処理」は「暗号化処理」ということになり、元データDが暗号データCの場合に行われる「暗号処理」は「復号処理」ということになる。   When the information processing unit 111 performs information processing, if encryption processing is necessary for some data, the data to be subjected to encryption processing is transferred to the encryption processing request unit 112 to instruct to perform encryption processing. Here, data to be subjected to encryption processing is referred to as original data D. As described above, “encryption processing” in the present application means “encryption processing (processing to convert plaintext data P into encrypted data C)” and “decryption processing (processing to return encrypted data C to plaintext data P)”. "Means both. Therefore, the “encryption process” performed when the original data D is the plaintext data P is called “encryption process”, and the “encryption process” performed when the original data D is the encrypted data C is “decryption process”. It turns out that.

暗号処理依頼部112は、情報処理部111から引き渡された元データDと予め記憶されていた符号データFを、暗号処理装置120内のデータ入力部121に与える処理を行う。符号データFの実体については、後に詳述する。この暗号処理依頼部112が行う処理は、実際には、メインプログラムMから暗号処理サブルーチンRを呼び出し、暗号処理サブルーチンRに元データDと符号データFとを引き渡す処理ということになる。   The cryptographic processing request unit 112 performs processing for providing the original data D delivered from the information processing unit 111 and the code data F stored in advance to the data input unit 121 in the cryptographic processing device 120. The substance of the code data F will be described in detail later. The processing performed by the encryption processing request unit 112 is actually processing for calling the encryption processing subroutine R from the main program M and delivering the original data D and the code data F to the encryption processing subroutine R.

一方、暗号処理結果受信部113は、暗号処理装置120のデータ出力部125から出力された処理済データEを受け取り、これを情報処理部111に引き渡す処理を行う。処理済データEは、暗号処理装置120による処理結果であり、元データDが平文データPであった場合には、これを暗号化して得られる暗号データCということになり、元データDが暗号データCであった場合には、これを復号して得られる平文データPということになる。この暗号処理結果受信部113が行う処理は、実際には、暗号処理サブルーチンRから戻される処理済データEを変数として取り込み、メインプログラムMの後続処理ステップ(サブルーチンコール命令に後続する命令)に引きつぐ処理ということになる。情報処理部111は、得られた処理済データEを用いて、後続する情報処理を続行する。   On the other hand, the cryptographic processing result receiving unit 113 receives the processed data E output from the data output unit 125 of the cryptographic processing device 120 and performs a process of delivering it to the information processing unit 111. The processed data E is a result of processing by the cryptographic processing device 120. If the original data D is plaintext data P, it is encrypted data C obtained by encrypting the original data D, and the original data D is encrypted. If it is data C, it is plaintext data P obtained by decrypting it. The processing performed by the cryptographic processing result receiving unit 113 actually takes the processed data E returned from the cryptographic processing subroutine R as a variable and pulls it to the subsequent processing step (command following the subroutine call command) of the main program M. It will be processing. The information processing unit 111 continues subsequent information processing using the obtained processed data E.

続いて、暗号処理装置120(暗号処理サブルーチンR)の構成を説明する。図示のとおり、暗号処理装置120は、データ入力部121、符号変換部122、乱数テーブル格納部123、暗号処理部124、データ出力部125を有しており、入力した元データDに対して暗号化もしくは復号のための暗号処理を行い、処理済データEを出力する機能を果たす。   Next, the configuration of the cryptographic processing device 120 (cryptographic processing subroutine R) will be described. As illustrated, the cryptographic processing device 120 includes a data input unit 121, a code conversion unit 122, a random number table storage unit 123, a cryptographic processing unit 124, and a data output unit 125, and encrypts the input original data D. A function of performing encryption processing for conversion or decryption and outputting processed data E is achieved.

データ入力部121は、暗号処理の対象となる元データDと暗号処理に必要な符号データFとを外部(主装置110)から入力する構成要素であり、暗号処理サブルーチンRにおいて、メインプログラムMから元データDと符号データFの引き渡しを受ける処理を行う部分に相当する。ここで、データ入力部121が入力した符号データFは符号変換部122に与えられ、元データDは暗号処理部124に与えられる。   The data input unit 121 is a component that inputs the original data D to be subjected to encryption processing and the code data F necessary for encryption processing from the outside (main device 110), and from the main program M in the encryption processing subroutine R. This corresponds to the part that performs the process of receiving the original data D and the code data F. Here, the code data F input by the data input unit 121 is provided to the code conversion unit 122, and the original data D is provided to the encryption processing unit 124.

符号変換部122は、データ入力部121が入力した符号データFを暗号鍵Kに変換する処理を行う。乱数テーブル格納部123は、この変換処理を行う際に参照される乱数テーブルTを格納する構成要素であり、符号変換部122による変換処理の結果は、この乱数テーブルTの内容に基づいて一義的に決定される。符号変換部122による変換処理で得られた暗号鍵Kは、暗号処理部124に与えられる。   The code conversion unit 122 performs a process of converting the code data F input by the data input unit 121 into an encryption key K. The random number table storage unit 123 is a component that stores a random number table T that is referred to when performing this conversion process. The result of the conversion process performed by the code conversion unit 122 is uniquely based on the contents of the random number table T. To be determined. The encryption key K obtained by the conversion process by the code conversion unit 122 is given to the encryption processing unit 124.

暗号処理部124は、データ入力部121から与えられた元データDに対して、符号変換部122から与えられた暗号鍵Kを用いて、予め組み込まれている所定の暗号アルゴリズムAに基づく暗号処理を実施し、処理済データEを生成する処理を行う。このように、所定の暗号鍵を用いた所定の暗号アルゴリズムに基づいて、元データDに対して暗号処理を施す具体的な処理方法は、既に様々な方法が公知となっているため、ここでは詳しい説明は省略する。暗号処理部124で生成された処理済データEは、データ出力部125に与えられる。   The encryption processing unit 124 uses the encryption key K given from the code conversion unit 122 for the original data D given from the data input unit 121 to perform encryption processing based on a predetermined encryption algorithm A incorporated in advance. To generate processed data E. As described above, since various methods are already known as specific processing methods for performing encryption processing on the original data D based on a predetermined encryption algorithm using a predetermined encryption key, here, Detailed description is omitted. The processed data E generated by the encryption processing unit 124 is given to the data output unit 125.

データ出力部125は、こうして生成された処理済データEを外部(主装置110)に出力する構成要素であり、暗号処理サブルーチンRにおいて、処理済データEをメインプログラムMに引き渡す処理を行う部分に相当する。図示のとおり、処理済データEは、主装置110(メインプログラムM)の暗号処理結果受信部113に引き渡される。上述したとおり、処理済データEは、元データDが平文データPであった場合には、これを暗号化して得られる暗号データCであり、元データが暗号データCであった場合には、これを復号して得られる平文データPである。   The data output unit 125 is a component that outputs the processed data E generated in this way to the outside (main device 110). In the encryption processing subroutine R, the data output unit 125 is a part that performs processing for passing the processed data E to the main program M. Equivalent to. As shown in the figure, the processed data E is delivered to the encryption processing result receiving unit 113 of the main device 110 (main program M). As described above, the processed data E is the encrypted data C obtained by encrypting the original data D when the original data D is the plain text data P, and the processed data E when the original data is the encrypted data C. This is plain text data P obtained by decrypting this.

続いて、乱数テーブルTの実体と、符号データFと暗号鍵Kとの関係を説明しよう。本発明において用いられる乱数テーブルTは、それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値を収容したテーブルであり、乱数テーブル格納部123に格納されている。別言すれば、暗号処理サブルーチンR内にテーブルとして組み込まれていることになる。   Next, the relationship between the substance of the random number table T and the code data F and the encryption key K will be described. The random number table T used in the present invention is a table in which N (M ≧ N) numerical values are randomly stored in a plurality of M cells each having a unique cell number. Stored. In other words, it is incorporated as a table in the cryptographic processing subroutine R.

図6は、このような乱数テーブルTの具体例を示す表である。この表において、実線の矩形は個々のセルを示しており、16行16列の合計256個のセルが設けられている。すなわち、図6に示す例は、M=256に設定し、256個のセルを有する乱数テーブルTを定義した例ということになる。個々のセルは、破線によって上下2段に分けられているが、上段の数値は当該セルに付された固有のセル番号(第0番〜第255番)を示し、下段の数値は当該セルに収容されている数値を示している。図では、便宜上、上段のセル番号も下段の数値も16進表示で記載してある。   FIG. 6 is a table showing a specific example of such a random number table T. In this table, solid rectangles indicate individual cells, and a total of 256 cells of 16 rows and 16 columns are provided. That is, the example shown in FIG. 6 is an example in which M = 256 is set and a random number table T having 256 cells is defined. Each cell is divided into two upper and lower levels by a broken line, but the upper numerical value indicates a unique cell number (No. 0 to 255) assigned to the cell, and the lower numerical value is assigned to the cell. Shows the number contained. In the figure, for convenience, the upper cell number and the lower numerical value are shown in hexadecimal notation.

上段に示すセル番号は、第1行第1列のセルを「00」として、右方向に「01」,「02」,... と順に増加してゆき、右端の「0F」から第2行第1列の「10」へと続き、以下同様にして、列に関しては左から右の順に、行に関しては上から下の順に、それぞれ番号を付し、最後に第16行第16列のセル(右下隅のセル)の番号を「FF」としている。   The cell numbers shown in the upper row are incremented in the order of “01”, “02”,... In the right direction from “0F” to the second row, with the cell in the first row and first column being “00”. Continuing on to “10” in the first column of the row, in the same manner, numbers are assigned in order from the left to the right for the columns, and from the top to the bottom for the rows, and finally, the 16th row and the 16th column. The number of the cell (cell in the lower right corner) is “FF”.

一方、この例では、各セルの下段に収容されている数値も、0〜255の256通り(N=256)の整数としており、16進表示で「00」〜「FF」なる256通りの数値が、いずれかのセルに収容されている。ただ、収容場所はランダムになっており、テーブル全体が乱数テーブルを構成している。たとえば、この例の場合、セル番号第0番(「00」)のセルには「5B」なる数値が収容され、セル番号第1番(「01」)のセルには「D3」なる数値が収容され、セル番号第2番(「02」)のセルには「8A」なる数値が収容されている。 Meanwhile, in this example, numerical values contained in the lower part of each cell also has an integral 256 of 0~255 (N = 256), 16 hexadecimal value 256 consisting "00" to "FF" in the display Is contained in one of the cells. However, the storage locations are random, and the entire table forms a random number table. For example, in this example, the cell number 0 (“00”) contains a numeric value “5B”, and the cell number 1 (“01”) contains a numeric value “D3”. The cell number 2 (“02”) contains a numerical value “8A”.

結局、この乱数テーブルTは、セル番号として与えられる0〜255の中の所定の整数(上段)と、セルに収容されている数値として与えられる0〜255の中の所定の整数(下段)とを1対1に対応づけた256組のペアーを定義するテーブルになっている。このため、任意のセル番号を指定すると、これに対応する数値が1つだけ定まり、逆に、任意の数値を指定すると、これに対応するセル番号が1つだけ定まることになる。たとえば、セル番号「00」を指定すれば数値「5B」が一義的に定まり、数値「D3」を指定すれば、セル番号「01」が一義的に定まる。   Eventually, this random number table T includes a predetermined integer (upper stage) of 0 to 255 given as a cell number, and a predetermined integer (lower stage) of 0 to 255 given as a numerical value accommodated in the cell. It is a table that defines 256 pairs that correspond to each other. For this reason, if an arbitrary cell number is specified, only one numerical value corresponding to this is determined. Conversely, if an arbitrary numerical value is specified, only one cell number corresponding thereto is determined. For example, if the cell number “00” is specified, the numerical value “5B” is uniquely determined, and if the numerical value “D3” is specified, the cell number “01” is uniquely determined.

なお、図6では、説明の便宜上、個々のセルの上段にセル番号を付して示したが、実際の乱数テーブルでは、セル番号を必ずしもデータとして格納しておく必要はない。たとえば、個々のセルをアドレス値として特定することができるのであれば、当該アドレス値がセル番号として機能するので、乱数テーブルとしては、単に、セル内に収容される合計256バイトの数値を羅列したデータであってもかまわない。   In FIG. 6, for convenience of explanation, cell numbers are assigned to the upper stages of individual cells. However, in an actual random number table, it is not always necessary to store cell numbers as data. For example, if an individual cell can be specified as an address value, the address value functions as a cell number. Therefore, the random number table simply lists a total of 256 bytes contained in the cell. Data may be used.

このような乱数テーブルTを利用すれば、1バイトのデータをL個羅列したLバイトの暗号鍵Kを、1バイトのデータをL個羅列したLバイトの符号データFに変換することができ、その逆の変換を行うこともできる。図7は、図6に示す乱数テーブルTを参照することにより、暗号鍵Kと符号データFとの間の相互変換を行った例を示す図である。   By using such a random number table T, it is possible to convert an L-byte encryption key K in which L 1-byte data is enumerated into L-byte code data F in which L 1-byte data is enumerated, The reverse conversion can also be performed. FIG. 7 is a diagram illustrating an example in which mutual conversion between the encryption key K and the code data F is performed by referring to the random number table T illustrated in FIG. 6.

この例の場合、暗号鍵Kは、「26,5C,08,3A,D8,55,2B,10」という8バイト(L=8)のデータによって構成されているが、個々のバイトを構成する数値が収容されているセルのセル番号を図6に示す乱数テーブルTから特定すると、数値「26」はセル番号「AD」のセル、数値「5C」はセル番号「31」のセル、数値「08」はセル番号「63」のセル、... といった具合にセル番号が特定できるので、暗号鍵Kの個々の数値をセル番号に置き換えれば、図7に符号データFとして示す8バイトのデータ「AD,31,63,1D,12,60,EE,1B」が一義的に定まることになる。   In this example, the encryption key K is composed of 8 bytes (L = 8) of “26, 5C, 08, 3A, D8, 55, 2B, 10”, but each byte is composed. When the cell number of the cell containing the numerical value is specified from the random number table T shown in FIG. 6, the numerical value “26” is the cell with the cell number “AD”, the numerical value “5C” is the cell with the cell number “31”, and the numerical value “ Since “08” is the cell number “63”, the cell number can be specified, etc., if each numerical value of the encryption key K is replaced with the cell number, the 8-byte data shown as the code data F in FIG. “AD, 31, 63, 1D, 12, 60, EE, 1B” is uniquely determined.

逆に、符号データFとして「AD,31,63,1D,12,60,EE,1B」なるデータが与えられれば、これらのデータをセル番号とする各セルに収容されている数値を並べることにより、「26,5C,08,3A,D8,55,2B,10」という8バイトの暗号鍵Kが一義的に定まることになる。   On the other hand, if the data “AD, 31, 63, 1D, 12, 60, EE, 1B” is given as the code data F, the numerical values accommodated in the respective cells having these data as cell numbers are arranged. Thus, an 8-byte encryption key K of “26, 5C, 08, 3A, D8, 55, 2B, 10” is uniquely determined.

結局、図6に示す乱数テーブルTを予め用意しておけば、図7に例示するように、暗号鍵Kと符号データFとの間で相互変換を行うことができる。そこで、本発明では、主装置110から暗号処理装置120に対して、暗号鍵Kを引き渡す代わりに、この暗号鍵Kに対応する符号データFを引き渡すという方法を採用することにより、暗号鍵Kが漏洩することを防止している。   Eventually, if the random number table T shown in FIG. 6 is prepared in advance, mutual conversion can be performed between the encryption key K and the code data F as illustrated in FIG. Therefore, in the present invention, instead of delivering the encryption key K from the main device 110 to the encryption processing device 120, by adopting a method of delivering the code data F corresponding to the encryption key K, the encryption key K is obtained. Prevents leakage.

前述したとおり、図5に示す情報処理装置100では、暗号処理依頼部112が、情報処理部111から与えられた元データDと、予め記憶している符号データFと、を暗号処理装置120に引き渡す処理を行うことになるが、ここで暗号処理依頼部112が予め記憶している符号データFは、暗号処理装置120内の暗号処理部124が暗号処理を行う際に実際に用いるべき暗号鍵Kを、乱数テーブル格納部123内に格納されている乱数テーブルTを用いて変換することにより得られる符号データになっている。   As described above, in the information processing apparatus 100 illustrated in FIG. 5, the encryption processing request unit 112 transmits the original data D given from the information processing unit 111 and the code data F stored in advance to the encryption processing apparatus 120. The code data F stored in advance in the encryption processing request unit 112 is an encryption key that is actually used when the encryption processing unit 124 in the encryption processing device 120 performs encryption processing. The code data is obtained by converting K using the random number table T stored in the random number table storage unit 123.

別言すれば、暗号処理装置120として機能する暗号処理サブルーチンRにおいて、図7上段に示すような「26,5C,08,3A,D8,55,2B,10」なる8バイトの暗号鍵Kを用いた暗号処理を実行させたい場合には、主装置110として機能するメインプログラムMの作成者は、予め図6に示すような乱数テーブルT(乱数テーブル格納部123に格納されているテーブル)を参照して、図7下段に示すような「AD,31,63,1D,12,60,EE,1B」なる8バイトの符号データFを作成しておき、これをメインプログラムM内に組み込んでおけばよい。   In other words, in the cryptographic processing subroutine R functioning as the cryptographic processing device 120, an 8-byte cryptographic key K “26, 5C, 08, 3A, D8, 55, 2B, 10” as shown in the upper part of FIG. In order to execute the encryption processing used, the creator of the main program M functioning as the main device 110 uses a random number table T (a table stored in the random number table storage unit 123) as shown in FIG. Referring to FIG. 7, the 8-byte code data F “AD, 31, 63, 1D, 12, 60, EE, 1B” as shown in the lower part of FIG. 7 is created and incorporated in the main program M. Just keep it.

この場合、主装置110から暗号処理装置120に対して暗号処理の依頼が行われる際に(すなわち、メインプログラムMから暗号処理サブルーチンRが呼び出される際に)、元データDと、「AD,31,63,1D,12,60,EE,1B」なる符号データFとが引き渡されることになるが、符号変換部122により、符号データFは暗号鍵Kに変換されるので、暗号処理部124は、変換後に得られる「26,5C,08,3A,D8,55,2B,10」なる暗号鍵Kを用いて暗号処理を実施することになる。かくして、メインプログラムMの作成者の意図どおりの暗号処理を実行することができる。   In this case, when a request for encryption processing is made from the main device 110 to the encryption processing device 120 (that is, when the encryption processing subroutine R is called from the main program M), the original data D and “AD, 31” , 63, 1D, 12, 60, EE, 1B "is delivered, but the code conversion unit 122 converts the code data F into the encryption key K. The cryptographic process is performed using the cryptographic key K “26, 5C, 08, 3A, D8, 55, 2B, 10” obtained after the conversion. Thus, the encryption process as intended by the creator of the main program M can be executed.

このように、本発明によれば、暗号処理依頼部112に所望の符号データFを用意しておき、この符号データFを暗号処理装置120に引き渡して暗号処理を行わせることができるため、暗号処理に用いる暗号鍵Kを自由に指定することができ、利便性が向上することになる。しかも、情報処理装置100内には、暗号鍵K自身を用意しておく必要がないので、たとえクラッカーが主装置110内を解析したとしても(メインプログラムMをソースコードに戻してリバースエンジニアリングを行ったとしても)、暗号鍵Kを盗み出すことはできない。   As described above, according to the present invention, since the desired code data F is prepared in the encryption processing request unit 112 and the code data F can be delivered to the encryption processing device 120 to perform encryption processing. The encryption key K used for the process can be freely specified, and convenience is improved. Moreover, since it is not necessary to prepare the encryption key K itself in the information processing apparatus 100, even if the cracker analyzes the main apparatus 110 (reverse engineering is performed by returning the main program M to the source code). The encryption key K cannot be stolen.

もちろん、クラッカーの解析により、符号データF自体は盗み出されるかもしれないが、符号データFを暗号鍵Kに変換するには乱数テーブルTが必要になるため、符号データFが漏洩したとしても、暗号鍵Kが直ちに察知されることはない。乱数テーブルTは、暗号処理装置120内に組み込まれているが、上述したとおり、暗号処理装置120は、マシン語によって記述された「Shared Object」内の暗号処理サブルーチンRの機能として実現されるものであるため、これを解析して、乱数テーブルTを抜き出す作業は、メインプログラムMを解析する作業に比べて極めて困難である。   Of course, the code data F itself may be stolen by cracker analysis, but since the random number table T is required to convert the code data F into the encryption key K, even if the code data F leaks, The key K is not immediately detected. The random number table T is incorporated in the cryptographic processing device 120. As described above, the cryptographic processing device 120 is realized as a function of the cryptographic processing subroutine R in the “Shared Object” described in the machine language. Therefore, the work of analyzing this and extracting the random number table T is extremely difficult compared to the work of analyzing the main program M.

なお、任意の暗号鍵Kを符号データFに変換するには、乱数テーブルTが必要になるので、メインプログラムMの作成者などが希望すれば、当該希望者には乱数テーブルTのデータを開示する必要がある。したがって、当該開示を受けた者は、乱数テーブルTの内容が漏洩しないよう、厳重に管理する必要がある。なお、乱数テーブルTの内容を開示せずに、任意の暗号鍵Kを用いた暗号処理を可能にする方法については、§7で述べる。   In order to convert an arbitrary encryption key K into code data F, a random number table T is required. Therefore, if the creator of the main program M desires, the data of the random number table T is disclosed to the desired person. There is a need to. Therefore, the person who has received the disclosure needs to strictly manage so that the contents of the random number table T are not leaked. Note that a method for enabling encryption processing using an arbitrary encryption key K without disclosing the contents of the random number table T will be described in §7.

以上、暗号処理依頼部112内に予め符号データFを記憶させておき、暗号処理を依頼する際には、暗号処理依頼部112が、情報処理部111から与えられた元データDと予め記憶していた符号データFとを暗号処理装置120に与える例を述べたが、符号データFは、必ずしも暗号処理依頼部112内に記憶させておく必要はなく、外部装置や外部のサーバから受け取るようにしてもかまわない。   As described above, the code data F is stored in advance in the encryption processing request unit 112, and when requesting encryption processing, the encryption processing request unit 112 stores the original data D given from the information processing unit 111 in advance. In the above example, the code data F is given to the cryptographic processing device 120. However, the code data F is not necessarily stored in the cryptographic processing requesting unit 112, and is received from an external device or an external server. It doesn't matter.

たとえば、符号データFを、情報処理装置100とは別の外部装置に記憶しておき、必要なときに、これを暗号処理依頼部112によって読み出して利用するような形態を採ることも可能である。あるいは、符号データFを外部のサーバに用意しておき、必要なときに、これを暗号処理依頼部112によってダウンロードして利用するような形態も可能である。もちろん、符号データFは、必要になるたびに、外部のサーバにおいて乱数テーブルTを参照して暗号鍵Kから生成するようにしてもかまわない。また、データ入力部121が、暗号処理依頼部112を介さずに、符号データFを外部装置や外部のサーバから直接入力するような形態を採ることもできる。   For example, it is possible to store the code data F in an external device different from the information processing device 100 and read it out by the encryption processing request unit 112 and use it when necessary. . Alternatively, the code data F can be prepared in an external server, and can be downloaded and used by the encryption processing request unit 112 when necessary. Of course, the code data F may be generated from the encryption key K by referring to the random number table T in an external server whenever necessary. Further, the data input unit 121 may directly input the code data F from an external device or an external server without using the encryption processing request unit 112.

なお、図6には、本発明に用いる乱数テーブルTの一例として、0〜255のセル番号が付された合計256個のセルに、0〜255の256通りの数値をランダムに収容したテーブルを示したが、もちろん、本発明に利用可能な乱数テーブルは、このようなテーブルに限定されるものではない。   In addition, in FIG. 6, as an example of the random number table T used in the present invention, a table in which 256 numbers from 0 to 255 are randomly stored in a total of 256 cells assigned cell numbers from 0 to 255. Of course, the random number table usable in the present invention is not limited to such a table.

本発明で利用する乱数テーブルは、それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値を収容したテーブルであれば、どのようなテーブルであってもかまわない。符号変換部122は、このような乱数テーブルを参照することにより、データ入力部121が入力した符号データFに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、変換後のデータを暗号鍵Kとして暗号処理部124に与える処理を行えばよい。   The random number table used in the present invention is any table as long as it is a table that accommodates N (M ≧ N) numerical values in a plurality of M cells each having a unique cell number. It doesn't matter. The code conversion unit 122 refers to such a random number table, and converts each numerical value included in the code data F input by the data input unit 121 into a numerical value stored in a cell having the numerical value as a cell number. A replacement conversion process may be performed, and a process of giving the converted data to the encryption processing unit 124 as the encryption key K may be performed.

より具体的には、暗号処理部124に組み込まれる一般的な暗号アルゴリズムAは、0〜(N−1)の範囲の値をもった整数を羅列した暗号鍵Kを用いて暗号処理を行う機能を有しているので、乱数テーブルTとしては、0〜(M−1)の範囲の連続したセル番号が付与された複数M個のセルに、0〜(N−1)の範囲の連続するN通りの整数をランダムに収容したテーブルを用意すればよい。そうすれば、符号変換部122は、0〜(M−1)の範囲の値をもった整数を羅列した符号データFを、0〜(N−1)の範囲の値をもった整数を羅列した暗号鍵Kに置き換える変換処理を行うことができる。   More specifically, the general encryption algorithm A incorporated in the encryption processing unit 124 has a function of performing encryption processing using an encryption key K that enumerates integers having values ranging from 0 to (N−1). Therefore, as the random number table T, a range of 0 to (N-1) is continuously added to a plurality of M cells assigned consecutive cell numbers in the range of 0 to (M-1). What is necessary is just to prepare the table which accommodated N types of integers at random. Then, the code conversion unit 122 enumerates the code data F in which the integers having a value in the range of 0 to (M−1) are enumerated, and the integer having the values in the range of 0 to (N−1). It is possible to perform conversion processing to replace the encrypted key K.

特に、M=Nに設定し、N個のセルにN通りの整数をそれぞれ1個ずつ収容した乱数テーブルを用いるようにすれば、図8に示すように、暗号鍵Kを構成する個々のデータも、符号データFを構成する個々のデータも、いずれも0〜(N−1)の範囲の値をもったN通りの整数になるので利便性が向上する。図6に示す乱数テーブルTは、M=N=256に設定した例ということになる。実用上、コンピュータのデータ処理は、1バイトのデータを1つの単位として取り扱うことになるので、M=N=256に設定した例は最も実用的な例と言うことができる。   In particular, if M = N is set and a random number table in which N integers are stored in N cells is used, individual data constituting the encryption key K as shown in FIG. In addition, since the individual data constituting the code data F are all N integers having values in the range of 0 to (N−1), the convenience is improved. The random number table T shown in FIG. 6 is an example in which M = N = 256. In practical use, since data processing of a computer handles 1-byte data as one unit, an example in which M = N = 256 can be said to be the most practical example.

すなわち、M=N=256に設定すれば、0〜255の連続セル番号が付与された256個のセルに、0〜255の整数をそれぞれ1個ずつランダムに収容した乱数テーブルT(図6の例)を定義することができるので、符号変換部122は、1バイトのデータをL個羅列したLバイトの符号データFを、個々のバイトごとに置換して、1バイトのデータをL個羅列したLバイトの暗号鍵Kに置き換える変換処理を行うことができ(図7の例は、L=8とした例)、暗号処理部124は、このLバイトの暗号鍵Kを用いて暗号処理を行うことができる。   That is, if M = N = 256 is set, random number table T (in FIG. 6) that randomly stores an integer of 0-255 in 256 cells assigned consecutive cell numbers of 0-255. For example, the code conversion unit 122 replaces the L byte code data F obtained by arranging L bytes of 1-byte data for each byte, and converts L bytes of 1-byte data. The L-byte encryption key K can be converted into the conversion process (in the example of FIG. 7, L = 8), and the encryption processing unit 124 performs the encryption process using the L-byte encryption key K. It can be carried out.

もっとも、本発明に用いる乱数テーブルでは、必ずしもセルの数Mと、セルに収容される数値のバリエーションの数Nとについて、M=Nの関係が成り立つ必要はない。すなわち、図9に示すとおり、セルの数をM個として、0〜(M−1)の範囲内のセル番号を付与し、個々のセル内に収容される数値を、0〜(N−1)の範囲内のN通りの整数とした場合、M≧Nの関係が維持されていればよい。別言すれば、M>Nの関係にあってもよい。M>Nに設定した場合は、M個のセルにN通りの整数がそれぞれ少なくとも1個ずつ収容され、一部のセルには他のセルと同一の整数が重複して収容されることになる。結局、本発明に用いる乱数テーブルは、複数M個(M≧N)のセルに、0〜(N−1)の範囲の整数を重複を許してランダムに収容したテーブルであればよいことになる。   However, in the random number table used in the present invention, the relationship of M = N does not necessarily hold for the number M of cells and the number N of numerical variations accommodated in the cells. That is, as shown in FIG. 9, the number of cells is M, cell numbers within a range of 0 to (M−1) are assigned, and numerical values accommodated in individual cells are set to 0 to (N−1). ), It is only necessary that the relationship of M ≧ N be maintained. In other words, the relationship may be M> N. When M> N, at least one N number of integers are accommodated in each of the M cells, and some cells contain the same integer as that of other cells. . After all, the random number table used in the present invention may be a table in which a plurality of M (M ≧ N) cells are randomly accommodated by allowing an integer in the range of 0 to (N−1) to overlap. .

特に、N=256、M>256に設定した場合、乱数テーブル格納部123には、0〜(M−1)の連続セル番号が付与されたM個のセルに、0〜255の整数をそれぞれ少なくとも1個ずつランダムに収容した乱数テーブルが格納されることになるが、そのような乱数テーブルを用いた場合でも、符号変換部122は、所定ビット長のデータをL個羅列した符号データを、個々のデータごとに置換して、1バイトのデータをL個羅列したLバイトの暗号鍵Kに置き換える変換処理を行うことができ、暗号処理部124は、このLバイトの暗号鍵Kを用いて暗号処理を行うことができる。   In particular, when N = 256 and M> 256 are set, the random number table storage unit 123 assigns integers of 0 to 255 to M cells to which consecutive cell numbers of 0 to (M−1) are assigned. At least one random number table stored at random is stored, but even when such a random number table is used, the code conversion unit 122 stores code data obtained by enumerating L pieces of data having a predetermined bit length, It is possible to perform conversion processing by replacing each piece of data and replacing the 1-byte data with an L-byte encryption key K arranged in L, and the encryption processing unit 124 uses the L-byte encryption key K. Cryptographic processing can be performed.

たとえば、N=256、M=512に設定した場合、512個のセルに、0〜255の整数が少なくとも1個ずつ含まれるように、各整数をランダムに収容した乱数テーブルが得られる。この場合、ある特定の整数が、1つのセルのみに収容されている場合もあれば、複数のセルに重複して収容されている場合もある。一方、符号データFを構成する個々のデータは、0〜511の512個のセルを特定するセル番号を示すことになるので、1バイト(8ビット)では足りず、9ビットのビット長をもったデータということになる。それでも、符号変換部122は、符号データFを構成する個々のデータを、当該データで特定されるセル番号のセルに収容されている整数に置き換える処理を行うことにより、符号データFを一義的に暗号鍵Kに変換することができる。   For example, when N = 256 and M = 512 are set, a random number table in which each integer is randomly stored so that at least one integer from 0 to 255 is included in 512 cells is obtained. In this case, a specific integer may be accommodated in only one cell, or may be accommodated in a plurality of cells. On the other hand, each piece of data constituting the code data F indicates a cell number that identifies 512 cells from 0 to 511, so 1 byte (8 bits) is not sufficient, and it has a bit length of 9 bits. Data. Still, the code conversion unit 122 uniquely replaces the code data F by performing a process of replacing individual data constituting the code data F with an integer accommodated in the cell having the cell number specified by the data. It can be converted into an encryption key K.

もっとも、M>Nに設定した場合は、1つの整数が複数のセルに重複して収容されることになるので、当該整数が収容されているセルのセル番号が、複数通り存在することになる。その場合、いずれのセル番号を用いてもよいことになる。その結果、同一の暗号鍵Kに対して、複数通りの符号データFを定義することができ、符号データFの決定に冗長性が加わることになる。このような冗長性は、耐タンパ性を向上させる上で有益である。すなわち、異なる複数通りの符号データFを用いて、同一の暗号鍵Kを発生させることができるようになるので、統計的な手段を利用した不正な解析を困難にする効果が得られる。   However, when M> N is set, an integer is accommodated redundantly in a plurality of cells, so there are a plurality of cell numbers of cells in which the integer is accommodated. . In that case, any cell number may be used. As a result, a plurality of types of code data F can be defined for the same encryption key K, and redundancy is added to the determination of the code data F. Such redundancy is beneficial in improving tamper resistance. That is, since the same encryption key K can be generated using a plurality of different types of code data F, an effect of making unauthorized analysis using statistical means difficult can be obtained.

<<< §2. 本発明の第2の実施形態 >>>
続いて、本発明の第2の実施形態を説明する。図10は、この第2の実施形態に係る情報処理装置100Aの構成を示すブロック図である。この第2の実施形態の構成の大部分は、図5を参照しながら§1において述べた第1の実施形態の構成と同じである。そこで、図10に示す第2の実施形態の各構成要素の符号には、図5に示す第1の実施形態の対応する構成要素の符号の末尾に「A」を付した符号を用いて示すことにし、ここでは、図5に示す第1の実施形態の対応する構成要素との相違点のみを説明することにする。
<<< §2. Second embodiment of the present invention >>>
Subsequently, a second embodiment of the present invention will be described. FIG. 10 is a block diagram showing the configuration of the information processing apparatus 100A according to the second embodiment. Most of the configuration of the second embodiment is the same as the configuration of the first embodiment described in section 1 with reference to FIG. Therefore, the reference numerals of the constituent elements of the second embodiment shown in FIG. 10 are indicated by using the reference numerals with “A” added to the end of the reference numerals of the corresponding constituent elements of the first embodiment shown in FIG. Only the differences from the corresponding components of the first embodiment shown in FIG. 5 will be described here.

図10に示す第2の実施形態の特徴は、暗号処理装置120Aが複数の乱数テーブルを用いる点にある。図示のとおり、乱数テーブル格納部123Aには、複数K通り(図示の例の場合、K=16)の乱数テーブルT0〜T15が格納されている。個々の乱数テーブルT0〜T15は、いずれも図6に例示した乱数テーブルTと同様に、合計256個のセルに、0〜255の整数をそれぞれ1個ずつランダムに収容したテーブルになっている。ただ、ランダムの状態は、16枚の乱数テーブルT0〜T15のそれぞれについて異なっているため、16枚の乱数テーブルT0〜T15の内容は互いに異なっている。   A feature of the second embodiment shown in FIG. 10 is that the cryptographic processing device 120A uses a plurality of random number tables. As illustrated, the random number table storage unit 123A stores a plurality of K random number tables T0 to T15 (K = 16 in the illustrated example). As with the random number table T illustrated in FIG. 6, each of the individual random number tables T0 to T15 is a table that randomly stores one integer from 0 to 255 in a total of 256 cells. However, since the random state is different for each of the 16 random number tables T0 to T15, the contents of the 16 random number tables T0 to T15 are different from each other.

一方、主装置110A内の暗号処理依頼部112Aは、情報処理部111Aから与えられた元データDと、予め記憶されていたもしくは外部から受け取った符号データFに加えて、更に、複数K通りの乱数テーブルの中の1つを指定するテーブル指定子tをデータ入力部121Aに対して与える機能を有している。このため、データ入力部121Aは、元データDおよび符号データFとともに、特定の乱数テーブルを指定するテーブル指定子tを入力する処理を行うことになる。ここで、元データDは暗号処理部124Aに与えられ、符号データFおよびテーブル指定子tは符号変換部122Aに与えられる。   On the other hand, in addition to the original data D given from the information processing unit 111A and the code data F stored in advance or received from the outside, the encryption processing request unit 112A in the main device 110A further includes a plurality of K types. It has a function of giving a table designator t for designating one of the random number tables to the data input unit 121A. For this reason, the data input unit 121A performs a process of inputting a table designator t for designating a specific random number table together with the original data D and the code data F. Here, the original data D is given to the encryption processing unit 124A, and the code data F and the table designator t are given to the code conversion unit 122A.

そして、符号変換部122Aは、複数K通りの乱数テーブルのうち、与えられたテーブル指定子tで指定された特定の乱数テーブルを参照することにより、符号データFを暗号鍵Kに変換する変換処理を行う。その他の各構成要素の機能は、図5に示す第1の実施形態の対応する構成要素の機能と同様である。   Then, the code conversion unit 122A converts the code data F into the encryption key K by referring to a specific random number table designated by the given table designator t among a plurality of K random number tables. I do. The functions of the other constituent elements are the same as the corresponding constituent elements of the first embodiment shown in FIG.

図11は、図10に示す第2の実施形態で利用されるテーブル指定子tの具体例を示す図である。ここでは、図7に示す例と同様に、8バイトのデータからなる符号データFを同じく8バイトのデータからなる暗号鍵Kに変換する場合を例として挙げてある。   FIG. 11 is a diagram showing a specific example of the table designator t used in the second embodiment shown in FIG. Here, as in the example shown in FIG. 7, the case where the code data F composed of 8-byte data is converted into the encryption key K composed of 8-byte data is taken as an example.

図11(a) に示す例は、8バイトの符号データFの先頭に1バイトのテーブル指定子tを付加した形態を示す。すなわち、この例の場合、「06」(16進表示)なる1バイトのテーブル指定子により、乱数テーブルT6が特定されている。後続する8バイトのデータ「AD,31,63,1D,12,60,EE,1B」は、図7下段に示す符号データFである。ここでは、この8バイトのデータを、それぞれf1〜f8なる符号で示すことにする。結局、図11(a) に示すデータは、1バイトのテーブル指定子tと、8バイトの符号データF(バイトf1〜f8)によって構成されている。   The example shown in FIG. 11A shows a form in which a 1-byte table designator t is added to the head of 8-byte code data F. That is, in this example, the random number table T6 is specified by a 1-byte table designator “06” (hexadecimal display). The subsequent 8-byte data “AD, 31, 63, 1D, 12, 60, EE, 1B” is code data F shown in the lower part of FIG. Here, the 8-byte data is indicated by codes f1 to f8, respectively. After all, the data shown in FIG. 11A is composed of a 1-byte table designator t and 8-byte code data F (bytes f1 to f8).

符号変換部122Aは、このようなデータが与えられると、まず、乱数テーブル格納部123A内に格納されている複数の乱数テーブルT0〜T15の中から、テーブル指定子tによって指定された乱数テーブルT6を選択し、この乱数テーブルT6を用いて、8バイトの符号データF(バイトf1〜f8)を8バイトの暗号鍵Kに変換する処理を行うことになる。   When such data is given to the code conversion unit 122A, first, the random number table T6 designated by the table designator t from the plurality of random number tables T0 to T15 stored in the random number table storage unit 123A. And using this random number table T6, a process of converting 8-byte code data F (bytes f1 to f8) into an 8-byte encryption key K is performed.

もちろん、テーブル指定子tによって異なる乱数テーブルを指定すれば、符号変換部122Aによる変換によって得られる暗号鍵Kの内容も異なってくる。したがって、メインプログラムMの作成者は、暗号処理部124Aに意図どおりの暗号鍵Kを用いた暗号処理を行わせるために、まず、乱数テーブルT0〜T15の中から1つの乱数テーブルを選択し、選択した乱数テーブルを用いて、意図どおりの暗号鍵Kを符号データFに変換する作業を行い、得られた符号データFに、選択した乱数テーブルを指定するためのテーブル指定子tを付して暗号処理依頼部112Aに記憶させておくようにすればよい(あるいは、外部のサーバからダウンロードさせてもよい)。   Of course, if a different random number table is designated by the table designator t, the contents of the encryption key K obtained by the conversion by the code conversion unit 122A also differ. Accordingly, the creator of the main program M first selects one random number table from the random number tables T0 to T15 in order to cause the cryptographic processing unit 124A to perform cryptographic processing using the intended cryptographic key K. The selected random number table is used to convert the encryption key K as intended into the code data F, and the obtained code data F is attached with a table designator t for specifying the selected random number table. It may be stored in the encryption processing request unit 112A (or may be downloaded from an external server).

このように、第2の実施形態では、乱数テーブル格納部123A内に複数の乱数テーブルを用意しておき、符号データFとともに特定の乱数テーブルを指定するテーブル指定子tを与えるようにしたため、同じ暗号鍵Kに変換可能な複数通りの符号データが存在することになる。このため、クラッカーによる不正な解析を一層困難にすることができ、耐タンパ性を向上させることができる。   As described above, in the second embodiment, a plurality of random number tables are prepared in the random number table storage unit 123A, and the table designator t for designating a specific random number table is given together with the code data F. There are a plurality of types of code data that can be converted into the encryption key K. For this reason, unauthorized analysis by a cracker can be made more difficult, and tamper resistance can be improved.

また、この第2の実施形態は、複数の異なるプログラム提供業者に、同一の暗号処理サブルーチンRを利用させる場合に、業者相互間でのセキュリティ維持にも貢献する。たとえば、プログラム提供業者X,Y,Zの三者が、この情報処理装置100Aで利用可能なアプリケーションプログラムとして、それぞれメインプログラムMx,My,Mzを開発した場合を考えてみる。ここで、これらのメインプログラムMx,My,Mzは、いずれも同一の暗号処理サブルーチンRを利用して暗号処理を行うものとしよう。   Further, the second embodiment also contributes to maintaining security between vendors when a plurality of different program providers are allowed to use the same cryptographic processing subroutine R. For example, let us consider a case where the program providers X, Y, and Z have developed main programs Mx, My, and Mz as application programs that can be used in the information processing apparatus 100A. Here, it is assumed that these main programs Mx, My, and Mz all perform cryptographic processing using the same cryptographic processing subroutine R.

暗号処理部124Aにおいて暗号処理を行う際に、所望の暗号鍵Kを用いた処理が行われるようにするためには、予め特定の乱数テーブルを用いて、当該暗号鍵Kに対応する符号データFを作成する必要がある。このため、プログラム提供業者X,Y,Zの三者には、乱数テーブルの内容を開示する必要がある。この第2の実施形態の場合、乱数テーブル格納部123A内には、複数通りの乱数テーブルT0〜T15が用意されているので、個々の業者に特定の乱数テーブルを割り当てるようにすれば、各業者には、割り当てられた特定の乱数テーブルの内容のみを開示すればよい。   In order to perform processing using a desired encryption key K when performing encryption processing in the encryption processing unit 124A, the code data F corresponding to the encryption key K is previously used using a specific random number table. Need to create. For this reason, it is necessary to disclose the contents of the random number table to the program providers X, Y, and Z. In the case of the second embodiment, since a plurality of random number tables T0 to T15 are prepared in the random number table storage unit 123A, if a specific random number table is assigned to each individual supplier, each supplier Only the contents of the assigned specific random number table need be disclosed.

たとえば、乱数テーブルT0を業者Xに割り当て、乱数テーブルT1を業者Yに割り当て、乱数テーブルT2を業者Zに割り当てたとすれば、業者Xには乱数テーブルT0のみを開示し、業者Yには乱数テーブルT1のみを開示し、業者Zには乱数テーブルT2のみを開示すれば足りる。そうすれば、たとえば、業者Xには、乱数テーブルT1,T2の内容は開示されないので、業者Y,Zが提供するメインプログラムMy,Mzが取り扱う符号データFの内容が業者Xに露呈したとしても、業者Xは、これを暗号鍵Kに変換することはできない。したがって、同一の暗号処理サブルーチンRが、三者X,Y,Zによって共用されることになっても、業者相互間でのセキュリティ維持に支障は生じない。   For example, if the random number table T0 is assigned to the trader X, the random number table T1 is assigned to the trader Y, and the random number table T2 is assigned to the trader Z, only the random number table T0 is disclosed to the trader X, and the random number table is assigned to the trader Y. It is sufficient to disclose only T1 and disclose only the random number table T2 to the trader Z. Then, for example, since the contents of the random number tables T1 and T2 are not disclosed to the trader X, even if the contents of the code data F handled by the main programs My and Mz provided by the traders Y and Z are exposed to the trader X, The trader X cannot convert this into the encryption key K. Therefore, even if the same cryptographic processing subroutine R is shared by the three parties X, Y, and Z, there is no problem in maintaining the security among the contractors.

もちろん、上例の場合、メインプログラムMxから暗号処理サブルーチンRに引き渡される符号データFについては、乱数テーブルT0を指定するテーブル指定子txが付されることになり、メインプログラムMyから暗号処理サブルーチンRに引き渡される符号データFについては、乱数テーブルT1を指定するテーブル指定子tyが付されることになり、メインプログラムMzから暗号処理サブルーチンRに引き渡される符号データFについては、乱数テーブルT2を指定するテーブル指定子tzが付されることになる。したがって、このような利用形態では、テーブル指定子tx,ty,tzは、個々の業者X,Y,Zを示す業者指定子として機能することになる。   Of course, in the case of the above example, the code data F delivered from the main program Mx to the encryption processing subroutine R is given a table designator tx for specifying the random number table T0, and the encryption processing subroutine R from the main program My. Is assigned a table designator ty for designating the random number table T1, and for the code data F delivered from the main program Mz to the encryption processing subroutine R, the random number table T2 is designated. A table designator tz is attached. Therefore, in such a usage mode, the table designators tx, ty, and tz function as trader designators indicating individual traders X, Y, and Z.

以上、1つの符号データFを構成する複数のデータ(たとえば、図11(a) に示す例の場合は、8個のデータf1〜f8)について、同一の乱数テーブルを参照して暗号鍵Kに変換する例を述べたが、1つの符号データFを構成する複数のデータについて、それぞれ異なる乱数テーブルを参照して暗号鍵Kに変換するようにしてもかまわない。図11(b) ,(c) は、このような例を示すものである。   As described above, a plurality of pieces of data constituting one code data F (for example, eight pieces of data f1 to f8 in the case of the example shown in FIG. 11A) are referred to the same random number table as the encryption key K. Although an example of conversion has been described, a plurality of data constituting one code data F may be converted to the encryption key K with reference to different random number tables. FIGS. 11B and 11C show such an example.

たとえば、図11(b) に示す例の場合、符号データFが、8バイトのデータによって構成されている点は、図11(a) に示す例と同様であるが、符号データFを構成する個々のバイトf1〜f8の直前には、それぞれ別個独立したテーブル指定子t1〜t8が挿入されている。すなわち、第i番目のテーブル指定子tiは、後続する第i番目のデータfi(1バイトのデータ)を、暗号鍵Kを構成する1バイトのデータに変換するために参照すべき特定の乱数テーブルを指定する役割を果たしている。たとえば、符号データFを構成する第1番目のバイトf1は、テーブル指定子t1によって指定された特定の乱数テーブルを参照することにより、暗号鍵Kを構成する第1番目のバイトに変換されることになる。   For example, in the case of the example shown in FIG. 11B, the code data F is similar to the example shown in FIG. Immediately before the individual bytes f1 to f8, independent table specifiers t1 to t8 are inserted. That is, the i-th table designator ti is a specific random number table to be referred to in order to convert the subsequent i-th data fi (1-byte data) into 1-byte data constituting the encryption key K. Plays the role of specifying. For example, the first byte f1 constituting the code data F is converted into the first byte constituting the encryption key K by referring to a specific random number table designated by the table designator t1. become.

一方、図11(c) に示す例も、符号データFが、8バイトのデータによって構成されている点は、図11(b) に示す例と同様であるが、個々のバイトf1〜f8の直前にそれぞれテーブル指定子t1〜t8を挿入する代わりに、参照すべき乱数テーブルを切り替える場合にのみ、テーブル指定子が挿入されている。具体的には、この例の場合、4種類のテーブル指定子t1〜t4が所定箇所に挿入されており、テーブル指定子が挿入されるたびに、参照対象となる乱数テーブルが切り替えられる。   On the other hand, the example shown in FIG. 11C is similar to the example shown in FIG. 11B in that the code data F is composed of 8-byte data. Instead of inserting the table specifiers t1 to t8 immediately before, the table specifier is inserted only when the random number table to be referred to is switched. Specifically, in this example, four types of table designators t1 to t4 are inserted at predetermined locations, and the random number table to be referred to is switched each time the table designator is inserted.

すなわち、まず、先頭のテーブル指定子t1によって、最初に参照すべき乱数テーブルが指定され、これに後続する3バイトのデータf1,f2,f3は、いずれもテーブル指定子t1によって指定された乱数テーブルを用いて変換が行われる。次に、新たなテーブル指定子t2が挿入されているため、これに後続する2バイトのデータf4,f5は、いずれもテーブル指定子t2によって指定された乱数テーブルを用いて変換が行われる。更に、新たなテーブル指定子t3が挿入されており、後続するデータf6は、テーブル指定子t3によって指定された乱数テーブルを用いて変換が行われ、続く新たなテーブル指定子t4の挿入により、残りの2バイトのデータf7,f8は、テーブル指定子t4によって指定された乱数テーブルを用いて変換が行われる。   That is, first, a random table to be referred to first is designated by the head table designator t1, and the subsequent three bytes of data f1, f2, and f3 are all random number tables designated by the table designator t1. The conversion is performed using. Next, since a new table designator t2 is inserted, the subsequent 2-byte data f4 and f5 are both converted using the random number table designated by the table designator t2. Further, a new table designator t3 is inserted, and the subsequent data f6 is converted using the random number table designated by the table designator t3, and the remaining new table designator t4 is inserted by the subsequent insertion of the new table designator t4. The 2-byte data f7 and f8 are converted using the random number table specified by the table designator t4.

要するに、図11(c) に示す例では、バイト群「f1,f2,f3」についてはテーブル指定子t1による指定が行われ、バイト群「f4,f5」についてはテーブル指定子t2による指定が行われ、バイトf6についてはテーブル指定子t3による指定が行われ、バイト群「f7,f8」についてはテーブル指定子t4による指定が行われていることになる。   In short, in the example shown in FIG. 11C, the byte group “f1, f2, f3” is designated by the table designator t1, and the byte group “f4, f5” is designated by the table designator t2. Thus, the byte f6 is designated by the table designator t3, and the byte group “f7, f8” is designated by the table designator t4.

このように、第2の実施形態を実施する際には、データ入力部121Aに対して、元データDと、1バイトのデータをL個羅列したLバイトの符号データF(図11に示す例の場合は、L=8)と、このLバイトの符号データFを構成する個々のバイトごとに、もしくは、複数バイトからなる個々のバイト群ごとに、それぞれ特定の乱数テーブルを指定する固有のテーブル指定子tと、を与えるようにし、符号変換部122Aが、符号データFの個々のバイトごとに、もしくは、複数バイトからなる個々のバイト群ごとに、それぞれ固有のテーブル指定子tで指定された乱数テーブルを参照することにより変換処理を行うようにすればよい。   As described above, when the second embodiment is implemented, the original data D and L-byte code data F obtained by arranging L 1-byte data into the data input unit 121A (example shown in FIG. 11). In this case, L = 8) and a unique table for designating a specific random number table for each byte constituting the L-byte code data F or for each byte group composed of a plurality of bytes. The code conversion unit 122A is designated by a unique table designator t for each byte of the code data F or for each byte group composed of a plurality of bytes. The conversion process may be performed by referring to the random number table.

<<< §3. 本発明の第3の実施形態 >>>
ここでは、本発明の第3の実施形態を説明する。図12は、この第3の実施形態に係る情報処理装置100Bの構成を示すブロック図である。この第3の実施形態の構成の大部分は、図5を参照しながら§1において述べた第1の実施形態の構成と同じである。そこで、図12に示す第3の実施形態の各構成要素の符号には、図5に示す第1の実施形態の対応する構成要素の符号の末尾に「B」を付した符号を用いて示すことにし、ここでは、図5に示す第1の実施形態の対応する構成要素との相違点のみを説明することにする。
<<< §3. Third embodiment of the present invention >>>
Here, a third embodiment of the present invention will be described. FIG. 12 is a block diagram showing the configuration of the information processing apparatus 100B according to the third embodiment. Most of the configuration of the third embodiment is the same as the configuration of the first embodiment described in section 1 with reference to FIG. Accordingly, the reference numerals of the constituent elements of the third embodiment shown in FIG. 12 are indicated by the reference numerals with “B” added to the end of the corresponding constituent elements of the first embodiment shown in FIG. Only the differences from the corresponding components of the first embodiment shown in FIG. 5 will be described here.

図12に示す第3の実施形態の特徴は、§2で述べた第2の実施形態の特徴と同様に、暗号処理装置120Bが複数の乱数テーブルを用いる点にある。図示の乱数テーブル格納部123Bは、図10に示す乱数テーブル格納部123Aと全く同じ構成要素であり、複数K通り(図示の例の場合、K=16)の乱数テーブルT0〜T15を格納している。ただ、第2の実施形態の場合、これら複数の乱数テーブルの中の特定の乱数テーブルを指定するために、テーブル指定子tを用いていたが、この第3の実施形態の場合、テーブル指定子tの代わりにパターン選択子pが用いられる。   The feature of the third embodiment shown in FIG. 12 is that the cryptographic processing device 120B uses a plurality of random number tables, like the feature of the second embodiment described in §2. The illustrated random number table storage unit 123B is the same component as the random number table storage unit 123A shown in FIG. 10, and stores a plurality of K types (K = 16 in the illustrated example) of random number tables T0 to T15. Yes. However, in the case of the second embodiment, the table designator t is used to designate a specific random number table among the plurality of random number tables. However, in the case of this third embodiment, the table designator is used. A pattern selector p is used instead of t.

一方、符号変換部122Bは、図10に示す符号変換部122Aと同様に、特定の乱数テーブルを参照して、符号データFを暗号鍵Kに変換する処理を行う機能を有しているが、予め、乱数テーブル格納部123Bが格納しているK通りの乱数テーブルを所定の規則で順次指定するテーブル指定パターンを複数通り記憶している。図12には、3通りのテーブル指定パターンP1〜P3が格納されている状態が示されている。   On the other hand, the code conversion unit 122B has a function of performing processing for converting the code data F into the encryption key K with reference to a specific random number table, similarly to the code conversion unit 122A illustrated in FIG. A plurality of table designation patterns for sequentially designating the K random number tables stored in the random number table storage unit 123B in accordance with a predetermined rule are stored in advance. FIG. 12 shows a state in which three table designation patterns P1 to P3 are stored.

主装置110B内の暗号処理依頼部112Bは、情報処理部111Bから与えられた元データDと、1バイトのデータをL個羅列したLバイトの符号データF(予め記憶されていたデータであってもよいし、外部から受け取ったデータであってもよい)と、パターン選択子pと、をデータ入力部121Bに対して与える機能を有している。ここで、パターン選択子pは、符号変換部122Bに記憶されている複数のテーブル指定パターン(図示の例では、3通りのテーブル指定パターンP1〜P3)のいずれを選択するかを示すデータである。   The encryption processing requesting unit 112B in the main apparatus 110B has the original data D given from the information processing unit 111B and L-byte code data F obtained by arranging L 1-byte data (data stored in advance). Or the data received from the outside) and the pattern selector p may be provided to the data input unit 121B. Here, the pattern selector p is data indicating which of a plurality of table designation patterns (three table designation patterns P1 to P3 in the illustrated example) stored in the code conversion unit 122B is selected. .

したがって、データ入力部121Bは、元データDと、1バイトのデータをL個羅列したLバイトの符号データFと、特定のテーブル指定パターンを選択するパターン選択子pと、を入力する処理を行うことになる。ここで、元データDは暗号処理部124Bに与えられ、符号データFおよびパターン選択子pは符号変換部122Bに与えられる。   Accordingly, the data input unit 121B performs a process of inputting the original data D, L-byte code data F obtained by arranging L 1-byte data, and a pattern selector p for selecting a specific table designation pattern. It will be. Here, the original data D is provided to the encryption processing unit 124B, and the code data F and the pattern selector p are provided to the code conversion unit 122B.

符号変換部122Bは、このパターン選択子pによって選択されたテーブル指定パターンに基づいて、符号データFの個々のバイトごとに乱数テーブルを指定し、指定された乱数テーブルを参照することにより変換処理を行い、暗号鍵Kを生成することになる。その他の各構成要素の機能は、図5に示す第1の実施形態の対応する構成要素の機能と同様である。   The code converting unit 122B specifies a random number table for each byte of the code data F based on the table specifying pattern selected by the pattern selector p, and performs conversion processing by referring to the specified random number table. The encryption key K is generated. The functions of the other constituent elements are the same as the corresponding constituent elements of the first embodiment shown in FIG.

ここで、テーブル指定パターンP1〜P3は、符号データFを構成するLバイトのデータに対して、どのような規則で乱数テーブルを指定するかを定義したものである。図13は、この3通りのテーブル指定パターンP1〜P3によって定義される指定規則の一例を示す図である。指定規則の欄に記載された各ますは、符号データを構成する個々のバイトに対応するものであり、各ますに記入された符号T0〜T15は、指定対象となる乱数テーブルを示す符号である。図13は、L=8の場合の規則を示しており、符号データFが8バイトのデータから構成されていることを前提としている。   Here, the table designating patterns P1 to P3 define the rules for designating the random number table for the L-byte data constituting the code data F. FIG. 13 is a diagram showing an example of a designation rule defined by these three table designation patterns P1 to P3. Each square described in the designation rule column corresponds to each byte constituting the code data, and the codes T0 to T15 entered in each square are codes indicating a random number table to be designated. . FIG. 13 shows a rule when L = 8, and it is assumed that the code data F is composed of 8-byte data.

たとえば、図13のテーブル指定パターンP1は、「T0,T1,T2,... ,T7」という順序で乱数テーブルを順次指定する規則を示している。したがって、パターン選択子pが、テーブル指定パターンP1を選択するものであった場合、符号変換部122Bは、符号データFの第1番目のバイトf1については乱数テーブルT0を参照して変換を行い、符号データFの第2番目のバイトf2については乱数テーブルT1を参照して変換を行い、符号データFの第3番目のバイトf3については乱数テーブルT2を参照して変換を行い、... 、符号データFの第8番目のバイトf8については乱数テーブルT7を参照して変換を行うことになる。図14(a) は、符号データFを構成する個々のバイトf1〜f8に対して、テーブル指定パターンP1に基づいて指定される乱数テーブルを示す図である。   For example, the table designation pattern P1 of FIG. 13 shows a rule for sequentially designating the random number table in the order of “T0, T1, T2,..., T7”. Therefore, when the pattern selector p is for selecting the table designating pattern P1, the code conversion unit 122B converts the first byte f1 of the code data F with reference to the random number table T0, and The second byte f2 of the code data F is converted with reference to the random number table T1, the third byte f3 of the code data F is converted with reference to the random number table T2, and so on. The eighth byte f8 of the code data F is converted with reference to the random number table T7. FIG. 14A is a diagram showing a random number table that is designated based on the table designation pattern P1 for each of the bytes f1 to f8 constituting the code data F. FIG.

一方、図13のテーブル指定パターンP2は、「T1,T3,T5,... ,T15」という順序で乱数テーブルを順次指定する規則を示している。したがって、パターン選択子pが、テーブル指定パターンP2を選択するものであった場合、符号変換部122Bは、符号データFの第1番目のバイトf1については乱数テーブルT1を参照して変換を行い、符号データFの第2番目のバイトf2については乱数テーブルT3を参照して変換を行い、符号データFの第3番目のバイトf3については乱数テーブルT5を参照して変換を行い、... 、符号データFの第8番目のバイトf8については乱数テーブルT15を参照して変換を行うことになる。図14(b) は、符号データFを構成する個々のバイトf1〜f8に対して、テーブル指定パターンP2に基づいて指定される乱数テーブルを示す図である。   On the other hand, the table specification pattern P2 of FIG. 13 shows a rule for sequentially specifying the random number table in the order of “T1, T3, T5,..., T15”. Therefore, when the pattern selector p selects the table designation pattern P2, the code conversion unit 122B converts the first byte f1 of the code data F with reference to the random number table T1, The second byte f2 of the code data F is converted with reference to the random number table T3, the third byte f3 of the code data F is converted with reference to the random number table T5,... The eighth byte f8 of the code data F is converted with reference to the random number table T15. FIG. 14B is a diagram showing a random number table that is designated based on the table designation pattern P2 for the individual bytes f1 to f8 that constitute the code data F. FIG.

また、図13のテーブル指定パターンP3は、「T2,T5,T8,T2,T5,T8,T2,T5」という順序で乱数テーブルを順次指定する規則を示している。したがって、パターン選択子pが、テーブル指定パターンP3を選択するものであった場合、符号変換部122Bは、符号データFの第1番目のバイトf1については乱数テーブルT2を参照して変換を行い、符号データFの第2番目のバイトf2については乱数テーブルT5を参照して変換を行い、符号データFの第3番目のバイトf3については乱数テーブルT8を参照して変換を行い、... 、符号データFの第8番目のバイトf8については乱数テーブルT5を参照して変換を行うことになる。図14(c) は、符号データFを構成する個々のバイトf1〜f8に対して、テーブル指定パターンP3に基づいて指定される乱数テーブルを示す図である。   Further, the table designation pattern P3 of FIG. 13 shows a rule for sequentially designating the random number table in the order of “T2, T5, T8, T2, T5, T8, T2, T5”. Therefore, when the pattern selector p is for selecting the table designating pattern P3, the code conversion unit 122B converts the first byte f1 of the code data F with reference to the random number table T2, The second byte f2 of the code data F is converted with reference to the random number table T5, the third byte f3 of the code data F is converted with reference to the random number table T8,... The eighth byte f8 of the code data F is converted with reference to the random number table T5. FIG. 14 (c) is a diagram showing a random number table that is designated based on the table designation pattern P3 for the individual bytes f1 to f8 constituting the code data F.

ここでは、3通りのテーブル指定パターンP1〜P3の具体例を示したが、もちろん、テーブル指定パターンとしては、乱数テーブル格納部123B内に格納されている複数通りの乱数テーブルを所定の規則で順次指定するものであれば、どのような規則に基づくパターンを採用してもかまわない。   Here, specific examples of the three table designation patterns P1 to P3 have been shown. Of course, as the table designation pattern, a plurality of random number tables stored in the random number table storage unit 123B are sequentially applied according to a predetermined rule. A pattern based on any rule may be adopted as long as it is specified.

このように、第3の実施形態では、乱数テーブル格納部123B内に複数の乱数テーブルを用意しておき、符号変換部122B内に複数のテーブル指定パターンを用意しておき、符号データFとともに特定のテーブル指定パターンを選択するテーブル選択子pを与えるようにしたため、符号データFと暗号鍵Kとの対応関係がより複雑になる。このため、クラッカーによる不正な解析を一層困難にすることができ、耐タンパ性を向上させることができる。   As described above, in the third embodiment, a plurality of random number tables are prepared in the random number table storage unit 123B, a plurality of table designation patterns are prepared in the code conversion unit 122B, and specified together with the code data F. Since the table selector p for selecting the table designation pattern is provided, the correspondence relationship between the code data F and the encryption key K becomes more complicated. For this reason, unauthorized analysis by a cracker can be made more difficult, and tamper resistance can be improved.

もちろん、メインプログラムを提供する業者ごとに特定のテーブル指定パターンを割り当てる運用を採ることも可能である。たとえば、業者Xにはテーブル指定パターンP1を割り当て、業者Yにはテーブル指定パターンP2を割り当て、業者Zにはテーブル指定パターンP3を割り当てるようにすればよい。この場合、パターン選択子pは、個々の業者X,Y,Zを示す業者指定子として機能することになる。   Of course, it is also possible to adopt an operation in which a specific table designation pattern is assigned to each supplier providing the main program. For example, the table designation pattern P1 may be assigned to the trader X, the table designation pattern P2 may be assigned to the trader Y, and the table designation pattern P3 may be assigned to the trader Z. In this case, the pattern selector p functions as a trader designator indicating individual traders X, Y, and Z.

<<< §4. 本発明の第4の実施形態 >>>
ここでは、本発明の第4の実施形態を説明する。図15は、この第4の実施形態に係る情報処理装置100Cの構成を示すブロック図である。この第4の実施形態の構成の大部分は、図5を参照しながら§1において述べた第1の実施形態の構成と同じである。そこで、図15に示す第4の実施形態の各構成要素の符号には、図5に示す第1の実施形態の対応する構成要素の符号の末尾に「C」を付した符号を用いて示すことにし、ここでは、図5に示す第1の実施形態の対応する構成要素との相違点のみを説明することにする。
<<< §4. Fourth embodiment of the present invention >>>
Here, a fourth embodiment of the present invention will be described. FIG. 15 is a block diagram showing a configuration of an information processing apparatus 100C according to the fourth embodiment. Most of the configuration of the fourth embodiment is the same as the configuration of the first embodiment described in section 1 with reference to FIG. Therefore, the reference numerals of the constituent elements of the fourth embodiment shown in FIG. 15 are indicated by using the reference numerals with “C” added to the end of the reference numerals of the corresponding constituent elements of the first embodiment shown in FIG. Only the differences from the corresponding components of the first embodiment shown in FIG. 5 will be described here.

図10に示す第2の実施形態や、図12に示す第3の実施形態では、複数の乱数テーブルを用いることにより、耐タンパ性を更に向上させる工夫を施した。図15に示す第4の実施形態では、乱数テーブル格納部123C内には単一の乱数テーブルT(たとえば、図6に示すような乱数テーブル)のみが用意されているが、この乱数テーブルTの各セルに収容されている数値を所定の規則でシフトさせることにより、擬似的に複数の乱数テーブルを用いたのと同様の効果を奏する工夫が施されている。   In the second embodiment shown in FIG. 10 and the third embodiment shown in FIG. 12, a device for further improving tamper resistance is used by using a plurality of random number tables. In the fourth embodiment shown in FIG. 15, only a single random number table T (for example, a random number table as shown in FIG. 6) is prepared in the random number table storage unit 123C. By shifting the numerical value accommodated in each cell according to a predetermined rule, a device that produces the same effect as using a plurality of pseudo random number tables is provided.

まず、主装置110C内の暗号処理依頼部112Cは、情報処理部111Cから与えられた元データDと、予め記憶されていたもしくは外部から受け取った符号データFに加えて、更に、乱数テーブルTの各セル内の数値をシフトさせる規則を示すシフト指示子sをデータ入力部121Cに対して与える機能を有している。このため、データ入力部121Cは、元データDおよび符号データFとともに、シフト指示子sを入力する処理を行うことになる。ここで、元データDは暗号処理部124Cに与えられ、符号データFおよびシフト指示子sは符号変換部122Cに与えられる。   First, in addition to the original data D given from the information processing unit 111C and the code data F stored in advance or received from the outside, the encryption processing request unit 112C in the main device 110C further stores the random number table T. The data input unit 121C is provided with a shift indicator s indicating a rule for shifting the numerical value in each cell. For this reason, the data input unit 121C performs a process of inputting the shift indicator s together with the original data D and the code data F. Here, the original data D is given to the encryption processing unit 124C, and the code data F and the shift indicator s are given to the code conversion unit 122C.

一方、符号変換部122Cは、乱数テーブル格納部123C内に格納されている乱数テーブルT内の各数値を、シフト指示子sによって示される規則に基づいてシフトさせ、シフト後の数値を用いて変換を行い、暗号鍵Kを生成する変換処理を行う。その他の各構成要素の機能は、図5に示す第1の実施形態の対応する構成要素の機能と同様である。   On the other hand, the code conversion unit 122C shifts each numerical value in the random number table T stored in the random number table storage unit 123C based on the rule indicated by the shift indicator s, and converts it using the shifted numerical value. And a conversion process for generating the encryption key K is performed. The functions of the other constituent elements are the same as the corresponding constituent elements of the first embodiment shown in FIG.

図16は、図15に示す第4の実施形態で利用されるシフト指示子sの具体例を示す図である。この例では、シフト指示子sは、正もしくは負のいずれかのシフト方向とシフト量dとを示すデータによって構成されている。たとえば、「+5」なるシフト指示子sは、正方向にシフト量5だけシフトすることを示し、「−3」なるシフト指示子sは、負方向にシフト量3だけシフトすることを示している。   FIG. 16 is a diagram showing a specific example of the shift indicator s used in the fourth embodiment shown in FIG. In this example, the shift indicator s is composed of data indicating either a positive or negative shift direction and a shift amount d. For example, a shift indicator s “+5” indicates that the shift is shifted by 5 in the positive direction, and a shift indicator s “−3” indicates that the shift is shifted by 3 in the negative direction. .

符号変換部122Cは、与えられたシフト指示子sによって示されるシフト方向が正の場合には、乱数テーブルTの第i番目のセル番号をもつセル内の数値を第(i+d)番目のセル番号をもつセルにシフトさせ、シフト方向が負の場合には、乱数テーブルTの第i番目のセル番号をもつセル内の数値を第(i−d)番目のセル番号をもつセルにシフトさせるシフト処理を行う機能を有しており、シフト後の数値を用いて変換を行い、暗号鍵Kを生成する。但し、シフト後のセルが、セル番号の範囲から外れる場合には、シフト後のセル番号にセルの総数Mを加算もしくは減算してセル番号の範囲内となるようにする修正処理を行う。   When the shift direction indicated by the given shift indicator s is positive, the code conversion unit 122C converts the numerical value in the cell having the i-th cell number of the random number table T to the (i + d) -th cell number. If the shift direction is negative, the value in the cell having the i-th cell number in the random number table T is shifted to the cell having the (id) cell number. It has a function to perform processing, performs conversion using the shifted numerical value, and generates an encryption key K. However, when the shifted cell is out of the cell number range, a correction process is performed so that the total number M of cells is added to or subtracted from the shifted cell number to be within the cell number range.

上記シフト処理は、いわゆるローテーションシフトと呼ばれているシフト方法である。図17は、8行8列に並べられた合計64個のセル(ここでは、セル番号を1〜64とする)からなる乱数テーブルに対して、このようなローテーションシフトを行った例を示す図である。図17(a) および図17(b) の左側に示す乱数テーブルは、乱数テーブル格納部123Cに格納されている元の乱数テーブルを示している。なお、ここでは、説明の便宜上、各セル内に1〜64の数字を順番に収容した例を示してあるが、実際には、各セルにはランダムに数値が収容されている。   The shift process is a so-called rotation shift method. FIG. 17 is a diagram illustrating an example in which such a rotation shift is performed on a random number table including a total of 64 cells (cell numbers 1 to 64 in this example) arranged in 8 rows and 8 columns. It is. The random number table shown on the left side of FIGS. 17A and 17B is the original random number table stored in the random number table storage unit 123C. Here, for convenience of explanation, an example in which numbers 1 to 64 are sequentially accommodated in each cell is shown, but in reality, numerical values are randomly accommodated in each cell.

図17(a) の右側に示すテーブルは、元の乱数テーブルに対して、「+5」なるシフト指示子sに基づくシフト処理を行うことにより得られるテーブルである。個々のセル内の数値は、正方向に5セル分だけシフトされており、第i番目のセル番号をもつセル内の数値は第(i+5)番目のセル番号をもつセルに移動されている。但し、第65〜69番目のセルにシフトされるべき数値「60」〜「64」については、セル番号の範囲(1〜64)から外れるため、セルの総数64を減算して、第1〜5番目のセルに移動させている。   The table shown on the right side of FIG. 17A is a table obtained by performing shift processing based on the shift indicator s “+5” on the original random number table. The numerical value in each cell is shifted by 5 cells in the positive direction, and the numerical value in the cell having the i-th cell number is moved to the cell having the (i + 5) -th cell number. However, since the numerical values “60” to “64” to be shifted to the 65th to 69th cells are out of the cell number range (1 to 64), the total number of cells 64 is subtracted to obtain the first to first values. It is moved to the fifth cell.

一方、図17(b) の右側に示すテーブルは、元の乱数テーブルに対して、「−3」なるシフト指示子sに基づくシフト処理を行うことにより得られるテーブルである。個々のセル内の数値は、負方向に3セル分だけシフトされており、第i番目のセル番号をもつセル内の数値は第(i−3)番目のセル番号をもつセルに移動されている。但し、第−2〜0番目のセルにシフトされるべき数値「1」〜「3」については、セル番号の範囲(1〜64)から外れるため、セルの総数64を加算して、第62〜64番目のセルに移動させている。   On the other hand, the table shown on the right side of FIG. 17B is a table obtained by performing shift processing based on the shift indicator s “−3” on the original random number table. The numerical value in each cell is shifted by 3 cells in the negative direction, and the numerical value in the cell having the i-th cell number is moved to the cell having the (i-3) -th cell number. Yes. However, since the numerical values “1” to “3” to be shifted to the −2nd to 0th cells are out of the cell number range (1 to 64), the total number of cells 64 is added to the 62nd cell. It is moved to the ˜64th cell.

もちろん、図17に示すシフト方法は、一例として示したものであり、シフト指示子sによって示されるシフト方法としては、任意の規則を採用することができる。なお、実用上は、乱数テーブル格納部123Cに格納されている乱数テーブルTに対して、実際に数値をシフトした新たなテーブルを作成する必要はなく、符号変換部122Cが、乱数テーブルT内の特定のセルを参照する際に、参照対象となるセルの位置をシフトさせれば十分である。たとえば、「+5」なるシフト指示子sが与えられた場合、符号変換部122Cは、第i番目のセル内の数値を参照する代わりに、第(i+5)番目のセル内の数値を参照すればよい。   Of course, the shift method shown in FIG. 17 is shown as an example, and any rule can be adopted as the shift method indicated by the shift indicator s. In practice, it is not necessary to create a new table in which numerical values are actually shifted with respect to the random number table T stored in the random number table storage unit 123C. When referring to a specific cell, it is sufficient to shift the position of the cell to be referenced. For example, when the shift indicator s “+5” is given, the sign conversion unit 122C may refer to the numerical value in the (i + 5) th cell instead of referring to the numerical value in the i-th cell. Good.

このように、シフト指示子sによって示される所定のシフト方法により、乱数テーブル格納部123C内に格納されている乱数テーブル内の各数値をシフトさせ、シフト後の数値を用いて変換を行い、暗号鍵Kを生成するようにすれば、符号データFと暗号鍵Kとの対応関係がより複雑になる。このため、クラッカーによる不正な解析を一層困難にすることができ、耐タンパ性を向上させることができる。   As described above, each numerical value in the random number table stored in the random number table storage unit 123C is shifted by the predetermined shift method indicated by the shift indicator s, and the converted numerical value is used for conversion. If the key K is generated, the correspondence between the code data F and the encryption key K becomes more complicated. For this reason, unauthorized analysis by a cracker can be made more difficult, and tamper resistance can be improved.

<<< §5. 本発明の第5の実施形態 >>>
次に、本発明の第5の実施形態を説明する。図18は、この第5の実施形態に係る情報処理装置100Dの構成を示すブロック図である。この第5の実施形態の構成の大部分は、図5を参照しながら§1において述べた第1の実施形態の構成と同じである。そこで、図18に示す第5の実施形態の各構成要素の符号には、図5に示す第1の実施形態の対応する構成要素の符号の末尾に「D」を付した符号を用いて示すことにし、ここでは、図5に示す第1の実施形態の対応する構成要素との相違点のみを説明することにする。
<<< §5. Fifth embodiment of the present invention >>>
Next, a fifth embodiment of the present invention will be described. FIG. 18 is a block diagram showing the configuration of the information processing apparatus 100D according to the fifth embodiment. Most of the configuration of the fifth embodiment is the same as the configuration of the first embodiment described in section 1 with reference to FIG. Therefore, the reference numerals of the constituent elements of the fifth embodiment shown in FIG. 18 are indicated by using the reference numerals with “D” added to the end of the reference numerals of the corresponding constituent elements of the first embodiment shown in FIG. Only the differences from the corresponding components of the first embodiment shown in FIG. 5 will be described here.

図18に示す第5の実施形態の特徴は、暗号処理部124Dが複数通りの暗号アルゴリズムの中の任意の暗号アルゴリズムを用いて暗号処理を実施する機能を有している点である。図には、暗号処理部124D内に4通りの暗号アルゴリズムA1〜A4が組み込まれている例が示されており、暗号処理部124Dは、これら4通りの暗号アルゴリズムA1〜A4の中から、アルゴリズム指定子aで指定された特定の暗号アルゴリズムを用いて暗号処理を行うことができる。   The feature of the fifth embodiment shown in FIG. 18 is that the cryptographic processing unit 124D has a function of performing cryptographic processing using an arbitrary cryptographic algorithm among a plurality of cryptographic algorithms. In the figure, an example in which four cryptographic algorithms A1 to A4 are incorporated in the cryptographic processing unit 124D is shown, and the cryptographic processing unit 124D can select an algorithm from the four cryptographic algorithms A1 to A4. Encryption processing can be performed using a specific encryption algorithm specified by the specifier a.

一方、主装置110D内の暗号処理依頼部112Dは、情報処理部111Dから与えられた元データDと、予め記憶されていたもしくは外部から受け取った符号データFに加えて、更に、複数通りの暗号アルゴリズム(図示の例の場合は、4通りの暗号アルゴリズムA1〜A4)の中の1つを指定するアルゴリズム指定子aをデータ入力部121Dに対して与える機能を有している。このため、データ入力部121Dは、元データDおよび符号データFとともに、特定の暗号アルゴリズムを指定するアルゴリズム指定子aを入力する処理を行うことになる。ここで、元データDおよびアルゴリズム指定子aは暗号処理部124Dに与えられ、符号データFは符号変換部122Dに与えられる。   On the other hand, in addition to the original data D given from the information processing unit 111D and the code data F stored in advance or received from the outside, the encryption processing request unit 112D in the main device 110D further includes a plurality of encryptions. The data input unit 121D has a function of giving an algorithm designator a for designating one of the algorithms (in the example shown, four encryption algorithms A1 to A4). For this reason, the data input unit 121D performs a process of inputting an algorithm designator a for designating a specific encryption algorithm together with the original data D and the code data F. Here, the original data D and the algorithm specifier a are given to the encryption processing unit 124D, and the code data F is given to the code conversion unit 122D.

そして、暗号処理部124Dは、与えられたアルゴリズム指定子aによって指定された暗号アルゴリズムを用いて、与えられた元データDに対して、与えられた暗号鍵Kを利用した暗号処理を実施し、処理済データEを生成することになる。その他の各構成要素の機能は、図5に示す第1の実施形態の対応する構成要素の機能と同様である。   Then, the cryptographic processing unit 124D performs cryptographic processing using the given cryptographic key K on the given original data D using the cryptographic algorithm designated by the given algorithm specifier a, Processed data E is generated. The functions of the other constituent elements are the same as the corresponding constituent elements of the first embodiment shown in FIG.

このように、第5の実施形態では、暗号処理部124D内に複数通りの暗号アルゴリズムを用意するようにしたため、同じ暗号鍵Kを用いたとしても、得られる処理済データEは、用いられた暗号アルゴリズムによって異なることになる。このため、クラッカーによる不正な解析を一層困難にすることができ、耐タンパ性を向上させることができる。   Thus, in the fifth embodiment, since a plurality of encryption algorithms are prepared in the encryption processing unit 124D, the processed data E obtained is used even if the same encryption key K is used. It depends on the encryption algorithm. For this reason, unauthorized analysis by a cracker can be made more difficult, and tamper resistance can be improved.

なお、耐タンパ性を更に向上させるために、アルゴリズム指定子aについても符号化した形で暗号処理装置120Dに引き渡すようにすることも可能である。上例の場合、アルゴリズム指定子aは、4通りの暗号アルゴリズムA1〜A4の中の1つを指定する情報になるので、たとえば、これら4通りの暗号アルゴリズムにそれぞれ「01」,「02」,「03」,「04」なるアルゴリズム指定子aを対応づけておけば、アルゴリズム指定子a=「02」により、暗号アルゴリズムA2を指定することができる。しかしながら、アルゴリズム指定子aはメインプログラムMを解析することにより盗み取ることが可能であるので、クラッカーが不正な手段で解析を行うと、指定された暗号アルゴリズムがどれであるかを認識できる可能性がある。   In order to further improve the tamper resistance, the algorithm specifier a can be transferred to the cryptographic processing device 120D in an encoded form. In the case of the above example, the algorithm designator a is information for designating one of the four cryptographic algorithms A1 to A4. For example, the four cryptographic algorithms are “01”, “02”, If the algorithm specifiers “03” and “04” are associated with each other, the encryption algorithm A2 can be specified by the algorithm specifier a = “02”. However, since the algorithm specifier a can be stolen by analyzing the main program M, if the cracker performs analysis by an unauthorized means, there is a possibility that the specified encryption algorithm can be recognized. There is.

そこで、より耐タンパ性を高めるために、主装置110Dから暗号処理装置120Dに対して、アルゴリズム指定子aを直接引き渡す代わりに、符号化されたアルゴリズム指定子を引き渡すようにすることも可能である。たとえば、上述したように、「01」,「02」,「03」,「04」の4通りの数値のいずれかを示すアルゴリズム指定子aを用いて、4通りの暗号アルゴリズムA1〜A4の中の1つを指定する場合、これら4通りの数値「01」,「02」,「03」,「04」を図6に示す乱数テーブルTを用いて符号化し、「68」,「67」,「AB」,「96」なる数値を、符号化されたアルゴリズム指定子として用いるようにすればよい。ここで、「68」は、図6に示す乱数テーブルTにおいて、数値「01」が収容されているセルのセル番号であり、「67」は、数値「02」が収容されているセルのセル番号であり、「AB」は、数値「03」が収容されているセルのセル番号であり、「96」は、数値「04」が収容されているセルのセル番号である。   Therefore, in order to further improve tamper resistance, it is also possible to deliver an encoded algorithm specifier instead of directly delivering the algorithm specifier a from the main apparatus 110D to the cryptographic processing apparatus 120D. . For example, as described above, the algorithm specifier a indicating any one of the four numerical values “01”, “02”, “03”, and “04” is used, and among the four cryptographic algorithms A1 to A4. Are designated by using the random number table T shown in FIG. 6, and “68”, “67”, The numerical values “AB” and “96” may be used as encoded algorithm specifiers. Here, “68” is the cell number of the cell containing the numerical value “01” in the random number table T shown in FIG. 6, and “67” is the cell of the cell containing the numerical value “02”. “AB” is the cell number of the cell containing the numerical value “03”, and “96” is the cell number of the cell containing the numerical value “04”.

そこで、たとえば、暗号アルゴリズムA2を指定する際には、「02」なるアルゴリズム指定子aを用いる代わりに、これを符号化した「67」なるデータを符号化されたアルゴリズム指定子として用いるようにする。主装置110Dは、「67」なる情報をアルゴリズム指定子aに代用することになるが、当該「67」なるデータが漏洩したとしても、乱数テーブルTがない限り、暗号アルゴリズムA2を指定する情報であることを認識することはできない。   Therefore, for example, when specifying the encryption algorithm A2, instead of using the algorithm specifier a “02”, data “67” obtained by encoding this is used as the encoded algorithm specifier. . The main device 110D substitutes the information “67” for the algorithm specifier a. However, even if the data “67” leaks, as long as there is no random number table T, the main device 110D is information that specifies the encryption algorithm A2. There is no recognition.

一方、暗号処理装置120D内では、データ入力部121Dが、アルゴリズム指定子aの代わりに、この符号化されたアルゴリズム指定子を入力することになるので、これを符号変換部122Dに与えて、元のアルゴリズム指定子aに変換する作業を行わせる。具体的には、符号変換部122Dは、乱数テーブルTを参照して、符号化されたアルゴリズム指定子として与えられたデータ「67」で示されるセル番号をもつセルを特定し、当該セル内に収容されている数値「02」を、アルゴリズム指定子aとして暗号処理部124Dに伝える処理をする。   On the other hand, in the cryptographic processing device 120D, the data input unit 121D inputs this encoded algorithm specifier instead of the algorithm specifier a. The conversion to the algorithm specifier a is performed. Specifically, the code conversion unit 122D refers to the random number table T, identifies the cell having the cell number indicated by the data “67” given as the encoded algorithm specifier, and stores the cell in the cell. A process of transmitting the stored numerical value “02” as the algorithm designator a to the cryptographic processing unit 124D is performed.

このように、符号変換部122Dを介して、符号化されたアルゴリズム指定子を元のアルゴリズム指定子aに変換する処理が加わることになるが、主装置110Dは、アルゴリズム指定子aを記憶しておいたり、外部からアルゴリズム指定子aを受け取ったりする必要はないので、メインプログラムMがクラッカーにより解析されたとしても、アルゴリズム指定子a自身が盗まれることはない。   In this way, processing for converting the encoded algorithm specifier into the original algorithm specifier a is added via the code conversion unit 122D, but the main device 110D stores the algorithm specifier a. It is not necessary to receive the algorithm specifier a from the outside, so even if the main program M is analyzed by the cracker, the algorithm specifier a itself is not stolen.

<<< §6. 本発明の第6の実施形態 >>>
続いて、本発明の第6の実施形態を説明する。図19は、この第6の実施形態に係る情報処理装置100Eの構成を示すブロック図である。この第6の実施形態の構成の大部分は、図5を参照しながら§1において述べた第1の実施形態の構成と同じである。そこで、図19に示す第6の実施形態の各構成要素の符号には、図5に示す第1の実施形態の対応する構成要素の符号の末尾に「E」を付した符号を用いて示すことにし、ここでは、図5に示す第1の実施形態の対応する構成要素との相違点のみを説明することにする。
<<< §6. Sixth embodiment of the present invention >>>
Subsequently, a sixth embodiment of the present invention will be described. FIG. 19 is a block diagram showing the configuration of the information processing apparatus 100E according to the sixth embodiment. Most of the configuration of the sixth embodiment is the same as the configuration of the first embodiment described in section 1 with reference to FIG. Accordingly, the reference numerals of the constituent elements of the sixth embodiment shown in FIG. 19 are indicated by the reference numerals with “E” added to the end of the corresponding constituent elements of the first embodiment shown in FIG. Only the differences from the corresponding components of the first embodiment shown in FIG. 5 will be described here.

図19に示す第6の実施形態の特徴は、主装置110Eから暗号処理装置120Eに対して引き渡す符号データFを、所定の方法で暗号化する点にある。別言すれば、第1の実施形態で引き渡していた符号データFの代わりに、これを所定の方法で暗号化した暗号化符号データGを用意しておき、主装置110Eから暗号処理装置120Eに対して、元データDとともに、この暗号化符号データGを引き渡すようにする(図示されている復号鍵指定子wについては後述する)。そのため、主装置110E内の暗号処理依頼部112Eには、符号データFの代わりに、暗号化符号データGを記憶させておくようにする。もちろん、暗号化符号データGを外部のサーバなどに用意しておき、暗号処理依頼部112Eが、外部から暗号化符号データGを受け取るようにしてもよい。   The feature of the sixth embodiment shown in FIG. 19 is that the code data F delivered from the main device 110E to the encryption processing device 120E is encrypted by a predetermined method. In other words, instead of the code data F delivered in the first embodiment, encrypted code data G obtained by encrypting the code data F by a predetermined method is prepared and transferred from the main device 110E to the encryption processing device 120E. On the other hand, the encrypted code data G is delivered together with the original data D (the decryption key designator w shown in the figure will be described later). Therefore, the encrypted code data G is stored in the encryption processing request unit 112E in the main device 110E instead of the code data F. Of course, the encryption code data G may be prepared in an external server or the like, and the encryption processing request unit 112E may receive the encryption code data G from the outside.

一方、暗号処理装置120E内には、新たな構成要素として、与えられた暗号化符号データGを復号して、元の符号データFを得る処理を行う符号データ復号部126Eを設けておくようにする。データ入力部121Eは、元データDおよび暗号化符号データGを入力する処理を行うことになる。ここで、元データDは暗号処理部124Eに与えられ、暗号化符号データGは符号データ復号部126Eに与えられる。符号データ復号部126Eは、与えられた暗号化符号データGを復号し、復号された符号データFを符号変換部122Eに与える。符号変換部122Eが、乱数テーブル格納部123Eに格納されている乱数テーブルTを用いて、復号された符号データFを暗号鍵Kに変換し、これを暗号処理部124Eに与える点は、第1の実施形態と同様である。その他の各構成要素の機能は、図5に示す第1の実施形態の対応する構成要素の機能と同様である。   On the other hand, in the cryptographic processing device 120E, a code data decrypting unit 126E that performs processing for decrypting the given encrypted code data G and obtaining the original code data F is provided as a new component. To do. The data input unit 121E performs a process of inputting the original data D and the encrypted code data G. Here, the original data D is provided to the encryption processing unit 124E, and the encrypted code data G is provided to the code data decryption unit 126E. The code data decoding unit 126E decodes the given encrypted code data G and provides the decoded code data F to the code conversion unit 122E. The code conversion unit 122E converts the decrypted code data F into the encryption key K using the random number table T stored in the random number table storage unit 123E, and provides this to the encryption processing unit 124E. This is the same as the embodiment. The functions of the other constituent elements are the same as the corresponding constituent elements of the first embodiment shown in FIG.

このように、第6の実施形態では、符号データFを暗号化し、暗号化符号データGとして取り扱うようにしたため、主装置110E内には、符号データFさえ存在しない状態が実現できる。このため、クラッカーによる不正な解析により暗号鍵Kが盗まれる可能性を更に低減することができ、耐タンパ性を向上させることができる。   Thus, in the sixth embodiment, since the code data F is encrypted and handled as the encrypted code data G, a state where even the code data F does not exist in the main device 110E can be realized. For this reason, it is possible to further reduce the possibility of the encryption key K being stolen by unauthorized analysis by a cracker, and to improve tamper resistance.

なお、図19に示す実施例では、符号データ復号部126E内に複数H通りの復号鍵(図示の例では、4通りの公開鍵W1〜W4)を記憶させておき、暗号処理依頼部112Eが、元データDとともに、この複数H通りの復号鍵のうちの第i番目の復号鍵を用いて復号が可能な状態で暗号化された暗号化符号データGと、この第i番目の復号鍵を指定する復号鍵指定子wと、をデータ入力部121Eに与えるようにしている。   In the embodiment shown in FIG. 19, a plurality of H types of decryption keys (in the example shown, four public keys W1 to W4) are stored in the code data decryption unit 126E, and the encryption processing request unit 112E Along with the original data D, the encrypted code data G encrypted in a state where the decryption is possible using the i-th decryption key of the plurality of H decryption keys, and the i-th decryption key The decryption key designator w to be designated is given to the data input unit 121E.

したがって、データ入力部121Eは、元データDと、第i番目の復号鍵を用いて復号が可能な状態で暗号化された暗号化符号データGと、この第i番目の復号鍵を指定する復号鍵指定子wと、を入力する処理を行うことになる。ここで、元データDは暗号処理部124Eに与えられ、暗号化符号データGおよび復号鍵指定子wは符号データ復号部126Eに与えられる。符号データ復号部126Eは、この復号鍵指定子wで指定された復号鍵を用いて、暗号化符号データGに対する復号処理を行い、符号データFを得ることになる。   Therefore, the data input unit 121E includes the original data D, the encrypted code data G that is encrypted using the i-th decryption key, and the decryption designating the i-th decryption key. Processing for inputting the key designator w is performed. Here, the original data D is provided to the encryption processing unit 124E, and the encrypted code data G and the decryption key specifier w are provided to the code data decryption unit 126E. The code data decryption unit 126E performs the decryption process on the encrypted code data G using the decryption key designated by the decryption key designator w to obtain the code data F.

ここでは、より具体的に、公開鍵暗号方式に利用可能な公開鍵および秘密鍵を用いた例を説明する。図20は、一般的な公開鍵暗号方式に利用可能な鍵ペアーを示す表である。公開鍵暗号方式では、公開鍵と秘密鍵との鍵ペアーが利用される。ここで、一対の鍵ペアーを構成する公開鍵と秘密鍵は、一方の鍵を暗号化用の鍵として用いて所定のデータに対して暗号化処理を行って暗号データを生成させると、他方の鍵を復号鍵として用いて当該暗号データに対して復号処理を行うことができる、という特殊な関係を有している。   Here, an example using a public key and a private key that can be used in a public key cryptosystem will be described more specifically. FIG. 20 is a table showing key pairs that can be used in a general public key cryptosystem. In the public key cryptosystem, a key pair of a public key and a secret key is used. Here, when the public key and the private key constituting a pair of key pairs are encrypted with respect to predetermined data using one key as an encryption key to generate encrypted data, It has a special relationship that the decryption process can be performed on the encrypted data using the key as a decryption key.

図20に示す例では、このような関係をもった鍵ペアーが合計H組用意されており、たとえば、第i番目の秘密鍵Viを用いて暗号化処理を行った場合、対応する第i番目の公開鍵Wiを復号鍵として用いて復号処理を行うことができる。そこで、符号データ復号部126Eには、このような公開鍵暗号方式に利用可能な公開鍵および秘密鍵を構成する複数H組の鍵ペアーのそれぞれについて、公開鍵および秘密鍵のうちの一方の鍵を復号鍵として記憶させておく。図19に示す例の場合、符号データ復号部126Eに、4組の公開鍵W1〜W4を復号鍵として記憶させておく例が示されている。   In the example shown in FIG. 20, a total of H key pairs having such a relationship are prepared. For example, when encryption processing is performed using the i-th secret key Vi, the corresponding i-th key pair is provided. The decryption process can be performed using the public key Wi as the decryption key. Therefore, the code data decryption unit 126E includes one of the public key and the private key for each of a plurality of H pairs of public keys and private keys that can be used in such a public key cryptosystem. Is stored as a decryption key. In the case of the example shown in FIG. 19, an example is shown in which the code data decryption unit 126E stores four sets of public keys W1 to W4 as decryption keys.

一方、暗号処理依頼部112Eに予め記憶されている(もしくは、外部から受け取る)暗号化符号データGは、元になる符号データFに対して、H組の鍵ペアーのうちの第i番目の一方の鍵(符号データ復号部126Eに記憶されている鍵)に対応する他方の鍵を用いて暗号化を行って得られるデータであるようにしておく。暗号処理依頼部112Eは、当該暗号化符号データGとともに、その復号処理に用いることができる復号鍵を指定する復号鍵指定子wをデータ入力部121Eに与えるようにする。すなわち、この復号鍵指定子wは、暗号処理装置120Eの符号データ復号部126Eに記憶されている「H組の鍵ペアーについての復号鍵として用いる一方の鍵」の第i番目を指定する情報ということになる。   On the other hand, the encrypted code data G stored in advance in the encryption processing request unit 112E (or received from the outside) is the i-th one of the H key pairs with respect to the original code data F. Data obtained by performing encryption using the other key corresponding to the key (the key stored in the code data decryption unit 126E). The encryption processing request unit 112E gives the data input unit 121E a decryption key designator w for designating a decryption key that can be used for the decryption process together with the encrypted code data G. That is, the decryption key designator w is information that specifies the i-th item of “one key used as the decryption key for the H key pairs” stored in the code data decryption unit 126E of the cryptographic processing device 120E. It will be.

結局、データ入力部121Eは、H組の鍵ペアーのうちの第i番目の鍵ペアーについての他方の鍵を用いて暗号化された暗号化符号データGと、第i番目の鍵ペアーを指定する復号鍵指定子wと、を入力することになるので、符号データ復号部126Eは、この復号鍵指定子wで指定された第i番目の鍵ペアーについての一方の鍵を復号鍵として用いた復号を行うことができる。   Eventually, the data input unit 121E designates the encrypted code data G encrypted using the other key of the i-th key pair of the H key pairs and the i-th key pair. Since the decryption key designator w is input, the code data decryption unit 126E decrypts the key using one key of the i-th key pair designated by the decryption key designator w as a decryption key. It can be performed.

図19に示すように、公開鍵W1〜W4を4組の復号鍵として符号データ復号部126Eに格納しておいた場合、符号データFの暗号化には、これら公開鍵W1〜W4に対応する秘密鍵V1〜V4のいずれかを用いればよい。たとえば、秘密鍵V3を用いて符号データFを暗号化して暗号化符号データGを用意した場合は、暗号処理依頼部112Eは、この暗号化符号データGとともに、復号鍵となる公開鍵W3を指定する復号鍵指定子wを、データ入力部121Eに与える処理を行うことになる。その結果、符号データ復号部126Eは、復号鍵指定子wによって指定された公開鍵W3を用いて、暗号化符号データGを復号し、元の符号データFを得る処理を行うことになる。   As shown in FIG. 19, when the public keys W1 to W4 are stored in the code data decryption unit 126E as four sets of decryption keys, the encryption of the code data F corresponds to these public keys W1 to W4. Any one of the secret keys V1 to V4 may be used. For example, when the encrypted code data G is prepared by encrypting the encoded data F using the secret key V3, the encryption processing request unit 112E specifies the public key W3 that is a decryption key together with the encrypted code data G A process of giving the decryption key designator w to be performed to the data input unit 121E is performed. As a result, the code data decryption unit 126E performs a process of decrypting the encrypted code data G and obtaining the original code data F using the public key W3 specified by the decryption key designator w.

このように、公開鍵暗号方式に利用可能な公開鍵および秘密鍵を複数H組利用する実施例は、複数の異なるプログラム提供業者に、同一の暗号処理サブルーチンRを利用させる場合に、業者相互間でのセキュリティを維持するために有効である。たとえば、前述したように、プログラム提供業者X,Y,Zの三者が、この情報処理装置100Eで利用可能なアプリケーションプログラムとして、それぞれメインプログラムMx,My,Mzを開発した場合に、この第6の実施形態を適用させる場合を考えてみる。これらのメインプログラムMx,My,Mzは、いずれも同一の暗号処理サブルーチンRを利用して暗号処理を行うアプリケーションプログラムであり、それぞれ暗号化符号データGx,Gy,Gzを暗号処理サブルーチンRに引き渡すことにより、それぞれ所望の暗号鍵Kx,Ky,Kzを用いた暗号処理が実施されるようにする機能を有しているものとしよう。   As described above, in the embodiment in which a plurality of H sets of public keys and secret keys that can be used for the public key cryptosystem are used, when the same cryptographic processing subroutine R is used by a plurality of different program providers, It is effective to maintain security in For example, as described above, when the program providers X, Y, and Z develop main programs Mx, My, and Mz as application programs that can be used in the information processing apparatus 100E, respectively, the sixth Consider the case of applying the embodiment. These main programs Mx, My, and Mz are all application programs that perform cryptographic processing using the same cryptographic processing subroutine R, and pass the encrypted code data Gx, Gy, and Gz to the cryptographic processing subroutine R, respectively. Therefore, it is assumed that each has a function of performing encryption processing using desired encryption keys Kx, Ky, and Kz.

この場合、業者X,Y,Zには、それぞれ秘密鍵V1,V2,V3を渡しておき、これら秘密鍵V1,V2,V3をそれぞれ用いて、符号データFx,Fy,Fzを暗号化し、暗号化符号データGx,Gy,Gzを用意してもらうようにする。そして、メインプログラムMxから暗号処理サブルーチンRに暗号処理依頼を行う際には、暗号化符号データGxとともに公開鍵W1を指定する復号鍵指定子wxを引き渡すようにする。そうすれば、符号データ復号部126Eは、公開鍵W1を用いて、暗号化符号データGxを復号し、元の符号データFxに戻す処理を行うことができる。メインプログラムMy,Mzから暗号処理依頼を行う場合も同様である。   In this case, the secret keys V1, V2, and V3 are given to the traders X, Y, and Z, respectively, and the code data Fx, Fy, and Fz are encrypted using these secret keys V1, V2, and V3, respectively. The encoded code data Gx, Gy, and Gz are prepared. Then, when making a cryptographic processing request from the main program Mx to the cryptographic processing subroutine R, the decryption key designator wx for designating the public key W1 is delivered together with the encrypted code data Gx. Then, the code data decryption unit 126E can perform a process of decrypting the encrypted code data Gx using the public key W1 and returning it to the original code data Fx. The same applies when a cryptographic process request is made from the main programs My and Mz.

このような実施形態を採れば、全く同一の暗号処理サブルーチンが業者X,Y,Zによって共用されることになるが、業者X,Y,Zに渡す秘密鍵V1,V2,V3はそれぞれ異なるため、業者相互間でのセキュリティは十分に維持されることになる。もちろん、公開鍵と秘密鍵の役割を逆にし、符号データ復号部126E内に秘密鍵V1,V2,V3を格納しておき、業者X,Y,Zに公開鍵W1,W2,W3を渡して暗号化を行うようにしてもかまわない。   If such an embodiment is adopted, the same encryption processing subroutine is shared by the traders X, Y, and Z, but the secret keys V1, V2, and V3 to be passed to the traders X, Y, and Z are different. , Security between vendors will be sufficiently maintained. Of course, the roles of the public key and the secret key are reversed, the secret keys V1, V2, and V3 are stored in the code data decryption unit 126E, and the public keys W1, W2, and W3 are transferred to the traders X, Y, and Z. It does not matter if encryption is performed.

<<< §7. 本発明に用いる符号データ生成装置 >>>
本発明を実施する上では、予め所定の乱数テーブルを利用して、所望の暗号鍵K(暗号処理で実際に利用すべき暗号鍵)に対応する符号データFを作成しておく必要がある。たとえば、図5に示す第1の実施形態の場合、暗号処理部124において、図7上段に示すような所望の暗号鍵K「26,5C,08,3A,D8,55,2B,10」を用いた暗号処理が行われるようにするには、予め、図6に示すような乱数テーブルTを用いて、暗号鍵K「26,5C,08,3A,D8,55,2B,10」に対応する符号データ、すなわち、図7下段に示すような符号データF「AD,31,63,1D,12,60,EE,1B」を作成しておく必要がある。
<<< §7. Code data generation apparatus used in the present invention >>
In practicing the present invention, it is necessary to create code data F corresponding to a desired encryption key K (an encryption key that should actually be used in encryption processing) using a predetermined random number table in advance. For example, in the case of the first embodiment shown in FIG. 5, the encryption processing unit 124 obtains a desired encryption key K “26, 5C, 08, 3A, D8, 55, 2B, 10” as shown in the upper part of FIG. In order to perform the encryption processing used, it corresponds to the encryption key K “26, 5C, 08, 3A, D8, 55, 2B, 10” in advance using a random number table T as shown in FIG. It is necessary to prepare the code data to be generated, that is, the code data F “AD, 31, 63, 1D, 12, 60, EE, 1B” as shown in the lower part of FIG.

所望の暗号鍵Kに基づいて、これに対応する符号データFを作成する作業は、乱数テーブルTがあれば手作業で行うことも可能である。したがって、メインプログラムMの作成者に、暗号処理サブルーチンR内に組み込まれている乱数テーブルTと同一の乱数テーブルを渡しておけば、当該作成者は、所望の暗号鍵Kに対応する符号データFを予め用意し、これを暗号処理依頼部112内に記憶させたり(実際には、メインプログラムM内に符号データFを書き込んでおくことになる)、あるいは、外部の装置やサーバに当該符号データFを格納しておき、必要に応じて、暗号処理依頼部112がこれを調達できるようにしたりすることができる(実際には、メインプログラムM内に、符号データFを外部から読み込む処理プログラムを用意しておくことになる)。   The operation of creating the code data F corresponding to the desired encryption key K can be performed manually if the random number table T is available. Therefore, if the same random number table as the random number table T incorporated in the encryption processing subroutine R is given to the creator of the main program M, the creator can generate the code data F corresponding to the desired encryption key K. Is prepared in advance and stored in the encryption processing request unit 112 (actually, the code data F is written in the main program M), or the code data is stored in an external device or server. F can be stored, and the encryption processing request unit 112 can be procured as necessary (in practice, a processing program for reading the code data F from the outside is included in the main program M). Will be prepared).

ただ、実用上は、メインプログラムMの作成者に、手作業で符号データFを作成してもらう代わりに、符号データFを自動的に生成する機能をもった符号データ生成装置を利用してもらい、この符号データ生成装置により符号データFの生成を行うようにするのが暗号鍵Kの秘密保持の観点からも好ましい。そこで、ここでは、このような符号データ生成装置の構成例を説明する。   However, in practice, instead of having the creator of the main program M create the code data F manually, use the code data generation device having the function of automatically generating the code data F. In addition, it is preferable that the code data F is generated by the code data generation device from the viewpoint of keeping the encryption key K secret. Therefore, here, a configuration example of such a code data generation apparatus will be described.

図21は、このような暗号処理用の符号データ生成装置300の基本構成を示すブロック図である。この装置は、§1で述べた第1の実施形態に係る暗号処理装置120に与える符号データFを生成するのに適した符号データ生成装置であり、図示のとおり、暗号鍵入力部310と、符号データ生成部320と、乱数テーブル記憶部330と、を有している。実際には、この符号データ生成装置300は、たとえば、汎用のパソコンにアプリケーションプログラムを組み込むことにより構成することができる。あるいは、この符号データ生成装置300を、ネットワークに接続されたサーバ装置によって構成し、ネットワーク経由で利用できるようにしてもよい。   FIG. 21 is a block diagram showing a basic configuration of such a code data generation device 300 for cryptographic processing. This device is a code data generation device suitable for generating code data F to be given to the encryption processing device 120 according to the first embodiment described in §1, and as shown in the figure, an encryption key input unit 310, A code data generation unit 320 and a random number table storage unit 330 are included. Actually, the code data generation apparatus 300 can be configured by, for example, incorporating an application program in a general-purpose personal computer. Alternatively, the code data generation device 300 may be configured by a server device connected to a network so that it can be used via the network.

ここで、暗号鍵入力部310は、暗号処理装置120内の暗号処理部124による暗号処理に利用させるべき暗号鍵Kを入力する構成要素である。パソコンによって符号データ生成装置300を構成した場合、暗号鍵入力部310は、このパソコンに備わっているキーボードによって構成することができる。   Here, the encryption key input unit 310 is a component that inputs an encryption key K to be used for encryption processing by the encryption processing unit 124 in the encryption processing device 120. When the code data generating apparatus 300 is configured by a personal computer, the encryption key input unit 310 can be configured by a keyboard provided in the personal computer.

一方、乱数テーブル記憶部330は、暗号処理装置120内の乱数テーブル格納部123に格納されている乱数テーブルTと同一の乱数テーブルTを記憶するための構成要素であり、パソコンによって符号データ生成装置300を構成した場合、乱数テーブル記憶部330は、このパソコンに備わっているメモリや、このパソコンに接続された種々の記憶装置によって構成することができる。   On the other hand, the random number table storage unit 330 is a component for storing the same random number table T as the random number table T stored in the random number table storage unit 123 in the cryptographic processing device 120. When 300 is configured, the random number table storage unit 330 can be configured by a memory provided in the personal computer or various storage devices connected to the personal computer.

そして、符号データ生成部320は、この乱数テーブル記憶部330に記憶されている乱数テーブルTを用いて、暗号処理装置120内の符号変換部122によって行われる変換処理とは逆の変換処理を行い、暗号鍵入力部310が入力した暗号鍵Kに対応する符号データFを生成する処理を行う。パソコンによって符号データ生成装置300を構成した場合、符号データ生成部320は、このパソコンに備わっているCPUと変換処理プログラムとによって構成することができる。   Then, the code data generation unit 320 uses the random number table T stored in the random number table storage unit 330 to perform a conversion process opposite to the conversion process performed by the code conversion unit 122 in the cryptographic processing device 120. The code key F corresponding to the encryption key K input by the encryption key input unit 310 is generated. When the code data generation device 300 is configured by a personal computer, the code data generation unit 320 can be configured by a CPU and a conversion processing program provided in the personal computer.

結局、この暗号処理用符号データ生成装置300は、与えられた任意の暗号鍵Kについて、乱数テーブルTを利用して、対応する符号データFを生成し、これを出力する機能を果たすことになる。たとえば、図7上段に示すような暗号鍵K「26,5C,08,3A,D8,55,2B,10」に対して、図6に例示する乱数テーブルTを用いた変換を行う場合は、まず、1バイト目の「26」なる数値が収容されたセルを乱数テーブルTから見つけ出し、当該セルのセル番号「AD」によって、元の数値「26」を置き換える処理が行われる。同様の処理を2〜8バイト目についても行えば、図7下段に示すような符号データF「AD,31,63,1D,12,60,EE,1B」が得られる。   Eventually, the code data generation device 300 for cryptographic processing fulfills the function of generating the corresponding code data F for the given arbitrary encryption key K using the random number table T and outputting it. . For example, when performing conversion using the random number table T illustrated in FIG. 6 with respect to the encryption key K “26, 5C, 08, 3A, D8, 55, 2B, 10” as shown in the upper part of FIG. First, a cell containing a numerical value “26” in the first byte is found from the random number table T, and the original numerical value “26” is replaced with the cell number “AD” of the cell. If the same processing is performed for the second to eighth bytes, the code data F “AD, 31, 63, 1D, 12, 60, EE, 1B” as shown in the lower part of FIG. 7 is obtained.

メインプログラムMの作成者は、メインプログラムMを作成する作業を行う際に、この符号データ生成装置300を利用すれば、所望の暗号鍵Kに対応する符号データFを自動的に得ることができ、得られた符号データFをメインプログラムMに組み込んだり、外部の装置やサーバなどに格納して提供したりすることができる。メインプログラムMの作成者は、手作業で符号データFを作成する必要はないので、当該作成者に対して、乱数テーブルTの内容を開示する必要はなくなる。   The creator of the main program M can automatically obtain the code data F corresponding to the desired encryption key K by using the code data generation device 300 when performing the work of creating the main program M. The obtained code data F can be incorporated into the main program M, or stored and provided in an external device or server. Since the creator of the main program M does not need to manually create the code data F, it is not necessary to disclose the contents of the random number table T to the creator.

なお、乱数テーブルTを記憶した乱数テーブル記憶部330は、ICカードやUSBメモリなど、パソコンに接続される外部記憶装置によって構成することもできる。特に、ICカードによって乱数テーブル記憶部330を構成しておけば、内部に記憶されている乱数テーブルTの秘匿性を確保することができる。もちろん、符号データ生成装置300全体を、ICカードによって構成してもかまわない。   Note that the random number table storage unit 330 that stores the random number table T can also be configured by an external storage device connected to a personal computer, such as an IC card or a USB memory. In particular, if the random number table storage unit 330 is configured with an IC card, the confidentiality of the random number table T stored therein can be ensured. Of course, the entire code data generation apparatus 300 may be configured by an IC card.

また、乱数テーブル記憶部330の部分を、外部のサーバによって構成することも可能である。この場合、符号データ生成部320は、ネットワークを介して、当該サーバをアクセスして、乱数テーブルTを参照することになる。もちろん、符号データ生成装置300全体を外部のサーバによって構成してもよい。この場合、メインプログラムMの作成者は、ネットワークを介して暗号鍵Kを符号データ生成装置300に送信し、ネットワークを介して符号データFを受信することになる。   Moreover, the part of the random number table storage unit 330 can be configured by an external server. In this case, the code data generation unit 320 accesses the server via the network and refers to the random number table T. Of course, the entire code data generation apparatus 300 may be configured by an external server. In this case, the creator of the main program M transmits the encryption key K to the code data generation device 300 via the network and receives the code data F via the network.

以上、図21を参照しながら、§1で述べた第1の実施形態に係る暗号処理装置120に与える符号データFを生成するのに適した符号データ生成装置300の構成を述べたが、§2〜§5で述べた第2〜第5の実施形態に係る暗号処理装置120A〜120Dに与える符号データFを生成するのに適した符号データ生成装置300A〜300Dも、ほぼ同様の構成で実現できる。   The configuration of the code data generation device 300 suitable for generating the code data F to be given to the cryptographic processing device 120 according to the first embodiment described in §1 has been described above with reference to FIG. The code data generation devices 300A to 300D suitable for generating the code data F to be given to the cryptographic processing devices 120A to 120D according to the second to fifth embodiments described in 2 to §5 are also realized with substantially the same configuration. it can.

たとえば、第2の実施形態に係る暗号処理装置120Aでは、複数の乱数テーブルT0〜T15が利用されるので、符号データ生成装置300A内の乱数テーブル記憶部330Aにも複数の乱数テーブルT0〜T15を記憶させておき、任意の乱数テーブルを選択して符号データFを生成するようにすればよい。もっとも、複数の異なるプログラム提供業者に、同一の暗号処理サブルーチンRを利用させ、業者相互間でのセキュリティの維持を図る場合は、§2で述べたとおり、個々の業者にそれぞれ特定の乱数テーブルを割り当てる運用が採られるので、個々の業者に提供する符号データ生成装置300Aには、当該業者に割り当てられた乱数テーブルのみを記憶させておけば足りる。   For example, since a plurality of random number tables T0 to T15 are used in the cryptographic processing device 120A according to the second embodiment, a plurality of random number tables T0 to T15 are also stored in the random number table storage unit 330A in the code data generation device 300A. The code data F may be generated by selecting an arbitrary random number table. Of course, in order to maintain the security between the vendors by using the same cryptographic processing subroutine R for a plurality of different program vendors, a specific random number table is assigned to each vendor as described in §2. Since the allocation operation is adopted, it is sufficient that the code data generation device 300A provided to each vendor stores only the random number table allocated to the vendor.

たとえば、プログラム提供業者X,Y,Zの三者に、それぞれ乱数テーブルT0,T1,T2を割り当てる運用を採る場合、業者Xに提供する符号データ生成装置には乱数テーブルT0のみを記憶させておき、業者Yに提供する符号データ生成装置には乱数テーブルT1のみを記憶させておき、業者Zに提供する符号データ生成装置には乱数テーブルT2のみを記憶させておけば足りる。また、乱数テーブル記憶部330をサーバ上に設ける場合は、業者Xには乱数テーブルT0に対するアクセス権を与え、業者Yには乱数テーブルT1に対するアクセス権を与え、業者Zには乱数テーブルT2に対するアクセス権を与える運用を採ればよい。   For example, when the operation of assigning the random numbers tables T0, T1, and T2 to the program providers X, Y, and Z, respectively, only the random number table T0 is stored in the code data generation device provided to the vendor X. It is sufficient that only the random number table T1 is stored in the code data generating device provided to the supplier Y, and only the random number table T2 is stored in the code data generating device provided to the supplier Z. When the random number table storage unit 330 is provided on the server, the trader X is given access rights to the random number table T0, the trader Y is given access rights to the random number table T1, and the trader Z is accessed to the random number table T2. The operation that grants the right should be taken.

一方、第3の実施形態に係る暗号処理装置120Bでは、符号変換部122Bがテーブル指定パターンP1〜P3に基づいて複数の乱数テーブルを指定する処理を行うことになるので、符号データ生成装置300B内の乱数テーブル記憶部330B内に複数の乱数テーブルT0〜T15を記憶させておくとともに、符号データ生成部320Bにも、同一のテーブル指定パターンP1〜P3を格納しておくようにし、選択した特定のテーブル指定パターンに基づいて、暗号鍵Kを構成するバイトごとに、所定の乱数テーブルが指定されるようにすればよい。   On the other hand, in the cryptographic processing device 120B according to the third embodiment, the code conversion unit 122B performs processing for designating a plurality of random number tables based on the table designating patterns P1 to P3. The random number table storage unit 330B stores a plurality of random number tables T0 to T15, and the code data generation unit 320B also stores the same table designating patterns P1 to P3 so that the selected specific table is stored. A predetermined random number table may be designated for each byte constituting the encryption key K based on the table designation pattern.

もちろん、業者ごとに特定のテーブル指定パターンを割り当てる運用を採る場合は、個々の業者に提供する符号データ生成装置300Bには、当該業者に割り当てられたテーブル指定パターンのみを格納しておけば足りる。   Of course, when the operation of assigning a specific table designation pattern for each trader is employed, it is sufficient to store only the table designation pattern assigned to the trader in the code data generation device 300B provided to each trader.

また、第4の実施形態に係る暗号処理装置120Cでは、符号変換部122Cがシフト指示子sに基づいてシフト処理を行うことになるので、符号データ生成装置300C内の符号データ生成部320Cにも、所望のシフト指示子sに基づいてシフト処理を行う機能を設けておくようにすればよい。   In addition, in the cryptographic processing device 120C according to the fourth embodiment, the code conversion unit 122C performs a shift process based on the shift indicator s, so that the code data generation unit 320C in the code data generation device 300C also A function for performing a shift process based on a desired shift indicator s may be provided.

第5の実施形態に係る暗号処理装置120Dにおける符号変換部122Dの機能は、第1の実施形態に係る暗号処理装置120における符号変換部122の機能と同じであるため、第5の実施形態に係る暗号処理装置120Dに与える符号データFを生成するには、図21に示す符号データ生成装置300をそのまま利用すればよい。   The function of the code conversion unit 122D in the cryptographic processing device 120D according to the fifth embodiment is the same as the function of the code conversion unit 122 in the cryptographic processing device 120 according to the first embodiment. In order to generate the code data F to be given to the encryption processing device 120D, the code data generation device 300 shown in FIG. 21 may be used as it is.

一方、第6の実施形態に係る暗号処理装置120Eについては、符号データFの代わりに暗号化符号データGを引き渡す必要があるので、符号データ生成装置には、符号データFに対する暗号化機能を付加しておき、暗号化符号データGを生成できるようにしておくのが好ましい。   On the other hand, since it is necessary to deliver the encrypted code data G instead of the code data F for the cryptographic processing device 120E according to the sixth embodiment, an encryption function for the code data F is added to the code data generation device. It is preferable that the encrypted code data G can be generated.

図22に示す符号データ生成装置300Eは、この第6の実施形態に係る暗号処理装置120Eに与える暗号化符号データGを生成するのに適した符号データ生成装置であり、図示のとおり、暗号鍵入力部310Eと、符号データ生成部320Eと、乱数テーブル記憶部330Eと、暗号化符号データ生成部340Eと、を有している。実際には、この符号データ生成装置300Eも、たとえば、汎用のパソコンにアプリケーションプログラムを組み込むことにより構成することができる。   The code data generation device 300E shown in FIG. 22 is a code data generation device suitable for generating the encrypted code data G to be given to the encryption processing device 120E according to the sixth embodiment. An input unit 310E, a code data generation unit 320E, a random number table storage unit 330E, and an encrypted code data generation unit 340E are provided. Actually, the code data generation device 300E can also be configured by, for example, incorporating an application program in a general-purpose personal computer.

ここで、暗号鍵入力部310E、符号データ生成部320E、乱数テーブル記憶部330Eの機能は、図21に示す符号データ生成装置300の構成要素である暗号鍵入力部310、符号データ生成部320、乱数テーブル記憶部330の機能と全く同じである。別言すれば、図22に示す符号データ生成装置300Eは、図21に示す符号データ生成装置300に、更に、暗号化符号データ生成部340Eを追加することにより構成されている。ここで、暗号化符号データ生成部340Eは、符号データ生成部320Eによって生成された符号データFに対して、図19に示す暗号処理装置120E内の符号データ復号部126Eによって復号可能な方法で暗号化を行って暗号化符号データGを生成し、これを出力する機能を有する。したがって、この符号データ生成装置300Eに対して、所望の暗号鍵Kを与えれば、暗号化符号データGが出力されることになる。   Here, the functions of the encryption key input unit 310E, the code data generation unit 320E, and the random number table storage unit 330E are the encryption key input unit 310, the code data generation unit 320, and the constituent elements of the code data generation device 300 shown in FIG. The function of the random number table storage unit 330 is exactly the same. In other words, the code data generation device 300E shown in FIG. 22 is configured by adding an encrypted code data generation unit 340E to the code data generation device 300 shown in FIG. Here, the encrypted code data generation unit 340E encrypts the code data F generated by the code data generation unit 320E by a method that can be decoded by the code data decoding unit 126E in the encryption processing device 120E shown in FIG. To generate encrypted code data G and output it. Therefore, if the desired encryption key K is given to the code data generation device 300E, the encrypted code data G is output.

より具体的に説明すれば、暗号化符号データ生成部340Eは、図19に示す暗号処理装置120E内の符号データ復号部126Eに記憶されている「H組の鍵ペアーのうち一方の鍵(図示の例では公開鍵W1〜W4)」にそれぞれ対応する「H組の鍵ペアーのうちの他方の鍵(図示の例では秘密鍵V1〜V4)」を記憶しており、符号データ生成部320Eによって生成された符号データFに対して、この「H組の鍵ペアーのうちの他方の鍵(図示の例では秘密鍵V1〜V4)」の中の任意の第i番目の鍵を用いて暗号化を行って暗号化符号データGを生成する処理を行う。ここで、暗号化に用いる第i番目の鍵は復号鍵となり、復号鍵指定子wによって指定されることになる。   More specifically, the encrypted code data generation unit 340E performs “one key (in the figure) of“ H key pairs ”stored in the code data decryption unit 126E in the encryption processing device 120E shown in FIG. In the example, “the other key of the H key pairs (the secret keys V1 to V4 in the illustrated example)” respectively corresponding to the public keys W1 to W4) ”is stored, and the code data generating unit 320E The generated code data F is encrypted using an arbitrary i-th key in the “other key of the H key pairs (the secret keys V1 to V4 in the illustrated example)”. To generate encrypted code data G. Here, the i-th key used for encryption is a decryption key and is designated by the decryption key designator w.

もちろん、暗号化符号データ生成部340Eは、ICカードやUSBメモリなど、パソコンに接続される外部記憶装置によって構成してもよいし、暗号化符号データ生成部340Eの部分を、外部のサーバによって構成してもよい。あるいは、符号データ生成装置300E全体を外部のサーバによって構成してもよい。   Of course, the encrypted code data generation unit 340E may be configured by an external storage device connected to a personal computer such as an IC card or a USB memory, or the encryption code data generation unit 340E is configured by an external server. May be. Alternatively, the entire code data generation device 300E may be configured by an external server.

なお、複数の異なるプログラム提供業者に、同一の暗号処理サブルーチンRを利用させ、業者相互間でのセキュリティの維持を図る場合は、個々の業者にそれぞれ特定の鍵ペアーを割り当てる運用が採られるので、個々の業者に提供する符号データ生成装置300Eの暗号化符号データ生成部340Eには、当該業者に割り当てられた鍵のみを格納しておけば足りる。   In order to maintain the security between the vendors by using the same cryptographic processing subroutine R for a plurality of different program providers, an operation of assigning a specific key pair to each vendor is adopted. The encrypted code data generation unit 340E of the code data generation device 300E provided to each individual company only needs to store the key assigned to the company.

たとえば、§6で述べたように、業者X,Y,Zには、それぞれ秘密鍵V1,V2,V3を用いて符号データFに対する暗号化を行わせる運用を採る場合は、業者Xが利用する符号データ生成装置300E内の暗号化符号データ生成部340Eには秘密鍵V1のみを格納し、業者Yが利用する符号データ生成装置300E内の暗号化符号データ生成部340Eには秘密鍵V2のみを格納し、業者Zが利用する符号データ生成装置300E内の暗号化符号データ生成部340Eには秘密鍵V3のみを格納しておけばよい。   For example, as described in §6, when the operator X, Y, Z uses the secret keys V1, V2, V3 to encrypt the code data F, the supplier X uses it. Only the secret key V1 is stored in the encrypted code data generation unit 340E in the code data generation device 300E, and only the secret key V2 is stored in the encryption code data generation unit 340E in the code data generation device 300E used by the vendor Y. Only the secret key V3 may be stored in the encrypted code data generation unit 340E in the code data generation device 300E that is stored and used by the trader Z.

もっとも、符号データ生成装置300Eを、パソコンではなくICカードによって構成すれば、暗号化符号データ生成部340Eが利用する秘密鍵もICカード内に記録されることになるため、これを不正な方法で外部に読み出すことは極めて困難である。したがって、符号データ生成装置300EをICカードで構成する場合は、業者ごとに異なる鍵ペアーを用いる必要はなく、共通の単一鍵ペアーを用いるようにしても、実用上、業者相互間でのセキュリティの問題は生じない。具体的には、この場合、図22に示す暗号化符号データ生成部340E内には、共通の鍵ペアーの秘密鍵を格納しておき、図19に示す符号データ復号部126E内には、当該共通の鍵ペアーの公開鍵を格納しておけば足りる。   However, if the code data generation device 300E is configured by an IC card instead of a personal computer, the secret key used by the encrypted code data generation unit 340E is also recorded in the IC card. Reading out to the outside is extremely difficult. Therefore, when the code data generation device 300E is configured with an IC card, it is not necessary to use a different key pair for each vendor, and even if a common single key pair is used, there is practical security between vendors. The problem does not occur. Specifically, in this case, the secret key of the common key pair is stored in the encrypted code data generation unit 340E shown in FIG. 22, and the code data decryption unit 126E shown in FIG. It is enough to store the public key of a common key pair.

なお、ここで説明した符号データ生成装置は、§5で述べたように、「アルゴリズム指定子a」を符号化して「符号化されたアルゴリズム指定子」を生成する処理を実行する場合にも利用可能である。この場合、「アルゴリズム指定子a」を入力すると、「符号化されたアルゴリズム指定子」が自動的に出力されることになる。このように、符号データ生成装置を用いて「符号化されたアルゴリズム指定子」を自動生成する仕組を採用すれば、同一の暗号処理装置120(暗号処理サブルーチン)を複数の事業者に共用させる実施形態を採る場合にも、十分なセキュリティを確保することができる。すなわち、個々の事業者に、それぞれ、当該事業者が利用するアルゴリズムを指定するための必要最小限のデータのみが組み込まれた符号データ生成装置を提供するようにすれば、他者が利用するアルゴリズムを指定するための「符号化されたアルゴリズム指定子」を生成することはできず、不正な行為が行われる可能性を低減できる。   The code data generation apparatus described here is also used when executing the process of generating “encoded algorithm specifier” by encoding “algorithm specifier a” as described in §5. Is possible. In this case, when “algorithm specifier a” is input, “encoded algorithm specifier” is automatically output. As described above, when a mechanism for automatically generating an “encoded algorithm specifier” using a code data generation device is employed, the same encryption processing device 120 (encryption processing subroutine) is shared by a plurality of operators. Even in the case of adopting a form, sufficient security can be ensured. In other words, if an individual data provider is provided with a code data generation device in which only the minimum necessary data for designating an algorithm used by the business is provided, an algorithm used by another It is not possible to generate an “encoded algorithm specifier” for designating “”, and it is possible to reduce the possibility of an illegal act.

<<< §8. その他の変形例 >>>
これまで、本発明に係る情報処理装置(主装置および暗号処理装置)を6つの実施形態について説明し、更に、これらに利用可能な暗号処理用符号データ生成装置についての説明を行った。ここでは、最後に、その他の変形例をいくつか述べておく。
<<< §8. Other variations >>
So far, six embodiments of the information processing apparatus (main apparatus and cryptographic processing apparatus) according to the present invention have been described, and further, the cryptographic processing code data generation apparatus that can be used for them has been described. Here, finally, some other modifications will be described.

(1) 暗号化処理と復号処理
既に述べたとおり、本願では、「暗号化処理」と「復号処理」とを包括して「暗号処理」と呼んでいる。したがって、各実施形態における暗号処理部124,124A,124B,124C,124D,124Eにおいて暗号鍵Kを用いて実行される「暗号処理」とは、平文データPとして与えられた元データDを暗号データCに変換する「暗号化処理」だけでなく、暗号データCとして与えられた元データDを平文データPに変換する「復号処理」も含むものである。したがって、暗号処理サブルーチンRは、暗号化処理サブルーチンR1であってもよいし、復号処理サブルーチンR2であってもよいし、これら両方を含むサブルーチンであってもよい。
(1) Encryption Process and Decryption Process As described above, in this application, “encryption process” and “decryption process” are collectively referred to as “encryption process”. Therefore, “encryption processing” executed using the encryption key K in the encryption processing units 124, 124A, 124B, 124C, 124D, and 124E in each embodiment refers to the original data D given as the plaintext data P as encrypted data. This includes not only “encryption processing” for converting to C, but also “decryption processing” for converting original data D given as encrypted data C into plaintext data P. Therefore, the encryption processing subroutine R may be the encryption processing subroutine R1, the decryption processing subroutine R2, or a subroutine including both of them.

(2) 符号データに関する並べ替え
符号変換部122,122A,122B,122C,122D,122Eの基本機能は、各実施形態で述べたとおり、乱数テーブルを参照することにより、入力した符号データに含まれる個々の数値を当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行って暗号鍵を得ることにある。図7には、その基本形態として、図6に示す具体的な乱数テーブルTを用いて、暗号鍵Kと符号データFとの間で行われる相互変換の一例が示されている。
(2) Rearrangement related to code data The basic functions of the code conversion units 122, 122A, 122B, 122C, 122D, and 122E are included in the input code data by referring to the random number table as described in each embodiment. The purpose is to obtain an encryption key by performing a conversion process in which each numerical value is replaced with a numerical value contained in a cell having the numerical value as a cell number. FIG. 7 shows an example of mutual conversion performed between the encryption key K and the code data F using the specific random number table T shown in FIG. 6 as its basic form.

ここで述べる変形例は、このような変換処理を行う際に、予め設定した所定の並べ替え規則に基づく数値の並び替え処理を行うものである。たとえば、図7には、暗号鍵K「26,5C,08,3A,D8,55,2B,10」に対して、図6に示す乱数テーブルTを用いた変換を行うことにより、符号データF「AD,31,63,1D,12,60,EE,1B」を得る例が示されている。§1で述べた実施形態の場合、こうして得られた符号データFを暗号処理装置120に引き渡し、符号変換部122において、逆変換を行うことにより元の暗号鍵Kを得る処理が行われる。これに対して、ここで述べる変形例の場合、図7に示す符号データFに対して、更に、所定の並べ替え規則に基づく数値の並び替え処理を行い、並び替え後の符号データF′を暗号処理装置120に引き渡すようにする。   In the modification described here, when such conversion processing is performed, numerical value rearrangement processing based on a predetermined rearrangement rule set in advance is performed. For example, in FIG. 7, the encryption key K “26, 5C, 08, 3A, D8, 55, 2B, 10” is converted by using the random number table T shown in FIG. An example of obtaining “AD, 31, 63, 1D, 12, 60, EE, 1B” is shown. In the case of the embodiment described in §1, the code data F obtained in this way is transferred to the cryptographic processing device 120, and the code conversion unit 122 performs a process of obtaining the original cryptographic key K by performing reverse conversion. On the other hand, in the modified example described here, numerical value rearrangement processing based on a predetermined rearrangement rule is further performed on the code data F shown in FIG. 7, and the rearranged code data F ′ is obtained. The data is delivered to the cryptographic processing device 120.

並べ替え規則として、たとえば、「数値を逆順にする」という単純な規則を設定した場合、符号データF「AD,31,63,1D,12,60,EE,1B」の各数値を逆順にすることにより、符号データF′「1B,EE,60,12,1D,63,31,AD」が得られる。そこで、暗号処理装置120に対しては、符号データFを引き渡す代わりに、符号データF′を引き渡すようにする。   For example, when a simple rule of “reverse numerical values” is set as the rearrangement rule, the numerical values of the code data F “AD, 31, 63, 1D, 12, 60, EE, 1B” are reversed. As a result, the code data F ′ “1B, EE, 60, 12, 1D, 63, 31, AD” is obtained. Therefore, instead of delivering the code data F to the cryptographic processing device 120, the code data F ′ is delivered.

この場合、符号変換部122は、データ入力部121が入力した符号データF′に含まれる個々の数値「1B,EE,60,12,1D,63,31,AD」を所定の並び替え規則(上例の場合は「数値を逆順にする」という規則)に従って並び替え、並び替え後の数値「AD,31,63,1D,12,60,EE,1B」を用いて乱数テーブルTを参照することにより変換処理を行い、変換後のデータ「26,5C,08,3A,D8,55,2B,10」を暗号鍵Kとして暗号処理部124に与える処理を行えばよい。結局、暗号処理部124に対して、図7上段に示す暗号鍵Kが与えられる点において、§1で述べた第1の実施形態と相違はないが、並び替え処理を行っておけば、符号データF′と暗号鍵Kとの対応関係がより複雑になり、耐タンパ性を更に向上させることができるようになる。   In this case, the code conversion unit 122 converts each numerical value “1B, EE, 60, 12, 1D, 63, 31, AD” included in the code data F ′ input by the data input unit 121 into a predetermined rearrangement rule ( In the case of the above example, rearrangement is performed according to the rule of “reverse numerical values”, and the random number table T is referred to using the rearranged numerical values “AD, 31, 63, 1D, 12, 60, EE, 1B”. Thus, the conversion process is performed, and the converted data “26, 5C, 08, 3A, D8, 55, 2B, 10” is given to the encryption processing unit 124 as the encryption key K. Eventually, there is no difference from the first embodiment described in §1 in that the encryption key K shown in the upper part of FIG. 7 is given to the encryption processing unit 124. The correspondence relationship between the data F ′ and the encryption key K becomes more complicated, and the tamper resistance can be further improved.

当然ながら、並び替え規則は、「数値を逆順にする」という規則に限定されるものではなく、任意の規則を設定しておくことができる。たとえば、「最初の数値と最後の数値とを入れ替える」という規則を設定しておけば、符号データF「AD,31,63,1D,12,60,EE,1B」に基づいて、符号データF′「1B,31,63,1D,12,60,EE,AD」が得られることになる。もちろん、より複雑な規則として、たとえば、「最初の数値と最後の数値とを入れ替えた上で、更に、数値を逆順にする」という規則を設定することも可能である。あるいは、いわゆるローテーションシフトによる並び替えを行う規則を設定してもかまわない。たとえば、符号データF「AD,31,63,1D,12,60,EE,1B」に対して、「+3」(右方向に3つずつシフト)というシフト量を設定して並び替えを行えば、符号データF′「60,EE,1B,AD,31,63,1D,12」が得られる。要するに、符号変換部122が、与えられた符号データを暗号鍵Kに変換する処理を行うことができれば、どのような並び替え規則を設定してもかまわない。   Naturally, the rearrangement rule is not limited to the rule of “reversing the numerical values”, and an arbitrary rule can be set. For example, if a rule of “changing the first numerical value and the last numerical value” is set, the code data F is based on the code data F “AD, 31, 63, 1D, 12, 60, EE, 1B”. “1B, 31, 63, 1D, 12, 60, EE, AD” is obtained. Of course, as a more complicated rule, for example, a rule that “the first numerical value and the last numerical value are interchanged and then the numerical values are reversed in order” can be set. Alternatively, a rule for rearranging by so-called rotation shift may be set. For example, if the code data F “AD, 31, 63, 1D, 12, 60, EE, 1B” is rearranged by setting a shift amount of “+3” (shifted by 3 in the right direction). , Code data F ′ “60, EE, 1B, AD, 31, 63, 1D, 12” is obtained. In short, any sort rule may be set as long as the code conversion unit 122 can perform processing for converting the given code data into the encryption key K.

また、上記変形例では、図7下段に示す符号データFに対して並び替えを行い、並び替え後の符号データF′を暗号処理装置120に引き渡しているが、図7上段に示す暗号鍵Kに対して所定の並び替え規則に基づいて並び替えを行って並び替え後の暗号鍵K′を作成し、当該並び替え後の暗号鍵K′を構成する個々の数値について、乱数テーブルTを参照した置き換えを行って符号データF"を得るようにしてもよい。要するに、前述の変形例では、乱数テーブルTを用いた変換後のデータに対して並び替えが行われるのに対して、この変形例では、乱数テーブルTを用いる変換前のデータに対して並び替えが行われることになる。   Further, in the above modification, the code data F shown in the lower part of FIG. 7 is rearranged, and the code data F ′ after the rearrangement is delivered to the cryptographic processing device 120, but the encryption key K shown in the upper part of FIG. Are rearranged based on a predetermined rearrangement rule to create a rearranged encryption key K ′, and refer to the random number table T for each numerical value constituting the rearranged encryption key K ′ The code data F ″ may be obtained by performing the above replacement. In short, in the above-described modified example, rearrangement is performed on the converted data using the random number table T. In the example, rearrangement is performed on the data before conversion using the random number table T.

たとえば、「数値を逆順にする」という規則を設定した場合、図7上段に示す暗号鍵K「26,5C,08,3A,D8,55,2B,10」に対して、これを逆順にする処理を行い、「10,2B,55,D8,3A,08,5C,26」なるデータ(並び替え後の暗号鍵K′)を作成し、これらの数値に対して、図6に示す乱数テーブルTを用いた置き換えを行うことにより、符号データF”「1B,EE,60,12,1D,63,31,AD」を作成し、これを暗号処理装置120に引き渡すようにすればよい。   For example, when the rule “reverse numerical values” is set, this is reversed for the encryption key K “26, 5C, 08, 3A, D8, 55, 2B, 10” shown in the upper part of FIG. Processing is performed to create data (10, 2B, 55, D8, 3A, 08, 5C, 26) (reordered encryption key K ′), and for these numerical values, the random number table shown in FIG. By performing replacement using T, code data F ″ “1B, EE, 60, 12, 1D, 63, 31, AD” may be generated and delivered to the cryptographic processor 120.

この場合、符号変換部122は、まず、図6に示す乱数テーブルTを参照して、与えられた符号データF”「1B,EE,60,12,1D,63,31,AD」の各数値を置き換える変換処理を行い、変換後のデータ「10,2B,55,D8,3A,08,5C,26」(並び替え後の暗号鍵K′)を得る。続いて、この変換後のデータに含まれる個々の数値を所定の並び替え規則(上例の場合は「数値を逆順にする」という規則)に従って並び替え、並び替え後のデータ「26,5C,08,3A,D8,55,2B,10」を暗号鍵Kとして暗号処理部124に与える処理を行えばよい。   In this case, the code conversion unit 122 first refers to the random number table T shown in FIG. 6 and each numerical value of the given code data F ”“ 1B, EE, 60, 12, 1D, 63, 31, AD ”. Is converted to obtain converted data “10, 2B, 55, D8, 3A, 08, 5C, 26” (rearranged encryption key K ′). Subsequently, the individual numerical values included in the converted data are rearranged according to a predetermined rearrangement rule (in the above example, the rule “reverse numerical values”), and the rearranged data “26, 5C, The process of giving 08, 3A, D8, 55, 2B, 10 "to the encryption processing unit 124 as the encryption key K may be performed.

もちろん、上述した2つの変形例を組み合わせて、乱数テーブルTを用いる変換前のデータに対して第1の並び替えを行い、乱数テーブルTを用いた変換後のデータに対して第2の並び替えを行うようにしてもよい。   Of course, by combining the above-described two modifications, the first rearrangement is performed on the data before conversion using the random number table T, and the second rearrangement is performed on the data after conversion using the random number table T. May be performed.

(3) 各実施形態相互の組合わせ
§1〜§6では、それぞれ固有の特徴をもった第1〜第6の実施形態を個別に述べたが、これらの各実施形態は、相互に組み合わせて実行することができる。たとえば、複数の乱数テーブルを用いる第2の実施形態と、乱数テーブルに対するシフトを行う第4の実施形態と、複数の暗号アルゴリズムを用いる第5の実施形態と、を組み合わせて用いてもよい。この場合、主装置(メインプログラムM)から暗号処理装置(暗号処理サブルーチンR)に対しては、元データD、符号データF、テーブル指定子t、シフト指示子s、アルゴリズム指定子aが引き渡されることになる。
(3) Combinations of Embodiments In §1 to §6, the first to sixth embodiments having unique features are individually described. However, these embodiments can be combined with each other. Can be executed. For example, the second embodiment that uses a plurality of random number tables, the fourth embodiment that shifts the random number table, and the fifth embodiment that uses a plurality of cryptographic algorithms may be used in combination. In this case, original data D, code data F, table designator t, shift designator s, and algorithm designator a are delivered from the main device (main program M) to the cryptographic processing device (encryption processing subroutine R). It will be.

もちろん、更に、第6の実施形態を組み合わせて、符号データFの代わりに暗号化符号データGを引き渡すことも可能である。要するに、これまで述べてきたいくつかの実施形態は、矛盾が生じない限り、相互に組み合わせて実施することが可能であり、主装置(メインプログラムM)から暗号処理装置(暗号処理サブルーチンR)に対しては、採用した実施形態に応じて、必要な情報を引き渡すようにすればよい。   Of course, it is also possible to deliver the encrypted code data G instead of the code data F by combining the sixth embodiment. In short, some of the embodiments described so far can be combined with each other as long as no contradiction arises, and the main apparatus (main program M) is changed to the encryption processing apparatus (encryption processing subroutine R). On the other hand, necessary information may be handed over according to the adopted embodiment.

なお、複数の乱数テーブルを用いる第2もしくは第3の実施形態と、乱数テーブルに対するシフトを行う第4の実施形態とを組み合わせる場合は、複数の乱数テーブルを跨いだシフトが行われるようにすることもできる。すなわち、複数の乱数テーブルを用いる場合、これら複数の乱数テーブルを一時的に結合することにより、結合テーブルを作成し、この結合テーブルに対して、たとえばローテーションシフトを行い、その後、個々の乱数テーブルに分離する処理を行えばよい。結合テーブルについて行われたシフト処理は、複数の乱数テーブルを跨いだシフト処理ということになり、耐タンパ性を更に向上させるメリットが得られる。   When the second or third embodiment using a plurality of random number tables is combined with the fourth embodiment that performs a shift with respect to the random number table, the shift across the plurality of random number tables should be performed. You can also. That is, when a plurality of random number tables are used, a combined table is created by temporarily combining the plurality of random number tables, and, for example, a rotation shift is performed on the combined table. What is necessary is just to perform the process to isolate | separate. The shift process performed on the combined table is a shift process across a plurality of random number tables, and a merit of further improving tamper resistance can be obtained.

たとえば、図17には、8行8列に並べられた合計64個のセルからなる乱数テーブルTに対してローテーションシフトを行う例が示されている。これに対して、64個のセルからなる乱数テーブルを2組結合して結合テーブルを作成することにすれば、合計128個のセルからなる結合テーブル上でシフト処理が行われることになる。こうして、結合テーブル上のセル内の数値に対するシフトが完了したら、元どおり、64個のセルからなる2組の乱数テーブルに分離すればよい。   For example, FIG. 17 shows an example in which a rotation shift is performed on a random number table T composed of a total of 64 cells arranged in 8 rows and 8 columns. On the other hand, if two tables of 64 random cells are combined to create a combined table, a shift process is performed on the combined table of 128 cells in total. Thus, when the shift for the numerical values in the cells on the combined table is completed, it can be separated into two sets of random number tables consisting of 64 cells.

具体的には、第1の乱数テーブルTaを構成する64個のセルのセル番号を1〜64とし、第2の乱数テーブルTbを構成する64個のセルのセル番号を65〜128とすれば、セル番号1〜128が付された128個のセルからなる結合テーブルを一時的に作成し、当該結合テーブル上で、たとえば、図17に例示するようなローテーションシフトを行い、その後、64個のセルをもった2つの乱数テーブルに分離する処理を行えばよい。この場合、第1の乱数テーブルTaから押し出された数値は第2の乱数テーブルTbへ移動し、第2の乱数テーブルTbから押し出された数値は第1の乱数テーブルTaへ移動する。   Specifically, if the cell numbers of 64 cells constituting the first random number table Ta are 1 to 64, and the cell numbers of 64 cells constituting the second random number table Tb are 65 to 128, , Temporarily create a join table made up of 128 cells with cell numbers 1 to 128, and perform a rotation shift as illustrated in FIG. What is necessary is just to perform the process which isolate | separates into two random number tables with a cell. In this case, the numerical value pushed out from the first random number table Ta moves to the second random number table Tb, and the numerical value pushed out from the second random number table Tb moves to the first random number table Ta.

たとえば、シフト前の第1の乱数テーブルTaに「1〜64」なる数値が収容され、シフト前の第2の乱数テーブルTbに「65〜128」なる数値が収容されている状態において、これら2つの乱数テーブルを跨いで、「+5」なるシフト指示子sに基づくローテーションシフトを行うと、シフト後の第1の乱数テーブルTa内の数値は「124,125,126,127,128,1,2,3,...,57,58,59」となり、シフト後の第2の乱数テーブルTa内の数値は「60,61,62,63,64,65,66,67,...,121,122,123」となる。2つの乱数テーブルを跨いだシフトが行われたため、耐タンパ性は更に向上する。   For example, in the state where the numerical value “1 to 64” is stored in the first random number table Ta before the shift and the numerical value “65 to 128” is stored in the second random number table Tb before the shift, these 2 When a rotation shift based on the shift indicator s “+5” is performed across the two random number tables, the numerical values in the first random number table Ta after the shift are “124, 125, 126, 127, 128, 1, 2”. , 3, ..., 57, 58, 59 ", and the numerical values in the second random number table Ta after the shift are" 60, 61, 62, 63, 64, 65, 66, 67, ..., 121 ". , 122, 123 ". Since the shift across the two random number tables is performed, the tamper resistance is further improved.

以上、2つの乱数テーブルTa,Tbを結合させて結合テーブルを作成する例を述べたが、もちろん、3つ以上の乱数テーブルを結合させてもかまわない。要するに、乱数テーブル格納部に複数K通りの乱数テーブルが格納されている場合、データ入力部が、元データおよび符号データとともに、特定の乱数テーブルを指定するテーブル指定子と、複数の乱数テーブルを跨いでシフトさせる規則を示すシフト指示子と、を外部から入力するようにし、符号変換部が、このシフト指示子によって示される規則に基づいて、複数の乱数テーブルを跨いだシフト処理を行い、当該シフト処理後に、テーブル指定子で指定された乱数テーブルを参照することにより変換処理を行うようにすればよい。   The example in which the two random number tables Ta and Tb are combined to create the combined table has been described above. Of course, three or more random number tables may be combined. In short, when a plurality of K kinds of random number tables are stored in the random number table storage unit, the data input unit straddles the table designator for designating a specific random number table together with the original data and the code data, and the plurality of random number tables. And a shift indicator indicating the rule to be shifted in the input from the outside, the code conversion unit performs a shift process across a plurality of random number tables based on the rule indicated by the shift indicator, the shift After the processing, the conversion processing may be performed by referring to the random number table specified by the table designator.

(4) 方法発明としての把握
本発明は、暗号処理装置として把握することもできるし、当該暗号処理装置に主装置を加えて構成される情報処理装置として把握することもできるし、更に、当該暗号処理装置に引き渡す符号データFもしくは暗号化符号データGを生成するための暗号処理用符号データ生成装置として把握することもできる。これまでの説明は、このように、本発明を様々な装置発明として捉えたものである。一方、本発明は、暗号処理方法という方法発明として捉えることも可能である。
(4) Grasping as a method invention The present invention can be grasped as a cryptographic processing device, can be grasped as an information processing device configured by adding a main device to the cryptographic processing device, and It can also be understood as a code data generation device for encryption processing for generating code data F or encryption code data G to be delivered to the encryption processing device. Thus far, the description so far regards the present invention as various device inventions. On the other hand, the present invention can also be understood as a method invention called a cryptographic processing method.

方法発明として捉えると、本発明は、メインプログラムMと暗号処理サブルーチンプログラムRとが組み込まれたコンピュータが、暗号化もしくは復号のための暗号処理を行う暗号処理方法ということになり、当該方法は、次の3つの処理段階から構成されることになる。   When viewed as a method invention, the present invention is an encryption processing method in which a computer in which the main program M and the encryption processing subroutine program R are incorporated performs encryption processing for encryption or decryption. It consists of the following three processing stages.

まず、第1の処理段階は、コンピュータが、メインプログラムMを実行することにより、暗号処理の対象となる元データDと暗号処理に必要な符号データFとを暗号処理サブルーチンプログラムRに引き渡す前処理段階である。   First, in the first processing stage, the computer executes the main program M, so that the original data D to be subjected to encryption processing and the code data F necessary for encryption processing are delivered to the encryption processing subroutine program R. It is a stage.

続く、第2の処理段階は、コンピュータが、暗号処理サブルーチンプログラムRを実行することにより、それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値が収容された乱数テーブルTを参照して、符号データFに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、変換後のデータを暗号鍵Kとして用いる所定の暗号アルゴリズムAに基づいて、元データDに対して暗号処理を実施し、処理済データEをメインプログラムに引き渡す暗号処理段階である。   In the subsequent second processing stage, when the computer executes the cryptographic processing subroutine program R, N (M ≧ N) numerical values are randomly assigned to a plurality of M cells each having a unique cell number. Is converted into a numerical value stored in a cell having the numerical value as a cell number, and the converted data is encrypted. This is a cryptographic processing stage in which cryptographic processing is performed on the original data D based on a predetermined cryptographic algorithm A used as the key K, and the processed data E is delivered to the main program.

そして、第3の処理段階は、コンピュータが、メインプログラムMを実行することにより、処理済みデータEを用いて所定の処理を続行する後処理段階である。   The third processing stage is a post-processing stage in which the computer executes the main program M to continue predetermined processing using the processed data E.

より具体的には、前処理段階では、0〜(M−1)の範囲の値をもった整数を羅列した符号データFを暗号処理サブルーチンプログラムRに引き渡す処理を行い、暗号処理段階では、0〜(M−1)の範囲の連続したセル番号が付与された複数M個のセルに、0〜(N−1)の範囲の連続するN通りの整数をランダムに収容した乱数テーブルTを用い、符号データを、0〜(N−1)の範囲の値をもった整数を羅列した暗号鍵Kに置き換える変換処理を行うようにすればよい。   More specifically, in the pre-processing stage, a process of handing over code data F in which integers having values in the range of 0 to (M-1) are transferred to the cryptographic processing subroutine program R is performed. A random number table T in which N consecutive integers in the range of 0 to (N-1) are randomly stored in a plurality of M cells assigned consecutive cell numbers in the range of ~ (M-1) is used. The code data may be converted into an encryption key K in which integers having values in the range of 0 to (N-1) are enumerated.

また、上述した第6の実施形態を採用する場合は、前処理段階で、符号データFの代わりに、当該符号データFに対して所定の方法で暗号化を行って生成された暗号化符号データGを暗号処理サブルーチンプログラムRに引き渡す処理を行い、暗号処理段階では、この暗号化符号データGを復号して得られる元の符号データFを暗号鍵Kに変換する変換処理を行うようにすればよい。   Further, when the sixth embodiment described above is adopted, encrypted code data generated by encrypting the code data F by a predetermined method instead of the code data F in the preprocessing stage. G is transferred to the encryption processing subroutine program R, and at the encryption processing stage, conversion processing for converting the original code data F obtained by decrypting the encrypted code data G into the encryption key K is performed. Good.

100,100A,100B,100C,100D,100E:情報処理装置
110,110A,110B,110C,110D,110E:主装置(メインプログラム)
111,111A,111B,111C,111D,111E:情報処理部
112,112A,112B,112C,112D,112E:暗号処理依頼部
113,113A,113B,113C,113D,113E:暗号処理結果受信部
120,120A,120B,120C,120D,120E:暗号処理装置(暗号処理サブルーチン)
121,121A,121B,121C,121D,121E:データ入力部
122,122A,122B,122C,122D,122E:符号変換部
123,123A,123B,123C,123D,123E:乱数テーブル格納部
124,124A,124B,124C,124D,124E:暗号処理部
125,125A,125B,125C,125D,125E:データ出力部
126E:符号データ復号部
300,300E:符号データ生成装置
310,310E:暗号鍵入力部
320,320E:符号データ生成部
330,330E:乱数テーブル記憶部
340E:暗号化データ生成部
A,A1〜A4:暗号アルゴリズム
a:アルゴリズム指定子
C:暗号データ
D:元データ
d:シフト量
E:処理済データ
F:符号データ
F′:並び替え後の符号データ
F":並び替え後の暗号鍵に基づいて作成された符号データ
f1〜f8:符号データFの各バイト
G:暗号化符号データ
K:暗号鍵
K′:並び替え後の暗号鍵
M:メインプログラム
P:平文データ
P1〜P3:テーブル指定パターン
p:パターン選択子
R:暗号処理サブルーチン
R1:暗号化処理サブルーチン
R2:復号処理サブルーチン
s:シフト指示子
T,T0〜T15:乱数テーブル
t,t1〜t8:テーブル指定子
V1〜VH:秘密鍵
W1〜WH:公開鍵
w:復号鍵指定子
X,Y,Z:アプリケーションプログラム(メインプログラムM)の提供業者
x,y:処理実行ルート
100, 100A, 100B, 100C, 100D, 100E: Information processing apparatus 110, 110A, 110B, 110C, 110D, 110E: Main apparatus (main program)
111, 111A, 111B, 111C, 111D, 111E: Information processing unit 112, 112A, 112B, 112C, 112D, 112E: Encryption processing request unit 113, 113A, 113B, 113C, 113D, 113E: Encryption processing result receiving unit 120, 120A, 120B, 120C, 120D, 120E: Cryptographic processing device (cryptographic processing subroutine)
121, 121A, 121B, 121C, 121D, 121E: Data input units 122, 122A, 122B, 122C, 122D, 122E: Code conversion units 123, 123A, 123B, 123C, 123D, 123E: Random number table storage units 124, 124A, 124B, 124C, 124D, 124E: encryption processing units 125, 125A, 125B, 125C, 125D, 125E: data output unit 126E: code data decryption unit 300, 300E: code data generation device 310, 310E: encryption key input unit 320, 320E: Code data generation unit 330, 330E: Random number table storage unit 340E: Encrypted data generation unit A, A1 to A4: Encryption algorithm a: Algorithm specifier C: Encryption data D: Original data d: Shift amount E: Processed Data F: Code data F : Code data F "after rearrangement: Code data f1 to f8 created based on the encryption key after rearrangement: Each byte G of code data F: Encrypted code data K: Encryption key K ': After rearrangement Encryption key M: main program P: plaintext data P1-P3: table designation pattern p: pattern selector R: encryption processing subroutine R1: encryption processing subroutine R2: decryption processing subroutine s: shift indicators T, T0 to T15: Random number tables t, t1 to t8: Table designators V1 to VH: Private keys W1 to WH: Public keys w: Decryption key designators X, Y, Z: Providers x, y of application program (main program M) Execution route

Claims (11)

入力した元データに対して暗号化もしくは復号のための暗号処理を行い、処理済データを出力する暗号処理装置であって、
暗号処理の対象となる元データと暗号処理に必要な符号データとを外部から入力するデータ入力部と、
所定の暗号鍵を用いた所定の暗号アルゴリズムに基づいて、前記データ入力部が入力した元データに対して暗号処理を実施し、処理済データを生成する暗号処理部と、
生成された前記処理済データを外部に出力するデータ出力部と、
それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値を収容した乱数テーブルを格納する乱数テーブル格納部と、
前記乱数テーブルを参照することにより、前記データ入力部が入力した符号データに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、当該変換処理を経て得られるデータを暗号鍵として前記暗号処理部に与える符号変換部と、
を備え
前記データ入力部が、元データおよび符号データとともに、乱数テーブルの各セル内の数値をシフトさせる規則を示すシフト指示子を外部から入力し、
前記符号変換部が、乱数テーブル内の各数値を前記シフト指示子によって示される規則に基づいてシフトさせ、シフト後の数値を用いて変換処理を行うことを特徴とする暗号処理装置。
An encryption processing device that performs encryption processing for encryption or decryption on input original data and outputs processed data,
A data input unit for inputting the original data to be encrypted and the code data necessary for the encryption from the outside;
Based on a predetermined encryption algorithm using a predetermined encryption key, an encryption process is performed on the original data input by the data input unit to generate processed data;
A data output unit for outputting the generated processed data to the outside;
A random number table storage unit for storing a random number table containing N (M ≧ N) numerical values randomly in a plurality of M cells each having a unique cell number;
By referring to the random number table, a conversion process is performed in which each numerical value included in the code data input by the data input unit is replaced with a numerical value contained in a cell having the numerical value as a cell number. A code conversion unit that gives the data obtained through the above as an encryption key to the encryption processing unit,
Equipped with a,
The data input unit inputs from the outside a shift indicator indicating a rule for shifting a numerical value in each cell of the random number table together with the original data and the code data,
An encryption processing apparatus , wherein the code conversion unit shifts each numerical value in a random number table based on a rule indicated by the shift indicator, and performs conversion processing using the shifted numerical value .
請求項に記載の暗号処理装置において、
データ入力部が、正もしくは負のいずれかのシフト方向とシフト量dとを示すシフト指示子を入力し、
前記符号変換部が、前記シフト方向が正の場合には、乱数テーブルの第i番目のセル番号をもつセル内の数値を第(i+d)番目のセル番号をもつセルにシフトさせ、前記シフト方向が負の場合には、乱数テーブルの第i番目のセル番号をもつセル内の数値を第(i−d)番目のセル番号をもつセルにシフトさせるシフト処理(但し、シフト後のセルが、セル番号の範囲から外れる場合には、シフト後のセル番号にセルの総数Mを加算もしくは減算してセル番号の範囲内となるようにする処理)を行うことを特徴とする暗号処理装置。
The cryptographic processing device according to claim 1 ,
The data input unit inputs a shift indicator indicating either a positive or negative shift direction and a shift amount d,
When the shift direction is positive, the code conversion unit shifts the numerical value in the cell having the i-th cell number of the random number table to the cell having the (i + d) -th cell number, and the shift direction Is negative, a shift process for shifting the numerical value in the cell having the i-th cell number in the random number table to the cell having the (id) cell number (where the cell after the shift is An encryption processing apparatus that performs a process of adding or subtracting the total number M of cells to the cell number after the shift so that the cell number is within the range of the cell number).
請求項に記載の暗号処理装置において、
前記乱数テーブル格納部が、複数K通りの乱数テーブルを格納しており、
データ入力部が、元データおよび符号データとともに、特定の乱数テーブルを指定するテーブル指定子と、複数の乱数テーブルを跨いでシフトさせる規則を示すシフト指示子と、を外部から入力し、
前記符号変換部が、前記シフト指示子によって示される規則に基づくシフト処理を行い、当該シフト処理後に、前記テーブル指定子で指定された乱数テーブルを参照することにより変換処理を行うことを特徴とする暗号処理装置。
The cryptographic processing device according to claim 1 ,
The random number table storage unit stores a plurality of K random number tables;
The data input unit inputs from the outside a table designator that designates a specific random number table together with the original data and code data, and a shift indicator that indicates a rule for shifting across a plurality of random number tables,
The code conversion unit performs a shift process based on a rule indicated by the shift indicator, and performs the conversion process by referring to the random number table specified by the table specifier after the shift process. Cryptographic processing device.
請求項1〜のいずれかに記載の暗号処理装置において、
前記符号変換部が、データ入力部が入力した符号データに含まれる個々の数値を所定の並び替え規則に従って並び替え、並び替え後の数値を用いて乱数テーブルを参照することにより変換処理を行い、変換後のデータを暗号鍵として前記暗号処理部に与えることを特徴とする暗号処理装置。
The cryptographic processing device according to any one of claims 1 to 3 ,
The code conversion unit rearranges individual numerical values included in the code data input by the data input unit according to a predetermined rearrangement rule, performs conversion processing by referring to the random number table using the rearranged numerical values, An encryption processing apparatus, wherein the converted data is given to the encryption processing unit as an encryption key.
請求項1〜のいずれかに記載の暗号処理装置において、
前記符号変換部が、乱数テーブルを参照して置き換える変換処理により変換後のデータを得た後、当該変換後のデータに含まれる個々の数値を所定の並び替え規則に従って並び替え、並び替え後のデータを暗号鍵として前記暗号処理部に与えることを特徴とする暗号処理装置。
The cryptographic processing device according to any one of claims 1 to 3 ,
After the code conversion unit obtains data after conversion by conversion processing referring to a random number table, the numerical values included in the converted data are rearranged according to a predetermined rearrangement rule, An encryption processing apparatus, wherein data is given to the encryption processing unit as an encryption key.
請求項1〜のいずれかに記載の暗号処理装置において、
前記暗号処理部が複数通りの暗号アルゴリズムの中の任意の暗号アルゴリズムを用いて暗号処理を実施する機能を有し、
前記データ入力部が、前記複数通りの暗号アルゴリズムの中の1つを指定するアルゴリズム指定子を入力し、
前記暗号処理部が前記アルゴリズム指定子によって指定された暗号アルゴリズムを用いて暗号処理を実施することを特徴とする暗号処理装置。
In the cryptographic processing device according to any one of claims 1 to 5 ,
The cryptographic processing unit has a function of performing cryptographic processing using an arbitrary cryptographic algorithm among a plurality of cryptographic algorithms,
The data input unit inputs an algorithm designator that designates one of the plurality of encryption algorithms,
The cryptographic processing apparatus, wherein the cryptographic processing unit performs cryptographic processing using a cryptographic algorithm designated by the algorithm designator.
入力した元データに対して暗号化もしくは復号のための暗号処理を行い、処理済データを出力する暗号処理装置であって、暗号処理の対象となる元データと暗号処理に必要な符号データとを外部から入力するデータ入力部と、所定の暗号鍵を用いた所定の暗号アルゴリズムに基づいて、前記データ入力部が入力した元データに対して暗号処理を実施し、処理済データを生成する暗号処理部と、生成された前記処理済データを外部に出力するデータ出力部と、それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値を収容した乱数テーブルを格納する乱数テーブル格納部と、前記乱数テーブルを参照することにより、前記データ入力部が入力した符号データに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、当該変換処理を経て得られるデータを暗号鍵として前記暗号処理部に与える符号変換部と、を備えた暗号処理装置に与える符号データを生成する符号データ生成装置であって、
前記暗号処理装置内の乱数テーブル格納部に格納されている乱数テーブルと同一の乱数テーブルを記憶した乱数テーブル記憶部と、
前記暗号処理装置内の暗号処理部による暗号処理に利用させる暗号鍵を入力する暗号鍵入力部と、
前記乱数テーブル記憶部に記憶されている乱数テーブルを用いて、前記暗号処理装置内の符号変換部によって行われる変換処理とは逆の変換処理を行い、前記暗号鍵入力部が入力した暗号鍵に対応する符号データを生成する符号データ生成部と、
を備えることを特徴とする暗号処理用符号データ生成装置。
An encryption processing device that performs encryption processing for encryption or decryption on input original data and outputs processed data, and includes original data to be subjected to encryption processing and code data necessary for encryption processing Cryptographic processing for generating processed data by performing cryptographic processing on the original data input by the data input unit based on a data input unit input from the outside and a predetermined encryption algorithm using a predetermined encryption key Unit, a data output unit for outputting the generated processed data to the outside, and a plurality of M cells each having a unique cell number, and randomly storing N numbers (M ≧ N). By referring to the random number table storage unit that stores the random number table and the random number table, each numerical value included in the code data input by the data input unit is converted into a cell number. Performs conversion processing for replacing the numerical value contained in that cell, it generates code data providing data obtained through the conversion process to the encryption processing apparatus and a code converting unit that gives the encryption processing section as an encryption key A code data generation device,
A random number table storage unit that stores the same random number table as the random number table stored in the random number table storage unit in the cryptographic processing device;
An encryption key input unit for inputting an encryption key to be used for encryption processing by the encryption processing unit in the encryption processing device;
Using the random number table stored in the random number table storage unit, a conversion process opposite to the conversion process performed by the code conversion unit in the encryption processing device is performed, and the encryption key input by the encryption key input unit A code data generation unit for generating corresponding code data;
A code data generation device for cryptographic processing, comprising:
入力した元データに対して暗号化もしくは復号のための暗号処理を行い、処理済データを出力する暗号処理装置であって、暗号処理の対象となる元データと暗号処理に必要な符号データとを外部から入力するデータ入力部と、所定の暗号鍵を用いた所定の暗号アルゴリズムに基づいて、前記データ入力部が入力した元データに対して暗号処理を実施し、処理済データを生成する暗号処理部と、生成された前記処理済データを外部に出力するデータ出力部と、それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値を収容した乱数テーブルを格納する乱数テーブル格納部と、前記乱数テーブルを参照することにより、前記データ入力部が入力した符号データに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、当該変換処理を経て得られるデータを暗号鍵として前記暗号処理部に与える符号変換部と、所定の方法で暗号化された暗号化符号データを復号して、元の符号データを得る符号データ復号部と、を備え、前記データ入力部が、前記暗号化符号データを外部から入力し、前記符号データ復号部が、前記データ入力部が入力した暗号化符号データを復号し、復号された符号データを前記符号変換部に与え、前記符号変換部が、前記復号された符号データを暗号鍵に変換する変換処理を行う暗号処理装置に与える暗号化符号データを生成する符号データ生成装置であって、
前記暗号処理装置内の乱数テーブル格納部に格納されている乱数テーブルと同一の乱数テーブルを記憶した乱数テーブル記憶部と、
前記暗号処理装置内の暗号処理部による暗号処理に利用させる暗号鍵を入力する暗号鍵入力部と、
前記乱数テーブル記憶部に記憶されている乱数テーブルを用いて、前記暗号処理装置内の符号変換部によって行われる変換処理とは逆の変換処理を行い、前記暗号鍵入力部が入力した暗号鍵に対応する符号データを生成する符号データ生成部と、
前記符号データ生成部によって生成された符号データに対して、前記暗号処理装置内の符号データ復号部によって復号可能な方法で暗号化を行って暗号化符号データを生成する暗号化符号データ生成部と、
を備えることを特徴とする暗号処理用符号データ生成装置。
An encryption processing device that performs encryption processing for encryption or decryption on input original data and outputs processed data, and includes original data to be subjected to encryption processing and code data necessary for encryption processing Cryptographic processing for generating processed data by performing cryptographic processing on the original data input by the data input unit based on a data input unit input from the outside and a predetermined encryption algorithm using a predetermined encryption key Unit, a data output unit for outputting the generated processed data to the outside, and a plurality of M cells each having a unique cell number, and randomly storing N numbers (M ≧ N). By referring to the random number table storage unit that stores the random number table and the random number table, each numerical value included in the code data input by the data input unit is converted into a cell number. Performs conversion processing for replacing the numerical value contained in that cell, and the code converting unit that gives the data obtained through the conversion process to the encryption processing section as an encryption key, encrypted encryption code data in a predetermined manner A code data decoding unit for obtaining original code data, wherein the data input unit inputs the encrypted code data from the outside, and the code data decoding unit inputs the data input unit The encrypted code data is decrypted, the decrypted code data is provided to the code conversion unit, and the code conversion unit provides a cryptographic processing device that performs a conversion process of converting the decrypted code data into an encryption key. A code data generation device for generating encoded code data,
A random number table storage unit that stores the same random number table as the random number table stored in the random number table storage unit in the cryptographic processing device;
An encryption key input unit for inputting an encryption key to be used for encryption processing by the encryption processing unit in the encryption processing device;
Using the random number table stored in the random number table storage unit, a conversion process opposite to the conversion process performed by the code conversion unit in the encryption processing device is performed, and the encryption key input by the encryption key input unit A code data generation unit for generating corresponding code data;
An encrypted code data generation unit that generates encrypted code data by encrypting the code data generated by the code data generation unit by a method that can be decrypted by the code data decoding unit in the encryption processing device; ,
A code data generation device for cryptographic processing, comprising:
入力した元データに対して暗号化もしくは復号のための暗号処理を行い、処理済データを出力する暗号処理装置であって、暗号処理の対象となる元データと暗号処理に必要な符号データとを外部から入力するデータ入力部と、所定の暗号鍵を用いた所定の暗号アルゴリズムに基づいて、前記データ入力部が入力した元データに対して暗号処理を実施し、処理済データを生成する暗号処理部と、生成された前記処理済データを外部に出力するデータ出力部と、それぞれ固有のセル番号が付与された複数M個のセルに、ランダムにN通り(M≧N)の数値を収容した乱数テーブルを格納する乱数テーブル格納部と、前記乱数テーブルを参照することにより、前記データ入力部が入力した符号データに含まれる個々の数値を、当該数値をセル番号とするセルに収容されている数値に置き換える変換処理を行い、当該変換処理を経て得られるデータを暗号鍵として前記暗号処理部に与える符号変換部と、所定の方法で暗号化された暗号化符号データを復号して、元の符号データを得る符号データ復号部と、を備え、前記データ入力部が、前記暗号化符号データを外部から入力し、前記符号データ復号部が、前記データ入力部が入力した暗号化符号データを復号し、復号された符号データを前記符号変換部に与え、前記符号変換部が、前記復号された符号データを暗号鍵に変換する変換処理を行い、前記符号データ復号部が複数H通りの復号鍵を記憶しており、前記データ入力部が、前記複数H通りの復号鍵のうちの第i番目の復号鍵を用いて復号が可能な状態で暗号化された暗号化符号データと、前記第i番目の復号鍵を指定する復号鍵指定子と、を外部から入力し、前記符号データ復号部が、前記復号鍵指定子で指定された復号鍵を用いた復号を行い、前記符号データ復号部が、公開鍵暗号方式に利用可能な公開鍵および秘密鍵を構成する複数H組の鍵ペアーのそれぞれについて、公開鍵および秘密鍵のうちの一方の鍵を記憶しており、前記データ入力部が、前記H組の鍵ペアーのうちの第i番目の鍵ペアーについての他方の鍵を用いて暗号化された暗号化符号データと、前記第i番目の鍵ペアーを指定する復号鍵指定子と、を外部から入力し、符号データ復号部が、前記復号鍵指定子で指定された鍵ペアーについての前記一方の鍵を復号鍵として用いた復号を行う暗号処理装置に与える暗号化符号データを生成する符号データ生成装置であって、
前記暗号処理装置内の乱数テーブル格納部に格納されている乱数テーブルと同一の乱数テーブルを記憶した乱数テーブル記憶部と、
前記暗号処理装置内の暗号処理部による暗号処理に利用させる暗号鍵を入力する暗号鍵入力部と、
前記乱数テーブル記憶部に記憶されている乱数テーブルを用いて、前記暗号処理装置内の符号変換部によって行われる変換処理とは逆の変換処理を行い、前記暗号鍵入力部が入力した暗号鍵に対応する符号データを生成する符号データ生成部と、
前記暗号処理装置内の符号データ復号部に記憶されている「H組の鍵ペアーのうち一方の鍵」にそれぞれ対応する「H組の鍵ペアーのうちの他方の鍵」を記憶しており、前記符号データ生成部によって生成された符号データに対して、前記「H組の鍵ペアーのうちの他方の鍵」の中の任意の第i番目の鍵を用いて暗号化を行って暗号化符号データを生成する暗号化符号データ生成部と、
を備えることを特徴とする暗号処理用符号データ生成装置。
An encryption processing device that performs encryption processing for encryption or decryption on input original data and outputs processed data, and includes original data to be subjected to encryption processing and code data necessary for encryption processing Cryptographic processing for generating processed data by performing cryptographic processing on the original data input by the data input unit based on a data input unit input from the outside and a predetermined encryption algorithm using a predetermined encryption key Unit, a data output unit for outputting the generated processed data to the outside, and a plurality of M cells each having a unique cell number, and randomly storing N numbers (M ≧ N). By referring to the random number table storage unit that stores the random number table and the random number table, each numerical value included in the code data input by the data input unit is converted into a cell number. Performs conversion processing for replacing the numerical value contained in that cell, and the code converting unit that gives the data obtained through the conversion process to the encryption processing section as an encryption key, encrypted encryption code data in a predetermined manner A code data decoding unit for obtaining original code data, wherein the data input unit inputs the encrypted code data from the outside, and the code data decoding unit inputs the data input unit The encrypted code data is decoded, the decoded code data is supplied to the code conversion unit, and the code conversion unit performs a conversion process of converting the decoded code data into an encryption key, and the code data decoding unit Stores a plurality of H types of decryption keys, and the data input unit is encrypted in such a manner that it can be decrypted using the i-th decryption key of the plurality of H types of decryption keys. Code data And a decryption key designator designating the i-th decryption key, and the code data decryption unit performs decryption using the decryption key designated by the decryption key designator, The code data decryption unit stores one of a public key and a private key for each of a plurality of H pairs of public keys and private keys that can be used in a public key cryptosystem, and A data input unit that encrypts encrypted data using the other key of the i-th key pair of the H key pairs and a decryption key that specifies the i-th key pair; An encryption code that is input from the outside, and the code data decryption unit gives to a cryptographic processing device that performs decryption using the one key of the key pair designated by the decryption key designator as a decryption key Generate code data to generate data A device,
A random number table storage unit that stores the same random number table as the random number table stored in the random number table storage unit in the cryptographic processing device;
An encryption key input unit for inputting an encryption key to be used for encryption processing by the encryption processing unit in the encryption processing device;
Using the random number table stored in the random number table storage unit, a conversion process opposite to the conversion process performed by the code conversion unit in the encryption processing device is performed, and the encryption key input by the encryption key input unit A code data generation unit for generating corresponding code data;
Storing “the other key of the H key pairs” corresponding to the “one key of the H key pairs” stored in the code data decryption unit in the encryption processing device, The code data generated by the code data generation unit is encrypted by using an arbitrary i-th key in the “other key of the H key pairs” to generate an encrypted code An encrypted code data generation unit for generating data;
A code data generation device for cryptographic processing, comprising:
請求項1〜6のいずれかに記載の暗号処理装置としてコンピュータを機能させるためのプログラム。 Program for causing a computer to function as a cryptographic processing apparatus according to claim 1. 請求項7〜9のいずれかに記載の暗号処理用符号データ生成装置としてコンピュータを機能させるためのプログラム。 A program for causing a computer to function as the code data generation device for cryptographic processing according to any one of claims 7 to 9 .
JP2013032862A 2013-02-22 2013-02-22 Cryptographic processing apparatus and information processing apparatus Expired - Fee Related JP6094255B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013032862A JP6094255B2 (en) 2013-02-22 2013-02-22 Cryptographic processing apparatus and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013032862A JP6094255B2 (en) 2013-02-22 2013-02-22 Cryptographic processing apparatus and information processing apparatus

Publications (2)

Publication Number Publication Date
JP2014165570A JP2014165570A (en) 2014-09-08
JP6094255B2 true JP6094255B2 (en) 2017-03-15

Family

ID=51615840

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013032862A Expired - Fee Related JP6094255B2 (en) 2013-02-22 2013-02-22 Cryptographic processing apparatus and information processing apparatus

Country Status (1)

Country Link
JP (1) JP6094255B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10224339A (en) * 1996-12-05 1998-08-21 Akutei Create:Kk Data security device
JP4140617B2 (en) * 2005-04-15 2008-08-27 三菱電機株式会社 Authentication system using authentication recording medium and method of creating authentication recording medium
JP2007164595A (en) * 2005-12-15 2007-06-28 Toshiba Corp Function calling method of computer system, computer system and library
JP2008098690A (en) * 2006-10-05 2008-04-24 Sharp Corp Encrypting device, decrypting device, encrypting program, decrypting program, recording medium storing the encrypting program, recording medium storing the decrypting program, encrypting method, decrypting method and table creating method
JP2008185608A (en) * 2007-01-26 2008-08-14 Casio Comput Co Ltd Ciphering device, deciphering device, deciphering method, and program
JP5161684B2 (en) * 2007-12-19 2013-03-13 株式会社日立ソリューションズ E-mail encryption system and e-mail encryption program
JP5613596B2 (en) * 2011-03-08 2014-10-29 Kddi株式会社 Authentication system, terminal device, authentication server, and program

Also Published As

Publication number Publication date
JP2014165570A (en) 2014-09-08

Similar Documents

Publication Publication Date Title
TWI750223B (en) Blockchain encrypted radio frequency chip storage design method
CN100576196C (en) Content enciphering method, system and utilize this encryption method that the method for content is provided by network
CN101401348B (en) Method and system for cipher function vagueness
US20060177065A1 (en) System and methods for encrypting data utilizing one-time pad key
US8600048B1 (en) Format-translating encryption systems
US20100202606A1 (en) Two strings private key (symmetric) encryption and decryption method
US6845159B1 (en) Processing method and apparatus for converting information from a first format into a second format
CN105959098A (en) Format-reserved encryption algorithm based on multi-segmented Feistel network
CN104298926B (en) A kind of method and apparatus for running encryption file
US8438112B2 (en) Host device, portable storage device, and method for updating meta information regarding right objects stored in portable storage device
CN102456108B (en) Encryption method for ibus pinyin code table
CN106131049A (en) A kind of method of data transmission encryption and decryption
CN103853943A (en) Program protection method and device
CN109951268A (en) The encrypting and decrypting method and device with bit map are changed based on position
CN102833077A (en) Encryption and decryption methods of remote card-issuing data transmission of financial IC (Integrated Circuit) card and financial social security IC card
CN107273724A (en) Input and output watermarking for whitepack embodiment
JP6089998B2 (en) Cryptographic processing apparatus and information processing apparatus
JP4582619B2 (en) IC card for encryption or decryption processing, and encryption communication system and encryption communication method using the same
JPH08286904A (en) Method and system for ciphering/deciphering software
EP3238365B1 (en) Cryptographic system and method
CN102224508A (en) Method of storing data in a memory device and a processing device for processing such data
JP6094255B2 (en) Cryptographic processing apparatus and information processing apparatus
CN110113151A (en) A kind of non-intrusion type real-time encryption and decryption method of pair of ELF format program
CN100486157C (en) Distribution type data encryption method
JP6980158B2 (en) Data processing device, decoding device, data processing method, decoding method, data processing program and decoding program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161018

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20161209

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161215

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170117

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170130

R150 Certificate of patent or registration of utility model

Ref document number: 6094255

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees