JP2012230276A - Encryption processing device - Google Patents

Encryption processing device Download PDF

Info

Publication number
JP2012230276A
JP2012230276A JP2011098947A JP2011098947A JP2012230276A JP 2012230276 A JP2012230276 A JP 2012230276A JP 2011098947 A JP2011098947 A JP 2011098947A JP 2011098947 A JP2011098947 A JP 2011098947A JP 2012230276 A JP2012230276 A JP 2012230276A
Authority
JP
Japan
Prior art keywords
mask
circuit
random number
number generator
output
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.)
Withdrawn
Application number
JP2011098947A
Other languages
Japanese (ja)
Inventor
Shugo Mikami
修吾 三上
Kunihiko Miyazaki
邦彦 宮崎
Masaru Watanabe
大 渡邉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2011098947A priority Critical patent/JP2012230276A/en
Publication of JP2012230276A publication Critical patent/JP2012230276A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve a side-channel attack resistance of a pseudo random number generator.SOLUTION: An encryption circuit of a pseudo random number generator has a one-round processing circuit of the pseudo random generator, a mask holding circuit, and a mask generating circuit. The encryption circuit performs calculations while masking data going through the one-round processing circuit of the pseudo random generator. Concretely, the mask holding circuit: includes a linear transformation circuit that is the same as one that the one-round processing circuit of the pseudo random generator has; operates with the circuit; and inputs output data from the mask generating circuit into the mask holding circuit itself. The mask generating circuit generates random numbers to mask data on calculation processes and results of calculation at a non-linear transformation circuit that the one-round processing circuit of the pseudo random generator has.

Description

本明細書で開示される主題は、暗号アルゴリズムをハードウェア処理する技術に関する。   The subject matter disclosed herein relates to a technique for hardware processing of cryptographic algorithms.

情報の秘匿を目的として、平文データから推測が困難な暗号文データを生成する暗号アルゴリズムが用いられる。暗号アルゴリズムには、米国標準暗号AES(Advanced Encryption Standard)や特許文献1に示す疑似乱数生成器Enocoroなどがある。   For the purpose of concealing information, an encryption algorithm for generating ciphertext data that is difficult to guess from plaintext data is used. Examples of the encryption algorithm include an American standard encryption AES (Advanced Encryption Standard) and a pseudo-random number generator Enocoro described in Patent Document 1.

暗号アルゴリズムの実装は各種の形態で実現されるが、ハードウェアを用いた暗号機能の実現に着目すると、通常、専用の暗号回路を組み込んだ暗号装置として実現される。暗号装置はICカードや携帯電話といった小型の機器にも広く利用されている。   The implementation of the encryption algorithm is realized in various forms, but when attention is paid to the realization of the encryption function using hardware, it is usually realized as an encryption device incorporating a dedicated encryption circuit. Cryptographic devices are widely used in small devices such as IC cards and mobile phones.

しかし、近年、暗号装置を攻撃対象としたサイドチャネル攻撃が発案された。サイドチャネル攻撃とは、暗号装置に入力される平文データや暗号装置から出力される暗号文データに加え、暗号装置が暗号化処理中に発生させる消費電力や漏洩電磁波、あるいは暗号化処理時間などの漏洩情報も利用して、暗号装置に組み込まれた秘密鍵などの秘密情報を特定する攻撃である。   In recent years, however, side channel attacks have been devised that target cryptographic devices. A side channel attack refers to plaintext data input to the cryptographic device and ciphertext data output from the cryptographic device, as well as power consumption, leakage electromagnetic waves generated by the cryptographic device during the encryption process, and encryption processing time. This is an attack that uses leaked information to identify secret information such as a secret key incorporated in a cryptographic device.

従来の暗号アルゴリズムに対する攻撃方法である差分解析攻撃や線形解析攻撃は、数万台のPCと数年の時間が必要である。一方で、サイドチャネル攻撃は、暗号装置とPC1台、オシロスコープなどの測定機器と数日程度の時間でよい。そのため、サイドチャネル攻撃は従来の攻撃方法と比較して、費用や時間などのコストが小さいため、強力な攻撃として知られている。   A differential analysis attack and a linear analysis attack, which are attack methods for conventional cryptographic algorithms, require tens of thousands of PCs and several years. On the other hand, the side channel attack may be performed for several days with a cryptographic device, one PC, and a measuring device such as an oscilloscope. For this reason, the side channel attack is known as a powerful attack because the cost, time, and the like are small compared to the conventional attack method.

AESを対象としたサイドチャネル攻撃対策技術としては、例えば、乱数を用いて暗号処理途中の値を隠す(マスクするという)方法が知られている(非特許文献1)。非特許文献1では、AES暗号回路の非線形変換をマスクする方法が示されている。非特許文献1で示されている方法では、乱数などの、隠すための情報(マスクデータ、または、単にマスクという)を、非線形変換を行うたびに新しくする必要がある。AESアルゴリズムは、内部状態のすべてのビットに非線形変換を適用し同じ内部状態を保持しない。従って、一度使用したマスクは保存する必要が無く、マスクは毎ラウンドですべて更新すればよい。   As a side channel attack countermeasure technique for AES, for example, a method of hiding (masking) a value during encryption processing using a random number is known (Non-Patent Document 1). Non-Patent Document 1 discloses a method for masking non-linear transformation of an AES encryption circuit. In the method disclosed in Non-Patent Document 1, it is necessary to renew information for concealment such as random numbers (mask data or simply referred to as a mask) each time nonlinear transformation is performed. The AES algorithm applies a non-linear transformation to all bits in the internal state and does not keep the same internal state. Therefore, it is not necessary to store the mask once used, and all the masks may be updated every round.

一方で、疑似乱数生成器Enocoroに着目すると、疑似乱数生成器Enocoroは、秘密鍵128ビット、初期ベクトル64ビットと定数80ビットを入力とし、所定の初期化処理を行った後、8ビットずつ疑似乱数列を出力する疑似乱数生成器である。疑似乱数生成器Enocoroは、272ビットの内部状態を備え、内部状態の一部のビットに対してのみ非線形変換を行い、他のビットは保持しつつ内部状態の撹拌を行い、内部状態の一部のビットを疑似乱数として出力する。疑似乱数生成器EnocoroはAESと同様に非線形変換を含むが、非線形変換を内部状態の一部のビットに適用し他のビットには適用しない点が異なる。   On the other hand, paying attention to the pseudo-random number generator Enocor, the pseudo-random number generator Enocoro receives a secret key 128 bits, an initial vector 64 bits and a constant 80 bits, performs a predetermined initialization process, and then performs pseudo-bits 8 bits at a time. This is a pseudo-random number generator that outputs a random number sequence. The pseudo-random number generator Enocoro has an internal state of 272 bits, performs non-linear conversion only on some bits of the internal state, stirs the internal state while holding other bits, and part of the internal state Are output as pseudo-random numbers. The pseudo-random number generator Enocoro includes nonlinear transformation as in AES, except that the nonlinear transformation is applied to some bits in the internal state and not to other bits.

特開2008-276728号公報JP 2008-276728 A

E.Trichina, “Logic Design for AES SubByte Transformation On masked Data”, [online], 2003年11月, Cryptology ePrint Archive, [2011年3月25日検索], インターネット <URL : http://eprint.iacr.org/2003/236.pdf >E. Trichina, “Logic Design for AES SubByte Transformation On masked Data”, [online], November 2003, Cryptology ePrint Archive, [searched March 25, 2011], Internet <URL: http: //eprint.iacr .org / 2003 / 236.pdf>

非特許文献1の技術を適用することで、AES暗号回路のサイドチャネル攻撃耐性の向上が見込まれる。   By applying the technique of Non-Patent Document 1, it is expected that the side channel attack resistance of the AES encryption circuit will be improved.

しかし、非特許文献1では、AESアルゴリズムへの適用を前提としており、疑似乱数生成器EnocoroのようにAESと異なるアルゴリズムに適用する手順については言及していない。   However, Non-Patent Document 1 is premised on application to the AES algorithm, and does not mention a procedure applied to an algorithm different from AES, such as the pseudorandom number generator Enocoro.

更に、AESに対するサイドチャネル攻撃対策技術は非特許文献1などで報告されているが、疑似乱数生成器Enocoroに対するサイドチャネル攻撃対策技術は知られていない。疑似乱数生成器Enocoroをより安全に利用するためにも、サイドチャネル攻撃対策が望ましい。   Furthermore, although a side channel attack countermeasure technique against AES has been reported in Non-Patent Document 1, etc., a side channel attack countermeasure technique against pseudorandom number generator Enocoro is not known. In order to use the pseudo random number generator Enocoro more safely, a countermeasure against side channel attacks is desirable.

本明細書では、上記の課題に鑑みて、上記課題を解決する構成が複数開示される。   In the present specification, in view of the above problems, a plurality of configurations for solving the above problems are disclosed.

その一例を挙げるならば、マスク生成ユニット、マスク保持ユニット、及び、ラウンド処理ユニットを用いて疑似乱数生成器Enocoro回路を構成する。ラウンド処理ユニットは、線形変換回路と非線形変換回路とを含む疑似乱数生成器Enocoroの1ラウンド分の処理回路である。マスク生成ユニットは、ラウンド処理ユニットに含まれる非線形変換回路で使用するための新たなマスクを生成する回路である。マスク保持ユニットは、ラウンド処理ユニットが含む線形変換回路と同一の線形変換回路を含み、ラウンド処理ユニットと同期して動作する。マスク保持ユニットへはマスク生成ユニットの出力値を入力し、また、マスク保持ユニットの値をラウンド処理ユニットの非線形変換回路へ出力する。   For example, a pseudo random number generator Enocoro circuit is configured by using a mask generation unit, a mask holding unit, and a round processing unit. The round processing unit is a processing circuit for one round of the pseudorandom number generator Enocor including a linear conversion circuit and a non-linear conversion circuit. The mask generation unit is a circuit that generates a new mask for use in the nonlinear conversion circuit included in the round processing unit. The mask holding unit includes the same linear conversion circuit as the linear conversion circuit included in the round processing unit, and operates in synchronization with the round processing unit. The output value of the mask generation unit is input to the mask holding unit, and the value of the mask holding unit is output to the non-linear conversion circuit of the round processing unit.

このように疑似乱数生成器Enocoro回路を構成することで、疑似乱数生成器Enocoro回路の内部状態レジスタに格納される値にマスクをかけ、非線形変換において使用する新たなマスクをマスク生成ユニットで生成しつつ、内部状態レジスタに格納される値に使用しているマスクをマスク保持ユニットで保存することができる。これらの処理によって、疑似乱数生成器Enocoro回路の内部状態をマスクし、非線形変換にもマスクを適用できるようになるため、疑似乱数生成器Enocoro回路のサイドチャネル攻撃耐性を向上させることができる。   By configuring the pseudo-random number generator Enocoro circuit in this way, the mask stored in the internal state register of the pseudo-random number generator Enocoro circuit is masked, and a new mask to be used in nonlinear conversion is generated by the mask generation unit. Meanwhile, the mask used for the value stored in the internal state register can be stored in the mask holding unit. By these processes, the internal state of the pseudo random number generator Enocoro circuit is masked, and the mask can be applied to non-linear conversion. Therefore, the side channel attack resistance of the pseudo random number generator Enocoro circuit can be improved.

開示によれば、乱数を用いてサイドチャネル攻撃耐性の向上が可能な疑似乱数生成器Enocoro回路を実現できる。   According to the disclosure, it is possible to realize a pseudo random number generator Enocoro circuit that can improve resistance to side channel attacks using random numbers.

実施例1の疑似乱数生成器Enocoro回路の構成を例示する図である。FIG. 3 is a diagram illustrating a configuration of a pseudo random number generator Enocoro circuit according to the first embodiment. 実施例1のマスク生成ユニットの構成を例示する図である。It is a figure which illustrates the structure of the mask production | generation unit of Example 1. FIG. 実施例1のマスク保持ユニットの構成を例示する図である。3 is a diagram illustrating a configuration of a mask holding unit according to Embodiment 1. FIG. 実施例1のラウンド処理ユニットの構成を例示する図である。It is a figure which illustrates the structure of the round processing unit of Example 1. FIG.

本発明の実施の形態について図面を参照して説明する。各図中の六角形は、データを示す。   Embodiments of the present invention will be described with reference to the drawings. The hexagons in each figure indicate data.

図1は、乱数を用いてサイドチャネル攻撃対策を施した、疑似乱数生成器Enocoroの回路図である。疑似乱数生成器Enocoro101は、272ビットのS入力シード102、128ビットのS出力シード103、及び、秘密鍵128ビットと初期ベクトル64ビットと定数80ビットを同順に結合した272ビットの初期値104とを入力する。疑似乱数列114は、疑似乱数生成器Enocoro101の出力データである疑似乱数列である。図示を省略するが疑似乱数生成器Enocoro101は、入力されるタイミング信号(クロック)に応じて、以下に説明する各レジスタと各処理ユニットが各々の動作を進める。   FIG. 1 is a circuit diagram of a pseudo-random number generator Enocoro that takes a countermeasure against side channel attacks using random numbers. The pseudo-random number generator Enocoro 101 includes a 272-bit S input seed 102, a 128-bit S output seed 103, and a 272-bit initial value 104 obtained by combining a secret key 128 bits, an initial vector 64 bits, and a constant 80 bits in the same order. Enter. The pseudo random number sequence 114 is a pseudo random number sequence that is output data of the pseudo random number generator Enocoro 101. Although not shown, in the pseudo-random number generator Enocoro 101, each register and each processing unit described below advance their operations in accordance with an input timing signal (clock).

セレクタ105は、疑似乱数生成器Enocoro101へS入力シード102が入力された場合はS入力シード102を選択し、それ以外の場合は272ビットのS入力マスクレジスタ入力値116を選択する。この選択結果を272ビットの中間データ115として出力する。   The selector 105 selects the S input seed 102 when the S input seed 102 is input to the pseudorandom number generator Enocoro 101, and selects the 272-bit S input mask register input value 116 otherwise. This selection result is output as intermediate data 115 of 272 bits.

セレクタ106も同様に、疑似乱数生成器Enocoro101へS出力シード103が入力された場合はS出力シード103を選択し、それ以外の場合は128ビットのS出力マスクレジスタ入力値120を選択する。この選択結果を128ビットの中間データ119として出力する。   Similarly, the selector 106 selects the S output seed 103 when the S output seed 103 is input to the pseudo random number generator Enocoro 101, and selects the 128-bit S output mask register input value 120 otherwise. The selection result is output as 128-bit intermediate data 119.

セレクタ107も同様に、疑似乱数生成器Enocoro101へS入力シード102及び初期値104が入力された場合はS入力シード102及び初期値104のXOR(排他的論理和)値を選択し、それ以外の場合は272ビットの内部状態レジスタ入力値124を選択する。この選択結果を272ビットの中間データ123として出力する。   Similarly, the selector 107 selects the XOR (exclusive OR) value of the S input seed 102 and the initial value 104 when the S input seed 102 and the initial value 104 are input to the pseudo-random number generator Enocoro 101, In this case, the 272-bit internal state register input value 124 is selected. This selection result is output as 272-bit intermediate data 123.

S入力マスクレジスタ108は、272ビットの中間データ115を入力とし、その値を保存し、更にその値を272ビットのS入力マスクレジスタ格納値126として出力する。   The S input mask register 108 receives 272-bit intermediate data 115 as input, stores the value, and outputs the value as a 272-bit S input mask register storage value 126.

S出力マスクレジスタ109は、128ビットの中間データ119を入力とし、その値を保存し、更にその値を128ビットのS出力マスクレジスタ格納値127として出力する。   The S output mask register 109 receives the 128-bit intermediate data 119, stores the value, and outputs the value as a 128-bit S output mask register storage value 127.

内部状態レジスタ110は、272ビットの中間データ123を入力とし、その値を保存し、更にその値を272ビットの内部状態レジスタ格納値128として出力する。   The internal state register 110 receives the 272-bit intermediate data 123, stores the value, and outputs the value as a 272-bit internal state register stored value 128.

マスク生成ユニット111は、128ビットのS出力マスクレジスタ格納値127を入力とし、所定のマスク生成処理を実行し、その結果を、128ビットのS出力マスクレジスタ入力値120、32ビットのS出力マスク121、及び、32ビットのS処理マスク122として出力する。   The mask generation unit 111 receives a 128-bit S output mask register stored value 127 as input, executes a predetermined mask generation process, and uses the result as a 128-bit S output mask register input value 120 and a 32-bit S output mask. 121 and 32-bit S processing masks 122 are output.

マスク保持ユニット112は、272ビットのS入力マスクレジスタ格納値126と32ビットのS出力マスク121とを入力とし、所定の線形変換を行い、その結果を、272ビットのS入力マスクレジスタ入力値116、32ビットのS入力マスク117、及び、8ビットの最終マスク118として出力する。   The mask holding unit 112 receives the 272-bit S input mask register stored value 126 and the 32-bit S output mask 121 as input, performs a predetermined linear conversion, and converts the result into a 272-bit S input mask register input value 116. , A 32-bit S input mask 117, and an 8-bit final mask 118.

ラウンド処理ユニット113は、272ビットの内部状態レジスタ格納値128と32ビットのS処理マスク122と、32ビットのS入力マスク117とを入力とし、所定の撹拌処理を行い、その結果を内部状態レジスタ入力値124、及び、8ビットの最終データ125として出力する。   The round processing unit 113 receives a 272-bit internal state register stored value 128, a 32-bit S processing mask 122, and a 32-bit S input mask 117 as inputs, performs a predetermined stirring process, and outputs the result to the internal state register. An input value 124 and 8-bit final data 125 are output.

8ビットの最終マスク118と8ビットの最終データ125との排他的論理和を計算した結果を8ビットの疑似乱数列114として出力する。尚、疑似乱数生成器Enocoro101は、S入力シード102、S出力シード103と初期値104とを入力した後、96ラウンドの初期化を行う。この初期化中は、疑似乱数列114を出力しない。   The result of calculating the exclusive OR of the 8-bit final mask 118 and the 8-bit final data 125 is output as an 8-bit pseudorandom number sequence 114. The pseudo random number generator Enocoro 101 receives the S input seed 102, the S output seed 103, and the initial value 104, and then initializes 96 rounds. During this initialization, the pseudo random number sequence 114 is not output.

また、S出力シード103、S出力マスクレジスタ109、中間データ119、S出力マスクレジスタ入力値120、S処理マスク122、及び、S出力マスクレジスタ格納値127のビット長は非線形変換の実装方法に依存するものであり、任意でよい。   The bit lengths of the S output seed 103, the S output mask register 109, the intermediate data 119, the S output mask register input value 120, the S processing mask 122, and the S output mask register stored value 127 depend on the implementation method of the nonlinear transformation. It may be optional.

次に、マスク生成ユニット111、マスク保持ユニット112、ラウンド処理ユニット113の詳細構成について説明する。   Next, detailed configurations of the mask generation unit 111, the mask holding unit 112, and the round processing unit 113 will be described.

マスク生成ユニット111の構成を図2に示す。マスク生成ユニット111の入力は128ビットのS出力マスクレジスタ格納値127である。マスク生成ユニット111の出力は128ビットのS出力マスクレジスタ入力値120、32ビットのS出力マスク121、及び、32ビットのS処理マスク122である。マスク生成ユニット111は、小乱数生成ユニット201によって128ビットの新たなマスクを生成する。この小乱数生成ユニット201は、疑似乱数生成器を用いて実現してもよいし、真性乱数の発生源を用いて実現してもよい。   The configuration of the mask generation unit 111 is shown in FIG. The input of the mask generation unit 111 is a 128-bit S output mask register stored value 127. The outputs of the mask generation unit 111 are a 128-bit S output mask register input value 120, a 32-bit S output mask 121, and a 32-bit S processing mask 122. The mask generation unit 111 generates a new 128-bit mask by the small random number generation unit 201. The small random number generation unit 201 may be realized using a pseudo-random number generator, or may be realized using a source of genuine random numbers.

小乱数生成ユニット201に用いる疑似乱数生成器の例としては、線形フィードバックシフトレジスタがある。   An example of a pseudo random number generator used for the small random number generation unit 201 is a linear feedback shift register.

小乱数生成ユニット201に真性乱数の発生源を用いる場合、入力のS出力マスクレジスタ格納値127は無くてもよい。   When a source of genuine random numbers is used for the small random number generation unit 201, the input S output mask register stored value 127 may be omitted.

小乱数生成ユニット201の出力を、S出力マスクレジスタ入力値120として出力し、更に、小乱数生成ユニット201の出力の内32ビットをS出力マスク121として出力し、同様にS処理マスク122を出力する。   The output of the small random number generation unit 201 is output as the S output mask register input value 120. Further, 32 bits of the output of the small random number generation unit 201 are output as the S output mask 121, and the S processing mask 122 is output in the same manner. To do.

マスク保持ユニット112の構成を図3に示す。マスク保持ユニット112の入力は272ビットのS入力マスクレジスタ格納値126と32ビットのS出力マスク121である。マスク保持ユニット112の出力は、272ビットのS入力マスクレジスタ入力値116、32ビットのS入力マスク117、及び、8ビットの最終マスク118である。図中、L(301)は16ビット入出力の線形変換である。   The configuration of the mask holding unit 112 is shown in FIG. The inputs of the mask holding unit 112 are a 272-bit S input mask register stored value 126 and a 32-bit S output mask 121. The outputs of the mask holding unit 112 are a 272-bit S input mask register input value 116, a 32-bit S input mask 117, and an 8-bit final mask 118. In the figure, L (301) is a 16-bit input / output linear transformation.

マスク保持ユニット112は、S入力マスクレジスタ格納値126とS出力マスク121に対して、図に示す結線に従うデータシフトを行った後、その結果をS入力マスクレジスタ入力値116、S入力マスク117、及び、最終マスク118として出力する。   The mask holding unit 112 performs a data shift according to the connection shown in the figure on the S input mask register storage value 126 and the S output mask 121, and then outputs the result as an S input mask register input value 116, an S input mask 117, And it outputs as the last mask 118.

本構成では、マスク保持ユニット112でマスクを保存しつつ、マスク保持ユニット112の出力であるS入力マスク117をラウンド処理ユニット113へ入力することを特徴としている。更に、マスク保持ユニット112の出力であるS入力マスクレジスタ値116をS入力マスクレジスタ108へ格納することで、マスク値を保持することができる。   This configuration is characterized in that the S input mask 117 that is the output of the mask holding unit 112 is input to the round processing unit 113 while the mask holding unit 112 stores the mask. Further, the mask value can be held by storing the S input mask register value 116 that is the output of the mask holding unit 112 in the S input mask register 108.

ラウンド処理ユニット113の構成を図4に示す。ラウンド処理ユニット113の入力は、272ビットの内部状態レジスタ格納値128、32ビットのS入力マスク117、及び32ビットのS処理マスク122である。ラウンド処理ユニット113の出力は、272ビットの内部状態レジスタ入力値124、及び、8ビットの最終データ125である。図中、S(401〜404)は8ビット入出力の非線形変換処理を表しており、401〜404の処理は同一である。また、図中L(405)は16ビット入出力の線形変換である。   The configuration of the round processing unit 113 is shown in FIG. The inputs of the round processing unit 113 are a 272-bit internal state register stored value 128, a 32-bit S input mask 117, and a 32-bit S processing mask 122. The output of the round processing unit 113 is a 272-bit internal state register input value 124 and an 8-bit final data 125. In the figure, S (401 to 404) represents an 8-bit input / output nonlinear conversion process, and the processes of 401 to 404 are the same. In the figure, L (405) is a 16-bit input / output linear conversion.

S(401〜404)は、いずれも、内部状態レジスタ格納値128と、その値に使用しているマスク(図中、S入力マスク117)と、Sの処理途中の値及び出力値をマスクするために用いる新たなマスク(図中、S処理マスク122)を入力とし、変換処理を行った後、マスクされた値を出力する。S(401〜404)はその変換途中で、マスクをといた値、すなわち、データとそのデータに使用しているマスクとのXOR結果が出現しないように変換を行う。例えば、データと新たなマスクとをXORした後、データに使用していたマスクとXORすることで実現可能である。   S (401 to 404) masks the internal state register stored value 128, the mask used for the value (S input mask 117 in the figure), and the value and output value during the processing of S. For this purpose, a new mask (S processing mask 122 in the figure) used for the input is input, and after the conversion processing is performed, the masked value is output. S (401 to 404) performs conversion so that the XOR result between the masked value, that is, the data and the mask used for the data does not appear during the conversion. For example, this can be realized by XORing the data and a new mask and then XORing the mask used for the data.

尚、S(401〜404)の実装方法の例としては、非特許文献1が示す技術を用いて実装してもよいし、WDDLなどの回路を二重化する技術を用いて実装してもよいし、ICカード、ROM、RAMやFPGA(Field Programmable Gate Array)を用いた表参照で実装してもよい。   In addition, as an example of the mounting method of S (401-404), you may mount using the technique which nonpatent literature 1 shows, and you may mount using the technique which duplicates circuits, such as WDDL. In addition, it may be implemented by referring to a table using an IC card, a ROM, a RAM, or an FPGA (Field Programmable Gate Array).

ラウンド処理ユニット113は、272ビットの内部状態レジスタ格納値128、32ビットのS入力マスク117、及び32ビットのS処理マスク122を入力とし、図に示す結線に従う変換処理を行った後、272ビットの内部状態レジスタ入力値124、及び、8ビットの最終データ125を出力する。尚、図示を省略するが、疑似乱数生成器Enocoro101の初期化時には、8ビットのカウンタ値と内部状態レジスタ格納値とのXORが行われる。   The round processing unit 113 receives the 272-bit internal state register stored value 128, the 32-bit S input mask 117, and the 32-bit S processing mask 122 as input, and after performing the conversion processing according to the connection shown in the figure, the round processing unit 113 is 272 bits. Internal state register input value 124 and 8-bit final data 125 are output. Although not shown, when the pseudo random number generator Enocoro 101 is initialized, XOR between the 8-bit counter value and the internal state register stored value is performed.

以上で、マスク生成ユニット111、マスク保持ユニット112、ラウンド処理ユニット113の詳細構成の説明を終える。   Above, description of the detailed structure of the mask production | generation unit 111, the mask holding unit 112, and the round processing unit 113 is finished.

図1において、S入力シード102をS入力マスクレジスタ108へ入力するビット順と、S入力シード102と初期値104とのXOR結果を内部状態レジスタ110へ入力するビット順とを同一にすると、図3、図4に示すように、マスク保持ユニット112の処理はラウンド処理ユニット113から非線形変換S(401〜404)を除いた処理と同一であるため、S入力マスクレジスタ108におけるマスクの格納箇所と、内部状態レジスタ110で使用中のマスクの格納箇所は同一にできる。   In FIG. 1, if the bit order of inputting the S input seed 102 to the S input mask register 108 and the bit order of inputting the XOR result of the S input seed 102 and the initial value 104 to the internal state register 110 are the same, 3. As shown in FIG. 4, the processing of the mask holding unit 112 is the same as the processing of the round processing unit 113 excluding the non-linear transformation S (401 to 404), and therefore the mask storage location in the S input mask register 108 The storage location of the mask being used in the internal state register 110 can be the same.

従って、内部状態レジスタ110に格納されている値が非線形変換S(例えば401)へ入力される場合は、内部状態レジスタ110における格納箇所と一致する箇所に格納されているS入力マスクレジスタ108の値を非線形変換Sに入力することで、正しくマスクを解くことが可能となる。   Therefore, when the value stored in the internal state register 110 is input to the non-linear transformation S (for example, 401), the value of the S input mask register 108 stored in a location that matches the storage location in the internal status register 110. Is input to the nonlinear transformation S, the mask can be solved correctly.

更に、ラウンド処理ユニット113で、非線形変換S(例えば401)の出力が所定の箇所へ入力されるのと同様に、非線形変換Sの出力に使用したS出力マスク121はマスク保持ユニット112において、ラウンド処理ユニット113で非線形変換Sの出力が入力されたのと同一の箇所に入力される。   Further, the S output mask 121 used for the output of the nonlinear transformation S is rounded by the mask holding unit 112 in the same manner as the output of the nonlinear transformation S (for example, 401) is inputted to a predetermined place in the round processing unit 113. The output of the non-linear transformation S is input to the same place where the output of the processing unit 113 is input.

以上のように、S入力マスクレジスタ108に格納されるマスクは、内部状態レジスタ110に格納される同マスクを用いた値と同期して保存することができる。   As described above, the mask stored in the S input mask register 108 can be saved in synchronization with the value using the mask stored in the internal state register 110.

以上、本実施例では、マスク生成ユニット111、マスク保持ユニット112、及び、ラウンド処理ユニット113を用いて疑似乱数生成器Enocoro回路101を構成した。   As described above, in this embodiment, the pseudo random number generator Enocoro circuit 101 is configured using the mask generation unit 111, the mask holding unit 112, and the round processing unit 113.

本実施例の構成では、疑似乱数生成器Enocoro回路101の内部状態レジスタ110に格納される値にマスクをかけ、非線形変換Sにおいて使用する新たなマスクをマスク生成ユニット111で生成しつつ、内部状態レジスタ110に格納される値に使用しているマスクをマスク保持ユニット112で保存することができる。これらの処理によって、疑似乱数生成器Enocoro回路101の内部状態をマスクし、非線形変換にもマスクを適用できるようになるため、疑似乱数生成器Enocoro回路101のサイドチャネル攻撃耐性を向上させることができる。   In the configuration of this embodiment, a mask is applied to the value stored in the internal state register 110 of the pseudorandom number generator Enocoro circuit 101, and a new mask used in the nonlinear transformation S is generated by the mask generation unit 111, while the internal state is generated. The mask used for the value stored in the register 110 can be stored in the mask holding unit 112. By these processes, the internal state of the pseudo random number generator Enocoro circuit 101 can be masked, and the mask can be applied to non-linear transformation. Therefore, the side channel attack resistance of the pseudo random number generator Enocoro circuit 101 can be improved. .

更に、本実施例では、AESに対するサイドチャネル攻撃対策技術をそのまま疑似乱数生成器Enocoroに適用する場合と比較して、毎ラウンドで内部状態の全ビットに新たなマスクをXORしなくてもよいため、1ラウンド当たり疑似乱数生成器Enocoroが新たに必要とするマスクのビット数を少なくできている。   Furthermore, in this embodiment, it is not necessary to XOR a new mask for all bits in the internal state every round as compared with the case where the side channel attack countermeasure technique for AES is applied to the pseudorandom number generator Enocor as it is. The number of mask bits newly required by the pseudo random number generator Enocor per round can be reduced.

更に、AESに対するサイドチャネル攻撃対策技術をそのまま疑似乱数生成器Enocoroに適用する場合と比較して、内部状態の全ビットとマスクとのXOR処理を省略できるため、疑似乱数生成器Enocoroの回路規模を小さくできている。   Furthermore, compared with the case where the side channel attack countermeasure technology for AES is applied to the pseudo random number generator Enocor as it is, the XOR process of all the bits of the internal state and the mask can be omitted, so the circuit scale of the pseudo random number generator Enocoro can be reduced. It is made small.

尚、この実施例において、ラウンド処理ユニット113は、まず新たなマスクと内部状態のすべてのビットをXORした後、現在使用しているマスクとXORを行い、その後、図4掲載のラウンド処理を実施するように構成してもよい。   In this embodiment, the round processing unit 113 first XORs the new mask and all the bits in the internal state, then performs XOR with the currently used mask, and then performs the round processing shown in FIG. You may comprise.

上記新たなマスクとは、S処理マスク122のビット幅を272ビット以上に拡張したものである。また現在使用しているマスクとは、S入力マスクレジスタ格納値126である。マスク生成ユニット111の構成は変わらないが、出力であるS処理マスク122のビット数が上記のように拡張される。マスク保持ユニット112の構成は変わらないが、入力はビット幅が拡張されたS処理マスク122のみとなり、出力のS入力マスク117はなくてもよい。   The new mask is obtained by expanding the bit width of the S processing mask 122 to 272 bits or more. The currently used mask is the S input mask register stored value 126. Although the configuration of the mask generation unit 111 is not changed, the number of bits of the S processing mask 122 as an output is expanded as described above. Although the configuration of the mask holding unit 112 is not changed, only the S processing mask 122 whose bit width is expanded is input, and the S input mask 117 for output may not be provided.

101:疑似乱数生成器Enocoro回路、105,106,107:セレクタ、108:S入力マスクレジスタ、109:S出力マスクレジスタ、110:内部状態レジスタ、111:マスク生成ユニット、112:マスク保持ユニット、113:ラウンド処理ユニット、116:S入力マスクレジスタ入力値、117:S入力マスク、118:最終マスク、120:S出力マスクレジスタ入力値、121:S出力マスク、122:S処理マスク、124:内部状態レジスタ入力値、125:最終データ、126:S入力マスクレジスタ格納値、127:S出力マスクレジスタ格納値、128:内部状態レジスタ格納値、201:小乱数生成ユニット、401、402、403、404:非線形変換S   101: Pseudorandom number generator Enocoro circuit, 105, 106, 107: Selector, 108: S input mask register, 109: S output mask register, 110: Internal state register, 111: Mask generation unit, 112: Mask holding unit, 113 : Round processing unit, 116: S input mask register input value, 117: S input mask, 118: final mask, 120: S output mask register input value, 121: S output mask, 122: S processing mask, 124: internal state Register input value, 125: final data, 126: S input mask register stored value, 127: S output mask register stored value, 128: internal state register stored value, 201: small random number generation unit, 401, 402, 403, 404: Nonlinear transformation S

Claims (8)

疑似乱数生成器Enocoroの回路であって、
線形変換回路1と第一の非線形変換回路とを含む疑似乱数生成器の1ラウンド分の処理回路と、マスク保持回路と、マスク生成回路とを含み、
前記マスク生成回路の出力は、前記疑似乱数生成器の1ラウンド分の処理回路と前記マスク保持ユニットへの入力であり、
前記マスク保持回路の出力は、前記疑似乱数生成器の1ラウンド分の処理回路への入力であり、
前記疑似乱数生成器の1ラウンド分の処理回路は、前記マスク保持ユニットが出力するマスクと前記マスク生成ユニットが出力するマスクとを入力とし、前記疑似乱数生成器の1ラウンド分の処理回路の処理対象データをマスクして変換処理を行う
ことを特徴とする暗号処理装置。
A circuit of a pseudo random number generator Enocoro,
Including a processing circuit for one round of a pseudo-random number generator including the linear conversion circuit 1 and the first nonlinear conversion circuit, a mask holding circuit, and a mask generation circuit,
The output of the mask generation circuit is an input to the processing circuit for one round of the pseudo random number generator and the mask holding unit,
The output of the mask holding circuit is an input to the processing circuit for one round of the pseudorandom number generator,
The processing circuit for one round of the pseudo-random number generator receives the mask output from the mask holding unit and the mask output from the mask generation unit as inputs, and the processing circuit for one round of the pseudo-random number generator An encryption processing apparatus that performs conversion processing while masking target data.
請求項1に記載の暗号処理装置であって、
前記マスク保持回路は、前記第1の線形変換回路と同一の第2の線形変換回路を含み、前記疑似乱数生成器の1ラウンド分の処理回路と同期して動作する
ことを特徴とする暗号処理装置。
The cryptographic processing device according to claim 1,
The mask holding circuit includes a second linear conversion circuit that is the same as the first linear conversion circuit, and operates in synchronization with a processing circuit for one round of the pseudo-random number generator. apparatus.
請求項1または2に記載の暗号処理装置であって、
前記マスク保持回路は、前記マスク生成回路の出力データを、前記マスク保持回路において前記非線形変換回路の出力箇所と一致する箇所へ入力する
ことを特徴とする暗号処理装置。
The cryptographic processing apparatus according to claim 1, wherein:
The encryption processing apparatus, wherein the mask holding circuit inputs the output data of the mask generation circuit to a location that matches the output location of the nonlinear conversion circuit in the mask holding circuit.
請求項1から3のいずれか一に記載の暗号処理装置であって、
前記マスク生成回路は、前記疑似乱数生成器の1ラウンド分の処理回路が含む非線形変換回路の計算過程のデータ、及び、計算結果をマスクする乱数を生成する
ことを特徴とする暗号処理装置。
The cryptographic processing device according to any one of claims 1 to 3,
The encryption processing apparatus, wherein the mask generation circuit generates data of a calculation process of a nonlinear conversion circuit included in a processing circuit for one round of the pseudo random number generator and a random number for masking a calculation result.
請求項1から4のいずれか一に記載の暗号処理装置であって、
前記マスク生成回路は、疑似乱数生成装置を用いてマスクを生成する
ことを特徴とする暗号処理装置。
A cryptographic processing device according to any one of claims 1 to 4,
The encryption processing apparatus, wherein the mask generation circuit generates a mask using a pseudo-random number generation apparatus.
請求項5に記載の暗号処理装置であって、
前記マスク生成回路は、真性乱数生成装置を用いてマスクを生成する
ことを特徴とする号処理装置。
The cryptographic processing device according to claim 5,
The number processing device, wherein the mask generation circuit generates a mask using a true random number generation device.
請求項1から6のいずれか一に記載の暗号処理装置であって、
前記疑似乱数生成器の1ラウンド分の処理回路が含む非線形変換回路は、前記疑似乱数生成器の1ラウンド分の処理回路のデータと、前記マスク保持回路のデータと、前記マスク生成回路が出力するマスクとを入力とし、マスクをはずすことなく、かつマスクを更新しつつ、計算を行い、マスクされた出力データを出力する
ことを特徴とする暗号処理装置。
The cryptographic processing device according to any one of claims 1 to 6,
The non-linear conversion circuit included in the processing circuit for one round of the pseudo random number generator outputs the data of the processing circuit for one round of the pseudo random number generator, the data of the mask holding circuit, and the mask generation circuit. An encryption processing apparatus, characterized in that a mask is inputted, calculation is performed without removing the mask and the mask is updated, and masked output data is output.
請求項1から7のいずれか一に記載の暗号処理装置であって、
前記疑似乱数生成器の1ラウンド分の処理回路が含む非線形変換回路は、マスクを用いて演算処理を行う
ことを特徴とする暗号処理装置。
The cryptographic processing device according to any one of claims 1 to 7,
An encryption processing apparatus, wherein a non-linear conversion circuit included in a processing circuit for one round of the pseudo-random number generator performs an arithmetic process using a mask.
JP2011098947A 2011-04-27 2011-04-27 Encryption processing device Withdrawn JP2012230276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011098947A JP2012230276A (en) 2011-04-27 2011-04-27 Encryption processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011098947A JP2012230276A (en) 2011-04-27 2011-04-27 Encryption processing device

Publications (1)

Publication Number Publication Date
JP2012230276A true JP2012230276A (en) 2012-11-22

Family

ID=47431863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011098947A Withdrawn JP2012230276A (en) 2011-04-27 2011-04-27 Encryption processing device

Country Status (1)

Country Link
JP (1) JP2012230276A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AT517983A1 (en) * 2015-11-18 2017-06-15 Siemens Ag Oesterreich Protection of a computer system against side channel attacks

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AT517983A1 (en) * 2015-11-18 2017-06-15 Siemens Ag Oesterreich Protection of a computer system against side channel attacks
AT517983B1 (en) * 2015-11-18 2018-11-15 Siemens Ag Oesterreich Protection of a computer system against side channel attacks

Similar Documents

Publication Publication Date Title
JP5911654B2 (en) Random number generator and stream cipher
JP5481455B2 (en) Cryptographic processing device
EP1873671B2 (en) A method for protecting IC Cards against power analysis attacks
CN107017981B (en) Hardware assisted fast pseudo random number generation
Kalenderi et al. Breaking the GSM A5/1 cryptography algorithm with rainbow tables and high-end FPGAS
US9871651B2 (en) Differential power analysis countermeasures
KR101783495B1 (en) Low-complexity electronic circuit protected by customized masking
CN108964872B (en) Encryption method and device based on AES
JP2013186157A (en) Encryption processing device
JP2015130580A (en) Data scrambling device, security device, security system, and data scrambling method
JP6287785B2 (en) Cryptographic processing apparatus, cryptographic processing method, and program
US9049004B2 (en) Low-power encryption apparatus and method
Das et al. Diffusion and encryption of digital image using genetic algorithm
Kadhim et al. Proposal of new keys generator for DES algorithms depending on multi techniques
JPWO2004086673A1 (en) Random number generation, encryption and decryption apparatus, method, program, and recording medium
JP6194136B2 (en) Pseudorandom number generation device and pseudorandom number generation program
JP2012230276A (en) Encryption processing device
Lin et al. Related key chosen IV attacks on Decim v2 and Decim-128
JP2010245753A (en) Encryption operation circuit device
WO2009104827A1 (en) Method and apparatus for generating key stream for stream cipher, s-box for block cipher and method for substituting input vector using the s-box
Assafli et al. The Evaluation of Time-Dependent Initialization Vector Advanced Encryption Standard Algorithm for Image Encryption
Singh et al. Design of enhanced pseudo-random sequence generator usable in GSM communication
Boey et al. How resistant are sboxes to power analysis attacks?
KR20140072283A (en) Method and apparatus of a masking countermeasure against side channel analysis
CN113886804B (en) Lightweight stream cipher generation method based on parallel cyclic shift register

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140701