JP4527960B2 - Substitution substitution device, substitution substitution method, substitution substitution program, substitution substitution recording medium - Google Patents
Substitution substitution device, substitution substitution method, substitution substitution program, substitution substitution recording medium Download PDFInfo
- Publication number
- JP4527960B2 JP4527960B2 JP2003362200A JP2003362200A JP4527960B2 JP 4527960 B2 JP4527960 B2 JP 4527960B2 JP 2003362200 A JP2003362200 A JP 2003362200A JP 2003362200 A JP2003362200 A JP 2003362200A JP 4527960 B2 JP4527960 B2 JP 4527960B2
- Authority
- JP
- Japan
- Prior art keywords
- substitution
- bit string
- function
- bit
- cyclic shift
- 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
- 238000006467 substitution reaction Methods 0.000 title claims description 159
- 238000000034 method Methods 0.000 title claims description 34
- 230000006870 function Effects 0.000 claims description 68
- 125000004122 cyclic group Chemical group 0.000 claims description 37
- 238000000605 extraction Methods 0.000 claims description 15
- 239000011159 matrix material Substances 0.000 claims description 14
- 239000000284 extract Substances 0.000 claims 1
- 238000012545 processing Methods 0.000 description 30
- 238000004364 calculation method Methods 0.000 description 11
- 241000209507 Camellia Species 0.000 description 9
- 235000018597 common camellia Nutrition 0.000 description 9
- 238000010586 diagram Methods 0.000 description 4
- 241000251730 Chondrichthyes Species 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
Images
Description
この発明は、主に暗号技術で用いられる換字置換処理に関し、特に、事前計算された値を用いて計算の効率化をはかった換字置換装置、換字置換方法、換字置換プログラム及び換字置換記録媒体に関する。 The present invention relates to substitution substitution processing mainly used in encryption technology, and more particularly to substitution substitution apparatus, substitution substitution method, substitution substitution program, and substitution substitution recording medium for improving calculation efficiency using pre-calculated values. .
データを秘匿するためには暗号化技術が有効である。暗号化の方法は共通鍵暗号と公開鍵暗号がある。共通鍵暗号では、暗号作成側と暗号復号側で同一の鍵を用い、この鍵は秘密に管理されている。一方、公開鍵暗号では暗号文作成のための鍵と暗号文復号の鍵は異なっており、暗号文作成のための鍵を公開しても、復号のための鍵は現実的な時間内に求まらないと広く信じられている。なお、処理速度の観点からは共通鍵暗号の方が有効である。
高速かつ安全な共通鍵暗号を作成するために、暗号化対象のデータを適当な長さのブロックに分割し、そのブロック毎に暗号化する方法をブロック暗号と呼ぶ。この様な暗号方式の代表としてAES暗号があり、その構成は、例えば、非特許文献1に示されている。
An encryption technique is effective for concealing data. Encryption methods include common key encryption and public key encryption. In the common key encryption, the same key is used on the encryption creation side and the encryption / decryption side, and this key is secretly managed. On the other hand, in public key cryptography, the key for ciphertext creation and the key for ciphertext decryption are different. Even if the key for ciphertext creation is disclosed, the key for decryption is found within a realistic time. It is widely believed that it will not be. From the viewpoint of processing speed, the common key encryption is more effective.
In order to create 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 block cipher. A representative example of such an encryption method is AES encryption, and its configuration is shown in
このAES暗号を含め、多くの共通鍵暗号は換字(substitution)と、置換(permutation)の組み合わせから構成されている。換字置換はかなり広い概念であるが、近年ソフトウェア実装の要請から、
なお、ここでの演算は全て環R上で行う。またsj(x)(j=1,2,…,n)は、R→Rの換字関数(S箱:S-box)であり、Pは、
式(1)に示される換字置換は、非特許文献2で定義されているSHARK暗号でも使われている。さらにこの非特許文献2には、
また、現実のブロック暗号に用いられている換字置換には、式(1)に示したような一般的に記述される{pij},sj(x)ではなく、これらの値が制限された形で構成されているものも多い。例えば、E2暗号(例えば、非特許文献3参照。)や、Camellia暗号(例えば、非特許文献4参照。)では、pij∈{0,1}であり、さらにsj(x)の間に簡単な数学的な関係が存在する。実際、Camellia暗号では、R=GF(28),n=m=8であり、
s3(x)=s6(x) …(5)
s4(x)=s7(x)
s8(x)=s1(x)
となっている。
In addition, substitution values used in actual block ciphers are not limited to {p ij }, s j (x), which are generally described as shown in Equation (1), but these values are limited. Many of them are made up of shapes. For example, in E2 encryption (for example, see Non-Patent Document 3) and Camellia encryption (for example, see Non-Patent Document 4), p ij ε {0,1}, and between s j (x) There is a simple mathematical relationship. In fact, in Camellia encryption, R = GF (2 8 ), n = m = 8,
s 3 (x) = s 6 (x) (5)
s 4 (x) = s 7 (x)
s 8 (x) = s 1 (x)
It has become.
非特許文献4では、このような特殊な性質を持つCamellia暗号について、式(3)に示した一般的な方法よりも効率良く式(1)を計算する方法が紹介されている。以下、64ビットプロセッサを用い、この非特許文献4の方法を実現する場合について説明する。
この方法では、j=1,2,3,4、x=(00000000)2〜(11111111)2についてsj(x)の出力値を事前計算しておき、その演算結果sjを8要素分配列した8KB(=8バイト(64ビット)×256×4)のビット列(表)
SPj=(sj,sj,sj,sj,sj,sj,sj,sj)…(6)
をメモリに格納しておく。そして、換字置換処理の際、この式(6)の表を参照し、入力データ列(x1,x2,…,x8)に対応するSPjの値を式(5)に適用し、さらに式(2)及び行列(4)を適用することにより、この入力データ列(x1,x2,…,x8)の換字置換結果(y1,y2,…,y8)を算出する。以下に、この演算に必要な処理回数及び表の大きさを示す。
表参照回数 8
排他的論理和回数 7
論理積回数 8
表の大きさ(KB) 8
Non-Patent Document 4 introduces a method of calculating Equation (1) more efficiently than the general method shown in Equation (3) for Camellia encryption having such special properties. Hereinafter, the case where the method of this nonpatent literature 4 is implement | achieved using a 64-bit processor is demonstrated.
In this method, the output value of s j (x) is pre-calculated for j = 1, 2, 3, 4 and x = (00000000) 2 to (11111111) 2 , and the operation result s j is divided into eight elements. Arranged 8KB (= 8 bytes (64 bits) × 256 × 4) bit string (table)
SPj = ( sj , sj , sj , sj , sj , sj , sj , sj ) (6)
Is stored in memory. Then, in the substitution processing, the table of the equation (6) is referred to, and the value of SP j corresponding to the input data string (x 1 , x 2 ,..., X 8 ) is applied to the equation (5). further by applying equation (2) and matrix (4), the input data sequence (x 1, x 2, ... , x 8) the substitution substitution results (y 1, y 2, ... , y 8) calculated To do. The number of processes required for this calculation and the size of the table are shown below.
Exclusive OR number 7
Number of
Table size (KB) 8
次に、32ビットプロセッサを用い、この非特許文献4の方法を実現する場合について説明する。
この場合、j=1,2,3,4、x=(00000000)2〜(11111111)2についてsj(x)の出力値を事前計算しておき、その演算結果sjを以下のように配置した4KB(=4バイト(32ビット)×256×4)の表をメモリに格納しておく。
Next, the case where the method of this nonpatent literature 4 is implement | achieved using a 32-bit processor is demonstrated.
In this case, the output value of s j (x) is pre-calculated for j = 1, 2, 3, 4 and x = (00000000) 2 to (11111111) 2 , and the operation result s j is expressed as follows: The arranged 4 KB (= 4 bytes (32 bits) × 256 × 4) table is stored in the memory.
SP1110=(s1,s1,s1,0)
SP0222=(0,s2,s2,s2) …(7)
SP3033=(s3,0,s3,s3)
SP4404=(s4,s4,0,s4)
そして、換字置換処理の際、この式(7)の表を参照して非特許文献5に示された
SP 0222 = (0, s 2 , s 2 , s 2 ) (7)
SP 3033 = (s 3 , 0, s 3 , s 3 )
SP 4404 = (s 4 , s 4 , 0, s 4 )
And in the substitution processing, it was shown in the
以下に、この式(8)の演算に必要な処理回数及び表の大きさを示す。
表参照回数 8
排他的論理和回数 8
32ビットデータ循環シフト回数 1
表の大きさ(KB) 4
Exclusive OR
32-bit data
Table size (KB) 4
しかし、非特許文献5に示す方法は、メモリに格納すべき表のサイズが大きく、十分なメモリ容量を確保できない場合には適用できないという問題点がある。
本発明はこのような点に鑑みてなされたものであり、十分なメモリ容量を確保できない場合でも、効率良く換字置換演算を行うことが可能な換字置換装置を提供することを目的とする。
また、本発明の他の目的は、十分なメモリ容量を確保できない場合でも、効率良く換字置換演算を行うことが可能な換字置換方法を提供することである。
However, the method shown in Non-Patent
The present invention has been made in view of these points, and an object of the present invention is to provide a substitution device that can perform substitution substitution efficiently even when a sufficient memory capacity cannot be secured.
Another object of the present invention is to provide a substitution method capable of performing substitution substitution efficiently even when a sufficient memory capacity cannot be secured.
さらに、本発明の他の目的は、十分なメモリ容量を確保できない場合でも、効率良く換字置換演算を行うことが可能な機能をコンピュータに実行させるための換字置換プログラムを提供することである。
また、本発明の他の目的は、十分なメモリ容量を確保できない場合でも、効率良く換字置換演算を行うことが可能な機能をコンピュータに実行させるための換字置換プログラムを格納した換字置換記録媒体を提供することである。
Furthermore, another object of the present invention is to provide a substitution program for causing a computer to execute a function capable of efficiently performing substitution substitution even when a sufficient memory capacity cannot be secured.
Another object of the present invention is to provide a substitution-replacement recording medium storing a substitution-replacement program for causing a computer to execute a function capable of performing substitution substitution efficiently even when a sufficient memory capacity cannot be secured. Is to provide.
この発明では上記課題を解決するために、メモリにビット列SPを格納しておく。ここで、ビット列SPは、循環シフトによって何れかの換字関数sj(x)と同値となる関数s(x)を複数個配列した関数SP(x)に、xの取り得る値を代入したものである。そして、換字置換処理の際、メモリからこのビット列SPを抽出し、抽出したビット列全体を循環シフトし、何れかの換字関数sj(x)に入力データxjを代入した結果sj(xj)を複数個配列したビット列SPj(xj)を算出する。
算出されたビット列SPj(xj)は、例えば、非特許文献4の方法に適用され、これにより、入力データ列(x1,x2,…,xn)から、その換字置換結果であるデータ列(y1,y2,…,ym)が求められる。
In the present invention, in order to solve the above problem, the bit string SP is stored in the memory. Here, the bit string SP is obtained by substituting a possible value of x into a function SP (x) in which a plurality of functions s (x) having the same value as any substitution function s j (x) is arranged by a cyclic shift. It is. Then, in the substitution processing, this bit string SP is extracted from the memory, the entire extracted bit string is cyclically shifted, and the result of substituting the input data x j for any substitution function s j (x) is s j (x j ) Are arranged, a bit string SP j (x j ) is calculated.
The calculated bit string SP j (x j ) is applied to, for example, the method of Non-Patent Document 4, and is thus a substitution substitution result from the input data string (x 1 , x 2 ,..., X n ). A data string (y 1 , y 2 ,..., Y m ) is obtained.
ここで、抽出したビット列を循環シフトして換字置換演算に必要なビット列SPjを算出することができるため、メモリに格納すべきビット列SPjの数を低減させることができる。
また、この関数s(x)は、それ自体の循環シフトによって何れかの換字関数sj(x)と同値となる(sj(x)=s(x)≪r)。この場合、関数s(x)を複数個配列したビット列SP=(s(x), s(x),…,s(x))全体を、同ビット、同方向に循環シフトした結果は、この換字関数sj(x)を同数個配列したビット列SPj=(sj(x), sj(x),…,sj(x))と同値となるという性質がある((sj(x), sj(x),…,sj(x))=(s(x), s(x),…,s(x))≪r)。そのため、換字置換演算に必要なビット列SPjを算出する際、関数s(x)から換字関数sj(x)を算出し、算出した換字関数sj(x)を複数個配列してビット列SPjを生成するといった煩雑な処理を行うことなく、単に、ビット列SP全体を循環シフトするのみでビット列SPjを生成することができる。
Here, since the extracted bit string can be cyclically shifted to calculate the bit string SP j necessary for the substitution substitution operation, the number of bit strings SP j to be stored in the memory can be reduced.
The function s (x) is equivalent to any substitution function s j (x) by its own cyclic shift (s j (x) = s (x) << r ). In this case, the result of cyclically shifting the entire bit string SP = (s (x), s (x),..., S (x)) in which a plurality of functions s (x) are arranged in the same bit and in the same direction is The bit string SP j = (s j (x), s j (x),..., S j (x)) in which the same number of substitution functions s j (x) are arranged has the property of being equivalent ((s j ( x), s j (x),..., s j (x)) = (s (x), s (x),..., s (x)) << r ). Therefore, when the bit string SP j necessary for the substitution substitution operation is calculated, the substitution function s j (x) is calculated from the function s (x), and a plurality of the substitution functions s j (x) calculated are arranged to form the bit string SP. The bit string SP j can be generated simply by cyclically shifting the entire bit string SP without performing complicated processing such as generating j .
なお、「≪r」はrビットの左循環シフトを表し、「≫r」はrビットの右循環シフトを表す。ここではGF(2α)をGF(2)αと同一視している。 Note that “<< r ” represents an r-bit left cyclic shift, and “>> r ” represents an r-bit right cyclic shift. Here, GF ( 2α ) is identified with GF (2) α .
上述のように、本発明では、メモリに格納すべきビット列SPjの数を低減させることができるため、十分なメモリ容量を確保できない場合でも、非特許文献4の方法等を用いて効率良く換字置換演算を行うことができる。
また、単に、ビット列SP全体を循環シフトするのみでビット列SPjを生成できるため、ビット列SPjの生成に必要な論理演算数も少なく、効率的な換字置換演算を実現できる。
As described above, according to the present invention, the number of bit strings SP j to be stored in the memory can be reduced. Therefore, even when a sufficient memory capacity cannot be secured, the substitution method can be efficiently performed using the method of Non-Patent Document 4. A replacement operation can be performed.
Also, merely for the entire bit string SP can generate a bit string SP j only cyclic shift, logical operands also less required to generate a bit string SP j, can realize efficient substitution substitution operation.
以下、この発明の実施の形態を図面を参照して説明する。
〔第1の実施の形態〕
まず、本発明の第1の実施の形態について説明する。
本形態は、64ビットプロセッサにおいて行われるCamellia暗号の換字置換処理に本発明を適用する例である。
図1は、本形態における換字置換装置10の機能構成を例示した図、図2は、ビット列格納部11に格納される表20のデータ構成を例示した図、図3は、換字置換装置10のハードウェア構成を例示した図である。また、図4は、本形態における換字置換方法を説明するためのフローチャートである。以下、これらの図を用いて、この例の換字置換装置10の構成及び処理手順について説明する。
Embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment]
First, a first embodiment of the present invention will be described.
This embodiment is an example in which the present invention is applied to a substitution substitution process of Camellia encryption performed in a 64-bit processor.
FIG. 1 is a diagram illustrating a functional configuration of the
<ハードウェア構成>
図3に例示するように、この例の換字置換装置10は、64ビットのCPU(Central Processing Unit)10a、ROM(Read Only Memory)10b、RAM(Random Access Memory)10c、換字置換プログラムを格納したRAM等のプログラムメモリ10d、インタフェースである入力部10e及び出力部10fを有しており、バス10gにおいて相互に通信可能なように接続されている。そして、CPU10aは、プログラムメモリ10dに格納された換字置換プログラムを読み出し、それに従った処理を実行することによって、以下に示す各処理機能を実現する。
<Hardware configuration>
As illustrated in FIG. 3, the
<前提>
換字置換装置10は、環R上の換字置換
ここではCamellia暗号の換字置換処理を例にとるため、R=GF(28)、n=m=8であり、置換行列は、
また、Camellia暗号の場合、換字関数間には、
s2(x)=s5(x)=s1(x)≪1
s3(x)=s6(x)=s1(x)≫1 …(10)
s4(x)=s7(x)=s1(x≪1)
s8(x)=s1(x)
の関係がある。
<Premise>
The
Here, since substitution substitution processing of Camellia encryption is taken as an example, R = GF (2 8 ), n = m = 8, and the substitution matrix is
In the case of Camellia encryption, between substitution functions,
s 2 (x) = s 5 (x) = s 1 (x) << 1
s 3 (x) = s 6 (x) = s 1 (x) >> 1 (10)
s 4 (x) = s 7 (x) = s 1 (x << 1 )
s 8 (x) = s 1 (x)
There is a relationship.
<前処理>
まず、前処理として、事前計算したビット列SPをビット列格納部11に格納する。ここで、ビット列SPは、循環シフトによって何れかの換字関数sj(x)と同値となる関数をs(x)とし、この関数s(x)を複数個配列した関数をSP(x)とし、この関数SP(x)にxの取り得る値を代入したビット列である。この例では、換字関数s1(x)を関数s(x)とする。
また、図2に例示するように、この例では、この関数s(x)を8要素配列した関数をSP(x)(=(s(x),s(x),s(x),s(x),s(x),s(x),s(x),s(x)))としている。そして、この関数SP(x)にx=(00000000)2,(00000001)2,…,(11111111)2をそれぞれ代入した256要素のビット列22
SP((00000000)2)=(s((00000000)2),…,s((00000000)2))
SP((00000001)2)=(s((00000001)2),…,s((00000001)2))
…
SP((11111111)2)=(s((11111111)2),…,s((11111111)2))
をSPとし、表20を構成している。
<Pretreatment>
First, as preprocessing, the pre-calculated bit string SP is stored in the bit
Further, as illustrated in FIG. 2, in this example, a function in which the function s (x) is arranged in eight elements is expressed as SP (x) (= (s (x), s (x), s (x), s (X), s (x), s (x), s (x), s (x))). Then, a 256-element bit string 22 obtained by substituting x = (00000000) 2 , (00000001) 2 ,..., (11111111) 2 for the function SP (x), respectively.
SP ((00000000) 2 ) = (s ((00000000) 2 ),…, s ((00000000) 2 ))
SP ((00000001) 2 ) = (s ((00000001) 2 ),…, s ((00000001) 2 ))
...
SP ((11111111) 2 ) = (s ((11111111) 2 ), ..., s ((11111111) 2 ))
Table 20 is constituted by SP.
また、これらの各ビット列SP((00000000)2),SP((00000001)2),…,SP((11111111)2)は、各代入値x=(00000000)2,(00000001)2,…,(11111111)2とそれぞれ対応付けられている。この例の場合、各代入値xに対応するビット列格納部11のアドレス21(H(x))に、xの代入結果である各ビット列SP((00000000)2),SP((00000001)2),…,SP((11111111)2)を格納することにより、この対応付けを行っている。
In addition, each of these bit strings SP ((00000000) 2 ), SP ((00000001) 2 ),..., SP ((11111111) 2 ) has an assigned value x = (00000000) 2 , (00000001) 2 ,. (11111111) 2 is associated with each. In this example, each bit string SP ((00000000) 2 ), SP ((00000001) 2 ) that is the result of substitution of x is stored in the address 21 (H (x)) of the bit
なお、s(x)の代入結果は8ビットであるため、それが8要素配列されたSP(x)の各代入結果は64(8×8)ビット=8バイトとなる。また、表20は、このSP(x)への代入結果が256要素集合したものである。よって、この表20の大きさ(データサイズ)は2KB(=8バイト×256)である。
また、置換行列格納部16には、置換行列
Also, the permutation matrix storage unit 16 has a permutation matrix
<換字置換処理>
本形態において換字置換処理を行う場合、まずデータ列入力部12において、換字置換処理の対象となる入力データ列(x1,x2,…,x8)の入力を受け付ける(ステップS1)。入力されたデータx4,x7は8ビット循環シフト部13へ送られ、その他のデータ列(x1,x2,x3,x5,x6,x8)はビット列抽出部14に送られる。
<Substitution replacement processing>
When performing substitution substitution processing in this embodiment, first, the data
8ビット循環シフト部13は、送られた8ビットのデータx4,x7に対し、それぞれ1ビットの左循環シフト(x4≪1,x7≪1)を行う(ステップS2)。つまり、例えばx4の各ビットがabcdefjhである場合、このビット列がbcdefjhaとなるように、各ビットを左に1ビット循環させる。そして、これらの1ビットの左循環シフト結果(x4≪1,x7≪1)はビット列抽出部14に送られる。
ビット列抽出部14は、ビット列格納部11を参照し、送られたデータ列(x1,x2,x3,x5,x6,x8)及び左循環シフト結果(x4≪1,x7≪1)に対応付けられているアドレス21に格納されたビット列SP(x1),SP(x2),SP(x3),SP(x5),SP(x6),SP(x8)及びSP(x4≪1),SP(x7≪1)を抽出する(ステップS3)。
The 8-bit cyclic shift unit 13 performs a 1-bit left cyclic shift (x 4 << 1 , x 7 << 1 ) on the transmitted 8-bit data x 4 and x 7 (step S2). That is, for example, when each bit of x 4 is Abcdefjh, the bit string so that the Bcdefjha, to 1-bit rotation each bit to the left. These 1-bit left circular shift results (x 4 << 1 , x 7 << 1 ) are sent to the bit
The bit
ここでビット列抽出部14で抽出されたSP(x1)はSP1(x1)として、SP(x8)はSP8(x8)として、SP(x4≪1)はSP4(x4)として、SP(x7≪1)はSP7(x7)として、それぞれ論理積演算部17に送られる。なお、SPj(α)は、換字関数sj(x)にデータαを代入した結果sj(α)を8個配列したビット列(sj(α),sj(α),sj(α),sj(α),sj(α),sj(α),sj(α),sj(α))を示す。また、上述のような置き換え(SP1(x1)←SP(x1)、SP8(x8)←SP(x8)等)ができるのは、この例では、換字関数s1(x)を関数s(x)としており、さらに式(10)の関係が成立していることに基づく。
Here, SP (x 1 ) extracted by the bit
また、ビット列抽出部14で抽出されたその他のSP(x2),SP(x3),SP(x5),SP(x6)は、それぞれ64ビット循環シフト部15に送られる。
64ビット循環シフト部15(「循環シフト手段」に相当)は、送られたビット列SP(x2)全体を左に1ビットだけ循環シフトし(SP(x2)≪1)、換字関数s2(x)に入力データx2を代入した結果s2(x2)を8個配列したビット列SP2(x2)を算出する。ここで、ビット列SP(x2)全体を左に1ビットだけ循環シフトするとビット列SP2(x2)となる理由を説明する。
The other SP (x 2 ), SP (x 3 ), SP (x 5 ), and SP (x 6 ) extracted by the bit
The 64-bit cyclic shift unit 15 (corresponding to “circular shift means”) cyclically shifts the entire transmitted bit string SP (x 2 ) by 1 bit to the left (SP (x 2 ) << 1 ), and the substitution function s 2 A bit string SP 2 (x 2 ) in which eight results s 2 (x 2 ) are arranged as a result of substituting the input data x 2 into (x) is calculated. Here, the reason why the entire bit string SP (x 2 ) is cyclically shifted to the left by 1 bit to form the bit string SP 2 (x 2 ) will be described.
例えばs(x2)の各ビットがabcdefjhである場合、SP(x2)は(abcdefjhabcdefjh…abcdefjh)となり、SP(x2)全体を左に1ビットだけ循環シフト(SP(x2)≪1)した結果は、
(bcdefjhabcdefjh…abcdefjha)…(11)
となる。
また、前述のように、この例ではs(x)=s1(x)としており、さらに式(10)より、s2(x2)=s1(x2)≪1=s(x2)≪1が成立する。そのため、s2(x2)は、s(x2)を左に1ビットだけ循環シフトした結果(s(x2)≪1)と同じbcdefjhaとなる。そして、s2(x2)を8個配列したビット列SP2(x2)は、(bcdefjhabcdefjh…abcdefjha)となり、上述の(11)と等しくなる。これは、ビット列SP(x2)全体を左に1ビットだけ循環シフトした結果(SP(x2)≪1)が、s2(x2)を8個配列したビット列SP2(x2)と等しくなることを意味している。
For example, when each bit of s (x 2 ) is abcdefjh, SP (x 2 ) becomes (abcdefjhabcdefjh... Abcdefjh), and the entire SP (x 2 ) is cyclically shifted by 1 bit to the left (SP (x 2 ) << 1 )
(Bcdefjhabcdefjh ... abcdefjha) (11)
It becomes.
Further, as described above, in this example, s (x) = s 1 (x) is set, and further, s 2 (x 2 ) = s 1 (x 2 ) << 1 = s (x 2 ) from Expression (10). ) << 1 is established. Therefore, s 2 (x 2 ) is bcdefjha which is the same as the result (s (x 2 ) << 1 ) obtained by cyclically shifting s (x 2 ) by 1 bit to the left. Then, s 2 (x 2) bit
同様に、64ビット循環シフト部15は、送られたビット列SP(x5)全体を左に1ビットだけ循環シフトし(SP(x5)≪1)、またSP(x3)全体及びSP(x6)全体をそれぞれ右に1ビットだけ循環シフトし(SP(x3)≫1, SP(x6)≫1)、ビット列SP5(x5), SP3(x3), SP6(x6)を算出する(ステップS4)。そして、64ビット循環シフト部15で算出されたビット列SP2(x2),SP3(x3),SP5(x5),SP6(x6)は論理積演算部17に送られる。
Similarly, the 64-bit
論理積演算部17は、送られたSPj(xj)に対し、置換行列格納部16から、置換行列Pのj列要素
<計算コスト・表の大きさ>
以上説明したように、本形態では、ステップS2において、8ビットデータの循環シフトを2回行い、ステップS3において、ビット列格納部11の表20を8回参照している。また、ステップS4において、64ビットデータの循環シフトを4回行い、ステップS5において、論理積SPj(xj)・Pj(j=1,2,…,8)を8回行い、ステップS6において、排他的論理和を7回行っている。また、前述のように表20の大きさは2KBである。
<Calculation cost / table size>
As described above, in this embodiment, the cyclic shift of the 8-bit data is performed twice in step S2, and the table 20 of the bit
表参照回数 8
排他的論理和回数 7
64ビットデータ循環シフト回数 4
8ビットデータ循環シフト回数 2
論理積回数 8
表の大きさ(KB) 2
このように、本形態では、計算コストをさほど増加させることなく、表の大きさを従来の4分の1にすることができた。
Exclusive OR number 7
64-bit data cyclic shift count 4
8-bit data
Number of
Table size (KB) 2
Thus, in this embodiment, the size of the table could be reduced to a quarter of the conventional size without increasing the calculation cost so much.
〔第2の実施の形態〕
次に、本発明の第2の実施の形態について説明する。
本形態は、32ビットプロセッサにおいて行われるCamellia暗号の換字置換処理に本発明を適用する例である。
図5は、本形態における換字置換装置100の機能構成を例示した図、図6は、ビット列格納部111に格納される表130のデータ構成を例示した図、図7は、本形態における換字置換方法を説明するためのフローチャートである。以下、これらの図を用いて、この例の換字置換装置100の構成及び処理手順について説明する。なお、以下では第1の実施の形態との相違点を中心に説明を行い、第1の実施の形態と共通する事項については説明を省略する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described.
This embodiment is an example in which the present invention is applied to a substitution substitution process of Camellia encryption performed in a 32-bit processor.
5 is a diagram illustrating a functional configuration of the
<ハードウェア構成>
32ビットのCPUを用いる以外は、第1の実施の形態と同様である。
<前処理>
第1の実施の形態と同様、事前計算したビット列SPをビット列格納部111に格納する。ただし、この例では、関数s(x)を4要素配列した関数をSP(x)(=(s(x),s(x),s(x),s(x)))とし、この関数SP(x)にx=(00000000)2,(00000001)2,…,(11111111)2をそれぞれ代入した256要素のビット列132
SP((00000000)2)=(s((00000000)2),…,s((00000000)2))
SP((00000001)2)=(s((00000001)2),…,s((00000001)2))
…
SP((11111111)2)=(s((11111111)2),…,s((11111111)2))
をSPとし、表130を構成している(図6)。
<Hardware configuration>
The second embodiment is the same as the first embodiment except that a 32-bit CPU is used.
<Pretreatment>
As in the first embodiment, the pre-calculated bit string SP is stored in the bit
SP ((00000000) 2 ) = (s ((00000000) 2 ),…, s ((00000000) 2 ))
SP ((00000001) 2 ) = (s ((00000001) 2 ),…, s ((00000001) 2 ))
...
SP ((11111111) 2 ) = (s ((11111111) 2 ), ..., s ((11111111) 2 ))
Table 130 is configured (FIG. 6).
また、第1の実施の形態と同様、この例でも各代入値xに対応するビット列格納部111のアドレス131(H(x))に、xの代入結果である各ビット列SP((00000000)2),SP((00000001)2),…,SP((11111111)2)を格納することにより、各ビット列SPと各代入値xとの対応付けを行っている。
なお、s(x)の代入結果は8ビットであるため、それが4要素配列されたSP(x)の各代入結果は32(8×4)ビット=4バイトとなる。また、表130は、このSP(x)への代入結果が256要素集合したものである。よって、この表130の大きさ(データサイズ)は1KB(=4バイト×256)である。
また、定数格納部116には、j=1,8に対応付けられた定数(ffffff00)16,j=2,5に対応付けられた定数(00ffffff)16,j=3,6に対応付けられた定数(ff00ffff)16,j=4,7に対応付けられた定数(ffff00ff)16が格納される。
Further, similarly to the first embodiment, in this example, each bit string SP ((00000000) 2 that is the result of substitution of x into the address 131 (H (x)) of the bit
Since the substitution result of s (x) is 8 bits, each substitution result of SP (x) in which four elements are arranged is 32 (8 × 4) bits = 4 bytes. Table 130 is a set of 256 elements obtained by substituting this SP (x). Therefore, the size (data size) of this table 130 is 1 KB (= 4 bytes × 256).
Further, in the constant storage unit 116, corresponding to j = the associated
<換字置換処理>
本形態において換字置換処理を行う場合、まずデータ列入力部112において、換字置換処理の対象となる入力データ列(x1,x2,…,x8)の入力を受け付ける(ステップS11)。入力されたデータx4,x7は8ビット循環シフト部113へ送られ、その他のデータ列(x1,x2,x3,x5,x6,x8)はビット列抽出部114に送られる。
8ビット循環シフト部113は、送られた8ビットのデータx4,x7に対し、それぞれ1ビットの左循環シフト(x4≪1,x7≪1)を行い(ステップS12)、その演算結果をビット列抽出部114に送る。
<Substitution replacement processing>
When performing substitution substitution processing in this embodiment, first, the data string input unit 112 receives input of an input data string (x 1 , x 2 ,..., X 8 ) to be subjected to substitution substitution processing (step S11). The input data x 4 and x 7 are sent to the 8-bit cyclic shift unit 113, and the other data strings (x 1 , x 2 , x 3 , x 5 , x 6 , x 8 ) are sent to the bit
The 8-bit cyclic shift unit 113 performs a 1-bit left cyclic shift (x 4 << 1 , x 7 << 1 ) on the transmitted 8-bit data x 4 and x 7 (step S12), and performs an operation thereof. The result is sent to the bit
ビット列抽出部114は、ビット列格納部111を参照し、送られたデータ列(x1,x2,x3,x5,x6,x8)及び左循環シフト結果(x4≪1,x7≪1)に対応付けられているアドレス131に格納されたビット列SP(x1),SP(x2),SP(x3),SP(x5),SP(x6),SP(x8)及びSP(x4≪1),SP(x7≪1)を抽出する(ステップS13)。このビット列抽出部114で抽出されたSP(x1)、SP(x8)、SP(x4≪1)、SP(x7≪1)は、それぞれ論理積演算部117に送られ、その他のSP(x2),SP(x3),SP(x5),SP(x6)は、それぞれ32ビット循環シフト部115に送られる。
The bit
32ビット循環シフト部115(「循環シフト手段」に相当)は、送られたビット列SP(x2)全体及びSP(x5)全体を左に1ビットだけ循環シフトし(SP(x2)≪1,SP(x5)≪1)、SP(x3)全体及びSP(x6)全体をそれぞれ右に1ビットだけ循環シフトする(SP(x3)≫1, SP(x6)≫1)(ステップS14)。そして、これらの演算結果は、論理積演算部117に送られる。なお、SP(x2)≪1は、換字関数s2(x)に入力データx2を代入した結果s2(x2)を4個配列したビット列に相当する。同様に、SP(x5)≪1はs5(x5)を4個配列したビット列に相当し、SP(x3)≫1, はs3(x3)を4個配列したビット列に相当し、SP(x6)≫1はs6(x6)を4個配列したビット列に相当する。 The 32-bit cyclic shift unit 115 (corresponding to “circular shift means”) cyclically shifts the entire transmitted bit string SP (x 2 ) and SP (x 5 ) to the left by 1 bit (SP (x 2 ) << 1 , SP (x 5 ) << 1 ), SP (x 3 ) and SP (x 6 ) are each cyclically shifted to the right by one bit (SP (x 3 ) >> 1 , SP (x 6 ) >> 1 (Step S14). Then, these calculation results are sent to the logical product calculation unit 117. SP (x 2 ) << 1 corresponds to a bit string in which four results s 2 (x 2 ) obtained by substituting the input data x 2 into the substitution function s 2 (x) are arranged. Similarly, SP (x 5 ) << 1 corresponds to a bit string in which four s 5 (x 5 ) are arranged, and SP (x 3 ) >> 1 , corresponds to a bit string in which four s 3 (x 3 ) are arranged. SP (x 6 ) >> 1 corresponds to a bit string in which four s 6 (x 6 ) are arranged.
論理積演算部117は、送られたSP(xj)(j=1,8)、SP(xj)≪1(j=2,5)、SP(xj)≫1(j=3,6)及びSP(xj≪1)(j=4,7)のjにそれぞれ対応する定数((ffffff00)16等)を定数格納部116から抽出し、抽出した定数とSP(xj)との論理積を以下のように計算する(ステップS15)。
SP1110(x1)←SP(x1)&(ffffff00)16
SP0222(x2)←SP(x2)≪1&(00ffffff)16
SP3033(x3)←SP(x3)≫1&(ff00ffff)16
SP4404(x4)←SP(x4≪1)&(ffff00ff)16
SP0222(x5)←SP(x5)≪1&(00ffffff)16
SP3033(x6)←SP(x6)≫1&(ff00ffff)16
SP4404(x7)←SP(x7≪1)&(ffff00ff)16
SP1110(x8)←SP(x8)&(ffffff00)16
論理積演算部117での演算結果SP1110(x1),SP0222(x2),SP3033(x3),SP4404(x4),SP0222(x5),SP3033(x6),SP4404(x7),SP1110(x8)は、排他的論理和演算部118に送られ、排他的論理和演算部118は、以下の排他的論理和演算によりDとUを求める(ステップS16)。
The logical product operation unit 117 sends the received SP (x j ) (j = 1,8), SP (x j ) << 1 (j = 2,5), SP (x j ) >> 1 (j = 3, 6) and constants ((ffffff00) 16 etc.) respectively corresponding to j of SP (x j << 1 ) (j = 4, 7) are extracted from the constant storage unit 116, and the extracted constants and SP (x j ) and Is calculated as follows (step S15).
SP 1110 (x 1 ) ← SP (x 1 ) & (ffffff00) 16
SP 0222 (x 2 ) <-SP (x 2 ) << 1 & (00ffffff) 16
SP 3033 (x 3 ) <-SP (x 3 ) >> 1 & (ff00ffff) 16
SP 4404 (x 4 ) <-SP (x 4 << 1 ) & (ffff00ff) 16
SP 0222 (x 5 ) ← SP (x 5 ) << 1 & (00ffffff) 16
SP 3033 (x 6 ) <-SP (x 6 ) >> 1 & (ff00ffff) 16
SP 4404 (x 7 ) ← SP (x 7 << 1 ) & (ffff00ff) 16
SP 1110 (x 8 ) ← SP (x 8 ) & (ffffff00) 16
Calculation results SP 1110 (x 1 ), SP 0222 (x 2 ), SP 3033 (x 3 ), SP 4404 (x 4 ), SP 0222 (x 5 ), SP 3033 (x 6 ) in the AND operation unit 117 , SP 4404 (x 7 ), SP 1110 (x 8 ) are sent to the exclusive OR
以上説明したように、本形態では、ステップS12において、8ビットデータの循環シフトを2回行い、ステップS13において、ビット列格納部111の表130を8回参照している。また、32ビットデータの循環シフトを、ステップS14において4回行い、ステップS17において1回行っている。さらに、スステップS15において論理積を8回行い、排他的論理和をステップS16において6回、ステップS18において2回行っている。また、前述のように表130の大きさは1KBである。
As described above, in this embodiment, the cyclic shift of 8-bit data is performed twice in step S12, and the table 130 of the bit
表参照回数 8
排他的論理和回数 8
32ビットデータ循環シフト回数 5
8ビットデータ循環シフト回数 2
論理積回数 8
表の大きさ(KB) 1
このように、本形態では、計算コストをさほど増加させることなく、表の大きさを従来の4分の1にすることができた。
Exclusive OR
32-bit data
8-bit data
Number of
Table size (KB) 1
Thus, in this embodiment, the size of the table could be reduced to a quarter of the conventional size without increasing the calculation cost so much.
なお、本発明は上述の各実施の形態に限定されるものではない。例えば、上述の各実施の形態はCamellia暗号への適用例であるため、R=GF(28)、n=m=8とし、置換行列Pを式(9)とし、換字関数間に式(10)の関係があることとしたが、特にこれに限定されるものではなく、例えば、RとしてGF(2)のその他の拡大体を用い、n,mとしてその他の数を適用し、置換行列Pを各要素が∈{0,1}であるその他の行列を用いてもよく、換字関数としてsj(x)=s(e(x))≪t(eは簡単に計算可能な関数)の関係を満たすものを用いてもよい。また、循環シフトを行う必要がない、或いは効率が悪い場合には、この循環シフトの代わりに、通常のシフト、加算、排他的論理和、論理和等を組み合わせた演算を行うこととしてもよい。 The present invention is not limited to the embodiments described above. For example, since each of the above-described embodiments is an application example to the Camellia cipher, R = GF (2 8 ), n = m = 8, the permutation matrix P is set as Formula (9), and the formula ( 10), but is not particularly limited to this. For example, another extension field of GF (2) is used as R, other numbers are applied as n and m, and a permutation matrix P may be another matrix in which each element is ∈ {0, 1}, and s j (x) = s (e (x)) << t (e is a function that can be easily calculated) as a substitution function Those satisfying the relationship may be used. Further, when it is not necessary to perform a cyclic shift or when the efficiency is poor, instead of this cyclic shift, an operation combining a normal shift, addition, exclusive logical sum, logical sum or the like may be performed.
また、上述の各実施の形態では、1種類の関数s(x)にxの取り得る値を代入した結果のみから構成されたビット列(SP)をビット列格納部に格納しておくこととしたが、複数の関数s(x)にxの取り得る値を代入した結果から構成されたビット列(SP)をビット列格納部に格納しておき、これらを用いて換字置換処理を行ってもよい。
さらに、上述の各実施の形態では、関数s(x)として換字関数s1(x)を用いたが、関数s(x)としてその他の換字関数を用いてもよく、また、換字関数以外の関数を関数s(x)としてもよい。
In each of the above-described embodiments, the bit string (SP) configured only from the result of substituting the possible values of x into one type of function s (x) is stored in the bit string storage unit. Alternatively, a bit string (SP) composed of the result of substituting the possible values of x into a plurality of functions s (x) may be stored in the bit string storage unit, and substitution substitution processing may be performed using these.
Further, in each of the above-described embodiments, the substitution function s 1 (x) is used as the function s (x). However, other substitution functions may be used as the function s (x). The function may be a function s (x).
その他、本発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。また、上述の各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。
また、上述の構成をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラム(換字変換プログラム)によって記述される。そして、このプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。
Needless to say, other modifications are possible without departing from the spirit of the present invention. In addition, the various processes described above are not only executed in time series according to the description, but may be executed in parallel or individually according to the processing capability of the apparatus that executes the processes or as necessary.
Further, when the above configuration is realized by a computer, the processing contents of the functions that each device should have are described by a program (substitution conversion program). The processing functions are realized on the computer by executing the program on the computer.
この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体(換字変換記録媒体)に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよいが、具体的には、例えば、磁気記録装置として、ハードディスク装置、フレキシブルディスク、磁気テープ等を、光ディスクとして、DVD(Digital Versatile Disc)、DVD−RAM(Random Access Memory)、CD−ROM(Compact Disc Read Only Memory)、CD−R(Recordable)/RW(ReWritable)等を、光磁気記録媒体として、MO(Magneto-Optical disc)等を、半導体メモリとしてEEP−ROM(Electronically Erasable and Programmable-Read Only Memory)等を用いることができる。 The program describing the processing contents can be recorded in a computer-readable recording medium (substitution conversion recording medium). The computer-readable recording medium may be any medium such as a magnetic recording device, an optical disk, a magneto-optical recording medium, or a semiconductor memory. Specifically, for example, the magnetic recording device may be a hard disk device or a flexible Discs, magnetic tapes, etc. as optical disks, DVD (Digital Versatile Disc), DVD-RAM (Random Access Memory), CD-ROM (Compact Disc Read Only Memory), CD-R (Recordable) / RW (ReWritable), etc. As the magneto-optical recording medium, MO (Magneto-Optical disc) or the like can be used, and as the semiconductor memory, EEP-ROM (Electronically Erasable and Programmable-Read Only Memory) or the like can be used.
また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD−ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。 The program is distributed by selling, transferring, or lending a portable recording medium such as a DVD or CD-ROM in which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of the server computer and transferring the program from the server computer to another computer via a network.
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記録媒体に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。 A computer that executes such a program first stores, for example, a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. When executing the process, the computer reads a program stored in its own recording medium and executes a process according to the read program. As another execution form of the program, the computer may directly read the program from the portable recording medium and execute processing according to the program, and the program is transferred from the server computer to the computer. Each time, the processing according to the received program may be executed sequentially. Also, the program is not transferred from the server computer to the computer, and the above-described processing is executed by a so-called ASP (Application Service Provider) type service that realizes the processing function only by the execution instruction and result acquisition. It is good. Note that the program in this embodiment includes information that is used for processing by an electronic computer and that conforms to the program (data that is not a direct command to the computer but has a property that defines the processing of the computer).
また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。 In this embodiment, the present apparatus is configured by executing a predetermined program on a computer. However, at least a part of these processing contents may be realized by hardware.
この発明により換字置換演算に必要な表の大きさを大幅に削減できるため(例えば、32ビット語長環境では1/4)、携帯電話等の省メモリ環境でも、演算速度をそれほど落すことなく換字置換を実装できる。 Since the present invention can greatly reduce the size of a table required for substitution substitution operation (for example, 1/4 in a 32-bit word length environment), substitution in a memory-saving environment such as a mobile phone does not significantly reduce the computation speed. You can implement replacement.
10,100 換字置換装置
11,111 ビット列格納部
14,114 ビット抽出部
15 64ビット循環シフト部
115,119 32ビット循環シフト部
10,100 Substitution replacement device 11,111 Bit string storage unit 14,114
Claims (7)
によって、入力データ列(x1,x2,…,xn)からデータ列(y1,y2,…,ym)を求める換字置換装置であって、
循環シフトによって何れかの上記換字関数sj(x)と同値となる関数をs(x)とし、この関数s(x)を複数個配列した関数をSP(x)とし、この関数SP(x)にxの取り得る値を代入したビット列をSPとした場合における、当該ビット列SPを格納するビット列格納手段と、
上記ビット列格納手段から上記ビット列SPの少なくとも一部を抽出するビット列抽出手段と、
上記ビット列抽出手段において抽出されたビット列全体を循環シフトし、何れかの上記換字関数sj(x)に入力データxjを代入した結果sj(xj)を複数個配列したビット列SPj(xj)を算出する循環シフト手段と、
を有することを特徴とする換字置換装置。 i = 1,2, ..., m, j = 1,2, ..., n, i row j column element of the permutation matrix on ring R is p ij, and R → R substitution function is s j (x ), Substitution substitution on R
Is a substitution device for obtaining a data string (y 1 , y 2 ,..., Y m ) from an input data string (x 1 , x 2 ,..., X n ),
A function that has the same value as any of the substitution functions s j (x) by the cyclic shift is defined as s (x), a function in which a plurality of the functions s (x) are arranged is defined as SP (x), and this function SP (x ), A bit string storage means for storing the bit string SP when the bit string obtained by substituting a possible value of x is SP,
Bit string extraction means for extracting at least part of the bit string SP from the bit string storage means;
The entire bit string extracted by the bit string extraction means is cyclically shifted, and the result of substituting the input data x j for any of the substitution functions s j (x) is a bit string SP j (array of a plurality of s j (x j ). a cyclic shift means for calculating x j );
Substitution replacement device characterized by having.
上記関数s(x)は、
何れかの換字関数sk(x)である、
ことを特徴とする換字置換装置。 A substitution device according to claim 1,
The function s (x) is
Any substitution function s k (x),
The substitution device characterized by that.
上記ビット列抽出手段は、
いずれかの入力データxpに対応するビット列SP(xp)を抽出する手段である、
ことを特徴とする換字置換装置。 A substitution device according to claim 1 or 2,
The bit string extraction means includes
A means for extracting a bit string SP (x p ) corresponding to any of the input data x p ;
The substitution device characterized by that.
上記ビット列格納手段に格納された上記ビット列SPは、
1種類の上記関数s(x)にxの取り得る値を代入した結果のみから構成されたビット列である、
ことを特徴とする換字置換装置。 The substitution device according to any one of claims 1 to 3,
The bit string SP stored in the bit string storage means is
A bit string composed only of the result of substituting a possible value of x into one type of the function s (x),
The substitution device characterized by that.
によって、入力データ列(x1,x2,…,xn)からデータ列(y1,y2,…,ym)を求める換字置換方法であって、
循環シフトによって何れかの上記換字関数sj(x)と同値となる関数をs(x)とし、この関数s(x)を複数個配列した関数をSP(x)とし、この関数SP(x)にxの取り得る値を代入したビット列をSPとした場合における、当該ビット列SPを上記メモリに格納しておき、
上記ビット列抽出手段が、上記メモリから上記ビット列SPの少なくとも一部を抽出する手順と、
上記循環シフト手段が、抽出されたビット列全体を循環シフトさせ、何れかの上記換字関数sj(x)に入力データxjを代入した結果sj(xj)を複数個配列したビット列SPj(xj)を算出する手順と、
を実行することを特徴とする換字置換方法。 Let the computer function as a substitution substitution device having a memory, a bit string extraction means, and a cyclic shift means, i = 1, 2,..., M, j = 1, 2,. Substitution substitution on R in the case where the i row and j column element of p is ij and the R → R substitution function is s j (x)
Is a substitution substitution method for obtaining a data string (y 1 , y 2 ,..., Y m ) from an input data string (x 1 , x 2 ,..., X n ),
A function that has the same value as any of the substitution functions s j (x) by the cyclic shift is defined as s (x), a function in which a plurality of the functions s (x) are arranged is defined as SP (x), and this function SP (x when the) bit sequence obtained by substituting the possible values of x in the set to SP, the bit string SP may be stored in the memory,
A procedure in which the bit string extraction means extracts at least a part of the bit string SP from the memory;
The cyclic shift unit, the whole was extracted bit string by circulating shift, one of the substitution function s j The result of substituting the input data x j in (x) s j (x j) bit string to a plurality arranged SP j A procedure for calculating (x j );
The substitution method characterized by performing .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003362200A JP4527960B2 (en) | 2003-10-22 | 2003-10-22 | Substitution substitution device, substitution substitution method, substitution substitution program, substitution substitution recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003362200A JP4527960B2 (en) | 2003-10-22 | 2003-10-22 | Substitution substitution device, substitution substitution method, substitution substitution program, substitution substitution recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005128166A JP2005128166A (en) | 2005-05-19 |
JP4527960B2 true JP4527960B2 (en) | 2010-08-18 |
Family
ID=34641926
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003362200A Expired - Lifetime JP4527960B2 (en) | 2003-10-22 | 2003-10-22 | Substitution substitution device, substitution substitution method, substitution substitution program, substitution substitution recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4527960B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000284691A (en) * | 1999-01-25 | 2000-10-13 | Nippon Telegr & Teleph Corp <Ntt> | Substitution permutation device and program recording medium thereof |
JP2001194994A (en) * | 2000-01-06 | 2001-07-19 | Nippon Telegr & Teleph Corp <Ntt> | Device and method for substituting computation and its program recording medium |
JP2001236017A (en) * | 2000-02-22 | 2001-08-31 | Nippon Telegr & Teleph Corp <Ntt> | Substitution processing device and recording medium with program thereof recorded thereon |
-
2003
- 2003-10-22 JP JP2003362200A patent/JP4527960B2/en not_active Expired - Lifetime
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000284691A (en) * | 1999-01-25 | 2000-10-13 | Nippon Telegr & Teleph Corp <Ntt> | Substitution permutation device and program recording medium thereof |
JP2001194994A (en) * | 2000-01-06 | 2001-07-19 | Nippon Telegr & Teleph Corp <Ntt> | Device and method for substituting computation and its program recording medium |
JP2001236017A (en) * | 2000-02-22 | 2001-08-31 | Nippon Telegr & Teleph Corp <Ntt> | Substitution processing device and recording medium with program thereof recorded thereon |
Also Published As
Publication number | Publication date |
---|---|
JP2005128166A (en) | 2005-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7049374B2 (en) | A terminal device that performs the same type of encryption, a server device that processes the ciphertext, and its method. | |
Thangavel et al. | Enhanced DNA and ElGamal cryptosystem for secure data storage and retrieval in cloud | |
CN110084599B (en) | Key processing method, device, equipment and storage medium | |
JP6044738B2 (en) | Information processing apparatus, program, and storage medium | |
US10326596B2 (en) | Techniques for secure authentication | |
CN115664847A (en) | User information safe storage method of internet education platform | |
Ahmad et al. | A secure network communication protocol based on text to barcode encryption algorithm | |
Ahmad et al. | Distributed text-to-image encryption algorithm | |
JP2008209499A (en) | Aes decryption apparatus and program | |
JP5992651B2 (en) | ENCRYPTION METHOD, PROGRAM, AND SYSTEM | |
EP3483867B1 (en) | System, device, method, and program for indexing a secret-shared array with secure multiparty computations | |
JP4527960B2 (en) | Substitution substitution device, substitution substitution method, substitution substitution program, substitution substitution recording medium | |
JP5530025B2 (en) | Data division apparatus and data division program | |
JP2011040932A (en) | Authenticated encryption device, authenticated encryption method, verified decryption device, verified decryption method, encryption system, program, recording medium | |
JP6091394B2 (en) | Information processing apparatus and encryption method | |
JP4789536B2 (en) | Data division apparatus, data division method, and computer program | |
Vinay et al. | Implementation of DNA cryptography based on dynamic DNA sequence table using cloud computing | |
JP6203387B2 (en) | Encryption device, storage system, decryption device, encryption method, decryption method, encryption program, and decryption program | |
JP4692022B2 (en) | Scalar multiplication apparatus and program for elliptic curve cryptography | |
CN115834163B (en) | Method, device, equipment and storage medium for generating secret key of encrypted data | |
CN114254372B (en) | Data encryption processing method and system and electronic equipment | |
CN116841750B (en) | Edge computing device integrating encryption algorithm | |
JP2001142395A (en) | Extended key generator, ciphering/deciphering device, extended key generating method and recording medium | |
JP7261502B2 (en) | Cryptographic processing device, cryptographic processing method, and cryptographic processing program | |
WO2022270080A1 (en) | Encryption processing device, encryption processing method, and encryption processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060406 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20060406 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091020 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091116 |
|
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: 20100525 |
|
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: 20100604 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130611 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4527960 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140611 Year of fee payment: 4 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |