JP4094758B2 - Data replacement / division method and apparatus - Google Patents
Data replacement / division method and apparatus Download PDFInfo
- Publication number
- JP4094758B2 JP4094758B2 JP01623899A JP1623899A JP4094758B2 JP 4094758 B2 JP4094758 B2 JP 4094758B2 JP 01623899 A JP01623899 A JP 01623899A JP 1623899 A JP1623899 A JP 1623899A JP 4094758 B2 JP4094758 B2 JP 4094758B2
- Authority
- JP
- Japan
- Prior art keywords
- register
- value
- data
- bits
- bit
- 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 - Lifetime
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、特に暗号技術の分野で用いられるデータ置換処理および分割処理を効率的に行なうデータ置換・分割方法および装置とデータ置換・分割プログラムを記録した記録媒体に関するものである。
【0002】
【従来の技術】
従来、データを秘匿するためにデータの暗号化が行われる。このデータの暗号化を行う暗号化技術には、共通鍵暗号方式と公開鍵暗号方式がある。
【0003】
公開鍵暗号方式ではデータを暗号化する鍵と復号化する鍵が異なっており、通常は暗号化に用いる鍵を一般に公開し、復号化に用いる鍵は利用者が秘密に保持する。公開される暗号化に用いる鍵から復号化に用いる鍵を求めることは、現在の数学的理論および計算機の計算能力をもってしても現実的な時間には完了しないものと信じられている。
【0004】
一方、共通鍵暗号方式では、データを暗号化する鍵と復号化する鍵とは同一である。高速かつ安全な共通鍵暗号を構成するために、暗号化対象のデータを適当な長さのブロックに分割し、そのブロック毎に暗号化する方法をブロック暗号と呼ぶ。ブロック暗号の多くはFeistel network と呼ばれる構造をもつ。この構造では、2nビットの入力をnビットに分割し左右に振り分け、右側のnビットデータに対して関数fを作用させ、その出力を左側のnビットデータと排他的論理和を取り、左右データを交換して同様の操作を繰り返すものである。この構造については、「Bruce Schneier,Applied Cryptography,2nd edition,John-Wiley and Sons,p.347,1996」に示されている。
【0005】
また共通鍵暗号方式は、公開鍵暗号方式に比べて計算に必要な処理量が少なく、単位時間当たりで暗号処理できるデータ量は数十倍から数百倍多い。したがって高速な暗号処理が必要な場面においては共通鍵暗号方式がよく用いられる傾向にある。
【0006】
共通鍵暗号方式には、上記に述べた高速性のみならず、その安全性も必要とされる。近年いくつかの共通鍵暗号アルゴリズムに対する解読法が提案されている。そのため新しく開発される共通鍵アルゴリズムはこのような解読法に対して常に安全が確保されるようにしなければならない。これらの解読法については、「Bruce Schneier,Applied Cryptography,2nd edition,John-Wiley and Sons,pp.285-293,1996 」に示されている。
【0007】
これらの解読法を適用しづらくさせるような方法も研究されており、それらの方法を用いることにより共通鍵暗号アルゴリズムの安全性を高めることが期待できる。その方法の1つとして、基礎となる暗号アルゴリズムへの入力データと出力データとを攻撃者から守るために、暗号鍵から得られるある種の値と入力データおよび出力データとの排他的論理和を計算する手法がある。この方法については「Bruce Schneier,Applied Cryptography,2nd edition,John-Wiley and Sons,pp.366-367,1996 」に示されている。なお、近年、提案される共通鍵暗号アルゴリズムでは、この方法を用いて設計されているものが多い。
【0008】
上記方法を用いて、暗号鍵から得られるある種の値と排他的論理和を取った入力データは、基礎となる暗号アルゴリズムの入力データとなる。上記Feistel network を用いる場合、この入力データを左右へ分割することが必要となる。最近設計される共通鍵暗号アルゴリズムには、ただ左右へ入力データを分割するだけでなく、置換処理を行なった後に左右へ入力データを分割することで安全性の向上を達成しようとしているものも存在する。そのような例としてE2暗号がある(神田他、「128ビットブロック暗号E2の提案」、信学技報ISEC 98-12を参照のこと)。E2暗号ではBP関数と呼ばれる置換処理を定義し、その後Feistel network のために左右へ入力データを分割している。
【0009】
【発明が解決しようとする課題】
しかしながら、このBP関数を実装する場合、次のような問題点が指摘されていた。すなわち、BP関数ではバイト単位の置換処理が必要であるが、最近のMPUで実装されているワード単位のレジスタではマスク処理やシフト処理を伴うため処理時間がかかる点、及び、メモリへ一度コピーしてから置換処理を行なえたとしても、メモリアクセスにかかる時間が大きくなり処理時間がかかる点である。これは、上記に示したような共通鍵暗号方式への高速性を満足させることを困難にするものである。
【0010】
本発明は、このような背景のもとになされたものであり、ワード単位のレジスタを用いてE2暗号のBP関数での置換およびFeistel network での左右への分割を高速に処理する。E2暗号では、基礎となる暗号処理部はバイト単位の処理が行なわれるため、例えば右側にあるデータの並びは必ずしも仕様に沿う必要はない。すなわち、内部にある暗号処理部の実装部が、変更されたバイト列に対応しておけばよい。
【0011】
さらに、本発明では置換処理後に左右に分割されるバイトの組を、仕様とは異なる列順ではあるが正しく左右に組として分割する。近年のMPUでは内蔵されるレジスタ2つを連結させて仮想的に1つのレジスタとみなし、シフト処理を行ない上位側あるいは下位側のデータをレジスタに格納する命令が実装される場合もあり、このような装置が利用可能な場合はさらに効果的である。
【0012】
すなわち、本発明は共通鍵暗号方式における処理を高速に行い得るデータ置換・分割方法および装置とデータ置換・分割プログラムを記録した記録媒体を提供することを目的とする。
【0013】
【課題を解決するための手段】
前述した目的を達成するために、本発明のうちで請求項1記載の発明は、kを整数とし、4kビット長のレジスタを具備し、16個のkビットデータ{a4i+j}(0≦i≦3,0≦j≦3)を集合{a4(i+j mod 4)+j}(0≦i≦1,0≦j≦3)と集合{a4(i+j mod 4)+j}(2≦i≦3,0≦j≦3)とに置換し分割するデータ置換・分割方法であって、各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
【数5】
のように代入するステップと、レジスタT0 の値と(23k−2k )との論理積を取ったデータをレジスタT0 ′に代入し、レジスタT2 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT2 ′に代入し、レジスタT0 ′の値とレジスタT2 ′の値との論理和をレジスタT4 に代入するステップと、レジスタT1 の値と(22k−1)との論理積を取ったデータをレジスタT1 ′に代入し、レジスタT3 の値と(24k−22k)との論理積を取ったデータをレジスタT3 ′に代入し、レジスタT1 ′の値とレジスタT3 ′との論理和をレジスタT5 に代入するステップと、レジスタT0 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT0 ″に代入し、レジスタT2 の値と(23k−2k )との論理積を取ったデータをレジスタT2 ″に代入し、レジスタT0 ″の値とレジスタT2 ″との論理和をレジスタT6 に代入するステップと、レジスタT1 の値と(24k−22k)との論理積を取ったデータをレジスタT1 ″に代入し、レジスタT3 の値と(22k−1)との論理積を取ったデータをレジスタT3 ″に代入し、レジスタT1 ″の値とレジスタT3 ″との論理和をレジスタT7 に代入するステップと、レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力するステップとを有することを要旨とする。
【0014】
また、本発明の請求項2記載の発明は、kを整数とし、4kビット長のレジスタを具備し、16個のkビットデータ{a4i+j}(0≦i≦3,0≦j≦3)を集合{a4(i+j mod 4)+j}(0≦i≦1,0≦j≦3)と集合{a4(i+j mod 4)+j}(2≦i≦3,0≦j≦3)とに置換し分割するデータ置換・分割方法であって、各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
【数6】
のように代入するステップと、レジスタT0 の値とレジスタT2 の値を各々一方の方向にkビットローテートするステップと、レジスタT0 とレジスタT2 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT4 とするステップと、レジスタT1 とレジスタT3 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT5 とするステップと、レジスタT2 とレジスタT0 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT6 とするステップと、レジスタT3 とレジスタT1 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT7 とするステップと、レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力するステップとを有することを要旨とする。
【0015】
また、本発明の請求項3記載の発明は、kを整数とし、4kビット長のレジスタを具備し、16個のkビットデータ{a4i+j}(0≦i≦3,0≦j≦3)を集合{a4(i+j mod 4)+j}(0≦i≦1,0≦j≦3)と集合{a4(i+j mod 4)+j}(2≦i≦3,0≦j≦3)とに置換し分割するデータ置換・分割装置であって、各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
【数7】
のように代入する手段と、レジスタT0 の値と(23k−2k )との論理積を取ったデータをレジスタT0 ′に代入し、レジスタT2 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT2 ′に代入し、レジスタT0 ′の値とレジスタT2 ′との論理和をレジスタT4 に代入する手段と、レジスタT1 の値と(22k−1)との論理積を取ったデータをレジスタT1 ′に代入し、レジスタT3 の値と(24k−22k)との論理積を取ったデータをレジスタT3 ′に代入し、レジスタT1 ′の値とレジスタT3 ′との論理和をレジスタT5 に代入する手段と、レジスタT0 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT0 ″に代入し、レジスタT2 の値と(23k−2k )との論理積を取ったデータをレジスタT2 ″に代入し、レジスタT0 ″の値とレジスタT2 ″との論理和をレジスタT6 に代入する手段と、レジスタT1 の値と(24k−22k)との論理積を取ったデータをレジスタT1 ″に代入し、レジスタT3 の値と(22k−1)との論理積を取ったデータをレジスタT3 ″に代入し、レジスタT1 ″の値とレジスタT3 ″との論理和をレジスタT7 に代入する手段と、レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力する手段とを有することを要旨とする。
【0016】
また、本発明の請求項4記載の発明は、kを整数とし、4kビット長のレジスタを具備し、16個のkビットデータ{a4i+j}(0≦i≦3,0≦j≦3)を集合{a4(i+j mod 4)+j}(0≦i≦1,0≦j≦3)と集合{a4(i+j mod 4)+j}(2≦i≦3,0≦j≦3)とに置換し分割するデータ置換・分割装置であって、各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
【数8】
のように代入する手段と、レジスタT0 の値とレジスタT2 の値を各々一方の方向にkビットローテートする手段と、レジスタT0 とレジスタT2 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT4 とする手段と、レジスタT1 とレジスタT3 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT5 とする手段と、レジスタT2 とレジスタT0 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT6 とする手段と、レジスタT3 とレジスタT1 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT7 とする手段と、レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力する手段とを有することを要旨とする。
【0017】
また、本発明の請求項5記載の発明は、前記レジスタTi とレジスタTj とを連結し8kビット長のレジスタとみなし、一方または他方に2kビットシフトした後の一方端または他方端から4kビットをレジスタTk とする手段と、この手段のうちいくつかを、レジスタTi の値と(22k−1)との論理積を取ったデータをレジスタTi ′に代入し、レジスタTj の値と(24k−22k)との論理積を取ったデータをレジスタTj ′に代入し、レジスタTi ′の値とレジスタTj ′の値との論理和をレジスタTk に代入する手段とを有することを要旨とする。
【0020】
すなわち、本発明では、kを整数とし、4kビット長のレジスタをレジスタTi と表し、16個のkビットデータ{a4i+j}(0≦i≦3,0≦j≦3)をBP関数への入力とし、各0≦i≦3においてレジスタTi に{a4i+j}(0≦j≦3)を、
【数9】
のように代入する。
【0021】
以後、この形式で代入されていることを
Ti =[a4i+0 a4i+1 a4i+2 a4i+3]
のように記述する。
【0022】
ここで集合[L]と集合[R]を、
【数10】
[L]={a4(i+j mod 4)+j|0≦i≦1,0≦j≦3}
={a0 ,a3 ,a4 ,a5 ,a9 ,a10,a14,a15}
[R]={a4(i+j mod 4)+j|2≦i≦3,0≦j≦3}
={a1 ,a2 ,a6 ,a7 ,a8 ,a11,a12,a13}
とそれぞれ定義しておく。
【0023】
レジスタT0 とレジスタT2 のデータ並びは、両端に集合[L]または集合 [R]に属するデータが配置され、中央の2つに集合[R]または集合[L]に属するデータが配置されている。
【0024】
このままの配置では、シフト命令を用いてのデータの分離は困難であるため、レジスタT1 またはレジスタT3 のように、一方、例えば右側または他方、すなわち左側に集合[L]または集合[R]のデータをまとめる。そのため、まずレジスタT0 とレジスタT2 を一方方向に、すなわち右周りにkビットローテートさせる。
【0025】
結果として以下のようにデータが配置される。
【0026】
T0 =[a3 a0 a1 a2 ]
T1 =[a4 a5 a6 a7 ]
T2 =[a11 a8 a9 a10]
T3 =[a12 a13 a14 a15]
これによりレジスタTi (0≦i≦1)の上位2kビットには集合[L]に属するデータが配置され、下位2kビットには集合[R]に属するデータが配置される。また、レジスタTi (2≦i≦3)の上位2kビットには集合[R]に属するデータが配置され、下位2kビットには集合[L]に属するデータが配置される。
【0027】
次に、レジスタT0 とレジスタT2 を連結し8kビット長のレジスタとみなし、右に2kビットシフトした後の右から4kビットをレジスタT4 とし、レジスタT1 とレジスタT3 を連結し8kビット長のレジスタとみなし、右に2kビットシフトした後の右から4kビットをレジスタT5 とする。
【0028】
すなわち、
T4 =[a1 a2 a11 a8 ]
T5 =[a6 a7 a12 a13]
であって、これより、レジスタTi (4≦i≦5)は集合[R]に属するデータを過不足なく保持している。
【0029】
同様に、レジスタT2 とレジスタT0 を連結し8kビット長のレジスタとみなし、左に2kビットシフトした後の左から4kビットをレジスタT6 とし、レジスタT3 とレジスタT1 を連結し8kビット長のレジスタとみなし、左に2kビットシフトした後の左から4kビットをレジスタT7 とする。
【0030】
すなわち
T6 =[a9 a10 a3 a0 ]
T7 =[a14 a15 a4 a5 ]
であり、これより、レジスタTi (6≦i≦7)は集合[L]に属するデータを過不足なく保持している。
【0031】
【発明の実施の形態】
以下、図面を用いて本発明の実施の形態について説明する。
【0032】
図1は本発明の一実施の形態に係るデータ置換・分割装置の構成を示すブロック図である。
【0033】
図1に示すように、制御部1は本実施形態の処理における各処理部および処理器等のコントロールを行なうものである。データ記憶部11には予め入力データ{a4i+j}(0≦i≦3,0≦j≦3)を格納し、処理終了時には出力データを格納する。算術演算部13ではレジスタが具備され、ローテートやシフト処理が行なえる。
【0034】
図2および図3はE2暗号におけるBP関数のデータの置換処理を図示したものである。図2では、出力データの先頭4バイトが置換処理によってどのように構成されているのかを示している。図3では、この処理による集合[L]の要素を示している。
【0035】
図4では、本実施形態を実行することによってレジスタT6 およびレジスタT7 に格納されるデータの並びを示している。図3と比較することによりレジスタT6 およびレジスタT7 には集合[L]の要素がすべて含まれており、BP関数およびFeistel network の左右への振り分けが行なわれていることが判る。
【0036】
ここで請求項2,5,7に記載のローテートおよびシフトを用いる手法を選択した場合には、レジスタT6 およびレジスタT7 内のデータ並びは右2バイトと左2バイトが入れ替わる形になる。すなわち、図4で示されているレジスタT4 のデータ列[a9 a10 a3 a0 ]は[a3 a0 a9 a10]となる。しかしながら集合[L]の要素としては過不足なく、よって目的は達成される。
【0037】
上述したように、本実施形態により、E2暗号の仕様において、BP関数の入出力を左からそれぞれ4バイトずつまとめてレジスタに代入するならば、入力の1つのレジスタにある4バイトは、出力の4つのレジスタに1バイトずつ代入されていることになる。これにより、1つのレジスタに対して演算を行ない、その結果を1つのレジスタに格納するような、MPUにある多くの命令では、1つの演算命令に対して1バイトしか処理できない。
【0038】
従って、BP関数を実装するには16個の命令が最低限必要となる。実際には、マスク処理や論理和処理などで16以上の命令が必要である。
【0039】
なお、レジスタの各バイトを直接入命令に用いた場合には16命令で済む場合も考えられるが、一部のMPUではその構造上ペナルティが発生し、通常の16命令分以上の処理時間がかかることが判る。
【0040】
さらに、入力データを一旦メモリに書き込んだ後に、BP関数の置換を考慮してバイト単位にデータを読み込む方法もあるが、近年のMPUではメモリへのアクセスにはペナルティが発生する場合が多く、また上記と同様に構造上のペナルティが発生する場合もあり、やはり16命令分以上の処理時間がかかることが判る。
【0041】
本実施形態により、E2暗号のBP部分はローテート命令2つと2つのレジスタを連結したものを右または左にシフトし、右または左の該当データをレジスタに代入する命令4つで構成できる。後半の処理を行なう命令は、例えばIntel 80386 以降のMPUでは標準搭載されている命令であり、その実装には問題がない。従って、既存方法より高速にBP関数を実行できる。
【0042】
また、具体的にこの命令が実装されていないMPUではマスク命令2つと論理和命令1つで代用することができる。すなわち、ローテート後のレジスタT0 とレジスタT2 を連結し8kビット長のレジスタとみなし、右に2kビットシフトした後の右から4kビットをレジスタT5 とする手段においては、レジスタT0 と(22k−1)との論理積を取ったデータをレジスタT0 ′に代入し、レジスタT2 と(24k−22k)との論理積を取ったデータをレジスタT2 ′に代入し、レジスタT0 ′とレジスタT2 ′との論理和をレジスタT4 に代入すればよい。
【0043】
すなわち、
T0 ′=[0 0 a1 a2 ]
T2 ′=[a11 a8 0 0]
T4 =[a11 a8 a1 a2 ]
となる。
【0044】
この場合でも、ローテート命令2つを合わせて全体で14命令で記述できるため、既存方法より高速にBP関数を実行できる。
【0045】
なお、この場合のレジスタT4 は、前述のレジスタT4 の保持する値と比較すると、上位2つの値と下位2つの値が入れ違いとなっている点が異なる。しかしレジスタT4 が保持する値はa1 ,a2 ,a8 ,a11の4つであることに変わりはなく、従ってレジスタT4 とレジスタT5 とで集合[R]の値を過不足なく保持していることが保証される。
【0046】
以上のように本実施形態は、暗号技術で用いられるデータ置換処理および分割処理に関して、特にE2暗号のBP関数部の高速な実装を満足することができる。
【0047】
また、このようなE2暗号のBP関数等におけるデータ置換・分割演算は上述したデータ置換・分割プログラムにより実現され、該プログラムは記録媒体に記録して提供される。このようなデータ置換・分割プログラムが記録された記録媒体を利用して、そのデータ置換・分割プログラムの流通性を高めることができる。
【0048】
【発明の効果】
以上のように本発明は、共通鍵暗号方式におけるデータ置換処理および分割処理に関し、処理を高速に行い得る等の効果を奏する。
【図面の簡単な説明】
【図1】本発明に係るデータ置換・分割装置の一実施形態の概略の構成を示すブロック図である。
【図2】E2暗号のBP関数部の置換処理を説明する図である。
【図3】BP関数の出力データの一部を示した図である。
【図4】レジスタT4 とレジスタT5 の出力データを示した図である。
【符号の説明】
1 制御部
11 データ記憶部
13 算術演算部
13a レジスタ群[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data replacement / division method and apparatus for efficiently performing data replacement processing and division processing, particularly used in the field of encryption technology, and a recording medium on which a data replacement / division program is recorded.
[0002]
[Prior art]
Conventionally, data encryption is performed to conceal data. Encryption techniques for encrypting this data include a common key cryptosystem and a public key cryptosystem.
[0003]
In the public key cryptosystem, a key for encrypting data is different from a key for decrypting data. Normally, a key used for encryption is made public, and a key used for decryption is kept secret by the user. It is believed that obtaining a key to be used for decryption from a public key to be used for encryption will not be completed in a realistic time even with the current mathematical theory and computer computing power.
[0004]
On the other hand, in the common key cryptosystem, a key for encrypting data and a key for decrypting data are the same. In order to construct a high-speed and secure common key cipher, a method of dividing data to be encrypted into blocks of an appropriate length and encrypting each block is called a block cipher. Many block ciphers have a structure called Feistel network. In this structure, the 2n-bit input is divided into n bits and distributed to the left and right, the function f is applied to the right n-bit data, the output is exclusive ORed with the left n-bit data, And the same operation is repeated. This structure is shown in “Bruce Schneier, Applied Cryptography, 2nd edition, John-Wiley and Sons, p. 347, 1996”.
[0005]
In addition, the common key cryptosystem requires less computation than the public key cryptosystem, and the amount of data that can be cryptographically processed per unit time is several tens to several hundred times greater. Therefore, the common key cryptosystem tends to be often used in situations where high-speed cryptographic processing is required.
[0006]
The common key cryptosystem requires not only the high speed described above but also its security. In recent years, cryptanalysis methods for several common key encryption algorithms have been proposed. Therefore, newly developed common key algorithms must always be secure against such cryptanalysis. These cryptanalysis methods are described in “Bruce Schneier, Applied Cryptography, 2nd edition, John-Wiley and Sons, pp. 285-293, 1996”.
[0007]
Methods that make it difficult to apply these cryptanalysis methods have been studied, and it can be expected that the security of the common key encryption algorithm will be enhanced by using these methods. As one of the methods, in order to protect the input data and output data to the underlying encryption algorithm from an attacker, an exclusive OR of a certain value obtained from the encryption key and the input data and output data is performed. There is a method to calculate. This method is described in “Bruce Schneier, Applied Cryptography, 2nd edition, John-Wiley and Sons, pp. 366-367, 1996”. In recent years, many of the proposed common key encryption algorithms are designed using this method.
[0008]
The input data obtained by taking an exclusive OR with a certain value obtained from the encryption key using the above method becomes the input data of the underlying encryption algorithm. When using the Feistel network, it is necessary to divide this input data into left and right. Some recently designed common key encryption algorithms not only divide input data left and right, but also attempt to improve security by dividing input data left and right after performing replacement processing. To do. An example of this is the E2 cipher (see Kanda et al., “Proposal of 128-bit block cipher E2”, IEICE Technical Report ISEC 98-12). In the E2 cipher, a replacement process called a BP function is defined, and then the input data is divided into left and right for the Feistel network.
[0009]
[Problems to be solved by the invention]
However, when this BP function is implemented, the following problems have been pointed out. In other words, the BP function requires byte-by-byte replacement processing, but the word-unit register implemented in recent MPUs requires processing time because it involves mask processing and shift processing, and is copied to the memory once. Even if the replacement process can be performed after that, the time required for memory access increases and the processing time takes longer. This makes it difficult to satisfy the high speed to the common key cryptosystem as described above.
[0010]
The present invention has been made based on such a background, and uses a register in units of words to perform high-speed processing such as replacement with the BP function of E2 encryption and division into left and right in the Feistel network. In the E2 cipher, since the basic cryptographic processing unit performs processing in units of bytes, for example, the arrangement of data on the right side does not necessarily conform to the specification. That is, the internal implementation of the cryptographic processing unit may correspond to the changed byte string.
[0011]
Furthermore, in the present invention, a set of bytes that are divided to the left and right after the replacement processing is correctly divided into a set to the left and right, although in a column order different from the specification. In recent MPUs, two built-in registers are concatenated and virtually regarded as one register, and an instruction to perform shift processing and store upper or lower data in the register may be implemented. It is even more effective if a simple device is available.
[0012]
That is, an object of the present invention is to provide a data replacement / division method and apparatus capable of performing high-speed processing in the common key cryptosystem and a recording medium on which the data replacement / division program is recorded.
[0013]
[Means for Solving the Problems]
In order to achieve the above-mentioned object, the invention according to
And the data obtained by ANDing the value of the register T 0 and (2 3k −2 k ) is substituted into the register T 0 ′, and the value of the register T 2 and (2 4k −2 3k Substituting data obtained by ANDing with +2 k −1) into the register T 2 ′, substituting the logical sum of the value of the register T 0 ′ and the value of the register T 2 ′ into the register T 4 , Data obtained by logical product of the value of T 1 and (2 2k −1) is substituted into the register T 1 ′, and data obtained by logical product of the value of the register T 3 and (2 4k −2 2k ) is obtained. Substituting into the register T 3 ′, substituting the logical sum of the value of the register T 1 ′ and the register T 3 ′ into the register T 5 , and the value of the register T 0 (2 4k −2 3k +2 k −1) The data obtained by ANDing is substituted into the register T 0 ″, and the logical product of the value of the register T 2 and (2 3k −2 k ) is calculated. The Tsu data "is substituted into the register T 0" register T 2 comprising the steps of substituting the logical sum of the values and registers T 2 "of the register T 6, the value of the register T 1 (2 4k -2 2k) the data ANDing "is substituted into the data by taking the logical product of the value of the register T 3 and the (2 2k -1) register T 3" register T 1 of the and substituted into the register T 1 " And substituting the logical sum of the value of T and the register T 3 ″ into the register T 7 , and outputting the register T 4 , the register T 5 , the register T 6 , and the register T 7 as two groups. The gist.
[0014]
According to the second aspect of the present invention, k is an integer, a 4 k-bit register is provided, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦) 3) into the set {a 4 (i + j mod 4) + j } (0 ≦ i ≦ 1, 0 ≦ j ≦ 3) and the set {a 4 (i + j mod 4) + j } (2 ≦ i ≦ 3, 0 ≦ j ≦ 3), and a data replacement / division method in which {a 4i + j } (0 ≦ j ≦ 3) is assigned to the register T i for each 0 ≦ i ≦ 3. Equation 6]
Considers the steps to assign as the steps of k-bit rotation in each one direction the values of the register T 2 of the register T 0, connecting the register T 0 and the register T 2 and register 8k bits long, steps and, regarded as the register T 1 and connecting the register T 3 8k bit length of the register, one end after 2k bits shifted while the 4k bit registers T 4 from one end after 2k bits shifted Meanwhile the step of the steps of a 4k-bit registers T 5, regarded as the register T 2 and the register T 0 connecting the 8k bit length of the register, a 4k-bit registers T 6 from the other end after 2k bit shifted to the other from If, regarded as the register T 3 and the register T 1 connects the 8k bit length of the register, 4k bits from the other end after 2k bit shifted to the other The method comprising the register T 7, register T 4, register T 5 and the register T 6, and summarized in that a step of outputting a register T 7 as two groups.
[0015]
According to a third aspect of the present invention, k is an integer, a 4 k-bit register is provided, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦) 3) into the set {a 4 (i + j mod 4) + j } (0 ≦ i ≦ 1, 0 ≦ j ≦ 3) and the set {a 4 (i + j mod 4) + j } (2 ≦ i ≦ 3, 0 ≦ j ≦ 3), and replaces and divides the data into a register T i with {a 4i + j } (0 ≦ j ≦ 3) in each 0 ≦ i ≦ 3. Equation 7]
And the data obtained by ANDing the value of the register T 0 and the value of the register T 0 and (2 3k −2 k ) is substituted into the register T 0 ′, and the value of the register T 2 and (2 4k −2 3k And a means for substituting the logical product of +2 k −1) into the register T 2 ′, substituting the logical sum of the value of the register T 0 ′ and the register T 2 ′ into the register T 4 , and the register T 1 The data obtained by ANDing the value of and the value of (2 2k −1) is substituted into the register T 1 ′, and the data obtained by calculating the logical product of the value of the register T 3 and (2 4k −2 2k ) 3 'and the means for substituting the logical sum of the value of the register T 1 ' and the register T 3 'into the register T 5 and the value of the register T 0 and (2 4k -2 3k +2 k -1) The data obtained by the logical product is substituted into the register T 0 ″, and the data obtained by performing the logical product of the value of the register T 2 and (2 3k −2 k ) is registered. "Substituted into the register T 0" Star T 2 logical product means for substituting the logical sum of the values and registers T 2 "of the register T 6, the value of the register T 1 and (2 4k -2 2k) "substituted, the data obtained by ANDing the value of the register T 3 and the (2 2k -1) register T 3" register T 1 data took substituted into the value a register of the register T 1 " The gist is to have means for substituting the logical sum of T 3 ″ into the register T 7 and means for outputting the registers T 4 , T 5 , T 6 , and T 7 as two groups.
[0016]
According to a fourth aspect of the present invention, k is an integer, a 4 k-bit register is provided, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦) 3) into the set {a 4 (i + j mod 4) + j } (0 ≦ i ≦ 1, 0 ≦ j ≦ 3) and the set {a 4 (i + j mod 4) + j } (2 ≦ i ≦ 3, 0 ≦ j ≦ 3), and replaces and divides the data into a register T i with {a 4i + j } (0 ≦ j ≦ 3) in each 0 ≦ i ≦ 3. (Equation 8)
A means for substituting, a means for rotating the value of the register T 0 and the value of the register T 2 in one direction, respectively, and a register T 0 and the register T 2 are concatenated and regarded as an 8 k-bit register. Meanwhile means for the 4k bit registers T 4 from one end after 2k bits shifted, regarded as the register T 1 and the register T 3 connected 8k bit length of the register, one end after 2k bits shifted one It means for the 4k bit registers T 5 from deemed register T 2 and the register T 0 connecting the 8k bit length of the register, means for the 4k bit registers T 6 from the other end after 2k bit shifted to the other The register T 3 and the register T 1 are concatenated to be regarded as an 8 k-bit register, and after shifting by 2 k bits to the other, 4 k bits from the other end are used as the register T 7. The gist is to have a stage and means for outputting the registers T 4 , T 5 , T 6 and T 7 as two groups.
[0017]
In the invention according to claim 5 of the present invention, the register T i and the register T j are concatenated to be regarded as an 8 k-bit register, and 4 k from one end or the other end after being shifted to one or the other by 2 k bits. A means for setting a bit as a register T k, and some of these means are assigned to a register T i ′ by substituting data obtained by ANDing the value of the register T i with (2 2k −1), and register T j Is obtained by substituting the data obtained by the logical product of the value of and the value of (2 4k -2 2k ) into the register T j ′ and substituting the logical sum of the value of the register T i ′ and the value of the register T j ′ into the register T k . It has a gist to have.
[0020]
That is, in the present invention, k is an integer, a 4 k-bit register is represented as a register T i, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦ 3) is represented by BP. The input to the function is {a 4i + j } (0 ≦ j ≦ 3) in the register T i for each 0 ≦ i ≦ 3.
[Equation 9]
Substitute as follows.
[0021]
Hereinafter, T i = [a 4i + 0 a 4i + 1 a 4i + 2 a 4i + 3 ] is assigned in this form.
Write like this.
[0022]
Here, the set [L] and the set [R] are
[Expression 10 ]
[L] = {a 4 (i + j mod 4) + j | 0 ≦ i ≦ 1, 0 ≦ j ≦ 3}
= {A 0, a 3, a 4, a 5, a 9, a 10, a 14, a 15}
[R] = {a 4 (i + j mod 4) + j | 2 ≦ i ≦ 3, 0 ≦ j ≦ 3}
= {A 1, a 2, a 6, a 7, a 8, a 11, a 12, a 13}
And define them respectively.
[0023]
In the data arrangement of the register T 0 and the register T 2 , data belonging to the set [L] or the set [R] is arranged at both ends, and data belonging to the set [R] or the set [L] is arranged in the center two. ing.
[0024]
In this arrangement, since it is difficult to separate data using a shift instruction, the set [L] or the set [R] on one side, for example, the right side or the other side, that is, the left side, like the register T 1 or the register T 3 . Summarize the data. Therefore, first, the register T 0 and the register T 2 are rotated k bits in one direction, that is, clockwise.
[0025]
As a result, data is arranged as follows.
[0026]
T 0 = [a 3 a 0 a 1 a 2 ]
T 1 = [a 4 a 5 a 6 a 7 ]
T 2 = [a 11 a 8 a 9 a 10 ]
T 3 = [a 12 a 13 a 14 a 15 ]
Thus, data belonging to the set [L] is arranged in the upper 2k bits of the register T i (0 ≦ i ≦ 1), and data belonging to the set [R] is arranged in the lower 2k bits. Further, data belonging to the set [R] is arranged in the upper 2k bits of the register T i (2 ≦ i ≦ 3), and data belonging to the set [L] is arranged in the lower 2k bits.
[0027]
Next, register T 0 and register T 2 are concatenated and regarded as an 8 k-bit register, and after shifting 2 k bits to the right, 4 k bits from the right are used as register T 4, and registers T 1 and T 3 are concatenated to 8 k. It is regarded as a register having a bit length, and 4 k bits from the right after shifting to the right by 2 k bits are set as a register T 5 .
[0028]
That is,
T 4 = [a 1 a 2 a 11 a 8 ]
T 5 = [a 6 a 7 a 12 a 13 ]
Thus, the register T i (4 ≦ i ≦ 5) holds the data belonging to the set [R] without excess or deficiency.
[0029]
Similarly, register T 2 and register T 0 are concatenated and regarded as an 8 k-bit register, and after shifting 2 k bits to the left, 4 k bits from the left are set as register T 6, and registers T 3 and T 1 are concatenated to 8 k. It is regarded as a register having a bit length, and 4 k bits from the left after shifting 2 k bits to the left are set as a register T 7 .
[0030]
That is, T 6 = [a 9 a 10 a 3 a 0 ]
T 7 = [a 14 a 15 a 4 a 5 ]
Thus, the register T i (6 ≦ i ≦ 7) holds the data belonging to the set [L] without excess or deficiency.
[0031]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0032]
FIG. 1 is a block diagram showing a configuration of a data replacement / division apparatus according to an embodiment of the present invention.
[0033]
As shown in FIG. 1, the
[0034]
2 and 3 illustrate the BP function data replacement process in the E2 cipher. FIG. 2 shows how the first 4 bytes of the output data are configured by the replacement process. FIG. 3 shows elements of the set [L] by this processing.
[0035]
FIG. 4 shows an arrangement of data stored in the register T 6 and the register T 7 by executing this embodiment. By comparing with FIG. 3, it can be seen that the register T 6 and the register T 7 include all elements of the set [L], and the BP function and the Feistel network are distributed to the left and right.
[0036]
Here, when the method using the rotation and shift described in claims 2, 5, and 7 is selected, the right 2 bytes and the left 2 bytes are interchanged in the data arrangement in the registers T 6 and T 7 . That is, the data string of the register T 4 shown in FIG. 4 [a 9 a 10 a 3 a 0] becomes [a 3 a 0 a 9 a 10]. However, there are no excess or deficiency as elements of the set [L], and the object is achieved.
[0037]
As described above, according to this embodiment, in the E2 cipher specification, if 4 bytes each of input and output of the BP function are collectively assigned to the register, 4 bytes in one input register are output. One byte is assigned to each of the four registers. Thus, many instructions in the MPU that perform an operation on one register and store the result in one register can process only one byte for one operation instruction.
[0038]
Therefore, a minimum of 16 instructions are required to implement the BP function. Actually, 16 or more instructions are required for mask processing or logical sum processing.
[0039]
If each byte of the register is used as a direct input instruction, 16 instructions may be sufficient. However, some MPUs have a penalty due to their structure, and processing time longer than the normal 16 instructions is required. I understand that.
[0040]
In addition, there is a method of reading input data in bytes after the input data is once written in the memory, considering the replacement of the BP function. However, in recent MPUs, there is often a penalty for accessing the memory. Similar to the above, a structural penalty may occur, and it is understood that a processing time of 16 instructions or more is required.
[0041]
According to the present embodiment, the BP portion of the E2 cipher can be composed of four instructions that shift two or more rotate instructions and two registers connected to the right or left and assign the right or left corresponding data to the registers. The instruction for performing the latter half of the process is, for example, a standard instruction in an MPU after Intel 80386, and there is no problem in its implementation. Therefore, the BP function can be executed faster than the existing method.
[0042]
Also, in an MPU in which this instruction is not specifically implemented, two mask instructions and one OR instruction can be substituted. That is, connecting the register T 0 and the register T 2 of the post-rotation deemed register 8k bits long, right after 2k-bit shift to the right in the means for the 4k bits register T 5, the register T 0 ( The data obtained by ANDing 2 2k −1) is assigned to register T 0 ′, and the data obtained by ANDing register T 2 and (2 4k −2 2k ) is assigned to register T 2 ′. A logical sum of the register T 0 ′ and the register T 2 ′ may be substituted into the register T 4 .
[0043]
That is,
T 0 ′ = [0 0 a 1 a 2 ]
T 2 ′ = [a 11 a 8 0 0]
T 4 = [a 11 a 8 a 1 a 2 ]
It becomes.
[0044]
Even in this case, since two rotate instructions can be combined and described in a total of 14 instructions, the BP function can be executed faster than the existing method.
[0045]
In this case, the register T 4 is different from the value held by the register T 4 in that the upper two values and the lower two values are misplaced. However, the value held by the register T 4 is still four, a 1 , a 2 , a 8 , and a 11 , and therefore the set [R] is excessive or insufficient between the register T 4 and the register T 5. Is guaranteed to hold
[0046]
As described above, the present embodiment can satisfy the high-speed mounting of the BP function part of the E2 cipher particularly with respect to the data replacement process and the division process used in the cryptographic technique.
[0047]
Further, such data replacement / division calculation in the E2 encryption BP function or the like is realized by the above-described data replacement / division program, which is provided by being recorded on a recording medium. By using a recording medium in which such a data replacement / division program is recorded, it is possible to improve the distribution of the data replacement / division program.
[0048]
【The invention's effect】
As described above, the present invention has effects such as high-speed processing regarding the data replacement processing and the division processing in the common key cryptosystem.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of a data replacement / division apparatus according to the present invention.
FIG. 2 is a diagram illustrating a replacement process of a BP function part of E2 encryption.
FIG. 3 is a diagram showing a part of output data of a BP function.
FIG. 4 is a diagram showing output data of a register T 4 and a register T 5 .
[Explanation of symbols]
1
Claims (5)
各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
レジスタT0 の値と(23k−2k )との論理積を取ったデータをレジスタT0 ′に代入し、レジスタT2 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT2 ′に代入し、レジスタT0 ′の値とレジスタT2 ′の値との論理和をレジスタT4 に代入するステップと、
レジスタT1 の値と(22k−1)との論理積を取ったデータをレジスタT1 ′に代入し、レジスタT3 の値と(24k−22k)との論理積を取ったデータをレジスタT3 ′に代入し、レジスタT1 ′の値とレジスタT3 ′との論理和をレジスタT5 に代入するステップと、
レジスタT0 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT0 ″に代入し、レジスタT2 の値と(23k−2k )との論理積を取ったデータをレジスタT2 ″に代入し、レジスタT0 ″の値とレジスタT2 ″との論理和をレジスタT6 に代入するステップと、
レジスタT1 の値と(24k−22k)との論理積を取ったデータをレジスタT1 ″に代入し、レジスタT3 の値と(22k−1)との論理積を取ったデータをレジスタT3 ″に代入し、レジスタT1 ″の値とレジスタT3 ″との論理和をレジスタT7 に代入するステップと、
レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力するステップと
を有することを特徴とするデータ置換・分割方法。k is an integer, a 4 k-bit register is provided, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦ 3) is set {a 4 (i + j mod 4 ) + j } (0 ≦ i ≦ 1, 0 ≦ j ≦ 3) and set {a4 (i + j mod 4) + j } (2 ≦ i ≦ 3, 0 ≦ j ≦ 3) A data replacement / division method for
At each 0 ≦ i ≦ 3, {a 4i + j } (0 ≦ j ≦ 3) is stored in the register T i.
Data obtained by ANDing the value of the register T 0 and (2 3k −2 k ) is substituted into the register T 0 ′, and the logic of the value of the register T 2 and (2 4k −2 3k +2 k −1) is assigned. Substituting the product data into register T 2 'and substituting the logical sum of the value of register T 0 ' and the value of register T 2 'into register T 4 ;
Data obtained by ANDing the value of the register T 1 and (2 2k −1) is substituted into the register T 1 ′, and data obtained by calculating the logical product of the value of the register T 3 and (2 4k −2 2k ). Substituting into the register T 3 ′, and substituting the logical sum of the value of the register T 1 ′ and the register T 3 ′ into the register T 5 ;
Data obtained by ANDing the value of the register T 0 and (2 4k −2 3k +2 k −1) is substituted into the register T 0 ″, and the logic of the value of the register T 2 and (2 3k −2 k ) Substituting the product data into register T 2 ″ and substituting the logical sum of the value of register T 0 ″ and register T 2 ″ into register T 6 ;
Data obtained by ANDing the value of the register T 1 and (2 4k −2 2k ) is assigned to the register T 1 ″, and data obtained by calculating the logical product of the value of the register T 3 and (2 2k −1). Substituting into register T 3 ″ and substituting the logical sum of the value of register T 1 ″ and register T 3 ″ into register T 7 ;
A data replacement / division method comprising: a step of outputting the register T 4 , the register T 5 and the register T 6 , and the register T 7 as two groups.
各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
レジスタT0 の値とレジスタT2 の値を各々一方の方向にkビットローテートするステップと、
レジスタT0 とレジスタT2 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT4 とするステップと、
レジスタT1 とレジスタT3 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT5 とするステップと、
レジスタT2 とレジスタT0 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT6 とするステップと、
レジスタT3 とレジスタT1 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT7 とするステップと、
レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力するステップと
を有することを特徴とするデータ置換・分割方法。k is an integer, a 4 k-bit register is provided, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦ 3) is set {a 4 (i + j mod 4 ) + j } (0 ≦ i ≦ 1, 0 ≦ j ≦ 3) and set {a4 (i + j mod 4) + j } (2 ≦ i ≦ 3, 0 ≦ j ≦ 3) A data replacement / division method for
At each 0 ≦ i ≦ 3, {a 4i + j } (0 ≦ j ≦ 3) is stored in the register T i.
Rotating the value of register T 0 and the value of register T 2 by k bits each in one direction;
Register T 0 and register T 2 are regarded as a register of 8 k bits length, and after shifting by 2 k bits to one, 4 k bits from one end are set as register T 4 ;
Register T 1 and register T 3 are concatenated and regarded as an 8 k-bit register, and after shifting 2 k bits to one, set 4 k bits from one end to register T 5 ;
Concatenating the register T 2 and the register T 0 to be regarded as an 8 k-bit register, and shifting the other 2 k bits to 4 k bits from the other end to make the register T 6 ;
Concatenating register T 3 and register T 1 and assuming that the register is 8 k bits long, shifting 2 k bits to the other, and setting 4 k bits from the other end to register T 7 ;
A data replacement / division method comprising: a step of outputting the register T 4 , the register T 5 and the register T 6 , and the register T 7 as two groups.
各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
レジスタT0 の値と(23k−2k )との論理積を取ったデータをレジスタT0 ′に代入し、レジスタT2 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT2 ′に代入し、レジスタT0 ′の値とレジスタT2 ′との論理和をレジスタT4 に代入する手段と、
レジスタT1 の値と(22k−1)との論理積を取ったデータをレジスタT1 ′に代入し、レジスタT3 の値と(24k−22k)との論理積を取ったデータをレジスタT3 ′に代入し、レジスタT1 ′の値とレジスタT3 ′との論理和をレジスタT5 に代入する手段と、
レジスタT0 の値と(24k−23k+2k −1)との論理積を取ったデータをレジスタT0 ″に代入し、レジスタT2 の値と(23k−2k )との論理積を取ったデータをレジスタT2 ″に代入し、レジスタT0 ″の値とレジスタT2 ″との論理和をレジスタT6 に代入する手段と、
レジスタT1 の値と(24k−22k)との論理積を取ったデータをレジスタT1 ″に代入し、レジスタT3 の値と(22k−1)との論理積を取ったデータをレジスタT3 ″に代入し、レジスタT1 ″の値とレジスタT3 ″との論理和をレジスタT7 に代入する手段と、
レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力する手段と
を有することを特徴とするデータ置換・分割装置。k is an integer, a 4 k-bit register is provided, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦ 3) is set {a 4 (i + j mod 4 ) + j } (0 ≦ i ≦ 1, 0 ≦ j ≦ 3) and set {a4 (i + j mod 4) + j } (2 ≦ i ≦ 3, 0 ≦ j ≦ 3) A data replacement / splitting device that performs
At each 0 ≦ i ≦ 3, {a 4i + j } (0 ≦ j ≦ 3) is stored in the register T i.
Data obtained by ANDing the value of the register T 0 and (2 3k −2 k ) is substituted into the register T 0 ′, and the logic of the value of the register T 2 and (2 4k −2 3k +2 k −1) is assigned. Means for substituting the product data into the register T 2 ′ and substituting the logical sum of the value of the register T 0 ′ and the register T 2 ′ into the register T 4 ;
Data obtained by ANDing the value of the register T 1 and (2 2k −1) is substituted into the register T 1 ′, and data obtained by calculating the logical product of the value of the register T 3 and (2 4k −2 2k ). means' substituted into the register T 1 'register T 3 substitutes a logical OR between the value and the register T 3' of the register T 5 a,
Data obtained by ANDing the value of the register T 0 and (2 4k −2 3k +2 k −1) is substituted into the register T 0 ″, and the logic of the value of the register T 2 and (2 3k −2 k ) Means for substituting the product data into register T 2 ″ and substituting the logical sum of the value of register T 0 ″ and register T 2 ″ into register T 6 ;
Data obtained by ANDing the value of the register T 1 and (2 4k −2 2k ) is assigned to the register T 1 ″, and data obtained by calculating the logical product of the value of the register T 3 and (2 2k −1). means "substituted into the register T 1" register T 3 substitutes a logical OR between the value and the register T 3 "in the register T 7 and
A data replacing / dividing device comprising: a register T 4 , a register T 5 and a register T 6 , and a means for outputting the register T 7 as two groups.
各0≦i≦3において、レジスタTi に{a4i+j}(0≦j≦3)を
レジスタT0 の値とレジスタT2 の値を各々一方の方向にkビットローテートする手段と、
レジスタT0 とレジスタT2 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT4 とする手段と、
レジスタT1 とレジスタT3 を連結し8kビット長のレジスタとみなし、一方に2kビットシフトした後の一方端から4kビットをレジスタT5 とする手段と、
レジスタT2 とレジスタT0 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT6 とする手段と、
レジスタT3 とレジスタT1 を連結し8kビット長のレジスタとみなし、他方に2kビットシフトした後の他方端から4kビットをレジスタT7 とする手段と、
レジスタT4 ,レジスタT5 とレジスタT6 ,レジスタT7 とを2つのグループとして出力する手段と
を有することを特徴とするデータ置換・分割装置。k is an integer, a 4 k-bit register is provided, and 16 k-bit data {a 4i + j } (0 ≦ i ≦ 3, 0 ≦ j ≦ 3) is set {a 4 (i + j mod 4 ) + j } (0 ≦ i ≦ 1, 0 ≦ j ≦ 3) and set {a4 (i + j mod 4) + j } (2 ≦ i ≦ 3, 0 ≦ j ≦ 3) A data replacement / splitting device that performs
At each 0 ≦ i ≦ 3, {a 4i + j } (0 ≦ j ≦ 3) is stored in the register T i.
Means for rotating the value of register T 0 and the value of register T 2 in one direction each by k bits;
Means for concatenating the register T 0 and the register T 2 to be regarded as an 8 k-bit register, shifting 4 k bits to one and setting 4 k bits from one end to the register T 4 ;
Means for concatenating the register T 1 and the register T 3 to be regarded as a register of 8 k bits and shifting the register 1 to 2 k bits to 4 k bits from one end of the register T 5 as a register T 5 ;
Means for concatenating the register T 2 and the register T 0 and assuming that the register is 8 k bits long and shifting the other end by 2 k bits to set 4 k bits from the other end to the register T 6 ;
Means for concatenating register T 3 and register T 1 to be regarded as an 8 k-bit register, shifting 4 k bits to the other, and setting 4 k bits from the other end to register T 7 ;
A data replacing / dividing device comprising: a register T 4 , a register T 5 and a register T 6 , and a means for outputting the register T 7 as two groups.
この手段のうちいくつかを、レジスタTi の値と(22k−1)との論理積を取ったデータをレジスタTi ′に代入し、レジスタTj の値と(24k−22k)との論理積を取ったデータをレジスタTj ′に代入し、レジスタTi ′の値とレジスタTj ′の値との論理和をレジスタTk に代入する手段と
を有することを特徴とする請求項4記載のデータ置換・分割装置。Means for concatenating the register T i and the register T j to be regarded as an 8 k-bit register, shifting 4 k bits to one or the other and shifting 4 k bits from one end or the other end to the register T k ;
For some of these means, data obtained by ANDing the value of the register T i and (2 2k −1) is substituted into the register T i ′, and the value of the register T j and (2 4k −2 2k ) the data ANDing 'is substituted into the register T i' register T j between, characterized in that the logical sum of the values of the register T j 'of and a means for substituting in the register T k The data replacement / division apparatus according to claim 4.
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP01623899A JP4094758B2 (en) | 1999-01-25 | 1999-01-25 | Data replacement / division method and apparatus |
| US09/487,597 US6578061B1 (en) | 1999-01-19 | 2000-01-19 | Method and apparatus for data permutation/division and recording medium with data permutation/division program recorded thereon |
| US10/419,241 US6850960B2 (en) | 1999-01-19 | 2003-04-21 | Inverse calculation apparatus and recording medium having stored thereon a program for executing inverse calculation |
| US10/419,244 US6859818B2 (en) | 1999-01-19 | 2003-04-21 | Method and apparatus for permuting input data and recording medium having stored thereon a program for executing permutation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP01623899A JP4094758B2 (en) | 1999-01-25 | 1999-01-25 | Data replacement / division method and apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2000214769A JP2000214769A (en) | 2000-08-04 |
| JP4094758B2 true JP4094758B2 (en) | 2008-06-04 |
Family
ID=11910989
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP01623899A Expired - Lifetime JP4094758B2 (en) | 1999-01-19 | 1999-01-25 | Data replacement / division method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4094758B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102598574B (en) * | 2009-10-27 | 2014-12-17 | 日本电气株式会社 | Block encryption apparatus, block encryption method and program |
-
1999
- 1999-01-25 JP JP01623899A patent/JP4094758B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2000214769A (en) | 2000-08-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6578061B1 (en) | Method and apparatus for data permutation/division and recording medium with data permutation/division program recorded thereon | |
| JP5417092B2 (en) | Cryptography speeded up using encrypted attributes | |
| US6189095B1 (en) | Symmetric block cipher using multiple stages with modified type-1 and type-3 feistel networks | |
| EP1081889A2 (en) | Extended key generator, encryption / decryption unit, extended key generation method, and storage medium | |
| JP2000162965A (en) | Encryption / decryption device and storage medium | |
| CN112287333B (en) | A lightweight adjustable block cipher implementation method, system, electronic device and readable storage medium | |
| JP2000305453A (en) | Ciphering device, deciphering device, and ciphering and deciphering device | |
| JP2004531778A (en) | Method and apparatus for data encryption | |
| US20010012362A1 (en) | Data encryptor/decryptor using variable in-place i/o | |
| WO2021129470A1 (en) | Polynomial-based system and method for fully homomorphic encryption of binary data | |
| JP2023130311A (en) | Method for protecting electronic computers from side channel attacks and electronic computers | |
| US20070064933A1 (en) | Method of symmetric key data encryption | |
| KR102393958B1 (en) | Data processing method in system with encryption algorithm | |
| CN113541942B (en) | Digital content encryption and decryption method based on ARX white-box block cipher | |
| US20240078323A1 (en) | Counter tree | |
| US7720225B2 (en) | Table splitting for cryptographic processes | |
| JP5113630B2 (en) | Secret sharing method, program, and apparatus | |
| CN119449308B (en) | Encryption method based on RSA algorithm | |
| JP4094758B2 (en) | Data replacement / division method and apparatus | |
| CN117725605A (en) | Method and system for remotely and automatically compiling electronic archive file information confidentiality | |
| JP2008205753A (en) | Signal processor | |
| JPS6281145A (en) | Data encryption method | |
| TWI895618B (en) | Cipher device and cipher method thereof | |
| CN118233081B (en) | NEON instruction set-based national cipher SM2 bottom modular multiplication optimization method | |
| JP5268413B2 (en) | Disclosure restriction processing apparatus, data processing system, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050307 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071218 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080130 |
|
| 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: 20080304 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080306 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110314 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110314 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120314 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130314 Year of fee payment: 5 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| EXPY | Cancellation because of completion of term |