JP2005149412A - Memory shuffling device, memory shuffling method and program - Google Patents
Memory shuffling device, memory shuffling method and program Download PDFInfo
- Publication number
- JP2005149412A JP2005149412A JP2003389704A JP2003389704A JP2005149412A JP 2005149412 A JP2005149412 A JP 2005149412A JP 2003389704 A JP2003389704 A JP 2003389704A JP 2003389704 A JP2003389704 A JP 2003389704A JP 2005149412 A JP2005149412 A JP 2005149412A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- address
- state
- data
- initial value
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、メモリの内容をシャッフルするメモリシャッフル装置、メモリシャッフル方法及びプログラムに関する。 The present invention relates to a memory shuffle device that shuffles the contents of a memory, a memory shuffle method, and a program.
通信内容を秘密にするために暗号化技術が使われている。暗号化には、乱数発生器を用いるものがある。乱数発生器は、次のような原理に基づいて構成されている。乱数発生器は、内部状態を記憶する記憶装置と、記憶装置の内部状態を更新する手段と、記憶装置の内部状態に基づいて乱数を出力する手段をもっている。記憶装置の内部状態の初期値が鍵となる。 Encryption technology is used to keep communication contents secret. Some encryption uses a random number generator. The random number generator is configured based on the following principle. The random number generator has a storage device that stores an internal state, a unit that updates the internal state of the storage device, and a unit that outputs a random number based on the internal state of the storage device. The initial value of the internal state of the storage device is the key.
回路規模を小さくすることができることから、LFSRによる擬似乱数発生を利用したストリーム暗号がよく使用されている。LFSRに基づく乱数発生器では、シフトレジスタが上記の内部状態記憶装置になる。しかし、LFSRに基づくストリーム暗号は安全性が低い問題がある。特に、回路の設計情報が分かると解読できてしまう問題がある。また、ソフトウェアでは速度が遅いという問題もある。 Since the circuit scale can be reduced, stream ciphers using pseudorandom number generation by LFSR are often used. In a random number generator based on LFSR, the shift register is the internal state storage device. However, the stream cipher based on LFSR has a problem of low security. In particular, there is a problem that if the circuit design information is known, it can be decoded. Another problem is that software is slow.
そこで、最近は、メモリ交換に基づくストリーム暗号が使われている。回路規模は小さくならないが、ソフトウェアでも高速にできるという特徴がある。アルゴリズムが知られることが、即、解読できることを意味しているわけではないという特徴もある。 Therefore, recently, stream cipher based on memory exchange has been used. Although the circuit scale does not become small, it has the feature that it can be performed at high speed by software. The fact that the algorithm is known does not mean that it can be decoded immediately.
メモリ交換に基づくストリーム暗号の乱数発生器は、内部状態記憶手段(メモリ上の配列)と、二つのアドレスレジスタとをもつ。1回の乱数生成では、二つのアドレスレジスタの内容を更新し、二つのアドレスレジスタから求められる第三のアドレス(例えば、二つのアドレスレジスタの和)のメモリの内容を乱数として出力し、二つのアドレスレジスタの指す番地の内容を交換する。 A stream cipher random number generator based on memory exchange has internal state storage means (an array on a memory) and two address registers. In one random number generation, the contents of the two address registers are updated, and the contents of the memory at the third address (for example, the sum of the two address registers) obtained from the two address registers are output as random numbers. Exchange the contents of the address pointed to by the address register.
バリエーションとして考えられるのは、アドレスレジスタの更新方法と、第三のアドレスを求める方法である。 Possible variations are an address register update method and a method for obtaining a third address.
上述した乱数生成自体は、鍵に依存した操作ではない。セキュリティを確保するために、鍵に依存して乱数系列が変わるように、乱数生成の前に、メモリの内容を鍵に依存してシャッフルしておく。かりにメモリをシャッフルしないでアドレスレジスタの更新を鍵に依存して行ったとすると、出力される乱数系列は鍵との相関が高いものになってしまう。 The random number generation described above is not a key-dependent operation. In order to ensure security, the contents of the memory are shuffled depending on the key before random number generation so that the random number series changes depending on the key. If the address register is updated depending on the key without shuffling the memory, the output random number sequence has a high correlation with the key.
メモリは、次のようにシャッフルする。上記の乱数生成と同じく二つのアドレスレジスタを用意する。まず、メモリをアドレスに依存した所定の値で初期化する(例えば、0番地には0を、1番地には1を、…、i番地にはiを書き込む)。そして、鍵に依存して二つのアドレスレジスタを更新し、二つのアドレスレジスタの指す番地の内容を交換する、という操作を、適当な回数繰り返す。このようにアドレスレジスタの更新を鍵に依存して行うことにより、メモリは鍵に依存してシャッフルされることになる。
The memory is shuffled as follows. As with the above random number generation, two address registers are prepared. First, the memory is initialized with a predetermined value depending on the address (for example, 0 is written at
なお、従来のシャッフルアルゴリズムは例えば非特許文献1に開示されている。
メモリ交換に基づくストリーム暗号は、最近広く世の中で使われるようになってきている。無線LANの標準であるIEEE802.11や、インターネットで安全にwebサイトにアクセスするためのSSL/TLSなどにも使用されている。高速な処理を要求するアプリケーションも増えてきており、従来のようにソフトウェアで処理するだけでなく、ハードウェアで処理されることも多くなってきている。 Stream ciphers based on memory exchange have recently been widely used in the world. It is also used for IEEE 802.11, which is a wireless LAN standard, and SSL / TLS for accessing a web site safely over the Internet. The number of applications that require high-speed processing is increasing, and not only processing by software as in the past but also processing by hardware is increasing.
メモリ交換に基づくストリーム暗号をハードウェアで実現しようとしたとき、処理時間は必要とされるクロック数つまりレイテンシで測られることになる。メモリへのアクセスは少なくとも1クロックを必要とする操作であり、メモリ交換に基づくストリーム暗号の処理速度はメモリアクセス回数に支配されているといってよい。 When stream encryption based on memory exchange is to be realized by hardware, the processing time is measured by the number of clocks required, that is, latency. Access to the memory is an operation that requires at least one clock, and it can be said that the processing speed of the stream cipher based on the memory exchange is governed by the number of memory accesses.
一回の乱数生成は高々数クロック程度で完了するため、高速に行うことができる。鍵を異なる値に交換したときは、メモリシャッフルを最初からやりなおす必要があり、これには1000クロック以上かかり、非常に時間がかかる。 Since one random number generation is completed in about several clocks at most, it can be performed at high speed. When the keys are exchanged for different values, it is necessary to restart the memory shuffle from the beginning, which takes 1000 clocks or more and takes a very long time.
このように、メモリ交換に基づくストリーム暗号は、乱数生成そのものは高速に行うことができるが、安全性を高めるために頻繁に鍵を交換しようとすると、毎回メモリシャッフルを行わなければならないのでレイテンシが増大し低速になってしまうという問題がある。 In this way, stream ciphers based on memory exchange can generate random numbers at high speed, but if you try to exchange keys frequently to increase security, you will have to perform memory shuffle every time, so latency will be reduced. There is a problem of increasing and slowing down.
本発明は、上記事情を考慮してなされたものであり、より少ないレイテンシでメモリシャッフルすることのできるメモリシャッフル装置、メモリシャッフル方法及びプログラムを提供することを目的とする。 The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a memory shuffle device, a memory shuffle method, and a program that can perform memory shuffle with less latency.
本発明は、乱数生成のもととなるデータを保持するメモリを、初期値を設定した後にシャッフルした状態にするためのメモリシャッフル装置において、前記メモリにおける第1のアドレスを保持するための第1のアドレスレジスタと、前記メモリにおける第2のアドレスを保持するための第2のアドレスレジスタと、前記メモリの各アドレスごとに、前記メモリの当該アドレスに保持されているべきデータが初期値であることを示す第1の状態又は第1の状態とは異なる第2の状態を示すフラグ情報を保持するためのフラグレジスタファイルと、前記メモリのアドレスを入力とし、前記メモリの当該アドレスに保持されるべきデータの初期値を出力とする初期値演算手段と、前記メモリの前記第1のアドレスに保持されている第1のデータと、前記メモリの前記第2のアドレスに保持されている第2のデータとを交換するための交換手段と、前記第1及び第2のアドレスレジスタに初期値を設定するとともに、前記交換の後には前記第1及び第2のアドレスレジスタに更新値を設定するための設定手段とを備え、前記交換手段は、前記交換を行うにあたって、前記第1及び第2のアドレスそれぞれにつき、前記フラグ情報を参照して、前記第1の状態か前記第2の状態かを調べ、当該アドレスに対応する前記フラグ情報が前記第1の状態である場合には、前記メモリをアクセスせずに、前記初期値演算手段によって、前記メモリの当該アドレスに保持されるデータを求め、当該アドレスに対応する前記フラグ情報が前記第2の状態である場合には、前記メモリをアクセスして、前記メモリの当該アドレスに保持されるデータを求めることを特徴とする。 The present invention provides a memory shuffle device for setting a memory for holding random number generation data in a shuffled state after setting an initial value, and a first address for holding a first address in the memory. Address register, a second address register for holding a second address in the memory, and for each address of the memory, the data to be held in the address of the memory is an initial value A flag register file for holding flag information indicating a first state indicating a second state different from the first state and an address of the memory should be input and held at the address of the memory An initial value calculating means for outputting an initial value of data; first data held at the first address of the memory; An exchange means for exchanging the second data held at the second address of the memory, an initial value is set in the first and second address registers, and after the exchange, Setting means for setting update values in the first and second address registers, and the exchange means refers to the flag information for each of the first and second addresses when performing the exchange. Whether the first state or the second state is checked. If the flag information corresponding to the address is the first state, the initial value calculation means is not accessed without accessing the memory. To obtain data held at the address of the memory, and when the flag information corresponding to the address is in the second state, the memory is accessed to And obtaining data held in the re of the address.
本発明によれば、メモリ交換に基づく乱数発生器(ストリーム暗号)の前処理として必要となるメモリシャッフルにおいて、メモリアクセスの回数を削減することができるので、メモリシャッフルに要するレイテンシを低減することができる。また、ハードウェアで実現する際に、なるべく少ない回路規模でレイテンシを節約してメモリシャッフルするメモリシャッフル装置が実現可能になる。セキュリティを高めるために鍵の変更を頻繁に行う応用に対しては高い効果が得られる。 According to the present invention, the number of memory accesses can be reduced in the memory shuffle required as pre-processing of the random number generator (stream cipher) based on the memory exchange, so that the latency required for the memory shuffle can be reduced. it can. Further, when implemented in hardware, a memory shuffle device that performs memory shuffle while saving latency with a circuit scale as small as possible can be realized. It is highly effective for applications that frequently change keys to increase security.
なお、装置に係る本発明は方法に係る発明としても成立し、方法に係る本発明は装置に係る発明としても成立する。
また、装置または方法に係る本発明は、コンピュータに当該発明に相当する手段を実行させるための(あるいはコンピュータを当該発明に相当する手段として機能させるための、あるいはコンピュータに当該発明に相当する機能を実現させるための)プログラムとしても成立し、該プログラムを記録したコンピュータ読み取り可能な記録媒体としても成立する。
The present invention relating to the apparatus is also established as an invention relating to a method, and the present invention relating to a method is also established as an invention relating to an apparatus.
Further, the present invention relating to an apparatus or a method has a function for causing a computer to execute means corresponding to the invention (or for causing a computer to function as means corresponding to the invention, or for a computer to have a function corresponding to the invention. It can also be realized as a program (for realizing the program), and can also be realized as a computer-readable recording medium on which the program is recorded.
本発明によれば、より少ないレイテンシでメモリシャッフルすることができる。 According to the present invention, memory shuffling can be performed with less latency.
以下、図面を参照しながら本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1に、本発明の一実施形態に係る乱数生成装置の構成例を示す。 FIG. 1 shows a configuration example of a random number generation device according to an embodiment of the present invention.
本乱数生成装置は、乱数生成のもととなる各データを保持するためのメモリ1、メモリ1に保持する各データの初期値を生成するための初期値生成部2、メモリ1に記憶された各データの内容が未だ更新されていない初期値の状態にあるか否かを示す情報を記憶するためのフラグレジスタファイル3、メモリ1に保持されているデータをシャッフルするためのメモリシャッフル部4、メモリ1に保持されているデータに基づいて乱数を発生するための乱数発生部5、装置全体の制御を司る制御回路(図示せず)、鍵情報等を入力したり、生成した乱数等を出力したりするための入出力部(図示せず)を備えている。なお、初期値生成部2は省いても構わない。
The random number generator is stored in a
本実施形態のメモリシャッフル部4は、図1に示されるように、外部から与えられる鍵のデータ(鍵情報)を記憶するための鍵情報記憶部41、第1のアドレスレジスタ42、第2のアドレスレジスタ43、アドレスレジスタ更新部44、メモリ交換部45を含む。なお、鍵情報を用いない場合には、鍵情報記憶部41は省いて構わない。
As shown in FIG. 1, the
なお、乱数発生部5は、公知の乱数生成装置の乱数発生部と同じもので構わない。図1には、乱数生成部5の一例を示してあり、この例では、乱数発生部5は、第1のアドレスレジスタ51、第2のアドレスレジスタ52、アドレスレジスタ更新部53、選択部54、メモリ交換部55を含む。
Note that the
また、初期値生成部2も、公知の初期値生成部の乱数発生部と同じもので構わない。
Also, the initial
本実施形態では、nはメモリ1とフラグレジスタファイル3におけるアドレス空間の最大値を示すものとする。すなわち、メモリ1とフラグレジスタファイル3は、アドレスとして0番地からn番地までを指定でき、n+1個の内容を保持できることになる。
In the present embodiment, n represents the maximum value of the address space in the
図1の乱数生成装置では、手順は、大きく次の3つのフェイズに分けられる。(1)まず、初期値生成部2が、制御回路の指示に従って、メモリ1の0番地からn番地までの各アドレスに設定する初期値を生成する。生成された各初期値は、各アドレスに設定される。(2)次に、メモリシャッフル部4が、制御回路の指示に従って、フラグレジスタファイル3とメモリ1を参照かつ書き込みながら、メモリ1のシャッフルを行う。(3)最後に、乱数発生部5が、制御回路の指示に従って、メモリ1を用いて乱数を生成する。なお、初期値生成部2を省く構成の場合には、もちろん、(1)の手順は省かれる。
In the random number generation device of FIG. 1, the procedure is roughly divided into the following three phases. (1) First, the initial
以下、上記の(2)のメモリシャッフルについて詳しく説明する。(1)と(3)は、従来の手順と同様で構わない。 Hereinafter, the memory shuffle (2) will be described in detail. (1) and (3) may be the same as the conventional procedure.
図2に、本実施形態におけるメモリシャッフルの手順の一例を示す。なお、図2では、各々のボックスが、処理単位であると同時に同クロック内で行う操作になっている。 FIG. 2 shows an example of a memory shuffle procedure in the present embodiment. In FIG. 2, each box is an operation performed within the same clock at the same time as a processing unit.
前述のように、nはアドレス空間の最大値を示している。 As described above, n indicates the maximum value of the address space.
M[i]は、メモリ1のi番地の内容である。メモリ1は、i番地を指定して内容を読み書きできる。フラグレジスタファイル3と異なり、メモリ1は、内容を読むのにも書くのにも、少なくとも1クロック以上のクロックが必要である。
M [i] is the content of address i in the
F[i]は、フラグレジスタファイル3のi番地の内容である。フラグレジスタファイル3は、アドレスを指定すると、対応する1ビットの内容を読み書きできる。フラグレジスタファイル3は、レジスタなので、クロックなしで読み出しを行える。ただし、書き込みには1クロックが必要である。
F [i] is the contents of address i of the
A1は、第1のアドレスレジスタ42の保持している内容である。A2は、第1のアドレスレジスタ43の保持している内容である。いずれも、少なくとも0からnの値を保持できる。
A1 is the content held in the
a1は、第1のアドレスレジスタ42の初期値である。a2は、第2のアドレスレジスタ43の初期値である。なお、a1とa2は、鍵に依存した値であってもよいし、依存しない値(例えば、a1=0、a2=1)であってもよい。
a1 is an initial value of the
D1は、A1が指すメモリ1の内容を読み出して保持するレジスタの内容である。D2は、A2が指すメモリ1の内容を読み出して保持するレジスタの内容である。なお、これらレジスタは、図1では、省略している。
D1 is the contents of the register that reads and holds the contents of the
以下、関数について説明する。 The function will be described below.
なお、関数は、ハードウェアで実現する場合には、組み合わせ回路により構成される。この場合、1クロック内に関数の評価が終わることが望ましいが、複数クロックかかる順序回路であってもよい。 Note that the function is configured by a combinational circuit when realized by hardware. In this case, it is desirable to evaluate the function within one clock, but a sequential circuit that takes a plurality of clocks may be used.
f(x)は、入力としてアドレスxをとり、メモリ1のx番地に対応する初期値を出力する関数である。例えば、f(x)=xでもよい。
f (x) is a function that takes an address x as an input and outputs an initial value corresponding to the address x in the
g1(x)は、入力としてアドレスレジスタA1をとり、A1の更新された値を出力する関数である。 g1 (x) is a function that takes the address register A1 as input and outputs the updated value of A1.
g2(x)は、入力としてアドレスレジスタA2をとり、A2の更新された値を出力する関数である。 g2 (x) is a function that takes the address register A2 as input and outputs the updated value of A2.
なお、g1は、鍵とA2とD2の全部又は一部に依存した関数であってもよいし、依存しない関数でもよい。また、g1は、鍵とA1とD1の全部又は一部に依存した関数であってもよいし、依存しない関数でもよい。 Note that g1 may be a function that depends on the key and all or part of A2 and D2, or may be a function that does not depend on the key. Also, g1 may be a function that depends on all or part of the key, A1, and D1, or may be a function that does not depend on it.
以下、動作について説明する。 The operation will be described below.
(ステップS1)
最初に、初期化を行う。初期化の内容は、以下の3つである。
(Step S1)
First, initialization is performed. The contents of initialization are the following three.
・フラグレジスタの内容F[0]〜F[n]をすべて0にする。ここでは、x番地の内容M[x]は、F[x]=0の場合にf(x)と同じ状態(初期値の状態)であり、F[x]=1の場合にf(x)と同じとは限らない状態(少なくとも一度は更新がなされた状態)であることを示すものとする。 • All the contents F [0] to F [n] of the flag register are set to 0. Here, the content M [x] at address x is in the same state (initial state) as f (x) when F [x] = 0, and f (x) when F [x] = 1. )) Is not necessarily the same state (at least once updated).
・アドレスレジスタA1の内容を初期値a1にする。
・アドレスレジスタA2の内容を初期値a2にする。
Set the contents of the address register A1 to the initial value a1.
Set the contents of the address register A2 to the initial value a2.
なお、a1とa2は、例えば、鍵情報記憶部41に記憶された鍵に基づいて生成される。
In addition, a1 and a2 are produced | generated based on the key memorize | stored in the key
以下の処理は、1回の繰り返しで、1回のメモリ交換を行うことができ、これを所定の回数(m回)繰り返す(ステップS10)ことによって、メモリ1をシャッフルすることができる。なお、mは、任意の定数でかまわないが、鍵に依存したものであってもよい。
The following processing can be performed once to exchange the memory, and the
(ステップS2)
まず、フラグレジスタF[A1]とF[A2]を調べる。
(Step S2)
First, the flag registers F [A1] and F [A2] are examined.
ここで、フラグレジスタF[A1]とF[A2]の内容により、処理の流れが4通りになる。 Here, there are four processing flows depending on the contents of the flag registers F [A1] and F [A2].
(第1のケース)F[A1]=0かつF[A2]=0である場合
この場合、まず、1クロック目にステップS3の3つの独立した操作を行い、次いで、2クロック目にステップS9の4つの独立した操作を行う。
(First Case) When F [A1] = 0 and F [A2] = 0 In this case, first, three independent operations of Step S3 are performed at the first clock, and then Step S9 is performed at the second clock. The four independent operations are performed.
(ステップS3)
・F[A1]=0であることから、メモリ1におけるA1で示す番地の内容は実際にメモリ1を読まなくてもM[A1]はf(A1)に等しいことが分かるので、D1にはf(A1)を書き込む。
・A1の指す番地のメモリM[A1]には、本来、メモリ1におけるA2の指す番地の内容M[A2]を書き込むのであるが、F[A2]=0であることから、実際にM[A2]は読み出さなくても、f(A2)であることが分かっているので、M[A1]にf(A2)を書き込む。
・上記のようにA1の指す番地のメモリM[A1]を書き換えるので、以降、M[A1]とf(A1)が同じであるとは限らなくなる。このことを示すために、F[A1]に1を書き込む。
(Step S3)
Since F [A1] = 0, the contents of the address indicated by A1 in the
The contents M [A2] of the address pointed to by A2 in the
Since the memory M [A1] at the address indicated by A1 is rewritten as described above, M [A1] and f (A1) are not always the same. To indicate this, 1 is written to F [A1].
これら3つの操作は独立しており、依存関係がないので、同一クロック内に行うことができる。 These three operations are independent and have no dependency, so they can be performed within the same clock.
(ステップS9)
・A2の指す番地のメモリM[A2]にD1を書き込む。
・上でA2の指す番地のメモリM[A2]を書き換えるので、以降M[A2]とf(A2)が同じであるとは限らなくなる。このことを示すために、F[A2]に1を書き込む。
・アドレスレジスタA1の内容をg1(A1)に更新する。
・アドレスレジスタA2の内容をg2(A2)に更新する。
(Step S9)
Write D1 to memory M [A2] at the address pointed to by A2.
Since the memory M [A2] at the address indicated by A2 is rewritten above, M [A2] and f (A2) are not necessarily the same. To indicate this, 1 is written to F [A2].
Update the contents of the address register A1 to g1 (A1).
Update the contents of address register A2 to g2 (A2).
なお、g1とg2は、例えば、鍵情報記憶部41に記憶された鍵に基づいて求められる。
In addition, g1 and g2 are calculated | required based on the key memorize | stored in the key
これら4つの操作は独立しており、依存関係がないので、同一クロック内に行うことができる。 Since these four operations are independent and have no dependency, they can be performed within the same clock.
なお、このステップS9は、全てのケースにおいて行われる操作である。 This step S9 is an operation performed in all cases.
この第1のケースでは、メモリ読み込み2回に必要なクロック(2クロック)を節約でき、計2クロックでメモリの交換を行うことができる。 In this first case, it is possible to save clocks (two clocks) required for reading the memory twice, and it is possible to exchange the memory with a total of two clocks.
(第2のケース)F[A1]=1かつF[A2]=0である場合
この場合、まず、1クロック目にステップS4の2つの独立した操作を行い、次いで、2クロック目のステップS8の2つの独立した操作を行い、最後に、3クロック目にステップS9の4つの独立した操作を行う。
(Second Case) When F [A1] = 1 and F [A2] = 0 In this case, first, two independent operations in step S4 are performed at the first clock, and then step S8 at the second clock. And finally, the four independent operations in step S9 are performed at the third clock.
(ステップS4)
・F[A1]=1であることから、M[A1]がf(A1)に等しいとは限らないので、実際にメモリ1を読まなければならない。すなわち、M[A1]を読み出して、これをD1に保持する。
・F[A2]=0であることから、メモリ1におけるA2で示す番地の内容M[A2]は、実際にメモリ1を読まなくてもf(A2)に等しいことが分かるので、D2にはf(A2)を書き込む。
(Step S4)
Since F [A1] = 1, M [A1] is not necessarily equal to f (A1), so the
Since F [A2] = 0, it can be seen that the content M [A2] of the address indicated by A2 in the
これら2つの操作は独立しており、依存関係がないので、同一クロック内に行うことができる。 These two operations are independent and have no dependency, so they can be performed within the same clock.
(ステップS8)
・A1の指す番地のメモリM[A1]にD2を書き込む。
・上記のようにA1の指す番地のメモリM[A1]を書き換えるので、以降、M[A1]とf(A1)が同じであるとは限らなくなる。このことを示すために、F[A1]に1を書き込む。
(Step S8)
Write D2 to memory M [A1] at the address indicated by A1.
Since the memory M [A1] at the address indicated by A1 is rewritten as described above, M [A1] and f (A1) are not always the same. To indicate this, 1 is written to F [A1].
これら2つの操作は独立しており、依存関係がないので同一クロック内に行うことができる。 These two operations are independent and can be performed within the same clock since there is no dependency.
なお、このステップS8は、第2のケース〜第4のケースにおいて行われる操作である。 This step S8 is an operation performed in the second case to the fourth case.
(ステップS9)
前述したように4つの独立した処理を行う。
(Step S9)
As described above, four independent processes are performed.
この第2のケースでは、メモリ読み込み1回に必要なクロック(1クロック)を節約でき、計3クロックでメモリの交換を行うことができる。 In this second case, a clock (one clock) required for one memory read can be saved, and the memory can be replaced with a total of three clocks.
(第3のケース)F[A1]=0かつF[A2]=1である場合
この場合、まず、1クロック目にステップS5の2つの独立した操作を行い、次いで、2クロック目のステップS8の2つの独立した操作を行い、最後に、3クロック目にステップS9の4つの独立した操作を行う。
(Third Case) When F [A1] = 0 and F [A2] = 1 In this case, first, two independent operations of Step S5 are performed at the first clock, and then Step S8 of the second clock And finally, the four independent operations in step S9 are performed at the third clock.
(ステップS5)
・F[A1]=0であることから、メモリ1におけるA1で示す番地の内容M[A1]は、実際にメモリ1を読まなくてもf(A1)に等しいことが分かるので、D1にはf(A1)を書き込む。
・F[A2]=1であることから、M[A2]がf(A2)に等しいとは限らないので、実際にメモリ1を読まなければならない。すなわち、M[A2]を読み出して、これをD2に保持する。
(Step S5)
Since F [A1] = 0, it is understood that the content M [A1] of the address indicated by A1 in the
Since F [A2] = 1, M [A2] is not necessarily equal to f (A2), so the
これらの2つの操作は独立しており、依存関係がないので、同一クロック内に行うことができる。 These two operations are independent and have no dependency, and can be performed within the same clock.
(ステップS8)
第2のケースと同様に2つの独立した処理を行う。
(Step S8)
As in the second case, two independent processes are performed.
(ステップS9)
前述したように4つの独立した処理を行う。
(Step S9)
As described above, four independent processes are performed.
この第3のケースでは、メモリ読み込み1回に必要なクロック(1クロック)を節約でき、計3クロックでメモリの交換を行うことができる。 In the third case, a clock (one clock) required for one memory read can be saved, and the memory can be exchanged with a total of three clocks.
(第4のケース)F[A1]=1かつF[A2]=1である場合
この場合、まず、1クロック目にステップS6の操作を行い、2クロック目にステップS7の操作を行い、次いで、3クロック目のステップS8の2つの独立した操作を行い、最後に、4クロック目にステップS9の4つの独立した操作を行う。
(Fourth Case) When F [A1] = 1 and F [A2] = 1 In this case, first, the operation of step S6 is performed at the first clock, the operation of step S7 is performed at the second clock, and then Two independent operations in step S8 of the third clock are performed, and finally, four independent operations in step S9 are performed in the fourth clock.
なお、ステップS6とステップS7とを逆の順番で行っても構わない。 Note that step S6 and step S7 may be performed in the reverse order.
(ステップS6)
F[A1]=1であることから、M[A1]とf(A1)が同じであるとは限らないので、実際にメモリ1を読まなければならない。すなわち、M[A1]を読み出して、これをD1に保持する。
(Step S6)
Since F [A1] = 1, M [A1] and f (A1) are not always the same, so the
(ステップS7)
F[A2]=1であることから、M[A2]とf(A2)が同じであるとは限らないので、実際にメモリ1を読まなければならない。すなわち、M[A2]を読み出して、これをD2に保持する。
(Step S7)
Since F [A2] = 1, M [A2] and f (A2) are not necessarily the same, so the
(ステップS8)
第2,3のケースと同様に2つの独立した処理を行う。
(Step S8)
Similar to the second and third cases, two independent processes are performed.
(ステップS9)
前述したように4つの独立した処理を行う。
(Step S9)
As described above, four independent processes are performed.
この第4のケースでは、計4クロックでメモリの交換を行うことができる。 In the fourth case, the memory can be exchanged with a total of four clocks.
なお、ステップS6の操作とステップS7の操作とは、独立していて、依存関係はないが、メモリ1に通常のメモリ装置に対しては、異なるアドレスに対する読み出しを同クロック内に行うことはできないので、2つのクロックが必要となる。ただし、メモリ1にデュアルポートメモリを使用する場合には、同クロック内で2つの異なるアドレスに対する読み出しを行うことができ、この場合には、必要となるクロック数を節約することができる。
Note that the operation of step S6 and the operation of step S7 are independent and have no dependency, but the
前述したように、1回の繰り返しで、第1のケース〜第4のケースのいずれかの処理が実行され、1回のメモリ交換を行うことができ、これをm回繰り返す(ステップS10)ことによって、メモリ1がシャッフルされる。
As described above, one of the processes from the first case to the fourth case is executed by one iteration, and one memory replacement can be performed, which is repeated m times (step S10). As a result, the
なお、初期値a1,初期値a2,関数g1,関数g2,繰り返し回数mの少なくとも一つは、鍵に依存した関数にすると、好ましい。 Note that it is preferable that at least one of the initial value a1, the initial value a2, the function g1, the function g2, and the number of repetitions m is a function depending on the key.
ところで、初期値a1,初期値a2,関数g1,関数g2,繰り返し回数mによっては、メモリの全ての番地(0〜n)が交換の対象とはならず、結果として、ある番地xに対してはメモリシャッフルの処理が完了してもF[x]=0のままである場合があり得る。 By the way, depending on the initial value a1, the initial value a2, the function g1, the function g2, and the number of repetitions m, not all addresses (0 to n) in the memory are to be exchanged. In some cases, F [x] = 0 may remain even when the memory shuffle process is completed.
初期値生成部2を省く構成においては、このように場合には、x番地のメモリM[x]の内容は一度も書き込みが行われていないので、何が書き込まれているかは不定である。従って、F[x]=0であるようなxが存在する場合には、M[x]にはf(x)を書き込んでやる必要がある。
In the configuration in which the initial
このような状況を避けるためには、A1とA2の一方又は両方がメモリの全ての番地を値としてとるようにすればよい。例えば、a1=0とし、g1(x)=x+1とし、繰り返し回数をn+1回とすることでA1は0〜nの値をとることが保証される。 In order to avoid such a situation, one or both of A1 and A2 may take all addresses of the memory as values. For example, if a1 = 0, g1 (x) = x + 1, and the number of repetitions is n + 1, it is guaranteed that A1 takes a value from 0 to n.
また、上記の例では、ある番地xについて、F[x]=0は、M[x]とf(x)が一致していることを意味し、F[x]=1は、M[x]とf(x)が一致しているとは限らないことを意味するものとした。しかし、場合によっては、初期状態以外であっても、M[x]にf(x)が書き込まれることもあり得る。そこで、M[x]とf(x)とを比較して、M[x]=f(x)であればF[x]に0を、そうでなければ1を書き込むようにしてもよい(この場合、ある番地xについて、F[x]=0は、M[x]とf(x)が一致していることを意味し、F[x]=1は、M[x]とf(x)が一致していないことを意味することになる)。これによって、レイテンシをより少なくすることができる。 In the above example, for a certain address x, F [x] = 0 means that M [x] and f (x) match, and F [x] = 1 means that M [x ] And f (x) are not necessarily the same. However, in some cases, f (x) may be written to M [x] even in a state other than the initial state. Therefore, M [x] and f (x) are compared, and if M [x] = f (x), 0 may be written in F [x], otherwise 1 may be written ( In this case, for a certain address x, F [x] = 0 means that M [x] and f (x) match, and F [x] = 1 means that M [x] and f (x x) will not match). Thereby, the latency can be further reduced.
図3に、図2の動作を行うシャッフル部4をハードウェアで実現した場合の構成例を示す。
FIG. 3 shows a configuration example when the
2つのアドレスレジスタA1とA2は、それぞれ、関数g1とg2によって更新される。 The two address registers A1 and A2 are updated by functions g1 and g2, respectively.
データレジスタD1には、f(A1)またはメモリからの入力Moutをセレクタs1で切り替えた入力が書き込まれる。データレジスタD2には、f(A2)またはメモリからの入力Moutをセレクタs2で切り替えた入力が書き込まれる。 In the data register D1, f (A1) or an input obtained by switching the input Mout from the memory by the selector s1 is written. In the data register D2, f (A2) or an input obtained by switching the input Mout from the memory by the selector s2 is written.
メモリへの書き込みMinへは、D1またはD2をセレクタs4で切り替えた内容が出力される。 The contents of switching D1 or D2 by the selector s4 are output to the write Min in the memory.
メモリのアドレス入力Ainへは、A1またはA2をセレクタs3で切り替えた内容が出力される。 The contents obtained by switching A1 or A2 by the selector s3 are output to the address input Ain of the memory.
アドレスレジスタA1とA2の内容は、それぞれ、フラグレジスタファイルfへ出力される。 The contents of the address registers A1 and A2 are each output to the flag register file f.
各セレクタは、制御部(図示せず)によって、切り替えられる。 Each selector is switched by a control unit (not shown).
次に、乱数発生部5について簡単に説明する。
Next, the
乱数発生部5は、メモリシャッフルされたメモリ1の内容をランダムに読み出して、これを乱数として出力するものである。乱数発生部5は、公知のもので構わない。
The
図1に例示した構成の場合には、例えば、まず、第1のアドレスレジスタ51と第2のアドレスレジスタ52の内容iとjに初期値を設定し、選択部54は、それらを加算した値i+jを番地とするメモリの内容を読み出して、これを乱数値とする。メモリ交換部55は、メモリのうち、i番地とj番地の内容を入れ替える。そして、アドレスレジスタ更新部53は、第1のアドレスレジスタ51と第2のアドレスレジスタ52の内容を更新する。選択部54は、それらを加算した値i+jを番地とするメモリの内容を読み出して、これを次の乱数値とする。メモリ交換部55は、メモリのうち、i番地とj番地の内容を入れ替える。これを必要なだけ繰り返し行う。
In the case of the configuration illustrated in FIG. 1, for example, first, initial values are set in the contents i and j of the first address register 51 and the second address register 52, and the
次に、図4に、本実施形態におけるメモリシャッフルの手順の他の例を示す。 Next, FIG. 4 shows another example of the memory shuffle procedure in the present embodiment.
本例は、関数g2が、(A1が指すメモリ1の内容を読み出して保持する)レジスタD1の保持している内容に依存する場合の例を示している。
This example shows an example in which the function g2 depends on the contents held in the register D1 (reads out and holds the contents of the
本例は、例えば、無線LANの標準IEEE802.11で使用されているストリーム暗号に適用可能である。ここでは、メモリの各番地には8ビット(0〜255)の数値を格納でき、アドレスの最大値nは255である場合を例にとって説明する。 This example is applicable to, for example, stream ciphers used in wireless LAN standard IEEE 802.11. Here, an example will be described in which an 8-bit (0 to 255) numerical value can be stored in each address of the memory and the maximum address value n is 255.
本例では、アドレスレジスタA2の内容は、レジスタD1の内容が決まるまでは決定できないため、A2の内容をg2によって更新する操作の部分が図2の処理手順とは異なっている。 In this example, the contents of the address register A2 cannot be determined until the contents of the register D1 are determined. Therefore, the operation part for updating the contents of A2 with g2 is different from the processing procedure of FIG.
ここで、各定数と各関数の一例を以下に示す。 Here, an example of each constant and each function is shown below.
n=255
a1=0
a2=1
f(x)=x
g1(A1)=A1+1
g2(A2,D1,k)=(A2+D1+k) mod 256
ただし、kは、(鍵情報記憶部41に記憶されている)鍵系列の入力であり、A1に依存している。keyを鍵のバイト配列(key[0],key[1],key[2],key[3],…)、keylenを鍵のバイト長とすると、kは次のように定義される。k=key[A1 mod keylen]
従来技術では、M[0]〜M[255]に0〜255を書き込むための256回のメモリアクセスと、256回のメモリ交換(1回のメモリ交換につき4回のメモリアクセス)を行うための1024回のメモリアクセスとの計1280回のメモリアクセスが必要であるが、本例によれば、初期値生成部2を省く構成の場合にはM[0]〜M[255]にはあらかじめ何も書き込まないので、初期値を書き込む256回のメモリアクセスを節約でき、256回のメモリ交換のうち256回のメモリ参照を節約できるので、1024−256=768回のメモリアクセスの計768回に低減されている。
n = 255
a1 = 0
a2 = 1
f (x) = x
g1 (A1) =
g2 (A2, D1, k) = (A2 + D1 + k)
However, k is an input of a key sequence (stored in the key information storage unit 41) and depends on A1. k is defined as follows, where key is a byte array of keys (key [0], key [1], key [2], key [3],...), and keylen is a byte length of the key. k = key [A1 mod keylen]
In the prior art, 256 memory accesses for writing 0 to 255 in M [0] to M [255] and 256 memory exchanges (4 memory accesses per memory exchange) are performed. A total of 1280 memory accesses is required, including 1024 memory accesses. According to this example, in the configuration in which the initial
なお、以上では、メモリがシングルポートの場合について説明したが、デュアルポートである場合も同様の構成をとることができ、レイテンシを削減することができる。 Although the case where the memory is a single port has been described above, the same configuration can be adopted when the memory is a dual port, and the latency can be reduced.
また、アドレスの更新関数は、一般的に鍵に依存した関数であるが、ここでは陽には示さなかった。これは、鍵に依存する関数であれば、任意の関数にすることが可能なためである。 The address update function is generally a key-dependent function, but is not explicitly shown here. This is because any function depending on the key can be used.
なお、以上の各機能は、ソフトウェアとして記述し適当な機構をもったコンピュータに処理させても実現可能である。
また、本実施形態は、コンピュータに所定の手段を実行させるための、あるいはコンピュータを所定の手段として機能させるための、あるいはコンピュータに所定の機能を実現させるためのプログラムとして実施することもできる。加えて該プログラムを記録したコンピュータ読取り可能な記録媒体として実施することもできる。
Each of the above functions can be realized even if it is described as software and processed by a computer having an appropriate mechanism.
The present embodiment can also be implemented as a program for causing a computer to execute predetermined means, causing a computer to function as predetermined means, or causing a computer to realize predetermined functions. In addition, the present invention can be implemented as a computer-readable recording medium that records the program.
なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。 Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
1…メモリ、2…初期値生成部、3…フラグレジスタファイル、4…メモリシャッフル部、5…乱数発生部、41…鍵情報記憶部、42,43,51,52…アドレスレジスタ、44,53…アドレスレジスタ更新部、45,55…メモリ交換部、54…選択部
DESCRIPTION OF
Claims (14)
前記メモリにおける第1のアドレスを保持するための第1のアドレスレジスタと、
前記メモリにおける第2のアドレスを保持するための第2のアドレスレジスタと、
前記メモリの各アドレスごとに、前記メモリの当該アドレスに保持されているべきデータが初期値であることを示す第1の状態又は第1の状態とは異なる第2の状態を示すフラグ情報を保持するためのフラグレジスタファイルと、
前記メモリのアドレスを入力とし、前記メモリの当該アドレスに保持されるべきデータの初期値を出力とする初期値演算手段と、
前記メモリの前記第1のアドレスに保持されている第1のデータと、前記メモリの前記第2のアドレスに保持されている第2のデータとを交換するための交換手段と、
前記第1及び第2のアドレスレジスタに初期値を設定するとともに、前記交換の後には前記第1及び第2のアドレスレジスタに更新値を設定するための設定手段とを備え、
前記交換手段は、前記交換を行うにあたって、前記第1及び第2のアドレスそれぞれにつき、前記フラグ情報を参照して、前記第1の状態か前記第2の状態かを調べ、当該アドレスに対応する前記フラグ情報が前記第1の状態である場合には、前記メモリをアクセスせずに、前記初期値演算手段によって、前記メモリの当該アドレスに保持されるデータを求め、当該アドレスに対応する前記フラグ情報が前記第2の状態である場合には、前記メモリをアクセスして、前記メモリの当該アドレスに保持されるデータを求めることを特徴とするメモリシャッフル装置。 In the memory shuffle device for setting the initial value to the memory holding the data that is the basis for random number generation,
A first address register for holding a first address in the memory;
A second address register for holding a second address in the memory;
For each address of the memory, flag information indicating a first state indicating that data to be stored in the address of the memory is an initial value or a second state different from the first state is stored Flag register file to
Initial value calculation means for inputting an address of the memory and outputting an initial value of data to be held at the address of the memory;
Exchanging means for exchanging the first data held at the first address of the memory and the second data held at the second address of the memory;
Setting initial values in the first and second address registers, and setting means for setting updated values in the first and second address registers after the exchange,
In performing the exchange, the exchange means refers to the flag information for each of the first and second addresses to check whether the state is the first state or the second state, and corresponds to the address. If the flag information is in the first state, the initial value calculation means obtains data held at the address of the memory without accessing the memory, and the flag corresponding to the address When the information is in the second state, the memory is shuffled by accessing the memory and obtaining data held at the address of the memory.
前記交換手段は、前記交換を行うにあたって、前記メモリの或るアドレスに対応する前記フラグ情報が前記第1の状態であったために、前記メモリをアクセスせずに、前記初期値演算手段によって、前記メモリの当該アドレスに保持されるデータを求めた場合には、当該アドレスに対応する前記フラグ情報を前記第2の状態に設定することを特徴とする請求項1に記載のメモリシャッフル装置。 The second state indicated by the flag information corresponding to each address of the memory indicates that the data to be held at the address of the memory may not be an initial value.
The exchange means performs the exchange, because the flag information corresponding to a certain address of the memory is in the first state, so that the initial value calculation means does not access the memory, and the initial value calculation means 2. The memory shuffler according to claim 1, wherein when the data held at the address of the memory is obtained, the flag information corresponding to the address is set to the second state.
前記交換手段は、前記交換を行うにあたって、前記メモリの或るアドレスに、前記メモリの他のアドレスに保持されていたデータを書き込む場合に、該データが、該或るアドレスに保持されるべき初期値に等しいときは、当該アドレスに対応する前記フラグ情報を前記第1の情報に設定し、等しくないときは、前記第2の情報に設定することを特徴とする請求項1に記載のメモリシャッフル装置。 The second state indicated by the flag information corresponding to each address of the memory indicates that the data to be held at the address of the memory is not an initial value,
The exchange means, when performing the exchange, when writing data held at another address of the memory to a certain address of the memory, the data is initially stored at the certain address. 2. The memory shuffle according to claim 1, wherein when the value is equal to the value, the flag information corresponding to the address is set as the first information, and when the value is not equal, the flag information is set as the second information. apparatus.
入力した鍵情報を記憶する手段とを更に備え、
前記設定手段は、前記第1又は第2のアドレスレジスタの少なくとも一方につき、前記更新値を求める方法として、前記鍵情報に依存した方法を用いることを特徴とする請求項1に記載のメモリシャッフル装置。 Means for entering key information;
Means for storing the inputted key information,
2. The memory shuffle device according to claim 1, wherein the setting unit uses a method depending on the key information as a method of obtaining the update value for at least one of the first or second address registers. .
前記メモリにアクセスして又は前記初期値演算手段によって求めた前記第1のデータを保持する第1のデータレジスタと、前記メモリにアクセスして又は前記初期値演算手段によって求めた前記第2のデータを保持する第2のデータレジスタとを含み、
前記交換にあたっては、前記第1及び第2のアドレスそれぞれにつき、前記フラグ情報を参照して、前記第1の状態か前記第2の状態かを調べ、前記第1のアドレスに対応する前記フラグ情報と前記第2のアドレスに対応する前記フラグ情報との両方が前記第1の状態である場合以外の場合には、前記第1のデータレジスタに一旦保持した第1のデータを、前記メモリの前記第2のアドレスに書き込み、前記第2のデータレジスタに一旦保持した第2のデータを、前記メモリの前記第1のアドレスに書き込むことを特徴とする請求項1に記載のメモリシャッフル装置。 The exchange means is
A first data register for holding the first data obtained by accessing the memory or by the initial value computing means; and the second data obtained by accessing the memory or obtained by the initial value computing means A second data register for holding
In the exchange, the flag information is checked for each of the first and second addresses with reference to the flag information, and the flag information corresponding to the first address is checked. And the flag information corresponding to the second address are in cases other than the case where the first state is the first state, the first data once held in the first data register is stored in the memory. 2. The memory shuffler according to claim 1, wherein the second data written to the second address and temporarily held in the second data register is written to the first address of the memory.
第1のアドレスレジスタにより指定される前記メモリの前記第1のアドレスに保持されている第1のデータと、第2のアドレスレジスタにより指定される前記メモリの前記第2のアドレスに保持されている第2のデータとを交換するための交換ステップと、
前記第1及び第2のアドレスレジスタに更新値を設定するためのステップと、
前記第1及び第2のステップを予め定められた繰り返し回数だけ繰り返し実行させるためのステップとを有し、
前記交換では、前記第1及び第2のアドレスそれぞれにつき、前記メモリの各アドレスごとに前記メモリの当該アドレスに保持されているべきデータが初期値であることを示す第1の状態又は第1の状態とは異なる第2の状態を示すフラグ情報を保持するためのフラグレジスタファイルを参照して、前記第1の状態か前記第2の状態かを調べ、当該アドレスに対応する前記フラグ情報が前記第1の状態である場合には、前記メモリをアクセスせずに、前記メモリのアドレスを入力とし前記メモリの当該アドレスに保持されるべきデータの初期値を出力とする初期値演算手段によって、前記メモリの当該アドレスに保持されるデータを求め、当該アドレスに対応する前記フラグ情報が前記第2の状態である場合には、前記メモリをアクセスして、前記メモリの当該アドレスに保持されるデータを求めることを特徴とするメモリシャッフル方法。 In the memory shuffling method of the memory shuffle device for setting the memory holding the data for generating the random number to the shuffled state after setting the initial value,
First data held at the first address of the memory specified by the first address register and held at the second address of the memory specified by the second address register An exchange step for exchanging the second data;
Setting update values in the first and second address registers;
And repeatedly executing the first and second steps a predetermined number of times,
In the exchange, for each of the first and second addresses, a first state or a first state indicating that data to be held at the address of the memory is an initial value for each address of the memory A flag register file for holding flag information indicating a second state different from the state is checked to determine whether the first state or the second state, and the flag information corresponding to the address is In the first state, without accessing the memory, the initial value calculation means for inputting the address of the memory and outputting the initial value of data to be held at the address of the memory, When the data held at the address of the memory is obtained and the flag information corresponding to the address is in the second state, the memory is accessed. Memory shuffling method characterized by obtaining data held in the address of the memory.
前記プログラムは、
第1のアドレス保持手段により指定される前記メモリの前記第1のアドレスに保持されている第1のデータと、第2のアドレス保持手段により指定される前記メモリの前記第2のアドレスに保持されている第2のデータとを交換するための交換ステップと、
前記第1及び第2のアドレス保持手段に更新値を設定するためのステップと、
前記第1及び第2のステップを予め定められた繰り返し回数だけ繰り返し実行させるためのステップとをコンピュータに実行させるとともに、
前記交換ステップでは、前記第1及び第2のアドレスそれぞれにつき、前記メモリの各アドレスごとに前記メモリの当該アドレスに保持されているべきデータが初期値であることを示す第1の状態又は第1の状態とは異なる第2の状態を示すフラグ情報を保持するためのフラグ情報保持手段を参照して、前記第1の状態か前記第2の状態かを調べ、当該アドレスに対応する前記フラグ情報が前記第1の状態である場合には、前記メモリをアクセスせずに、前記メモリのアドレスを入力とし前記メモリの当該アドレスに保持されるべきデータの初期値を出力とする初期値演算手段によって、前記メモリの当該アドレスに保持されるデータを求め、当該アドレスに対応する前記フラグ情報が前記第2の状態である場合には、前記メモリをアクセスして、前記メモリの当該アドレスに保持されるデータを求めさせるものであることを特徴とするプログラム。 In a program for causing a computer to function as a memory shuffle device for setting the initial value to a memory that holds data that is a source of random number generation,
The program is
First data held at the first address of the memory designated by the first address holding means, and held at the second address of the memory designated by the second address holding means. An exchange step for exchanging with the second data being
Setting an update value in the first and second address holding means;
And causing the computer to execute a step for repeatedly executing the first and second steps a predetermined number of times,
In the exchange step, for each of the first and second addresses, a first state or a first state indicating that data to be held at the address of the memory is an initial value for each address of the memory The flag information corresponding to the address is checked by referring to flag information holding means for holding flag information indicating a second state different from the first state, and determining whether the first state or the second state. Is the first state, without accessing the memory, by an initial value calculation means for inputting the address of the memory and outputting the initial value of data to be held at the address of the memory Obtaining data held at the address of the memory, and accessing the memory when the flag information corresponding to the address is in the second state Te, program characterized in that to let for data held in the address of the memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003389704A JP2005149412A (en) | 2003-11-19 | 2003-11-19 | Memory shuffling device, memory shuffling method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003389704A JP2005149412A (en) | 2003-11-19 | 2003-11-19 | Memory shuffling device, memory shuffling method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005149412A true JP2005149412A (en) | 2005-06-09 |
Family
ID=34696364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003389704A Pending JP2005149412A (en) | 2003-11-19 | 2003-11-19 | Memory shuffling device, memory shuffling method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005149412A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007287079A (en) * | 2006-04-20 | 2007-11-01 | Fujitsu Fip Corp | Pseudo random number generation device, pseudo random number generation method, pseudo random number generation program, ciphering device and deciphering device |
WO2008053936A1 (en) * | 2006-10-31 | 2008-05-08 | Kiyoto Yui | Pseudo-random number generation device, pseudo-random number generation program, and medium containing pseudo-random number generation program |
-
2003
- 2003-11-19 JP JP2003389704A patent/JP2005149412A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007287079A (en) * | 2006-04-20 | 2007-11-01 | Fujitsu Fip Corp | Pseudo random number generation device, pseudo random number generation method, pseudo random number generation program, ciphering device and deciphering device |
JP4709685B2 (en) * | 2006-04-20 | 2011-06-22 | 富士通エフ・アイ・ピー株式会社 | Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device |
WO2008053936A1 (en) * | 2006-10-31 | 2008-05-08 | Kiyoto Yui | Pseudo-random number generation device, pseudo-random number generation program, and medium containing pseudo-random number generation program |
US8510359B2 (en) | 2006-10-31 | 2013-08-13 | Kiyoto Yui | Pseudo-random number generation device, pseudo-random number generation program, and medium containing pseudo-random number generation program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4718455B2 (en) | Pseudorandom number generation device, pseudorandom number generation method, and pseudorandom number generation program | |
JP4740611B2 (en) | A key scheduler that selectively generates an encryption round key and a decryption round key corresponding to an initial round key having a variable key length | |
EP3839788A1 (en) | Bit-length parameterizable cipher | |
JP4574994B2 (en) | Microcomputer with external memory | |
JP2008077590A (en) | Data transfer device | |
JP2005149412A (en) | Memory shuffling device, memory shuffling method and program | |
JP4863279B2 (en) | Memory system and memory access method | |
US8510359B2 (en) | Pseudo-random number generation device, pseudo-random number generation program, and medium containing pseudo-random number generation program | |
JP4327169B2 (en) | Encryption device | |
JP2010107947A (en) | Sha-based message schedule operation method, message compression operation method and cryptographic device performing the same | |
JP2013045072A (en) | Arithmetic unit | |
JPS583040A (en) | Information processor | |
JP2008205753A (en) | Signal processor | |
KR100511684B1 (en) | The pseudo random number generator | |
JP2004354920A (en) | Storage device | |
TWI785952B (en) | Cipher accelerator and differential fault analysis method for encryption and decryption operations | |
JP5266651B2 (en) | Branch prediction apparatus and branch prediction method using local branch history | |
JP2004302647A (en) | Vector processor and address designation method for register | |
JPH0644051A (en) | Microcomputer | |
CN117692130A (en) | ZUC algorithm parallel processing method based on dual-core reconfigurable chip | |
JP4107043B2 (en) | Arithmetic processing unit | |
TWI528362B (en) | Static random access memory system and operation method thereof | |
JP2015173497A (en) | Electronic apparatus | |
JP2020173609A (en) | Vector processor device, generation method and program | |
JP2002311827A (en) | Information processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060919 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20070227 |