JP2006279488A - Cipher text generation device, cipher text deciphering device, cipher text generation program, and cipher text deciphering program - Google Patents
Cipher text generation device, cipher text deciphering device, cipher text generation program, and cipher text deciphering program Download PDFInfo
- Publication number
- JP2006279488A JP2006279488A JP2005095097A JP2005095097A JP2006279488A JP 2006279488 A JP2006279488 A JP 2006279488A JP 2005095097 A JP2005095097 A JP 2005095097A JP 2005095097 A JP2005095097 A JP 2005095097A JP 2006279488 A JP2006279488 A JP 2006279488A
- Authority
- JP
- Japan
- Prior art keywords
- ciphertext
- block
- decryption
- key
- generation
- 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.)
- Granted
Links
Images
Abstract
Description
この発明は、平文/暗号文を所定の長さを持つブロックに区切り、ブロック単位で暗号化/復号化処理を行う場合に好適な暗号文生成装置、暗号文復号装置、暗号文生成プログラム及び暗号文復号プログラムに関するものである。 The present invention relates to a ciphertext generation device, a ciphertext decryption device, a ciphertext generation program, and a cipher suitable for dividing plaintext / ciphertext into blocks having a predetermined length and performing encryption / decryption processing in units of blocks. The present invention relates to a sentence decryption program.
平文の長さより短いブロック長単位に分割されたデータに対し、ブロック毎に暗号化を完結させたいような利用においてストリーム暗号の適用を考えた場合で、かつ、ブロック毎に同一の暗号鍵を使いまわす場合では、一般的に平文に作用させる擬似乱数はブロック毎に同一パターンとなってしまうため、十分な暗号強度が保たれるとは言い難い。 Consider using stream ciphers in applications where you want to complete encryption for each block of data divided into block length units shorter than the plaintext length, and use the same encryption key for each block. In some cases, generally, pseudorandom numbers that act on plaintext have the same pattern for each block, and it is difficult to say that sufficient encryption strength is maintained.
例えば、特許文献1では、共通の鍵系列発生用基数である種とメディアアクセスユニットナンバー等とから秘密に定義した関数を生成し、これを用いて鍵を作成し、ブロック暗号化することが開示されている。
しかしながら、上記の特許文献1においては暗号化のブロック単位に鍵変更を行うストリーム暗号方式のものではない。
However, the above-mentioned
本発明の課題は、鍵変更用の擬似乱数生成アルゴリズムなどの複雑で大掛かりな構成を用いることなく、秘匿性の高い暗号化を行うことが可能な暗号文生成装置を提供することであり、この暗号文生成装置により暗号化された暗号文を復号化する暗号文復号装置を提供し、コンピュータにより上記暗号文生成装置と暗号文復号装置を実現するための暗号文生成プログラム及び暗号文復号プログラムを提供することにある。 An object of the present invention is to provide a ciphertext generation apparatus capable of performing highly confidential encryption without using a complicated and large-scale configuration such as a pseudorandom number generation algorithm for key change. A ciphertext decryption device for decrypting a ciphertext encrypted by a ciphertext generation device, and a ciphertext generation program and a ciphertext decryption program for realizing the ciphertext generation device and the ciphertext decryption device by a computer are provided. It is to provide.
本発明に係る暗号文生成装置は、平文を所定の長さを持つブロックに分割し、分割されたブロック単位にブロック鍵を用いて暗号文生成を行って暗号文を得る暗号文生成装置において、ブロック単位の暗号文生成終了毎にカウントするカウンタと、現時点において暗号文生成を行っているブロックよりも所定ブロック前に暗号化された暗号文と、前記カウンタによるカウント値と、暗号鍵データとを用いて、暗号化するブロック毎にブロック鍵を作成するブロック鍵作成手段とを具備することを特徴とする。 In the ciphertext generating apparatus according to the present invention, a plaintext is divided into blocks having a predetermined length, and a ciphertext is generated by using a block key for each divided block to obtain a ciphertext. A counter that counts every time ciphertext generation in units of blocks, a ciphertext that is encrypted before a block that is currently generating ciphertext, a count value by the counter, and cipher key data And a block key creating means for creating a block key for each block to be encrypted.
本発明に係る暗号文生成装置は、暗号文生成の初期時と再開時に、前記カウンタの値と前記所定ブロック前の暗号文のデータとを設定する制御手段が備えられていることを特徴とする。 The ciphertext generation apparatus according to the present invention is characterized by comprising control means for setting the counter value and ciphertext data before the predetermined block at the initial and resumption of ciphertext generation. .
本発明に係る暗号文復号装置は、暗号化された暗号文を所定の長さを持つブロックに分割し、分割されたブロック単位にブロック鍵を用いて復号化を行って平文を得る暗号文復号装置において、ブロック単位の暗号文復号化終了毎にカウントするカウンタと、現時点において暗号文復号化を行っているブロックよりも所定ブロック前に復号化に用いた復号化前の暗号文と、前記カウンタによるカウント値と、暗号鍵データとを用いて、復号化するブロック毎にブロック鍵を作成するブロック鍵作成手段とを具備することを特徴とする。 The ciphertext decryption apparatus according to the present invention divides an encrypted ciphertext into blocks having a predetermined length, and performs decryption using the block key for each divided block to obtain plaintext In the apparatus, a counter that counts every time ciphertext decryption in units of blocks, a ciphertext before decryption that is used for decryption before a block that is currently decrypted, and the counter And a block key creating means for creating a block key for each block to be decrypted using the count value of the above and the encryption key data.
本発明に係る暗号文復号装置は、暗号文復号化の初期時と再開時に、前記カウンタの値と前記所定ブロック前に復号化に用いた復号化前の暗号文のデータとを設定する制御手段が備えられていることを特徴とする。 The ciphertext decryption apparatus according to the present invention is a control means for setting the value of the counter and the data of the ciphertext before decryption used for decryption before the predetermined block at the initial and resumption of ciphertext decryption. Is provided.
本発明に係る暗号文生成プログラムは、コンピュータが暗号文を生成するに際しコンピュータにより実行されると、前記コンピュータが平文を所定の長さを持つブロックに分割し、分割されたブロック単位にブロック鍵を用いて暗号文生成を行って暗号文を得る処理を行う暗号文生成プログラムにおいて、ブロック単位の暗号文生成終了毎にカウントすることによりカウント値を得るカウントステップと、現時点において暗号文生成を行っているブロックよりも所定ブロック前に暗号化された暗号文と、前記カウントステップによって得られるカウント値と、暗号鍵データとを用いて、暗号化するブロック毎にブロック鍵を作成するブロック鍵作成ステップとを具備することを特徴とする。 The ciphertext generation program according to the present invention, when executed by a computer when the computer generates ciphertext, the computer divides the plaintext into blocks having a predetermined length, and a block key is assigned to each divided block. In the ciphertext generation program that performs ciphertext generation using the ciphertext generation process, a count step for obtaining a count value by counting each time ciphertext generation is completed in block units, and ciphertext generation at the present time A block key creating step for creating a block key for each block to be encrypted using the ciphertext encrypted before the predetermined block, the count value obtained by the counting step, and the encryption key data; It is characterized by comprising.
本発明に係る暗号文生成プログラムは、暗号文生成の初期時と再開時に、前記カウント値と前記所定ブロック前の暗号文のデータとを設定する制御ステップを備えることを特徴とする。 The ciphertext generation program according to the present invention includes a control step of setting the count value and ciphertext data before the predetermined block at the initial and resumption of ciphertext generation.
本発明に係る暗号文復号プログラムは、コンピュータが暗号文を復号化するに際しコンピュータにより実行されると、前記コンピュータが暗号化された暗号文を所定の長さを持つブロックに分割し、分割されたブロック単位にブロック鍵を用いて復号化を行って平文を得る処理を行う暗号文復号プログラムにおいて、ブロック単位の暗号文復号化終了毎にカウントすることによりカウント値を得るカウントステップと、現時点において暗号文復号化を行っているブロックよりも所定ブロック前に復号化に用いた復号化前の暗号文と、前記カウントステップによって得られるカウント値と、暗号鍵データとを用いて、復号化するブロック毎にブロック鍵を作成するブロック鍵作成ステップとを具備することを特徴とする。 The ciphertext decryption program according to the present invention, when executed by a computer when the computer decrypts the ciphertext, the computer divides the encrypted ciphertext into blocks having a predetermined length, and In a ciphertext decryption program that performs decryption using a block key for each block and obtains plaintext, a count step for obtaining a count value by counting each time the ciphertext decryption for each block is completed, and encryption at the present time Each block to be decrypted using the undecrypted ciphertext used for the decryption before the block that is decrypting the text, the count value obtained by the counting step, and the encryption key data And a block key creating step for creating a block key.
本発明に係る暗号文復号プログラムは、暗号文復号化の初期時と再開時に、前記カウント値と前記所定ブロック前に復号化に用いた復号化前の暗号文のデータとを設定する制御ステップを備えることを特徴とする。 The ciphertext decryption program according to the present invention includes a control step of setting the count value and the data of the ciphertext before decryption used for decryption before the predetermined block at the time of initial and restart of ciphertext decryption. It is characterized by providing.
本発明では、所定ブロック前に暗号化された暗号文と、ブロック単位の暗号文生成終了毎にカウントしたカウント値と暗号鍵データとを用いて、暗号化するブロック毎にブロック鍵を作成するので、暗号化のブロック単位に鍵が変更されることになり、ブロック毎に異なる乱数パターンが生成可能となる。また、このような乱数パターンが生成される暗号化手法による暗号文を復号化できる効果を奏する。 In the present invention, the block key is created for each block to be encrypted using the ciphertext encrypted before the predetermined block, the count value counted at the end of each block ciphertext generation, and the encryption key data. Thus, the key is changed for each block of encryption, and a different random number pattern can be generated for each block. In addition, the ciphertext can be decrypted by an encryption method that generates such a random number pattern.
また、暗号文生成の初期時と再開時に、前記カウント値と前記所定ブロック前の暗号文のデータとを設定し、暗号文復号化の初期時と再開時に、前記カウント値と前記所定ブロック前に復号化に用いた復号化前の暗号文のデータとを設定するので、初期状態と停止後の再開において暗号化・復号化の適切なるスタートを確保できる。 Also, at the initial and restart of ciphertext generation, the count value and the ciphertext data before the predetermined block are set, and at the initial and restart of ciphertext decryption, the count value and the predetermined block are set. Since the ciphertext data before decryption used for decryption is set, an appropriate start of encryption / decryption can be ensured in the initial state and restart after the stop.
本発明では、複雑・大掛かりな構成を用いずにブロック毎に異なる乱数パターンを生成可能とするという目的を、所定ブロック前に暗号化された暗号文と、ブロック単位の暗号文生成終了毎にカウントしたカウント値と暗号鍵データとを用いて、暗号化するブロック毎にブロック鍵を作成することにより達成したものである。 In the present invention, the purpose of enabling generation of a different random number pattern for each block without using a complicated and large-scale configuration is to count ciphertext encrypted before a predetermined block and ciphertext generation for each block. This is achieved by creating a block key for each block to be encrypted using the counted value and encryption key data.
以下添付図面を参照して本発明の実施例を説明する。図1に、暗号文生成装置のブロック図を示す。この暗号文生成装置は、装置全体を統括制御する制御部1を有し、平文格納部2、暗号化部3、ブロック鍵作成部4、暗号鍵記憶部5、ブロックカウンタ6、前暗号文供給部7、暗号文出力部8、暗号文記憶部9を備えている。
Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 shows a block diagram of the ciphertext generation apparatus. This ciphertext generation apparatus has a
平文格納部2には、暗号化すべき平文(暗号化前のデータ)が制御部1の制御によって1ブロック毎(例えば、1バイト毎)に格納される。暗号化部3は、ブロック毎の平文とブロック鍵作成部4により作成されたブロック鍵とに基づいて例えばXOR(排他的論理和)演算により暗号文生成を行うものである。
The
ブロック鍵作成部4にはブロックカウンタ6の出力と、前暗号文供給部7により供給される1ステップ前に暗号化された暗号文と、暗号鍵記憶部5から暗号鍵データとが与えられる。ここでは、1ステップ前に暗号化された暗号文を与えたが、一般的には所定ステップ前に暗号化された暗号文を与えることになる。ブロック鍵作成部4は前暗号文供給部7により供給される暗号文を鍵長に揃える圧縮を行い、暗号文と暗号鍵及びブロックカウンタ6の出力をビット毎にXOR(排他的論理和)演算を行うなどしてブロック鍵を作成する。上記の圧縮の手法としては、暗号文中の所定ビット部分を抽出するなどが簡便であるが、どのような手法を用いるかについて特に制限はない。
The block
ブロックカウンタ6は、暗号化部3が1ブロックの平文について暗号化を終了したときに所定値づつカウントアップまたはカウントダウンを行うものである。ブロックカウンタ6の出力ビット長は、例えば鍵長に等しいものとする。
The
暗号鍵記憶部5は、予め定められた暗号鍵を記憶しておくものである。暗号文出力部8は、暗号化部3により暗号化された暗号文を、例えば相手側へ伝送し、或いは記憶媒体へ記憶する処理部へ送出するものである。暗号文記憶部9は、暗号化された暗号文を例えば全て記憶しているものである。
The encryption key storage unit 5 stores a predetermined encryption key. The
制御部1は、装置全体の統括制御において、暗号文生成の初期時と再開時に、ブロックカウンタ6の値と前暗号文供給部7へ所定の暗号文のデータを設定し、また、暗号鍵記憶部5へ暗号鍵を記憶する。更に、制御部1は、暗号化部3が1ブロックの平文について暗号化を終了し、次の1ブロックの平文を平文格納部2から全て読み出したときに、更に新たな1ブロックの平文を平文格納部2へ格納する制御を行うものである。
The
以上の通りに各部より構成される暗号文生成装置は、実際には、パーソナルコンピュータやワークステーションなどのコンピュータにより構成されており、図2に示されるフローチャートに対応する暗号文生成プログラムを上記コンピュータが実行することにより、制御部1、暗号化部3、ブロック鍵作成部4、ブロックカウンタ6、前暗号文供給部7、暗号文出力部8の動作が実現されるので、以下において、図2に示されるフローチャートに基づき動作を説明する。
As described above, the ciphertext generation apparatus configured by each unit is actually configured by a computer such as a personal computer or a workstation, and the above-described computer generates a ciphertext generation program corresponding to the flowchart shown in FIG. By executing the operations, the operations of the
プログラムがスタートされると、外部からの入力に応じて、初期スタートであるか否かを検出する(S1)。例えば、再スタートの場合には、再スタートの指示と必要なデータ(カウント値等)が、初期スタートの場合には、スタートの指示のみが入力される。 When the program is started, it is detected whether it is an initial start according to an input from the outside (S1). For example, in the case of a restart, a restart instruction and necessary data (count value, etc.) are input, and in the case of an initial start, only the start instruction is input.
上記ステップS1においてYESへ分岐すると、ブロックカウンタ6に対して、予めプログラムにセットされているスタート用のカウント値をセットし、前暗号文供給部7に対して、予めプログラムにセットされているスタート用の暗号文データ(任意のデータ)をセットする(S2:制御ステップ)。
When the process branches to YES in step S1, the start count value set in advance in the program is set in the
一方、上記ステップS1においてNOへ分岐すると、ブロックカウンタ6に対して、外部から与えられた再スタート用のカウント値をセットし、前暗号文供給部7に対して、外部から与えられたカウント値に対応する再スタート用の暗号文データ(上記カウント値がブロックカウンタ6にセットされていたときに、前暗号文供給部7にセットされていた暗号文のデータ)を暗号文記憶部9から読み出してセットする(S3:制御ステップ)。
On the other hand, when branching to NO in step S1, the restart count value given from the outside is set to the
以上のステップS2またはステップS3の処理を終えると、予めプログラムにセットされている暗号鍵データを暗号鍵記憶部5へセットする(S4)。次に、ブロックカウンタ6にセットしたカウント値に応じた1ブロック分の平文データを平文格納部2へ読み出す(S5)。即ち、初期スタートの場合には、最初の1ブロック分の平文データが平文格納部2へ格納され、再スタートの場合には、上記カウント値がブロックカウンタ6にセットされていたときに、平文格納部2にセットされていた平文データが平文格納部2へ格納される。
When the above step S2 or step S3 is completed, the encryption key data set in advance in the program is set in the encryption key storage unit 5 (S4). Next, the plaintext data for one block corresponding to the count value set in the
続いて、暗号鍵記憶部5にセットされている暗号鍵データと、ブロックカウンタ6にセットされているカウント値と、前暗号文供給部7にセットされている暗号文データとを用いて前述の通りにしてブロック鍵が作成され(ブロック鍵作成ステップ)、このブロック鍵に基づき平文の暗号化が行われ(暗号化ステップ)、暗号文出力部8としての出力が行われる(S6)。
Subsequently, the encryption key data set in the encryption key storage unit 5, the count value set in the
次に、ブロックカウンタ6を更新(所定値のカウントアップもしくはカウントダウン)し(S7:カウントステップ)、前暗号文供給部7にその時点において暗号化された1ブロック分の暗号文をセットする(S8)。そこで、記憶媒体等に暗号化すべき平文データが残っているかを検出することにより全ての平文についての暗号化済みを確認する(S9)。
Next, the
上記のステップS9において暗号化されずに残っている平文がある場合には、ステップS5へ戻って次の1ブロックの平文に対する暗号化へと進む。このようにして、ステップS5からステップS9へ進み、このステップS9からステップS5へ戻るルーチンが繰り返されて、ステップS9において全ての平文についての暗号化済みが確認できると、エンドとなる。 If there is a plaintext remaining unencrypted in step S9, the process returns to step S5 to proceed to encryption for the next one block of plaintext. In this way, the routine proceeds from step S5 to step S9, and the routine returning from step S9 to step S5 is repeated, and when it is confirmed in step S9 that all plaintexts have been encrypted, the processing is ended.
このようにして、実施例では、暗号鍵記憶部5にセットされている暗号鍵データと、ブロックカウンタ6にセットされているカウント値と、前暗号文供給部7にセットされている暗号文データとを用いてブロック鍵が作成され、このブロック鍵に基づき平文の暗号化が行われるので、別途に暗号鍵変更用の乱数生成アルゴリズムを用いることなく、ブロック毎に異なる乱数パターンを生成してストリーム暗号化を実行できる。しかも、暗号文記憶部9を有しており、カウント値に基づき再スタートが可能な構成を採用しているので、暗号文出力部8以降の構成(例えば伝送路)などの不具合により再度の暗号化が必要な場合にも迅速に対応することが可能である。
In this way, in the embodiment, the encryption key data set in the encryption key storage unit 5, the count value set in the
なお、再スタートの指示とカウント値を入力する例を示したが、カウント値に代えて1ブロックの暗号文を入力して再スタートを行わせるように構成しても良い。この場合には、与えられた1ブロックの暗号文が何番目か(カウント値に相当)を暗号文記憶部9に蓄積された暗号文の順から取得する処理が必要となるが、それ以外の構成は上記実施例と同様にして再スタートを行うこともできる。また、暗号文記憶部9には、暗号化した暗号文の全てを記憶する例を示したが、再スタートを保証できる範囲をNブロック前までとし、Nブロック前までに暗号化した暗号文を暗号文記憶部9に記憶するようにしても良い。 Although an example of inputting a restart instruction and a count value has been shown, it may be configured to restart by inputting a block of ciphertext instead of the count value. In this case, it is necessary to acquire the number (corresponding to the count value) of the given ciphertext in one block from the order of the ciphertext stored in the ciphertext storage unit 9. The configuration can be restarted in the same manner as in the above embodiment. In addition, the ciphertext storage unit 9 has shown an example in which all of the encrypted ciphertext is stored, but the range in which restart can be guaranteed is up to N blocks before, and the ciphertext encrypted up to N blocks before is stored. You may make it memorize | store in the ciphertext memory | storage part 9. FIG.
次に、上記暗号文生成装置によって暗号化された暗号文を復号化する暗号文復号装置の実施例を説明する。図3に、暗号文復号装置のブロック図を示す。この暗号文復号装置は、装置全体を統括制御する制御部11を有し、暗号文格納部12、復号化部13、ブロック鍵作成部14、暗号鍵記憶部15、ブロックカウンタ16、前暗号文供給部17、復号文出力部18、暗号文記憶部19を備えている。
Next, an embodiment of a ciphertext decryption apparatus that decrypts the ciphertext encrypted by the ciphertext generation apparatus will be described. FIG. 3 shows a block diagram of the ciphertext decryption apparatus. This ciphertext decryption apparatus includes a control unit 11 that performs overall control of the entire apparatus, and includes a ciphertext storage unit 12, a
暗号文格納部12には、復号化すべき暗号文のデータが制御部11の制御によって1ブロック毎(例えば、1バイト毎)に格納される。復号化部13は、ブロック毎の暗号文とブロック鍵作成部14により作成されたブロック鍵とに基づいて例えばXOR(排他的論理和)演算により暗号文の復号化を行うものである。
The ciphertext storage unit 12 stores ciphertext data to be decrypted for each block (for example, for each byte) under the control of the control unit 11. The
ブロック鍵作成部14にはブロックカウンタ16の出力と、前暗号文供給部17により供給される1ステップ前に復号化に用いた復号化前の暗号文と、暗号鍵記憶部15から暗号鍵データ(暗号文生成装置の暗号鍵記憶部5に記憶された暗号鍵データと同一の暗号鍵データ)とが与えられる。ここでは、1ステップ前に暗号化した暗号文を与えたが、一般的には所定ステップ前に復号化に用いた復号化前の暗号文を与えることになる。ブロック鍵作成部14は前暗号文供給部17により供給される暗号文を鍵長に揃える圧縮を行い、暗号文と暗号鍵及びブロックカウンタ16の出力をビット毎にXOR(排他的論理和)演算を行うなどしてブロック鍵を作成する。上記の圧縮の手法としては、暗号文中の所定ビット部分を抽出するなどが簡便であるが、どのような手法を用いるかについて特に制限はない。
The block
ブロックカウンタ16は、復号化部13が1ブロックの暗号文について復号化を終了したときに暗号文生成装置のブロックカウンタ16と同じ所定値づつカウントアップまたはカウントダウンを行うものである。ブロックカウンタ16の出力ビット長は、例えば鍵長に等しいものとする。
The block counter 16 counts up or down by the same predetermined value as the
暗号鍵記憶部15は、予め定められた暗号鍵(暗号文生成装置の暗号鍵記憶部5に記憶された暗号鍵データと同一の暗号鍵データ)を記憶しておくものである。復号文出力部18は、復号化部13により復号化された復号文を、例えばコンテンツを再生する端末側へ伝送し、或いは記憶媒体へ記憶する処理部へ送出するものである。暗号文記憶部19は、復号化に用いた復号化前の暗号文を例えば全て記憶しているものである。
The encryption
制御部11は、装置全体の統括制御において、復号文生成の初期時と再開時に、ブロックカウンタ16の値と前暗号文供給部17へ所定の暗号文のデータを設定し、また、暗号鍵記憶部15へ暗号鍵を記憶する。更に、制御部11は、復号化部13が1ブロックの暗号文について復号化を終了し、次の1ブロックの暗号文を暗号文格納部12から全て読み出したときに、暗号文格納部12の暗号文を前暗号文供給部17へ送り出すと共に更に新たな1ブロックの暗号文を暗号文格納部12へ格納する制御を行うものである。
The control unit 11 sets the value of the
以上の通りに各部より構成される暗号文復号装置は、実際には、パーソナルコンピュータやワークステーションなどのコンピュータにより構成されており、図4に示されるフローチャートに対応する暗号文復号プログラムを上記コンピュータが実行することにより、制御部11、復号化部13、ブロック鍵作成部14、ブロックカウンタ16、前暗号文供給部17、復号文出力部18の動作が実現されるので、以下において、図4に示されるフローチャートに基づき動作を説明する。
As described above, the ciphertext decryption apparatus configured by each unit is actually configured by a computer such as a personal computer or a workstation, and the computer executes the ciphertext decryption program corresponding to the flowchart shown in FIG. By executing the operations, the operations of the control unit 11, the
プログラムがスタートされると、外部からの入力に応じて、初期スタートであるか否かを検出する(S11)。例えば、再スタートの場合には、再スタートの指示と必要なデータ(カウント値等)が、初期スタートの場合には、スタートの指示のみが入力される。 When the program is started, it is detected whether or not it is an initial start according to an external input (S11). For example, in the case of a restart, a restart instruction and necessary data (count value, etc.) are input, and in the case of an initial start, only the start instruction is input.
上記ステップS11においてYESへ分岐すると、ブロックカウンタ16に対して、予めプログラムにセットされているスタート用のカウント値(暗号生成プログラムのものと同じカウント値)をセットし、前暗号文供給部17に対して、予めプログラムにセットされているスタート用の暗号文データ(任意のデータ:暗号生成プログラムのものと同じデータ)をセットする(S12:制御ステップ)。
When branching to YES in step S11, a start count value set in advance in the program (the same count value as that of the cipher generation program) is set to the
一方、上記ステップS11においてNOへ分岐すると、ブロックカウンタ16に対して、外部から与えられた再スタート用のカウント値をセットし、前暗号文供給部17に対して、外部から与えられたカウント値に対応する再スタート用の暗号文データ(上記カウント値がブロックカウンタ16にセットされていたときに、前暗号文供給部17にセットされていた暗号文のデータ)を暗号文記憶部19から読み出してセットする(S13:制御ステップ)。
On the other hand, when branching to NO in the above step S11, the restart count value given from the outside is set to the
以上のステップS12またはステップS13の処理を終えると、予めプログラムにセットされている暗号鍵データを暗号鍵記憶部15へセットする(S14)。次に、ブロックカウンタ16にセットしたカウント値に応じた1ブロック分の暗号文データを暗号文格納部12へ読み出す(S15)。即ち、初期スタートの場合には、最初の1ブロック分の暗号文データが暗号文格納部12へ格納され、再スタートの場合には、上記カウント値がブロックカウンタ16にセットされていたときに、暗号文格納部12にセットされていた暗号文データが暗号文格納部12へ格納される。
When the processing in step S12 or step S13 is completed, the encryption key data set in advance in the program is set in the encryption key storage unit 15 (S14). Next, ciphertext data for one block corresponding to the count value set in the
続いて、暗号鍵記憶部15にセットされている暗号鍵データと、ブロックカウンタ16にセットされているカウント値と、前暗号文供給部17にセットされている暗号文データとを用いて前述の通りにしてブロック鍵が作成され(ブロック鍵作成ステップ)、このブロック鍵に基づき暗号文の復号化(暗号化と逆の処理)が行われ(復号化ステップ)、復号文出力部18としての出力が行われる(S16)。
Subsequently, the encryption key data set in the encryption
次に、ブロックカウンタ16を更新(所定値のカウントアップもしくはカウントダウン)し(S17:カウントステップ)、前暗号文供給部17にその時点において復号化した1ブロック分の復号化前の暗号文を暗号文格納部12から転送してセットする(S18)。そこで、記憶媒体等に復号化すべき暗号文データが残っているかを検出することにより全ての暗号文についての復号化済みを確認する(S19)。
Next, the
上記のステップS19において復号化されずに残っている復号文がある場合には、ステップS15へ戻って次の1ブロックの暗号文に対する復号化へと進む。このようにして、ステップS15からステップS19へ進み、このステップS19からステップS15へ戻るルーチンが繰り返されて、ステップS19において全ての暗号文についての復号化済みが確認できると、エンドとなる。 If there is a decrypted text that remains without being decrypted in step S19, the process returns to step S15 to proceed to decryption of the next one block of ciphertext. In this way, the routine proceeds from step S15 to step S19, and the routine returning from step S19 to step S15 is repeated, and when it is confirmed in step S19 that all the ciphertexts have been decrypted, the process is ended.
このようにして、実施例では、暗号鍵記憶部15にセットされている暗号鍵データと、ブロックカウンタ16にセットされているカウント値と、前暗号文供給部7にセットされている暗号文データとを用いてブロック鍵が作成され、このブロック鍵に基づき暗号文の復号化が行われるので、既に説明した暗号文生成装置または暗号文生成プログラムによって別途に暗号鍵変更用の乱数生成アルゴリズムを用いることなく、ブロック毎に異なる乱数パターンを生成してストリーム暗号化を実行した結果の暗号文について適切に復号化が可能である。しかも、暗号文記憶部19を有しており、カウント値に基づき再スタートが可能な構成を採用しているので、暗号文生成装置から暗号文が送られてくる経路(例えば伝送路)や当該暗号文復号装置などの不具合により復号化が停止したブロックから再度の復号化が必要な場合にも迅速に対応することが可能である。
In this way, in the embodiment, the encryption key data set in the encryption
なお、再スタートの指示とカウント値を入力する例を示したが、カウント値に代えて1ブロックの暗号文を入力して再スタートを行わせるように構成しても良い。この場合には、与えられた1ブロックの暗号文が何番目か(カウント値に相当)を暗号文記憶部19に蓄積された暗号文の順から取得する処理が必要となるが、それ以外の構成は上記実施例と同様にして再スタートを行うこともできる。また、暗号文記憶部19には、復号化前の暗号文全てを記憶する構成を例示したが、再スタートを保証できる範囲をNブロック前までとし、Nブロック前までに復号化した復号前の暗号文を暗号文記憶部19に記憶するようにしても良い。
Although an example of inputting a restart instruction and a count value has been shown, it may be configured to restart by inputting a block of ciphertext instead of the count value. In this case, it is necessary to obtain the number of the ciphertext in one block given (corresponding to the count value) from the order of the ciphertext stored in the
1、11 制御部
2 平文格納部
3 暗号化部
4、14 ブロック鍵生成部
5、15 暗号鍵記憶部
6、16 ブロックカウンタ
7 前暗号文供給部
8 暗号文出力部
9 暗号文記憶部
12 暗号文格納部
13 復号化部
17 前暗号文供給部
18 復号文出力部
19 暗号文記憶部
1, 11 Control unit
2 Plain text storage
3 Encryption Department
4, 14 Block key generator
5, 15 Encryption key storage
6, 16 block counter
7 Previous Ciphertext Supply Department
8 Ciphertext output part
9 Ciphertext storage
12 Ciphertext storage
13 Decryption unit
17 Previous Ciphertext Supply Department
18 Decrypted text output part
19 Ciphertext storage
Claims (8)
ブロック単位の暗号文生成終了毎にカウントするカウンタと、
現時点において暗号文生成を行っているブロックよりも所定ブロック前に暗号化された暗号文と、前記カウンタによるカウント値と、暗号鍵データとを用いて、暗号化するブロック毎にブロック鍵を作成するブロック鍵作成手段と
を具備することを特徴とする暗号文生成装置。 In a ciphertext generation apparatus that divides a plaintext into blocks having a predetermined length and generates ciphertext by generating ciphertext using a block key for each divided block,
A counter that counts every end of ciphertext generation in block units;
A block key is created for each block to be encrypted using the ciphertext encrypted a predetermined block before the block for which ciphertext is currently generated, the count value by the counter, and the encryption key data. A ciphertext generation apparatus comprising: a block key generation unit.
ブロック単位の暗号文復号化終了毎にカウントするカウンタと、
現時点において暗号文復号化を行っているブロックよりも所定ブロック前に復号化に用いた復号化前の暗号文と、前記カウンタによるカウント値と、暗号鍵データとを用いて、復号化するブロック毎にブロック鍵を作成するブロック鍵作成手段と
を具備することを特徴とする暗号文復号装置。 In the ciphertext decryption apparatus that divides the encrypted ciphertext into blocks having a predetermined length and obtains plaintext by performing decryption using the block key for each divided block unit,
A counter that counts at the end of each block ciphertext decryption;
For each block to be decrypted using the undecrypted ciphertext used for decryption before the block that is currently decrypting the ciphertext, the count value by the counter, and the encryption key data A ciphertext decryption apparatus comprising: a block key creating means for creating a block key.
ブロック単位の暗号文生成終了毎にカウントすることによりカウント値を得るカウントステップと、
現時点において暗号文生成を行っているブロックよりも所定ブロック前に暗号化された暗号文と、前記カウントステップによって得られるカウント値と、暗号鍵データとを用いて、暗号化するブロック毎にブロック鍵を作成するブロック鍵作成ステップと
を具備することを特徴とする暗号文生成プログラム。 When the computer generates the ciphertext, when the computer executes the ciphertext, the computer divides the plaintext into blocks having a predetermined length and generates ciphertext using a block key for each divided block. In the ciphertext generation program that performs the process of obtaining
A count step of obtaining a count value by counting every time ciphertext generation in block units is completed;
A block key for each block to be encrypted using a ciphertext encrypted before a block for which ciphertext is currently generated, a count value obtained by the counting step, and cipher key data. A ciphertext generation program comprising: a block key generation step for generating
ブロック単位の暗号文復号化終了毎にカウントすることによりカウント値を得るカウントステップと、
現時点において暗号文復号化を行っているブロックよりも所定ブロック前に復号化に用いた復号化前の暗号文と、前記カウントステップによって得られるカウント値と、暗号鍵データとを用いて、復号化するブロック毎にブロック鍵を作成するブロック鍵作成ステップと
を具備することを特徴とする暗号文復号プログラム。 When executed by a computer when the computer decrypts the ciphertext, the computer divides the encrypted ciphertext into blocks having a predetermined length and decrypts them using the block key for each divided block. In a ciphertext decryption program that performs processing to obtain plaintext by performing
A count step of obtaining a count value by counting every time ciphertext decryption in block units is completed;
Decryption using the undecrypted ciphertext used for decryption before the block that is currently decrypting ciphertext, the count value obtained by the counting step, and the cipher key data A ciphertext decryption program comprising: a block key creating step for creating a block key for each block to be performed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005095097A JP4287397B2 (en) | 2005-03-29 | 2005-03-29 | Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005095097A JP4287397B2 (en) | 2005-03-29 | 2005-03-29 | Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006279488A true JP2006279488A (en) | 2006-10-12 |
JP4287397B2 JP4287397B2 (en) | 2009-07-01 |
Family
ID=37213770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005095097A Active JP4287397B2 (en) | 2005-03-29 | 2005-03-29 | Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4287397B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014016584A (en) * | 2012-07-11 | 2014-01-30 | Canon Inc | Data division device, data restoration device, data division method, data restoration method, and program |
CN114697463A (en) * | 2020-12-31 | 2022-07-01 | 思特威(上海)电子科技股份有限公司 | Encryption transmission method and image sensor |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6612889B1 (en) | 2000-10-27 | 2003-09-02 | Science Applications International Corporation | Method for making a light-emitting panel |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05160866A (en) * | 1991-12-04 | 1993-06-25 | Hitachi Ltd | Portable isdn communication terminal equipment |
JPH09233066A (en) * | 1996-02-23 | 1997-09-05 | Sony Corp | Encryption/decryption method and its device |
JPH1066157A (en) * | 1996-06-06 | 1998-03-06 | Nokia Mobile Phones Ltd | Information-ciphering method and data communication system |
JPH10313306A (en) * | 1997-05-13 | 1998-11-24 | Oki Electric Ind Co Ltd | Authentication device, ciphering device, decoding device and cipher communication system |
WO2001052472A1 (en) * | 2000-01-14 | 2001-07-19 | Mitsubishi Denki Kabushiki Kaisha | Method and apparatus for encryption, method and apparatus for decryption, and computer-readable medium storing program |
-
2005
- 2005-03-29 JP JP2005095097A patent/JP4287397B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05160866A (en) * | 1991-12-04 | 1993-06-25 | Hitachi Ltd | Portable isdn communication terminal equipment |
JPH09233066A (en) * | 1996-02-23 | 1997-09-05 | Sony Corp | Encryption/decryption method and its device |
JPH1066157A (en) * | 1996-06-06 | 1998-03-06 | Nokia Mobile Phones Ltd | Information-ciphering method and data communication system |
JPH10313306A (en) * | 1997-05-13 | 1998-11-24 | Oki Electric Ind Co Ltd | Authentication device, ciphering device, decoding device and cipher communication system |
WO2001052472A1 (en) * | 2000-01-14 | 2001-07-19 | Mitsubishi Denki Kabushiki Kaisha | Method and apparatus for encryption, method and apparatus for decryption, and computer-readable medium storing program |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014016584A (en) * | 2012-07-11 | 2014-01-30 | Canon Inc | Data division device, data restoration device, data division method, data restoration method, and program |
CN114697463A (en) * | 2020-12-31 | 2022-07-01 | 思特威(上海)电子科技股份有限公司 | Encryption transmission method and image sensor |
CN114697463B (en) * | 2020-12-31 | 2023-11-21 | 思特威(上海)电子科技股份有限公司 | Encryption transmission method and image sensor |
Also Published As
Publication number | Publication date |
---|---|
JP4287397B2 (en) | 2009-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8416947B2 (en) | Block cipher using multiplication over a finite field of even characteristic | |
US7945049B2 (en) | Stream cipher using multiplication over a finite field of even characteristic | |
US7860241B2 (en) | Simple universal hash for plaintext aware encryption | |
KR20100069610A (en) | Methods and devices for a chained encryption mode | |
TW200828938A (en) | Method for securely extending key stream to encrypt high-entropy data | |
US20060023875A1 (en) | Enhanced stream cipher combining function | |
KR20120079639A (en) | Contents protection, encryption and decryption apparatus using white-box cryptography | |
US7925009B2 (en) | Hybrid data encryption | |
KR20170097509A (en) | Operation method based on white-box cryptography and security apparatus for performing the method | |
US8804953B2 (en) | Extensive ciphertext feedback | |
Asaad et al. | Advanced Encryption Standard Enhancement with Output Feedback Block Mode Operation | |
US8041033B2 (en) | Cipher feedback with variable block chaining | |
US10110373B2 (en) | System and method for manipulating both the plaintext and ciphertext of an encryption process prior to dissemination to an intended recipient | |
JP2008035305A (en) | Encryption method and data concealing method | |
JP3769804B2 (en) | Decoding method and electronic device | |
KR20150064042A (en) | Method and device for digital data blocks encryption and decryption | |
JP4287397B2 (en) | Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program | |
US20240097880A1 (en) | High-speed circuit combining aes and sm4 encryption and decryption | |
CN102622561A (en) | Enciphering and deciphering method for invoking data in software | |
JP2001177518A (en) | Enciphering method, and decoding method and device | |
JP5586758B1 (en) | Dynamic encryption key generation system | |
WO2021044465A1 (en) | Encrypting device, decrypting device, computer program, encryption method, decryption method, and data structure | |
JP2013098722A (en) | Ciphering device of stream cipher, deciphering device of stream cipher, ciphering method of stream cipher, deciphering method of stream cipher, and program | |
US20230083850A1 (en) | Cryptographic systems and methods for development of pools of random numbers | |
JP2002023624A (en) | Block cipher communication method and device therefor, and recording medium with block cipher communication program recorded thereon |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080513 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080520 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080722 |
|
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: 20090324 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090326 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120403 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4287397 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120403 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130403 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130403 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140403 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |