JP4664655B2 - Information processing apparatus and address control method thereof - Google Patents

Information processing apparatus and address control method thereof Download PDF

Info

Publication number
JP4664655B2
JP4664655B2 JP2004343648A JP2004343648A JP4664655B2 JP 4664655 B2 JP4664655 B2 JP 4664655B2 JP 2004343648 A JP2004343648 A JP 2004343648A JP 2004343648 A JP2004343648 A JP 2004343648A JP 4664655 B2 JP4664655 B2 JP 4664655B2
Authority
JP
Japan
Prior art keywords
value
address
conversion unit
program counter
processing apparatus
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 - Fee Related
Application number
JP2004343648A
Other languages
Japanese (ja)
Other versions
JP2006155140A (en
Inventor
高志 渡邊
俊夫 大河内
隆 遠藤
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2004343648A priority Critical patent/JP4664655B2/en
Publication of JP2006155140A publication Critical patent/JP2006155140A/en
Application granted granted Critical
Publication of JP4664655B2 publication Critical patent/JP4664655B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Description

本発明は、情報処理装置、および、そのアドレス制御方法に係り、情報記憶用のメモリとそのメモリへのアクセス機能を備えた情報処理装置であって、スマートカードに代表される、処理データの秘匿性が重要な耐タンパー情報処理装置に用いて好適な情報処理装置、および、そのアドレス制御方法に関する。   The present invention relates to an information processing apparatus and an address control method thereof, and relates to an information processing apparatus having an information storage memory and a function for accessing the memory, and conceals processing data represented by a smart card. The present invention relates to an information processing apparatus suitable for use in a tamper-resistant information processing apparatus where safety is important, and an address control method thereof.

近年、メモリを内蔵したマイクロプロセッサ(マイクロコンピュータ)をICカードなどに埋め込み、個人情報を利用できるようにして、生活の様々な場面で利用できるようにする情報処理装置が注目を集めている。   In recent years, information processing apparatuses that embed a microprocessor (microcomputer) with a built-in memory in an IC card or the like so that personal information can be used and can be used in various scenes of life have attracted attention.

以下、このような情報処理装置に関連する従来の技術として、CPUとメモリマネージメントユニットについて述べる。   Hereinafter, a CPU and a memory management unit will be described as conventional techniques related to such an information processing apparatus.

中央処理装置(CPU)は、命令コードに従い所定の操作をおこなう演算装置である。一般的なCPUは、論理演算・算術演算・比較演算・分岐処理から構成される命令コード群を処理することができる。命令コードはメモリに保存されており、CPUが保持しているプログラムカウンタ(PC)には、次に実行するべき命令コードが格納されているアドレスが記憶されている。一度に読み込まれる命令コードのサイズをSとすれば、PCには、一つの命令コードを処理するごとに、Sが加算される。Sは、処理の簡略化による高速化のために、一定値である場合が多い。分岐処理がおこなわれる場合には、PCには分岐先までの相対距離が加算または減算されるか、分岐先の絶対アドレスが設定される。   The central processing unit (CPU) is an arithmetic unit that performs a predetermined operation according to an instruction code. A general CPU can process an instruction code group composed of logical operation, arithmetic operation, comparison operation, and branch processing. The instruction code is stored in the memory, and an address where an instruction code to be executed next is stored is stored in a program counter (PC) held by the CPU. If the size of the instruction code read at a time is S, S is added to the PC every time one instruction code is processed. In many cases, S is a constant value for speeding up the process. When the branch process is performed, the relative distance to the branch destination is added or subtracted to the PC, or the absolute address of the branch destination is set.

CPUとメモリを備えるマイクロコンピュータの多くは、メモリマネージメントユニット(MMU)と呼ばれるコントローラーを備えている。MMUの主な機能は、アドレス変換とメモリ保護である。アドレス変換とは、CPUから与えられた論理アドレスを(メモリの実体である)物理アドレスに変換することである。メモリ保護とは、論理アドレスごとに(または、複数の論理アドレスをまとめて1ブロックとし、全論理アドレス空間をいくつかのブロックに分割した後に、各ブロックごとに)読み書きの可否を設定して、OSなどのシステムが使用する領域がユーザープログラムから侵害されないように保護することである。   Many microcomputers including a CPU and a memory include a controller called a memory management unit (MMU). The main functions of the MMU are address translation and memory protection. The address conversion is to convert a logical address given from the CPU into a physical address (which is a memory entity). Memory protection is to set read / write permission for each logical address (or for each block after grouping a plurality of logical addresses into one block and dividing the entire logical address space into several blocks) This is to protect an area used by a system such as an OS from being invaded by a user program.

なお、CPUがアクセス可能なアドレス領域は、CPUが備えるアドレス線のビット長によって決まる。32ビットCPUであれば、アドレス線のビット長も32ビットであることが多い。32ビットで表現できるアドレスの数は、(232=)約43億通りである。つまり、1アドレスにつき1バイトのデータを格納すると考えれば、32ビットCPUは4ギガバイトのメモリ空間にアクセスできる計算になる。しかし、実際に情報処理装置に搭載されているメモリの容量は、CPUが指定することのできるアドレス空間のサイズと比較して小さいことがほとんどである。例えば、現在のスマートカードのメモリ容量は、1メガバイト未満である。 The address area accessible by the CPU is determined by the bit length of the address line provided in the CPU. In the case of a 32-bit CPU, the bit length of the address line is often 32 bits. The number of addresses that can be expressed in 32 bits is (2 32 =) about 4.3 billion. In other words, if one byte of data is stored per address, the 32-bit CPU can calculate 4 gigabytes of memory space. However, the capacity of the memory actually mounted on the information processing apparatus is almost smaller than the size of the address space that can be specified by the CPU. For example, current smart card memory capacity is less than 1 megabyte.

ところで、クレジットカードなどに利用されるスマートカードは、個人情報がメモリ上に保持されるため、盗用、漏洩などがないように機密保護をすることが最重要課題となる。   By the way, in a smart card used for a credit card or the like, since personal information is held in a memory, it is the most important issue to protect confidentiality so as not to be stolen or leaked.

悪意あるアタッカーは、海賊行為(タンパー行為)によってスマートカードに保持された情報を読み取ろうとする。このようなアタッカーがスマートカードの情報を読み取る手法として消費電力解析法がある。   A malicious attacker attempts to read information held in a smart card by piracy (tampering). There is a power consumption analysis method for such an attacker to read information on a smart card.

消費電力解析法は、暗号処理をICチップ上でおこなう際の消費電力と暗号処理の途中データとの相関を利用して暗号鍵を特定する攻撃法である。より具体的に述べれば、以下の通りである。CMOSで構成されているICチップの動作時の消費電力は、CMOSスイッチのON/OFF動作数に比例している。よって、ICチップ内部で処理されているデータの論理変化分(ハミング距離)が、消費電力として観測される。暗号アルゴリズムの安全性は、「暗号への入力と出力が得られても秘密鍵がわからない」という形で保証されており、処理途中のデータから秘密鍵がわからないということに関しては保障されていない。実際に、暗号処理途中のデータがわかる場合、暗号の安全性は低下する。消費電力解析法では、暗号処理の途中の消費電力を記録して攻撃に使用する。つまり、消費電力解析法は、暗号処理途中のデータを消費電力すなわちデータのハミング距離という形で観測することで、暗号本来が備える安全性を低下させた上で攻撃をおこなう方法であると言える。   The power consumption analysis method is an attack method that specifies an encryption key by using a correlation between power consumption when performing cryptographic processing on an IC chip and data in the middle of cryptographic processing. More specifically, it is as follows. The power consumption during the operation of an IC chip composed of CMOS is proportional to the number of ON / OFF operations of the CMOS switch. Therefore, a logical change (Hamming distance) of data processed inside the IC chip is observed as power consumption. The security of the cryptographic algorithm is guaranteed in the form of “I do not know the secret key even if the input and output to the cipher are obtained”, and there is no guarantee that the secret key is not known from the data being processed. Actually, if the data during the encryption process is known, the security of the encryption is lowered. In the power consumption analysis method, power consumption during encryption processing is recorded and used for attacks. In other words, the power consumption analysis method can be said to be an attack method by observing data in the middle of encryption processing in the form of power consumption, that is, the Hamming distance of the data, thereby reducing the security inherent in the encryption.

最後に、消費電力解析の防止法に関する、従来の技術とその問題点について述べる。   Finally, the conventional technology and its problems related to the prevention method of power consumption analysis are described.

以下の特許文献1は、消費電力解析への対策方法として、記憶するデータを暗号化することによって、データバスを通過するデータと記憶データとの相関を小さくすることが有効であるとし、対策方式を開示している。この方式の特徴は、あるデータDをある物理アドレスPAに記録する場合に、いずれも物理アドレスPAを指し示す複数の異なる論理アドレスの集合L={LA'[I]: I=0,1,…,n−1}を用意し、Lのうちの一つLA'[I]を外部から予測できない方法で選択し、さらに選択したLA'[I]に依存してデータDをD'[I]に変形することである。これによって、同一の物理アドレスにデータDを記憶する場合でも、記憶データ値を外部から予測できない値に変化させることができる。   Patent Document 1 below is effective as a countermeasure against power consumption analysis by reducing the correlation between data passing through a data bus and stored data by encrypting stored data. Is disclosed. A feature of this method is that when a certain data D is recorded at a certain physical address PA, a set L = {LA ′ [I]: I = 0, 1,... , N−1}, LA ′ [I] of L is selected by a method that cannot be predicted from the outside, and data D is D ′ [I] depending on the selected LA ′ [I]. It is to be transformed into. Thus, even when data D is stored at the same physical address, the stored data value can be changed to a value that cannot be predicted from the outside.

しかしながら、この方式には、書き込みの際と読み出しの際には同一の論理アドレスLA'[I]を使用する必要があるという、制限が存在する。LA'[I]が書き込みの際と読み出しの際で同一であれば、LA'[I]と消費電流の関係を利用して、例えば「少なくとも同じデータDがどのタイミングで使用されているか」など、データDに関する情報を得ることができる。さらには、この明細書中には直接的には言及がないものの、書き込みと読み出し時で使用する論理アドレスが同一である必要があるため、書き込み時に用いた論理アドレスを、読み出し時に備えて記憶しておく必要がある。このことは、書き込み時に用いた論理アドレスを記憶するための特別なメモリを備える必要があることを意味している。スマートカードのような小型の装置では、搭載可能なメモリ容量が制限されるため、特別なメモリを必要としない対策方式が望ましい。   However, this method has a limitation that it is necessary to use the same logical address LA ′ [I] for writing and reading. If LA ′ [I] is the same at the time of writing and at the time of reading, the relationship between LA ′ [I] and the current consumption is utilized, for example, “at which timing at least the same data D is used”, etc. Information about data D can be obtained. Furthermore, although not directly mentioned in this specification, the logical address used for writing and reading needs to be the same, so the logical address used for writing is stored in preparation for reading. It is necessary to keep. This means that it is necessary to provide a special memory for storing the logical address used at the time of writing. In a small device such as a smart card, the memory capacity that can be mounted is limited. Therefore, a countermeasure method that does not require a special memory is desirable.

また、以下の特許文献2は、メモリ装置の連続するアドレスに記録されているデータを暗号処理用演算ユニット内部のレジスタに転送する際の、論理アドレス値依存の消費電力パターンを隠蔽する方法を開示している。特許文献2の段落番号0059、0060には、nは読み出すデータのサイズとするとき、各データが格納されている連続する論理アドレス群LA[I](I∈{0,…,n−1})を、オフセットLOと読み出しバイト数LDの二つで表現する技術が開示されている。例示のため、論理アドレスは16進数で表記した16ビットとし、各アドレスには1バイトのデータが格納されており、データは1バイトごとに読み出されるとする。論理アドレス0100から、16バイトを読み出す場合、一般的なマイコンでは、0100,0101,0102,…,100Fが順番に現れることになるが、特許文献2の情報処理装置では、アドレスバスに現れるデータが,読み出し開始アドレスである0100と読み出しサイズである16をあらわす0010の2つとなる。さらに、これらは事前にメモリ装置と暗号処理用演算ユニットで共有されている値でマスクされており、例えば、マスク値をF8B2であるとするならば、アドレスバスに現れるのは、読み出し開始アドレスである(0100+F8B2=)F9B2または(0100−F8B2=)084Eと、読み出しサイズである(0010+F8B2=)F8C2または(0010−F8B2=)075Eとなる。また、本来ならば16個のアドレスがアドレスバス現れるところを2つのデータの送信で情報の伝達が完了したことを隠蔽するために、残りの14個のアドレスが現れるべきタイミングで、暗号処理用演算ユニットは乱数をアドレスバスを通じて送信し、受信側であるメモリ装置はそれらを無視するように構成している。このため、アタッカーは、アドレスバスの消費電力を観察しても、乱数を観察しているに過ぎないため、どのアドレスからデータが読まれたのかを知ることができない。   Patent Document 2 below discloses a method of concealing a power consumption pattern depending on a logical address value when transferring data recorded at consecutive addresses of a memory device to a register inside a cryptographic processing arithmetic unit. is doing. In paragraph Nos. 0059 and 0060 of Patent Document 2, when n is the size of data to be read, a continuous logical address group LA [I] (Iε {0,..., N−1} in which each data is stored. ) Is expressed by two of the offset LO and the number of read bytes LD. For illustration, it is assumed that the logical address is 16 bits expressed in hexadecimal, 1 byte of data is stored in each address, and the data is read out every 1 byte. When reading 16 bytes from the logical address 0100, in a general microcomputer, 0100, 0101, 0102,..., 100F appear in order, but in the information processing apparatus of Patent Document 2, data appearing on the address bus , Which represents 0100 which is a read start address and 0010 which represents 16 which is a read size. Furthermore, these are masked in advance with values shared by the memory device and the cryptographic processing arithmetic unit. For example, if the mask value is F8B2, the address start appears at the read start address. A certain (0100 + F8B2 =) F9B2 or (0100−F8B2 =) 084E and a read size (0010 + F8B2 =) F8C2 or (0010−F8B2 =) 075E are obtained. In addition, in order to conceal that the transmission of information is completed by transmitting two data from the place where 16 addresses appear in the address bus, the computation for cryptographic processing is performed at the timing when the remaining 14 addresses should appear. The unit transmits random numbers through the address bus, and the memory device on the receiving side is configured to ignore them. For this reason, even if the attacker observes the power consumption of the address bus, it is merely observing the random number, and thus cannot know from which address the data is read.

特開2002−328844号公報JP 2002-328844 A 特開2001−195555号公報JP 2001-195555 A

上述の消費電力解析法により、アタッカーは、CPU内部が保持しているプログラムカウンタの変化系列から、プログラムの処理フローを推測することができる。   By the power consumption analysis method described above, the attacker can infer the processing flow of the program from the change sequence of the program counter held in the CPU.

以下では、その消費電力解析法によるプログラムの処理フローの解析例について説明する。   In the following, an analysis example of the processing flow of the program by the power consumption analysis method will be described.

プログラムカウンタの変化形列において、連続するプログラムカウンタ値間のハミング距離の系列に注目する。ハミング距離の系列が消費電力として観測可能であることは、先に述べたとおりである。ここで、ハミング距離は、同じ長さのビット列を有するパターンにおいて、その値が変化するビット位置の個数として定義することができる。例えば、ビット列表現で、11=(1,0,1,1)と12=(1,1,0,0)と表される場合は、第2〜第4ビット目の三つが変化しているのでハミング距離は、3となる。   Attention is paid to a series of Hamming distances between successive program counter values in the program counter variation sequence. As described above, the Hamming distance series can be observed as the power consumption. Here, the Hamming distance can be defined as the number of bit positions whose values change in a pattern having a bit string of the same length. For example, when 11 = (1, 0, 1, 1) and 12 = (1, 1, 0, 0) are expressed in the bit string representation, three of the second to fourth bits are changed. Therefore, the Hamming distance is 3.

プログラムカウンタの変化系列は、プログラムの処理フローに応じて変化する。たとえば、条件分岐命令によって、系列1もしくは系列2に分岐する場合を考える。論理アドレスは16進数で表記した16ビットとし、プログラムカウンタは2ずつ進むとする。条件分岐命令が、論理アドレス0000に設置されており、系列1は0010から系列2は001Aから開始する。このとき、処理系列1のプログラムカウンタの変化は、
0000→0010→0012→0014→0016→0018→001A→001C→001E→0020→ …
となるのに対して、処理系列2のプログラムカウンタの変化は、
0000→001A→001C→001E→0020→0022→0024→0026→0028→002A→ …
となる。
The change sequence of the program counter changes according to the processing flow of the program. For example, consider a case where a branch is made to series 1 or series 2 by a conditional branch instruction. The logical address is 16 bits expressed in hexadecimal, and the program counter is incremented by two. A conditional branch instruction is installed at the logical address 0000, and the sequence 1 starts from 0010 and the sequence 2 starts from 001A. At this time, the change of the program counter of the processing sequence 1 is
0000 → 0010 → 0012 → 0014 → 0016 → 0018 → 001A → 001C → 001E → 0020 →
On the other hand, the change in the program counter of processing sequence 2 is
0000 → 001A → 001C → 001E → 0020 → 0022 → 0024 → 0026 → 0028 → 002A →…
It becomes.

それぞれのハミング距離の系列は、系列1では、
1→1→2→1→3→1→2→1→5→ …
であるのに対して、系列2では、
3→2→1→5→1→2→1→3→1→ …
となり、明らかに消費電力の系列が異なることがわかる。このことから、アタッカーは分岐条件が成立したかどうかを知ることができる。
Each Hamming distance series is series 1,
1 → 1 → 2 → 1 → 3 → 1 → 2 → 1 → 5 →…
In contrast, in series 2,
3 → 2 → 1 → 5 → 1 → 2 → 1 → 3 → 1 →…
This clearly shows that the power consumption series are different. From this, the attacker can know whether or not the branch condition is satisfied.

この解析によって、電子商取引等で用いられるRSA暗号の解読をおこなうことができる。RSA暗号の中核となる演算は、yを演算の入力値、Nを公開鍵、xを秘密鍵とした、べき乗剰余演算yx mod Nである。攻撃者の目的は、秘密鍵xを知ることである。べき乗剰余演算の一般的な処理方法は、バイナリー法である。Len(x)でxのビット長を、x[i]でxを二進数展開したときのMSBからi+1番目の1ビットを表し、バイナリー法のアルゴリズムをC言語風に記述すると以下のように表すことができる。
V = 1;
for (i = 0; i < Len(x); i++){
V = V2 mod N;
if (x[i] == 1){ ……(*)
V = V×y mod N;
}
}
return V;
本アルゴリズムでは、(*)における条件分岐の成立・不成立が、秘密鍵xの各ビットに依存している。すなわち、条件分岐の成立・不成立が判明すれば、秘密鍵を特定することができる。本アルゴリズムでは、分岐が成立した場合にVにyを乗じる処理が行われる。この際のPC値の変化系列は明らかに分岐が不成立の場合と異なるため、上述した理由によって、秘密鍵を特定することができるのである。
By this analysis, it is possible to decrypt RSA encryption used in electronic commerce and the like. The core operation of the RSA cipher is a power-residue operation y x mod N, where y is an input value of the operation, N is a public key, and x is a secret key. The attacker's purpose is to know the secret key x. A general processing method for the power-residue operation is a binary method. Len (x) represents the bit length of x, x [i] represents the i + 1th bit from the MSB when x is binary expanded, and the binary algorithm is described in the C language style as follows: Can be expressed as
V = 1;
for (i = 0; i <Len (x); i ++) {
V = V 2 mod N;
if (x [i] == 1) {…… (*)
V = V × y mod N;
}
}
return V;
In this algorithm, the establishment / non-establishment of the conditional branch in (*) depends on each bit of the secret key x. That is, if it is found that the conditional branch is established or not, the secret key can be specified. In this algorithm, a process of multiplying V by y is performed when a branch is taken. Since the PC value change sequence at this time is clearly different from the case where the branch is not established, the secret key can be specified for the reason described above.

上述の特許文献1に開示された技術は、メモリセルへのアクセス時の論理アドレスが複数種類存在するため、メモリ内部における消費電力解析に対する対策として機能する。しかしながら、これら複数種類の論理アドレスの生成源となっている値は、CPU内部で物理アドレスと一対一に対応する値でプログラムカウンタに保持されているため、CPU内部のプログラムカウンタに対する消費電力解析への対策としては機能しない。また、特許文献2に開示された技術についても同様であり、アドレスバスにおける消費電力解析に対する対策としては機能するが、CPU内部では論理アドレスと物理アドレスがただ一通りに対応付けられて処理されているため、 CPU内部に対する消費電力解析への対策としては機能しない。   The technique disclosed in Patent Document 1 described above functions as a countermeasure against power consumption analysis in the memory because there are a plurality of types of logical addresses when accessing the memory cells. However, since the values that are the generation sources of the plurality of types of logical addresses are held in the program counter as values corresponding to the physical addresses in the CPU, the power consumption analysis for the program counter in the CPU is performed. It does not function as a countermeasure. The same is true for the technique disclosed in Patent Document 2, which functions as a countermeasure against power consumption analysis in the address bus, but in the CPU, the logical address and the physical address are simply associated with each other and processed. Therefore, it does not function as a measure for power consumption analysis inside the CPU.

本発明は、上記問題点を解決するためになされたもので、その目的は、ICチップの中でも特にアドレスバスおよびCPU内部のプログラムカウンタおよびその関連するレジスタ等における消費電力を解析することによる内部データの推定や特定をおこなう試みを困難にすることによって、安全性の高い情報処理装置およびそのアドレス制御方法を提供することにある。   The present invention has been made in order to solve the above-mentioned problems, and the object thereof is internal data obtained by analyzing power consumption in an address bus, a program counter in the CPU, and related registers, among other IC chips. It is an object of the present invention to provide a highly secure information processing apparatus and an address control method thereof by making it difficult to estimate or specify the information.

本発明の情報処理装置は、プログラムカウンタの更新に用いられるアドレス変位値を格納するレジスタの値dを任意の値αによってマスクする。このマスクしたアドレス変位値に従って、プログラムカウンタの値を順次更新する。また、本発明の情報処理装置は、アドレスを受信する側、すなわち記憶装置側にアドレス逆変換装置を備えており、マスクされたアドレスを逆変換することで、対応するアドレスを得て、CPUがそのアドレスによりメモリセルへのアクセスをおこなう。なお、ここで「マスク」とは、アタッカーが予測できない値を用いて、保護対象の値を予測不可能な値に変換することを意味する。   The information processing apparatus of the present invention masks the value d of the register storing the address displacement value used for updating the program counter with an arbitrary value α. The value of the program counter is sequentially updated according to the masked address displacement value. In addition, the information processing apparatus of the present invention includes an address reverse conversion device on the address receiving side, that is, the storage device side. By inversely converting the masked address, a corresponding address is obtained, and the CPU The memory cell is accessed by the address. Here, “mask” means that a value to be protected is converted to an unpredictable value using a value that cannot be predicted by an attacker.

このようにすれば、CPUが使用するプログラムカウンタの値が、外部から予測できない値αによってマスクされているため、CPUの内部やアドレスバスにおいて、プログラムカウンタの変化系列に依存した消費電力を解析したとしても、プログラムの処理フローやメモリアクセスに関する、有用な情報を得ることができない。   In this way, since the value of the program counter used by the CPU is masked by a value α that cannot be predicted from the outside, the power consumption depending on the change sequence of the program counter is analyzed inside the CPU and the address bus. However, useful information regarding the program processing flow and memory access cannot be obtained.

なお、アドレス変位値とは、以下の値のことを意味している。マイコン内部でプログラム処理が進行する場合、命令コードのサイズ分だけメモリ装置からデータを読み出し、次の命令コード実行に備える処理がおこなわれる。このときの読み出しデータのサイズとしては、一般的に2バイトないし4バイトといった固定値が用いられる。この固定値のことを、ここでは、アドレス変位値と呼ぶ。アドレス変位値は、多くの場合一通りに設定されているが、必ずしも一通りである必要は無く、先行する命令コードに依存して、多様な値を取る場合がある。ただし、これら複数種類のアドレス変位値すべてについてマスクされたアドレス変位値を持つように構成すれば同様の効果を得ることができるため、ここでは、アドレス変位値として、ただひとつの固定値を用いる場合について述べる。   The address displacement value means the following value. When the program process proceeds inside the microcomputer, data is read from the memory device by the size of the instruction code, and a process for preparing the next instruction code is performed. In general, a fixed value such as 2 bytes to 4 bytes is used as the size of the read data at this time. This fixed value is called an address displacement value here. In many cases, the address displacement value is set in a single manner, but it is not necessarily required to be in a single manner, and may take various values depending on the preceding instruction code. However, since it is possible to obtain the same effect if it is configured to have masked address displacement values for all of these multiple types of address displacement values, here, only one fixed value is used as the address displacement value. Is described.

マスク処理は、任意の値αとの排他的論理和や加減算、乗算などの算術演算、αをパラメータとする順列やαを鍵として用いる暗号化処理である場合などがある。   The mask processing may be an arithmetic operation such as exclusive OR, addition / subtraction, or multiplication with an arbitrary value α, a permutation using α as a parameter, or encryption processing using α as a key.

さらに、αとして用いる値は、事前に定義した値の系列を任意の順番で使用する場合や、物理的な機構による真正乱数生成器あるいはソフトウェアにより実現される擬似乱数生成器の出力を用いる場合も想定される。   Furthermore, the value used as α may be a case where a pre-defined series of values is used in an arbitrary order, or an output of a true random number generator based on a physical mechanism or a pseudo random number generator realized by software. is assumed.

本発明によれば、ICチップの中でも特にアドレスバスおよびCPU内部のプログラムカウンタおよびその関連するレジスタ等における消費電力を解析することによる内部データの推定や特定をおこなう試みを困難にすることによって、安全性の高い情報処理装置およびそのアドレス制御方法を提供することができる。   According to the present invention, it is possible to make an attempt to estimate and specify internal data by analyzing power consumption in an address bus, a program counter in the CPU, and a related register in the IC chip, in particular, A highly functional information processing apparatus and its address control method can be provided.

〔マイクロコンピュータの構成とICカードへの実装〕
先ず、図2および図3を用いて本発明に係るマイクロコンピュータとICカードへの実装の様子について説明する。
図2は、本発明に係るマイクロコンピュータをICカードに実装した様子を示す図である。
図3は、本発明に係るマイクロコンピュータの基本構成を示す構成図である。
[Configuration of microcomputer and mounting on IC card]
First, the state of mounting on a microcomputer and an IC card according to the present invention will be described with reference to FIGS.
FIG. 2 is a diagram showing a state in which the microcomputer according to the present invention is mounted on an IC card.
FIG. 3 is a block diagram showing the basic configuration of the microcomputer according to the present invention.

本発明に係るマイクロコンピュータは、図2に示されるように、この半導体装置のチップをプラスチックカード上に実装した接触型ICカードに用いることができる。   As shown in FIG. 2, the microcomputer according to the present invention can be used for a contact type IC card in which a chip of this semiconductor device is mounted on a plastic card.

このマイクロコンピュータの本体は、カードの中央の横に配置されたCOTと呼ばれるパッケージ形態のICチップ202である。   The main body of this microcomputer is an IC chip 202 in the form of a package called COT, which is arranged next to the center of the card.

ICカード201は、図3にも図示されているように、Vcc(供給電源)、GND(グランド)、RST(リセット)、I/O(入出力)およびCLK(クロック)の端子を持ち、カード上のチップはこれらの信号を外部から、例えば、端末機から、供給されることによって稼動する。その場合に用いる端末機自体は基本的に一般のカード・システムと同じ仕様のものでよい。   As shown also in FIG. 3, the IC card 201 has terminals of Vcc (power supply), GND (ground), RST (reset), I / O (input / output) and CLK (clock). The upper chip operates by supplying these signals from the outside, for example, from a terminal. In this case, the terminal itself may basically have the same specifications as a general card system.

マイクロコンピュータは、図3に示されるように、中央処理装置CPU、記憶装置である読み出し専用メモリROM、書き換え可能不揮発性メモリEEPROMおよび書き換え可能揮発性メモリRAM、コプロセッサCPR、そして各部の情報のやりとりをおこなうための入出力ポートI/O、およびそれらを結ぶ信号線としてアドレスバス301やデータバス302などを有している。   As shown in FIG. 3, the microcomputer has a central processing unit CPU, a read-only memory ROM as a storage device, a rewritable nonvolatile memory EEPROM and a rewritable volatile memory RAM, a coprocessor CPR, and exchange of information of each part. Input / output port I / O for performing the above, and an address bus 301 and a data bus 302 as signal lines connecting them.

コプロセッサCPRは、内部に独自の記憶装置CRAMを保持することもある。中央処理装置CPUは、論理演算や算術演算などをおこなう装置であり、記憶装置は、プログラムやデータを格納する装置である。クロック生成器CLKGは、図2に示されるICチップの端子202を経由して、ICチップ外部からクロック信号の供給を受け、そのクロック信号に同期した内部システムクロック信号を生成し、CPUなどの内部装置に供給する。システムコントローラSYSCRは、CPUやバス信号などの制御をおこなう装置であり、乱数生成器RNGやタイマーTIM、セキュリティロジックSECLなどのコントロールをおこなう。   The coprocessor CPR may have its own storage device CRAM inside. The central processing unit CPU is a device that performs logical operations and arithmetic operations, and the storage device is a device that stores programs and data. The clock generator CLKG receives the supply of a clock signal from the outside of the IC chip via the terminal 202 of the IC chip shown in FIG. 2, generates an internal system clock signal synchronized with the clock signal, Supply to the device. The system controller SYSSCR is a device that controls the CPU and bus signals, and controls the random number generator RNG, timer TIM, security logic SECL, and the like.

セキュリティロジックSECLは、アタッカーからの消費電力解析をおこなわせないようにするため、アドレス情報を暗号化するための仕組みであり、これは後に詳説する。   The security logic SECL is a mechanism for encrypting address information so as not to perform power consumption analysis from an attacker, which will be described in detail later.

なお、SYSCR,CPU,TIM,SECLなどをまとめてCPUと呼ぶ場合もある。   Note that SYSSCR, CPU, TIM, SECL, etc. may be collectively referred to as a CPU.

記憶装置は、例えばROM (Read Only Memory)やRAM(Random Access Memory),EEPROM(Electrically Erasable Programmable Read Only Memory),FRAM(Ferromagnetic Random Access Memory)などを用いて構成される。ROMは、内容が固定された変更できないメモリであり、主にプログラムを格納するメモリである。RAMは自由に書き換えができるメモリであるが、電源の供給が中断されると、記憶している内容が消失する。すなわち、デバイスへの電源供給が中断されると、RAMの内容は、保持できなくなるいわゆる揮発性のメモリである。EEPROM、 FRAMは、電源の供給が中断されてもその内容を保持することができるいわゆる不揮発性メモリである。これらの組み合わせの違いは必ずしも本発明の本質とは関係しないため、図3には、すべての種類のメモリ構成について記述していない。ROMのみからなる情報処理装置や磁気記憶装置を持つ情報処理装置などについても、同様に構成することができることはもとよりである。   The storage device is configured using, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), an EEPROM (Electrically Erasable Programmable Read Only Memory), an FRAM (Ferromagnetic Random Access Memory), or the like. The ROM is a memory whose contents are fixed and cannot be changed, and is a memory mainly storing a program. The RAM is a rewritable memory, but the stored contents are lost when the supply of power is interrupted. That is, when the power supply to the device is interrupted, the contents of the RAM are so-called volatile memories that cannot be retained. EEPROM and FRAM are so-called non-volatile memories that can retain their contents even when power supply is interrupted. Since the difference between these combinations is not necessarily related to the essence of the present invention, FIG. 3 does not describe all types of memory configurations. It goes without saying that an information processing apparatus consisting of only a ROM or an information processing apparatus having a magnetic storage device can be configured in the same manner.

入出力ポートI/Oは、ICチップ内部と外部との間でデータ通信をおこなうためのポートである。アドレスバス301は、アクセス先の記憶装置のアドレスを転送するバスであり、データバス302は、当該アドレスから読み出されたデータ、あるいは、当該アドレスに書き込まれるべきデータの転送に用いられるバスである。   The input / output port I / O is a port for performing data communication between the inside and outside of the IC chip. The address bus 301 is a bus for transferring the address of the storage device to be accessed, and the data bus 302 is a bus used for transferring data read from the address or data to be written to the address. .

CPUは、プログラムカウンタPCを内部に持ち、PCが指し示すアドレスに記憶されている命令コードおよびデータを読み出して処理をおこなう。PCは通常、一定値分だけインクリメントするという方法で更新される。すなわち、PCが指し示すアドレスから命令コードを読み出した後に、一定のアドレス変位値dだけ先のアドレスを指すようにPCを更新し(|PC|=|PC|+d、ここで|PC|はPCの内部に格納される値)、引き続きPCが指し示すアドレスから命令コードを読み出すという処理を繰り返すことになる。ここで、一定のアドレス変位値とは、多くの場合、2であることが多い。これは、8ビットCPUの命令コードが1バイトのインストラクションコードと1バイトのオペランドの2バイトで構成されることが多いためである。   The CPU has a program counter PC inside, and reads and processes an instruction code and data stored at an address indicated by the PC. The PC is usually updated by a method of incrementing by a certain value. That is, after reading the instruction code from the address indicated by the PC, the PC is updated so as to indicate the previous address by a certain address displacement value d (| PC | = | PC | + d, where | PC | (Value stored in the inside), and then the process of reading the instruction code from the address indicated by the PC is repeated. Here, the constant address displacement value is often 2 in many cases. This is because an instruction code of an 8-bit CPU is often composed of 2 bytes of a 1-byte instruction code and a 1-byte operand.

〔実施形態1〕
以下、図1、図4ないし図9を用いて本発明に係る第一の実施形態について説明する。
Embodiment 1
The first embodiment according to the present invention will be described below with reference to FIGS. 1 and 4 to 9.

先ず、図1を用いて本発明に係る情報処理装置の構成について説明する。
図1は、本発明の第一の実施形態に係る情報処理装置の構成図である。
First, the configuration of the information processing apparatus according to the present invention will be described with reference to FIG.
FIG. 1 is a configuration diagram of an information processing apparatus according to the first embodiment of the present invention.

本発明の情報処理装置は、上述のように、セキュリティロジックSECL部を設け、悪意のアタッカーが情報処理装置の消費電力を解析して、情報を読み取るのを防ぐために、アドレス情報をセキュリティロジックSECL部により暗号化してメモリ側に転送し、メモリ側で復号しCPUがメモリにアクセスするためのアドレスを取り出すようにしたものである。   As described above, the information processing apparatus according to the present invention includes the security logic SECL unit, and in order to prevent a malicious attacker from analyzing the power consumption of the information processing apparatus and reading the information, the address information is converted into the security logic SECL unit. Is encrypted and transferred to the memory side, decrypted on the memory side, and an address for the CPU to access the memory is taken out.

セキュリティロジックSECL部は、アドレス変換装置ATEからなり、内部にインクリメントサイズレジスタISRを有する。   The security logic SECL unit is composed of an address translation device ATE, and has an increment size register ISR inside.

インクリメントサイズレジスタISRは、PCのインクリメントサイズdを記憶する。   The increment size register ISR stores the increment size d of the PC.

また、アドレス逆変換装置ATDが記憶装置との間にあるアドレスバス101に接続されており、ATDは、内部にアドレス逆変換用の値を記憶するレジスタATRを有している。   An address reverse conversion device ATD is connected to an address bus 101 between the address reverse conversion device ATD and a storage device, and the ATD has a register ATR for storing a value for address reverse conversion therein.

この情報処理装置では、ICチップが起動されプログラムを実行する前に、ATEで生成するマスク値αによって、ISR値dをマスクする。そして、ATEでISR値dをマスクした値によりATE内部のISRは書き換えられる。   In this information processing apparatus, before the IC chip is activated and the program is executed, the ISR value d is masked by the mask value α generated by the ATE. The ISR inside the ATE is rewritten by the value obtained by masking the ISR value d with the ATE.

そして、ATEは、マスク値αに基づき逆変換に必要な値βを生成し、ATDに送信する。その結果、ATDはβをATRに保持する。   Then, the ATE generates a value β necessary for inverse conversion based on the mask value α, and transmits it to the ATD. As a result, ATD retains β in the ATR.

以上の初期的な処理をおこなった後は、PCは通常通り、ATEにおいて、ISR値に従って順次更新される。CPUがPC値の指し示すアドレスLA'にアクセスする際は、アドレスバスを通じて転送されたLA'をATDが受け取り、ATDはATR値βを用いてLA'の逆変換をおこない、CPUがメモリにアクセスする際のアドレスに相当するLAを得る。その上で、CPUは、そのLAに対応する実際のメモリセルへのアクセスをおこなう。このアクセスが読み出し動作の場合は、読み出されたデータがデータバス302を通じてCPUに転送され、書き込み動作の場合は、書き込むべきデータがCPUからデータバスを通じて記憶装置に転送される。   After performing the above initial processing, the PC is sequentially updated in accordance with the ISR value in the ATE as usual. When the CPU accesses the address LA ′ indicated by the PC value, the ATD receives LA ′ transferred through the address bus, the ATD performs the inverse conversion of LA ′ using the ATR value β, and the CPU accesses the memory. The LA corresponding to the current address is obtained. Then, the CPU accesses the actual memory cell corresponding to the LA. When the access is a read operation, the read data is transferred to the CPU through the data bus 302, and when the access is a write operation, the data to be written is transferred from the CPU to the storage device through the data bus.

これらの処理を、より詳細に述べれば、次のようになる。ATEとCPUは、システムコントローラSYSCRから初期化信号INIを受ける。SYSCRがINIを発行するのは、ICチップの外部からリセット信号RSTを受けた場合や、CPUが命令コードとしてリセットを指示する場合などである。INIを受けたATEは、乱数生成器RNGを用いて、あるマスク値αを選び、ある関数f(x)を用いて、β=f(α)を計算する。このβがアドレスの復号化のために用いられる値である。   These processes are described in more detail as follows. The ATE and CPU receive the initialization signal INI from the system controller SYSSCR. The SYSCR issues the INI when the reset signal RST is received from the outside of the IC chip, or when the CPU instructs resetting as an instruction code. The ATE having received the INI selects a certain mask value α using the random number generator RNG, and calculates β = f (α) using a certain function f (x). This β is a value used for address decoding.

そして、インクリメントサイズレジスタISRに初期値dが保持されているとすると、その初期値dとマスク値αと演算された値により、インクリメントサイズレジスタISRを書き換える。なお、RNGは、ハードウェア機構で実現される真正乱数生成器である場合もあり、ソフトウェアにより実現される擬似乱数生成器である場合もある。ATEはこのβをATDに送り、ATDはβをATRに記憶する。   Then, assuming that the initial value d is held in the increment size register ISR, the increment size register ISR is rewritten by the calculated value of the initial value d and the mask value α. The RNG may be a true random number generator realized by a hardware mechanism, or may be a pseudo random number generator realized by software. The ATE sends this β to the ATD, and the ATD stores β in the ATR.

CPUはアクセスするメモリアドレスを格納するプログラムカウンタPCを保持しており、この間に、CPUはPCを0に初期化する。以上が初期化処理である。   The CPU holds a program counter PC that stores a memory address to be accessed. During this time, the CPU initializes the PC to zero. The above is the initialization process.

それ以降の動作は以下の通りである。CPUはATEを用いて、メモリから命令コードを読み出すごとに、|PC|'をISR分だけ増加させる。すなわち、|PC|'=|PC|'+|ISR|とする。ここで、|ISR|は、ISRの初期値dをマスク値αによりマスクした値である。また、ここでの|PC|'の記号は、PCの値をマスクした変位値により更新していったプログラムカウンタの値であることを示した。   The subsequent operation is as follows. The CPU increments | PC | 'by ISR every time the instruction code is read from the memory using ATE. That is, | PC | '= | PC |' + | ISR |. Here, | ISR | is a value obtained by masking the initial value d of ISR with the mask value α. In addition, the symbol | PC | 'here indicates that the value of the program counter is updated with a displacement value obtained by masking the PC value.

ここで、 |PC|' =LA'とすると、LA'がアドレスバスを介してメモリに送られる。メモリ側では、メモリセルにLA'が到達する前に、ATDがLA'を受け取り、ATRに保持している先の値βを用いて、CPUがメモリをアクセスする際のアドレスに相当するLA=g(LA',β)を得る。ここで、g(x,y)は、マスクを除去するための関数である。   If | PC | ′ = LA ′, LA ′ is sent to the memory via the address bus. On the memory side, before LA ′ reaches the memory cell, ATD receives LA ′ and uses the previous value β held in the ATR, and LA = corresponding to the address when the CPU accesses the memory = g (LA ′, β) is obtained. Here, g (x, y) is a function for removing the mask.

上述の一連のアドレスの処理について具体例を述べると示すと以下のようになる。   A specific example of the above-described series of address processing will be described as follows.

インクリメントサイズレジスタISRの初期値dが2であるとする。   Assume that the initial value d of the increment size register ISR is 2.

d=|ISR|=2 …(式1)
また、マスク値αを16進表記で、2B37とする。
d = | ISR | = 2 (Formula 1)
The mask value α is 2B37 in hexadecimal notation.

α=(2B37) …(式2)
最初にISRの値を更新するときには、dとαの積をとる。この値をd'とすると、
d'=|ISR|=d・α=2×(2B37) …(式3)
である。
α = (2B37) (Formula 2)
When updating the value of ISR for the first time, the product of d and α is taken. If this value is d ′,
d ′ = | ISR | = d · α = 2 × (2B37) (Formula 3)
It is.

βの計算に使用する関数f(x)を、f(x)=x−1 mod 2とする。これは、元数が2場合の有限環における乗法の逆元を求めることに対応している。ここで、nはメモリのサイズに対応する適当な整数、例えば、n=16とする。すなわち、
α・β≡1 mod 216 …(式4)
(2B37)・β≡1 mod 216
である。
A function f (x) used for calculating β is assumed to be f (x) = x −1 mod 2 n . This corresponds to obtaining an inverse element of multiplication in a finite ring when the number of elements is 2 n . Here, n is an appropriate integer corresponding to the size of the memory, for example, n = 16. That is,
α · β≡1 mod 2 16 (Formula 4)
(2B37) · β≡1 mod 2 16
It is.

ここで、元数が2場合の有限環は、αがゼロおよび2の倍数のときには逆元を持たないので、αがゼロおよび2の倍数ではないこと、すなわち奇数であることが必要になる。なお、αの生成に真正乱数生成器や擬似乱数生成器を使用する場合、αは1/2の確率で偶数となる。しかしながら、奇数のαを得るためには、αの最下位のビットを無条件に1とするように処理すればよく、ほとんど処理の負荷なくαが奇数であることを保証することができる。 Here, since the finite ring in the case where the element is 2 n does not have an inverse element when α is a multiple of zero and 2, it is necessary that α is not a multiple of zero and 2, that is, an odd number. . When a true random number generator or a pseudo random number generator is used for generating α, α is an even number with a probability of 1/2. However, in order to obtain an odd number α, it is sufficient to process the least significant bit of α unconditionally, and it is possible to guarantee that α is an odd number with little processing load.

プログラムカウンタの値は、最初は0なので、マスクされたアドレス変位値の整数倍となる。したがって、 kを整数として、以下の(式5)が成り立つ
LA'=k・d'= k・2α …(式5)
この式5に式4のβをかけると、
LA=LA' ・β=k・d'・β= k・2α・β …(式6)
≡ 2k mod 2
として、LAを求めることができる。
Since the value of the program counter is initially 0, it is an integer multiple of the masked address displacement value. Therefore, the following (Equation 5) holds, where k is an integer.
LA ′ = k · d ′ = k · 2α (Formula 5)
Multiplying Equation 5 by β in Equation 4,
LA = LA ′ · β = k · d ′ · β = k · 2α · β (Formula 6)
≡ 2k mod 2 n
As LA.

ここで、逆変換用の関数g(x,y)は、g(x,y)=x×y mod 2としたことになる。 Here, the function g (x, y) for inverse transformation is g (x, y) = x × y mod 2 n .

次に、図4を用いて上記の関数f(x)を用いたPC値のマスクによるハミング距離の影響について説明する。
図4は、PCの変化系列ごとのハミング距離の変化を表したグラフである。
Next, the influence of the Hamming distance by the PC value mask using the function f (x) will be described with reference to FIG.
FIG. 4 is a graph showing a change in the Hamming distance for each change series of the PC.

いま、PC値の変化系列が、
0000→0010→0012→0014→0016→0018→001A→001C→001E→0020→ …(系列1)
であるとき、ハミング距離の系列は、
1→1→2→1→3→1→2→1→5→ …
である。
Now, the PC value change series is
0000 → 0010 → 0012 → 0014 → 0016 → 0018 → 001A → 001C → 001E → 0020 → (Series 1)
The sequence of Hamming distances is
1 → 1 → 2 → 1 → 3 → 1 → 2 → 1 → 5 →…
It is.

マスク値として2B37を用いて、このPC値の系列をマスクした場合、PC値の変化系列は、以下のように変化する。   When the PC value series is masked using 2B37 as the mask value, the PC value change series changes as follows.

0000→B370→09DE→604C→B6BA→0D28→6396→BA04→1072→66E0→ …(系列2)
これに対応するハミング距離の系列は、以下の通りである。
0000 → B370 → 09DE → 604C → B6BA → 0D28 → 6396 → BA04 → 1072 → 66E0 → (series 2)
The series of Hamming distances corresponding to this is as follows.

8→10→7→11→9→11→8→9→8→ …
一方、別のマスク値D4C9を用いた場合、PC値の変化系列は、以下のように変化する。
8 → 10 → 7 → 11 → 9 → 11 → 8 → 9 → 8 →…
On the other hand, when another mask value D4C9 is used, the PC value change sequence changes as follows.

0000→4C90→F622→9FB4→4946→F2D8→9C6A→45FC→EF8E→9920→ …(系列3)
これに対応するハミング距離の系列は、以下の通りである。
0000 → 4C90 → F622 → 9FB4 → 4946 → F2D8 → 9C6A → 45FC → EF8E → 9920 → (Series 3)
The series of Hamming distances corresponding to this is as follows.

5→9→8→10→11→9→9→8→10→ …
このように、同一のPC値の変化系列も、マスク値によってハミング距離の系列が変化する。図4は、三つの異なるマスク値を用いて、同一のPC値の変化系列をマスクした場合の、ハミング距離の系列を示したものである。マスク値によってハミング距離の系列が異なる挙動となるため、消費電力がハミング距離に比例して現れることから、消費電力を観察しても有用な情報を得ることができないことがわかる
次に、図5および図6を用いて本発明の第一の実施形態に係る情報処理装置のアドレスに関する処理について説明する。
図5は、アドレス変換装置ATEの構成図である。
図6は、アドレス逆変換装置ATDの構成図である。
5 → 9 → 8 → 10 → 11 → 9 → 9 → 8 → 10 →…
As described above, the hamming distance series also changes depending on the mask value even in the same PC value change series. FIG. 4 shows a Hamming distance sequence when the same PC value change sequence is masked using three different mask values. Since the hamming distance series behaves differently depending on the mask value, the power consumption appears in proportion to the hamming distance, so that it is understood that useful information cannot be obtained even by observing the power consumption. Processing related to the address of the information processing apparatus according to the first embodiment of the present invention will be described with reference to FIG.
FIG. 5 is a configuration diagram of the address translation device ATE.
FIG. 6 is a configuration diagram of the address reverse translation device ATD.

先ず、初期化時の処理手順について述べる。   First, the processing procedure at the time of initialization will be described.

アドレス変換装置ATEは、初期化信号INIがオンになると、乱数生成器RNGの出力αがゼロでないことを確認して、αの最下位ビットを1であるときに、アドレス変位値レジスタISRに、元の値dにマスクした値d'をアドレス変位値レジスタISRに記憶する。RNGの出力がゼロである場合は、最下位ビットを1をたしたり、再度新しい値を生成したり、RNGの故障診断などをおこなう。   When the initialization signal INI is turned on, the address translation device ATE confirms that the output α of the random number generator RNG is not zero. When the least significant bit of α is 1, the address translation device ATE stores the address displacement value register ISR in the address displacement value register ISR. The value d ′ masked by the original value d is stored in the address displacement value register ISR. When the output of the RNG is zero, the least significant bit is set to 1, a new value is generated again, or an RNG failure diagnosis is performed.

ISRの値αはさらに、上記関数f(x)すなわち、逆元計算器INVに入力される。INVの出力βは、アドレスバスABに送られる。同時に、アドレス逆変換装置ATDに逆変換に用いる値βの取り込みを促すための信号βEがオンになる。ATDでは、βEがオンであることを受けて、ABからの入力値βを、二出力のうち一方を選択する出力セレクタSELOを用いて、アドレス変換値レジスタATRに取り込む。以上の手順が終了すれば、INIはオフになる。   The value α of the ISR is further input to the function f (x), that is, the inverse element calculator INV. The output β of INV is sent to the address bus AB. At the same time, the signal βE for encouraging the address reverse conversion device ATD to take in the value β used for reverse conversion is turned on. In the ATD, in response to βE being on, the input value β from AB is taken into the address translation value register ATR using the output selector SELO that selects one of the two outputs. When the above procedure is completed, INI is turned off.

次に、PCの更新とメモリへのアクセスについて述べる。   Next, PC update and memory access will be described.

CPUは、PCを更新する場合、PC値をATEの入力ポートPCIに送る。ATEは、PCIから受け取ったPC値にISR値を加算して、出力ポートPCOに送る。CPUは、PCOからの出力値を新しいPC値として記憶する。   When updating the PC, the CPU sends the PC value to the input port PCI of the ATE. The ATE adds the ISR value to the PC value received from the PCI and sends it to the output port PCO. The CPU stores the output value from the PCO as a new PC value.

これまでの記法を使うと、|PC|'=|PC|'+|ISR|=|PC|'+d'である。   Using the conventional notation, | PC | '= | PC |' + | ISR | = | PC | '+ d'.

そして、CPUは、PC値である|PC|'をABを通じて送信する。   Then, the CPU transmits | PC | 'which is a PC value through AB.

CPUがメモリにアクセスする場合、ATDはABから|PC|'を受け取り、βEがオフであるので、上の具体例では乗算器MULを用いてATR値βを乗じた結果を出力ポートPBに出力する。出力値は、上記で確認したように、マスクされていないCPUがメモリをアクセスするためのアドレスである。   When the CPU accesses the memory, the ATD receives | PC | 'from AB and βE is off. In the above specific example, the result of multiplying the ATR value β by using the multiplier MUL is output to the output port PB. To do. As confirmed above, the output value is an address for the unmasked CPU to access the memory.

なお、ICチップのリセット時に必ずしもINIが発行されない場合、ATRの初期値を1とする。この初期値は、ATEが用いられない場合の整合性を確保するために必要である。これは、マスクされていないアドレス値に1を乗じても、値が変化しないことを利用した方法であるが、ATR値が1の場合は乗算自体をおこなわないようにすれば、処理に必要な時間や電力を削減することができるため、そのように構成することが望ましい。もちろん、ATDを使用しない場合は、ATD部を非活性化してバイパスするように構成することもできる。   If the INI is not necessarily issued when the IC chip is reset, the initial value of ATR is set to 1. This initial value is necessary to ensure consistency when ATE is not used. This is a method using the fact that even if an unmasked address value is multiplied by 1, the value does not change. However, if the ATR value is 1, if the multiplication itself is not performed, it is necessary for processing. Since time and power can be reduced, such a configuration is desirable. Of course, when the ATD is not used, the ATD unit can be inactivated and bypassed.

以上の処理は、プログラムカウンタを順次、一定のアドレス変位値により更新していく場合の処理であったが、一般的なCPUは、ジャンプ命令に相当する命令を実行することができる。ジャンプ命令とは、あるアドレスから、所定のアドレスにPCの値を変化させる命令である。この場合、命令コードには、ジャンプ先のアドレスが含まれる。命令コードは、多くの場合、ROMなどの書き換え不可能な記憶装置に記録されているため、命令実行時までに、マスク値に応じた、ジャンプ先アドレスの変換をおこなう必要がある。これまで述べたきたアドレス変換は、CPUが命令コードをジャンプ命令であると判断した場合に、マスク値をジャンプ先アドレスに乗じることで容易におこなうことができる。CPUに命令コードキャッシュを備えれば、命令実行時間のペナルティなしで、このアドレス変換をおこなうことができる。   The above processing is processing when the program counter is sequentially updated with a constant address displacement value, but a general CPU can execute an instruction corresponding to a jump instruction. The jump instruction is an instruction for changing the value of the PC from a certain address to a predetermined address. In this case, the instruction code includes the jump destination address. Since the instruction code is often recorded in a non-rewritable storage device such as a ROM, it is necessary to convert the jump destination address according to the mask value before the instruction is executed. The address conversion described so far can be easily performed by multiplying the jump destination address by the mask value when the CPU determines that the instruction code is a jump instruction. If the CPU is provided with an instruction code cache, this address conversion can be performed without penalty of instruction execution time.

また、アドレス変換装置およびアドレス逆変換装置が適宜演算処理をおこなう場合について説明してきたが、初期化時にアドレス変換および逆変換テーブルを作成し、アドレス変換処理および逆変換処理を、テーブル参照によりおこなう構成にしてもよい。このような構成にすることにより、処理速度の高速化を図ることができる。アドレス変換および逆変換テーブルは、揮発性メモリに格納し、チップリセットごとに再生成する。マスク値の更新が必要ない場合は、アドレス変換および逆変換テーブルを一度だけ書き込みが可能なメモリーに格納するように構成してもよい。少なくとも異なるICチップで互いに相関を持たないマスク値を用いるようにすれば、悪意のあるアタッカーが一つのICチップを解析したとしても、他のICチップの解析に対する手がかりが得られないようにすることができる。   In addition, the case where the address conversion device and the address reverse conversion device appropriately perform arithmetic processing has been described. However, the address conversion and the reverse conversion table are created at the time of initialization, and the address conversion processing and the reverse conversion processing are performed by referring to the table. It may be. With such a configuration, the processing speed can be increased. The address conversion and reverse conversion tables are stored in the volatile memory and regenerated every time the chip is reset. If it is not necessary to update the mask value, the address conversion and inverse conversion table may be stored in a memory that can be written only once. By using mask values that are not correlated with each other at least in different IC chips, even if a malicious attacker analyzes one IC chip, no clue to analysis of other IC chips can be obtained. Can do.

〔実施形態2〕
以下、図7ないし図9を用いて本発明に係る第二の実施形態について説明する。
図7は、アドレス変換装置ATEUの構成図である。
図8は、アドレス逆変換装置ATDUの構成図である。
図9は、本発明の第二の実施形態に係る情報処理装置の信号線におけるデータの流れを表すタイミングチャートである。
[Embodiment 2]
Hereinafter, a second embodiment according to the present invention will be described with reference to FIGS.
FIG. 7 is a configuration diagram of the address translation device ATEU.
FIG. 8 is a configuration diagram of the address reverse translation device ATDU.
FIG. 9 is a timing chart showing the flow of data in the signal line of the information processing apparatus according to the second embodiment of the present invention.

第一の実施形態では、マスク値は、乱数生成器RNGにより発生させていたが、いったんマスク値αが定まると、CPUのメモリのアドレスの連続性を保つため、CPU自体をリセットしたり、再起動するまで変更することができなかった。   In the first embodiment, the mask value is generated by the random number generator RNG. However, once the mask value α is determined, the CPU itself can be reset or reset in order to maintain the continuity of the memory address of the CPU. I couldn't change it until it started.

本実施形態は、マスク値を任意の時点で変更したり、任意の時点でアドレス変換を開始することのできる情報処理装置に関するものである。   The present embodiment relates to an information processing apparatus capable of changing a mask value at an arbitrary time or starting address conversion at an arbitrary time.

本実施形態のアドレス変換装置とアドレス逆変換装置は、マスク値の更新をおこなう機能をサポートしているので、それぞれアドレス変換装置ATEUとアドレス逆変換装置ATDUと記載することにする。   Since the address translation device and the address reverse translation device of the present embodiment support the function of updating the mask value, they will be described as the address translation device ATEU and the address reverse translation device ATDU, respectively.

マスク値の更新手順は、以下の通りである。   The procedure for updating the mask value is as follows.

なお、第二の実施形態でも、マスク値の逆変換関数を、f(x)=x−1 mod 2であるものとして説明する。 In the second embodiment, the inverse transformation function of the mask value will be described as f (x) = x −1 mod 2 n .

図7に示されるATEUは、マスク値更新信号UPDがオンになると、RNGを用いて任意の値α^を生成し、テンポラリレジスタTRに保存する。さらに二入力から一方を選択して出力する入力セレクタSELIによって、TR値がINVに入力される。その出力値β^=α^−1 mod 2はそのままABを通じてATDUに送信される。 When the mask value update signal UPD is turned on, the ATEU shown in FIG. 7 generates an arbitrary value α ^ using RNG and stores it in the temporary register TR. Further, the TR value is input to INV by an input selector SELI that selects and outputs one of the two inputs. The output value β ^ = α ^ −1 mod 2 n is transmitted as it is to the ATDU through AB.

TRが更新されたタイミングで、TR値はMULを用いて、現在のISR値に乗じられ、結果は再びISRに記憶される。TR値はさらに、PCIから入力された|PC|'にも乗じられ、その結果はPCOを通じて出力される。すなわち、|ISR|=|ISR|×α^ mod 2および|PC|'=|PC|'×α^ mod 2とする。 At the timing when TR is updated, the TR value is multiplied by the current ISR value using MUL, and the result is stored in the ISR again. The TR value is also multiplied by | PC | 'input from the PCI, and the result is output through the PCO. That is, | ISR | = | ISR | × α ^ mod 2 n and | PC | ′ = | PC | ′ × α ^ mod 2 n .

UPDがオンであることから、更新を指示する信号UEと、ABの値の取り込みを促すβEがオンとなる。ATDは、βEがオンであるためABの値をTRに取り込み、UEがオンであるため、TR値β^をATR値に乗じる。その結果はATRに記憶される。すなわち、|ATR|=|ATR|×β^ mod 2となる。この結果、ISRには、α×α^ mod 2が記憶されており、ATRには、α−1×α^−1 mod 2(=(α×α^)−1 mod 2)が記憶される。また、|PC|'はマスクされていない値のα×α^ mod 2倍数になる。すなわち、CPUから送信されるアクセス先アドレスは、α×α^ mod 2が乗じられた値となっており、ATRを乗じることで、マスクを除去することができる。 Since the UPD is on, the signal UE instructing the update and βE that prompts the acquisition of the AB value are turned on. The ATD takes the value of AB into TR because βE is on, and multiplies the ATR value by the TR value β ^ because the UE is on. The result is stored in the ATR. That is, | ATR | = | ATR | × β ^ mod 2 n . As a result, α × α ^ mod 2 n is stored in the ISR, and α −1 × α ^ −1 mod 2 n (= (α × α ^) −1 mod 2 n ) is stored in the ATR. Remembered. Also, | PC | 'is an α × α ^ mod 2 n multiple of the unmasked value. That is, the access destination address transmitted from the CPU is a value multiplied by α × α ^ mod 2 n , and the mask can be removed by multiplying by ATR.

ある時点でマスク処理を開始する場合、図7と図8に示される各信号線の関係を示すと図9に示されるようになる。   When the mask process is started at a certain time, the relationship between the signal lines shown in FIGS. 7 and 8 is as shown in FIG.

 ̄AE(AEオーバーライン)は、アドレスを示す値LAがアドレスバスABを通じて得られることを意味するAEの論理反転値であるので、 ̄AEがオフ(論理0)であれば、LAがABを通じて得られる状態であることを意味する。本実施形態では、ATEUからATDUに逆変換用の値βを転送する際に、アドレスバスを共用することでセキュリティを高めているため、LAとβを同時に転送することができない。よって、 ̄AEがオフであるときは、βEはオフである必要があり、βEがオンであるときは、 ̄AEはオンである必要がある。本例では、 ̄AEをオフにして、CPUはアドレスLA[1]をアドレスバスABに送出する。同時にATDUでは、ATDU内部のATRに記憶している値である1を用いて、ABから得たアドレスLA[1]を逆変換し、CPUがメモリにアクセスするアドレスLA[1]を得る。LA[1]は、アドレスバスPBに送られ、メモリセルへのアクセスがおこなわれる。すでに述べたように、ATR値が1である場合は、逆変換は自分自身への恒等変換であるから、ATDUによる逆変換の結果は入力と同じ値となる。すなわち、この場合は、処理自体をバイパスする構成にすることも可能である。    ̄AE (AE overline) is a logical inversion value of AE which means that the value LA indicating the address is obtained through the address bus AB. Therefore, if  ̄AE is off (logic 0), LA is passed through AB. It means that it is in the obtained state. In the present embodiment, when the value β for inverse conversion is transferred from ATEU to ATDU, security is enhanced by sharing the address bus, so LA and β cannot be transferred simultaneously. Thus, when  ̄AE is off, βE needs to be off, and when βE is on,  ̄AE needs to be on. In this example,  ̄AE is turned off, and the CPU sends address LA [1] to address bus AB. At the same time, ATDU reverse-converts address LA [1] obtained from AB using 1 which is a value stored in ATR inside ATDU, and obtains address LA [1] from which the CPU accesses the memory. LA [1] is sent to the address bus PB, and the memory cell is accessed. As described above, when the ATR value is 1, since the inverse transformation is an identity transformation to itself, the result of the inverse transformation by ATDU has the same value as the input. That is, in this case, it is possible to adopt a configuration in which the processing itself is bypassed.

引き続いて、ATEUは更新信号UPDがオンになると、内部で任意の値αを生成し、さらにαからβを生成する。βはアドレスバスABを通じて送出される。このとき、UEとβEもオンになり、ATDUはβをABから取り込んで、ATR値に乗じることでATR値の更新を行う。更新が終了するタイミングで、UPDはオフになり、その結果、UEとβEもオフとなる。これ以降のタイミングでは、CPUが使用するプログラムカウンタ値はマスクされた値になるため、次のメモリアクセスでABに現れるのは、マスクされた値LA'[2]である。 ̄AEがオフであるから、ATDUは、LA'[2]をアドレスとして取り込み、ATR値を乗じること逆変換し、CPUがメモリにアクセスするアドレスLA[2]を得る。以下、同様にしてプログラムカウンタの値がマスクされたまま、処理が継続される。   Subsequently, when the update signal UPD is turned on, the ATEU generates an arbitrary value α internally and further generates β from α. β is transmitted through the address bus AB. At this time, UE and βE are also turned on, and ATDU takes in β from AB and multiplies the ATR value to update the ATR value. At the timing when the update is completed, UPD is turned off. As a result, UE and βE are also turned off. At the subsequent timing, the program counter value used by the CPU becomes a masked value, and therefore, the masked value LA ′ [2] appears in AB in the next memory access. Since  ̄AE is off, the ATDU takes LA ′ [2] as an address, performs inverse conversion by multiplying by the ATR value, and obtains an address LA [2] at which the CPU accesses the memory. Thereafter, the processing is continued in the same manner while the value of the program counter is masked.

マスク値の更新は、任意のタイミングでおこなうことができるが、べき乗剰余演算時のループにおける分岐と非分岐の差異を隠蔽する場合には、ループ中のある分岐処理から次の分岐処理までの間におこなうことが望ましい。例えば、分岐命令を実行した直後にマスク値の更新をおこなうように構成すればよい。また、消費電力を測定する際のSN比によっては、数回の分岐処理を観測しただけでは、分岐の有無を判断できない場合があることを鑑みれば、かならずしも分岐命令処理ごとにマスク値を更新する必要は無く、マスク値更新用の命令コードを用意して、ユーザーが任意のタイミングで実施することができるように構成してもよい。さらには、RNGを用いて外部から予測できないタイミングで実施するようにしてもよい。   The mask value can be updated at any timing. However, when concealing the difference between a branch and a non-branch in a loop at the time of a power-residue operation, the interval between a branch process in the loop and the next branch process is hidden. It is desirable to do this. For example, the mask value may be updated immediately after the branch instruction is executed. Also, depending on the S / N ratio when measuring power consumption, the mask value is always updated for each branch instruction process in view of the fact that it may not be possible to determine the presence or absence of a branch just by observing several branch processes. There is no need, and an instruction code for updating the mask value may be prepared so that the user can execute it at an arbitrary timing. Furthermore, it may be performed at a timing that cannot be predicted from the outside using RNG.

処理の途中で、もはやセキュリティを確保する必要がなくなった場合など、PC値のマスクが不要となった場合、アドレス変換装置ATEUは、アドレス逆変換装置ATDUからATR値を受信し、|PC|'に乗じることで、マスクを除去することができる。すなわち、上で述べた場合のアドレス変換装置からアドレス逆変換装置に、逆変換のためのβを転送する場合の逆の方向の転送にあたる。その後のPCの更新には、CPUが備えているインクリメント値を用いればよい。また、ATR値は1に初期化するか、すでに述べた方法で非活性する。ATR値を受信する以外にも、ATEUにおいてISR値をINVで処理し、その値を用いることもできる。さらには、ATR値のコピーをATEUやCPUに保持し、マスク除去処理に備えるように構成することもできる。安全性を高めるために「セキュリティモード」を備え、セキュリティモードのON/OFFを切り替える「セキュリティビット」を備える構成にすれば、このセキュリティビットの設定を、ユーザーがコントロールすることができるように構成することで、必要に応じて保護の適用と解除をおこなうことができる。セキュリティビットがONの場合は、上記の手順に従って安全性を高めた処理をおこない、セキュリティビットがOFFの場合は、マスクによる保護が停止すればよい。   When the PC value mask is no longer necessary, for example, when it is no longer necessary to ensure security during the process, the address translation device ATEU receives the ATR value from the address reverse translation device ATDU, and | PC | ' The mask can be removed by multiplying by. That is, it corresponds to the transfer in the reverse direction when β for reverse conversion is transferred from the address conversion apparatus in the case described above to the address reverse conversion apparatus. For subsequent PC updates, an increment value provided in the CPU may be used. The ATR value is initialized to 1 or deactivated by the method described above. Besides receiving the ATR value, the ISR value can be processed by INV in the ATEU and the value can be used. Further, a copy of the ATR value can be held in the ATEU or CPU to prepare for mask removal processing. In order to enhance the security, it is possible to provide a “security mode” and a “security bit” for switching the security mode ON / OFF so that the user can control the setting of this security bit. Thus, it is possible to apply and release protection as necessary. When the security bit is ON, processing with improved safety is performed according to the above procedure, and when the security bit is OFF, protection by the mask may be stopped.

〔実施形態3〕
以下、図10を用いて本発明に係る第三の実施形態を説明する。
図10は、本発明の第三の実施形態に係る情報処理装置の構成図である。
[Embodiment 3]
Hereinafter, a third embodiment according to the present invention will be described with reference to FIG.
FIG. 10 is a configuration diagram of an information processing apparatus according to the third embodiment of the present invention.

なお、図10では、アドレス変換装置ATEとアドレス変換装置ATDと記載しているが、実施形態2のようにマスク値の更新機能を有するアドレス変換装置ATEUとアドレス変換装置ATDUであってもよい。   In FIG. 10, the address translation device ATE and the address translation device ATD are described, but the address translation device ATEU and the address translation device ATDU having a mask value update function as in the second embodiment may be used.

本実施形態では、アドレス変換装置ATEとアドレス逆変換装置ATDをつなぐ経路として、アドレスバス401およびデータバス403のほかに、逆変換用の値βを転送するための専用のバス402を備えている。先の実施形態では、逆変換用の値をアドレスバスを用いて転送することによって、配線を減らすことができ、さらにβの転送を隠蔽することができるが、マスク値の更新の際のメモリアクセスレートが落ちることになる。一方、本実施形態のように、逆変換用の値を転送する専用のバスを持てば、アドレスバスを占有する必要が無くなるため、マスク値の更新処理を高速化することができる。ただし、βはセキュリティ上の重要な値であるので、バス402の配線はできるだけ発見が困難になるようにおこなうことや、β値の転送時以外には乱数を転送するなどの対策をおこなうことで、アタッカーによる解析を困難にすることができる。   In the present embodiment, as a path connecting the address translation device ATE and the address reverse translation device ATD, in addition to the address bus 401 and the data bus 403, a dedicated bus 402 for transferring the reverse translation value β is provided. . In the previous embodiment, by transferring the value for inverse conversion using the address bus, the wiring can be reduced and the transfer of β can be concealed, but the memory access at the time of updating the mask value The rate will drop. On the other hand, if the dedicated bus for transferring the value for inverse conversion is provided as in this embodiment, it is not necessary to occupy the address bus, so that the mask value update process can be speeded up. However, since β is an important value for security, it is possible to make the wiring of the bus 402 as difficult as possible to discover, or to take measures such as transferring random numbers except when transferring the β value. Analysis by an attacker can be made difficult.

〔実施形態4〕
以下、図11を用いて本発明に係る第四の実施形態を説明する。
図11は、本発明の第四の実施形態に係る情報処理装置の構成図である。
[Embodiment 4]
Hereinafter, the fourth embodiment according to the present invention will be described with reference to FIG.
FIG. 11 is a configuration diagram of an information processing apparatus according to the fourth embodiment of the present invention.

なお、図11では、アドレス変換装置ATEとアドレス変換装置ATDと記載しているが、実施形態2のようにマスク値の更新機能を有するアドレス変換装置ATEUとアドレス変換装置ATDUであってもよい。   In FIG. 11, the address translation device ATE and the address translation device ATD are described, but the address translation device ATEU and the address translation device ATDU having a mask value update function as in the second embodiment may be used.

本実施形態では、アドレス逆変換装置ATDを各記憶装置ごとに用意する。また、ATEには、それぞれの記憶装置ごとに異なるマスク値を用いることができるように、複数のISRを備える。複数のマスク値を用いることにより、安全性を高めることができる。ただし、必ずしもすべてのマスク値が異なるように構成する必要は無く、一部あるいはすべてが同じ値であっても良い。   In this embodiment, an address reverse translation device ATD is prepared for each storage device. The ATE includes a plurality of ISRs so that different mask values can be used for the respective storage devices. By using a plurality of mask values, safety can be improved. However, it is not always necessary to configure all the mask values to be different, and some or all of them may have the same value.

〔実施形態5〕
以下、図12を用いて本発明に係る第五の実施形態を説明する。
図12は、本発明の第五の実施形態に係る情報処理装置の構成図である。
[Embodiment 5]
The fifth embodiment according to the present invention will be described below with reference to FIG.
FIG. 12 is a configuration diagram of an information processing apparatus according to the fifth embodiment of the present invention.

なお、図12では、アドレス変換装置ATEとアドレス変換装置ATDと記載しているが、実施形態2のようにマスク値の更新機能を有するアドレス変換装置ATEUとアドレス変換装置ATDUであってもよい。   In FIG. 12, the address translation device ATE and the address translation device ATD are described, but the address translation device ATEU and the address translation device ATDU having a mask value update function as in the second embodiment may be used.

本実施形態では、一部の記憶装置のみにATDを設置しているが、それぞれの記憶領域ごとに別々のプログラムカウンタを用意し別のアドレス空間としてアクセスすることが可能となっている。   In this embodiment, the ATD is installed only in a part of the storage devices. However, a separate program counter is prepared for each storage area and can be accessed as a separate address space.

ATDを設置する記憶装置としては、頻繁に書き換えられないものを選択することが望ましい。たとえば、読み出し専用メモリであるROMや、書き換え回数の制限されるEEPROMなどがATD設置によって保護をおこなう対象の候補である。このような保護領域の制限は、記憶装置の種類によっておこなう方法とは別に、システム的な機能によっておこなう方法がある。すなわち、アドレス空間の一部領域をセキュリティを確保する領域であると定義し、当該アドレス領域にアクセスする場合にのみATEおよびATDによる保護をおこなうように構成することができる。   As a storage device in which the ATD is installed, it is desirable to select a storage device that is not frequently rewritten. For example, a ROM that is a read-only memory, an EEPROM with a limited number of rewrites, and the like are candidates for protection by installing an ATD. There is a method in which such protection area limitation is performed by a system function, in addition to the method performed by the type of storage device. That is, it is possible to define a partial area of the address space as an area for ensuring security and to perform protection by ATE and ATD only when the address area is accessed.

〔実施形態6〕
以下、図13を用いて本発明に係る第六の実施形態を説明する。
図13は、本発明の第六の実施形態に係る情報処理装置の構成図である。
[Embodiment 6]
The sixth embodiment according to the present invention will be described below with reference to FIG.
FIG. 13 is a configuration diagram of an information processing apparatus according to the sixth embodiment of the present invention.

なお、図13では、アドレス変換装置ATEとアドレス変換装置ATDと記載しているが、実施形態2のようにマスク値の更新機能を有するアドレス変換装置ATEUとアドレス変換装置ATDUであってもよい。   In FIG. 13, the address translation device ATE and the address translation device ATD are described, but the address translation device ATEU and the address translation device ATDU having a mask value update function as in the second embodiment may be used.

本実施形態の構成では、二つ以上のPC[I],ISR[I],ATR[I]の組(I∈{1,2,…,m})を備え、どの組を使用するかの選択を外部から予測できない方法でおこなう。これによって、マスク値の更新をおこなわずとも、複数のマスク値を切り替えて使用することができるため、消費電力から情報を取得する攻撃をより効率よく防止することができる。どの組を使用するかの選択には、たとえば、乱数生成装置RNGから得られる乱数を用いる。使用する組の変更は、マスク値の更新タイミングとしては、実施形態2に述べたようなタイミングに従っておこなえばよい。また、特に読み出しと書き込みで異なる組を使用するようにすることで、読み出しと書き込み時の消費電力が異なるように構成すれば、データの書き込みと読み出し時の消費電力の相関を利用する解析をも防止することができる。どの組を使用するかは、ATEで生成した値を専用のバス502を通じてATDに転送することによって情報を伝えることができる。   In the configuration of this embodiment, a set of two or more PC [I], ISR [I], and ATR [I] (Iε {1, 2,..., M}) is provided, and which set is used. Make the selection in an unpredictable way. Accordingly, since a plurality of mask values can be switched and used without updating the mask value, an attack for acquiring information from power consumption can be prevented more efficiently. For selection of which set to use, for example, a random number obtained from the random number generation device RNG is used. The set to be used may be changed in accordance with the timing as described in the second embodiment as the mask value update timing. In addition, by using different sets for reading and writing, if the power consumption during reading and writing is different, an analysis using the correlation between data writing and power consumption during reading is also possible. Can be prevented. Which set is used can be conveyed by transferring a value generated by the ATE to the ATD through the dedicated bus 502.

本発明の第一の実施形態に係る情報処理装置の構成図である。1 is a configuration diagram of an information processing apparatus according to a first embodiment of the present invention. 本発明に係るマイクロコンピュータをICカードに実装した様子を示す図である。It is a figure which shows a mode that the microcomputer based on this invention was mounted in the IC card. 本発明に係るマイクロコンピュータの基本構成を示す構成図である。It is a block diagram which shows the basic composition of the microcomputer which concerns on this invention. PCの変化系列ごとのハミング距離の変化を表したグラフである。It is a graph showing the change of the Hamming distance for every change series of PC. アドレス変換装置ATEの構成図である。It is a block diagram of the address translation apparatus ATE. アドレス逆変換装置ATDの構成図である。It is a block diagram of the address reverse translation apparatus ATD. アドレス変換装置ATEUの構成図である。It is a block diagram of the address translation apparatus ATEU. アドレス逆変換装置ATDUの構成図である。It is a block diagram of address reverse translation apparatus ATDU. 本発明の第二の実施形態に係る情報処理装置の信号線におけるデータの流れを表すタイミングチャートである。It is a timing chart showing the flow of data in the signal line of the information processor concerning a second embodiment of the present invention. 本発明の第三の実施形態に係る情報処理装置の構成図である。It is a block diagram of the information processing apparatus which concerns on 3rd embodiment of this invention. 本発明の第四の実施形態に係る情報処理装置の構成図である。It is a block diagram of the information processing apparatus which concerns on 4th embodiment of this invention. 本発明の第五の実施形態に係る情報処理装置の構成図である。It is a block diagram of the information processing apparatus which concerns on 5th embodiment of this invention. 本発明の第六の実施形態に係る情報処理装置の構成図である。It is a block diagram of the information processing apparatus which concerns on the 6th embodiment of this invention.

符号の説明Explanation of symbols

102、302、403、503…データバス
402…ATR値転送バス
502…選択情報転送バス
CPU…中央演算装置
PC…プログラムカウンタ
I/O…入出力装置および入出力ポート
ATE…アドレス変換装置
ISR…インクリメントアドレスレジスタ
RNG…乱数生成器
SYSCL…システムコントローラ
SECL…セキュリティロジック
TIM…タイマー
ATD…アドレス逆変換装置
ATR…アドレス逆変換用パラメータレジスタ
ROM…読み出し専用不揮発性メモリ
EEPROM…書き換え可能不揮発性メモリ
RAM…書き換え可能揮発性メモリ
CPR…コプロセッサ
CRAM…コプロセッサメモリ
Vcc…電源入力端子
Vss…接地端子
RST…リセット入力端子
CLK…クロック入力端子
CLKG…システムクロック生成器
INV…逆元計算器
ADD…加算器
MUL…乗算器
SELO…二出力から一方を選択するセレクタ
SELI…二入力から一方を選択するセレクタ
βE…β値のフェッチを指示する信号線
101、301、401、501、AB…暗号化された可能性のあるアドレスバス
PB…暗号化されていないアドレスバス
UE…マスク値更新を指示する信号線
TR…一時値保存用レジスタ
102, 302, 403, 503 ... Data bus 402 ... ATR value transfer bus 502 ... Selection information transfer bus CPU ... Central processing unit PC ... Program counter I / O ... Input / output device and input / output port ATE ... Address conversion device ISR ... Increment Address register RNG ... random number generator SYSCL ... system controller SECL ... security logic TIM ... timer ATD ... address reverse conversion device ATR ... address reverse conversion parameter register ROM ... read-only nonvolatile memory EEPROM ... rewritable nonvolatile memory RAM ... rewritable Volatile memory CPR ... Coprocessor CRAM ... Coprocessor memory Vcc ... Power input terminal Vss ... Ground terminal RST ... Reset input terminal CLK ... Clock input terminal CLKG ... System clock generator NV: inverse element calculator ADD ... adder MUL ... multiplier SELO ... selector SELI for selecting one from two outputs .beta.E selector for selecting one from two inputs .beta.E ... signal lines 101, 301, 401 for instructing fetch of .beta. Value 501, AB: Address bus PB that may have been encrypted ... Address bus UE that has not been encrypted ... Signal line TR instructing mask value update ... Temporary value storage register

Claims (10)

プログラムカウンタを有する中央処理装置と前記中央処理装置からアクセスされる記憶装置とを備える情報処理装置において、
さらに、アドレス変位値レジスタを有するアドレス変位値変換部とアドレス逆変換部とを備え、
前記アドレス変位値変換部は、前記アドレス変位値レジスタに格納された値を暗号化して、その暗号化した値により前記プログラムカウンタを順次更新して、
前記中央処理装置は、前記プログラムカウンタの値をバスを介して前記アドレス逆変換部に転送し、
前記アドレス逆変換部は、転送されてくる前記プログラムカウンタの値を復号化して、前記中央処理装置が前記記憶装置にアクセスするためのアドレスを求めることを特徴とする情報処理装置。
In an information processing apparatus comprising a central processing unit having a program counter and a storage device accessed from the central processing unit,
Furthermore, an address displacement value conversion unit having an address displacement value register and an address reverse conversion unit are provided,
The address displacement value conversion unit encrypts the value stored in the address displacement value register, sequentially updates the program counter with the encrypted value,
The central processing unit transfers the value of the program counter to the address reverse conversion unit via a bus,
The address reverse conversion unit decodes the transferred value of the program counter and obtains an address for the central processing unit to access the storage device.
前記アドレス変位値変換は、任意値生成器を備え、前記アドレス変位値レジスタの値は、前記アドレス変位値レジスタの初期値と前記任意値生成器が生成した値とを演算した値であることを特徴とする請求項1に記載の情報処理装置。 The address displacement value conversion unit includes an arbitrary value generator, and the value of the address displacement value register is a value obtained by calculating an initial value of the address displacement value register and a value generated by the arbitrary value generator. The information processing apparatus according to claim 1. 前記任意値生成器が生成する値は、真正乱数または擬似乱数であることを特徴とする請求項2記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the value generated by the arbitrary value generator is a true random number or a pseudo random number. 前記アドレス逆変換部が、前記プログラムカウンタを復号化するための値を前記バスを介して受信することを特徴とする請求項1記載の情報処理装置。 The information processing apparatus according to claim 1, wherein the address reverse conversion unit receives a value for decoding the program counter via the bus. 前記アドレス逆変換部が、前記プログラムカウンタを復号化するための値を受信するための専用のバスを有することを特徴とする請求項1記載の情報処理装置。 The information processing apparatus according to claim 1, wherein the address reverse conversion unit includes a dedicated bus for receiving a value for decoding the program counter. 前記アドレス変位値変換部は、前記アドレス変位値レジスタに格納された値とマスク値を乗算し、その乗算したが前記プログラムカウンタを更新する増加値であって、
前記アドレス変位値変換部は、前記マスク値の元数2の有限環における逆元を求めて、その逆元により前記アドレス逆変換部が、転送されてくる前記プログラムカウンタの復号化をおこなうことを特徴とする請求項1記載の情報処理装置。
The address displacement value conversion unit multiplies the value stored in the address displacement value register by a mask value, and the multiplied value is an increment value for updating the program counter,
The address displacement value conversion unit obtains an inverse element in a finite ring with an element number 2 n of the mask value, and the address inverse conversion unit decodes the transferred program counter based on the inverse element. The information processing apparatus according to claim 1.
プログラムカウンタを有する中央処理装置と前記中央処理装置からアクセスされる記憶装置とを備える情報処理装置のアドレス制御方法において、
前記情報処理装置は、さらに、アドレス変位値レジスタを有するアドレス変位値変換部とアドレス逆変換部と任意値生成器とを備え、
前記アドレス変位値変換部が、前記アドレス変位値レジスタに値を設定する手順と、
前記任意値生成器が、真正乱数または擬似乱数により生成されるマスク値を生成する手順と、
前記アドレス変位値変換部が、前記アドレス変位値レジスタの値と前記マスク値を演算する手順と、
前記アドレス変位値レジスタの値と前記マスク値を演算した値によって、前記中央処理装置が、前記プログラムカウンタを更新する手順と、
前記アドレス変位値変換部が、前記プログラムカウンタを復号化するために必要な値を、前記マスク値に基づき求める手順と、
前記アドレス変位値変換部が、前記プログラムカウンタを復号化するために必要な値をバスを介して前記アドレス逆変換部に転送する手順と、
前記中央処理装置が、前記プログラムカウンタの値をバスを介して前記アドレス逆変換部に転送する手順と、
前記アドレス逆変換部が、前記プログラムカウンタを復号化するために必要な値に基づき転送されてくる前記プログラムカウンタの値を復号化してアドレスを求める手順と、
前記復号化されたアドレスにより、前記中央処理装置が前記記憶装置にアクセスする手順とを有することを特徴とする情報処理装置のアドレス制御方法。
In an address control method for an information processing apparatus comprising a central processing unit having a program counter and a storage device accessed from the central processing unit,
The information processing apparatus further includes an address displacement value conversion unit having an address displacement value register, an address inverse conversion unit, and an arbitrary value generator.
The address displacement value conversion unit sets a value in the address displacement value register;
The arbitrary value generator generates a mask value generated by a true random number or a pseudo random number; and
The address displacement value conversion unit calculates a value of the address displacement value register and the mask value;
The central processing unit updates the program counter with a value obtained by calculating the value of the address displacement value register and the mask value;
The address displacement value conversion unit obtains a value necessary for decoding the program counter based on the mask value;
The address displacement value converting unit transfers a value necessary for decoding the program counter to the address inverse converting unit via a bus;
The central processing unit transfers the value of the program counter to the address reverse conversion unit via a bus;
The address inverse conversion unit obtains an address by decoding the value of the program counter transferred based on a value necessary for decoding the program counter; and
An address control method for an information processing apparatus, comprising: a procedure for the central processing unit to access the storage device using the decrypted address.
プログラムカウンタを有する中央処理装置と前記中央処理装置からアクセスされる記憶装置とを備える情報処理装置のアドレス制御方法において、
前記情報処理装置は、さらに、アドレス変位値レジスタを有するアドレス変位値変換部とアドレス逆変換部と任意値生成器とを備え、
前記アドレス変位値変換部が、前記アドレス変位値レジスタに値dを設定する手順と、
前記任意値生成器が、真正乱数または擬似乱数により生成されるマスク値αを生成する手順と、
前記アドレス変位値変換部が、前記アドレス変位値レジスタの値dと前記マスク値αとの乗算値d×αを演算する手順と、
前記中央処理装置が、前記アドレス変位値レジスタdの値と前記マスク値αとの乗算値d×αにより前記プログラムカウンタをインクリメントする手順と、
前記アドレス変位値変換部が、前記プログラムカウンタを復号化するために必要な値として、前記マスク値αの元数2の有限環における逆元βを求める手順と、
前記アドレス変位値変換部が、前記プログラムカウンタを復号化するために必要な値βをバスを介して前記アドレス逆変換部に転送する手順と、
前記アドレス逆変換部が、前記プログラムカウンタを復号化するために必要な値βに基づき転送されてくる前記プログラムカウンタの値を復号化してアドレスを求める手順と、
前記復号化されたアドレスにより、前記中央処理装置が前記記憶装置にアクセスする手順とを有することを特徴とする情報処理装置のアドレス制御方法。
In an address control method for an information processing apparatus comprising a central processing unit having a program counter and a storage device accessed from the central processing unit,
The information processing apparatus further includes an address displacement value conversion unit having an address displacement value register, an address inverse conversion unit, and an arbitrary value generator.
A procedure in which the address displacement value converter sets a value d in the address displacement value register;
The arbitrary value generator generates a mask value α generated by a genuine random number or a pseudo random number; and
A procedure in which the address displacement value conversion unit calculates a multiplication value d × α of the value d of the address displacement value register and the mask value α;
A step in which the central processing unit increments the program counter by a multiplication value d × α of the value of the address displacement value register d and the mask value α;
The address displacement value conversion unit obtains an inverse element β in a finite ring of element number 2 n of the mask value α as a value necessary for decoding the program counter;
The address displacement value conversion unit transfers a value β necessary for decoding the program counter to the address reverse conversion unit via a bus;
The address inverse conversion unit obtains an address by decoding the value of the program counter transferred based on the value β necessary for decoding the program counter;
An address control method for an information processing apparatus, comprising: a procedure for the central processing unit to access the storage device using the decrypted address.
前記アドレス変位値変換部が、前記アドレス変位値レジスタに値を設定する手順を、プログラムを開始する前におこなうことを特徴とする請求項7記載の情報処理装置のアドレス制御方法。 The address displacement value conversion unit, a procedure for setting a value in the address displacement value register, an address control method for an information processing apparatus according to claim 7, wherein the performed before starting the program. 前記任意値生成器がマスク値を生成する手順を、前記中央処理装置が動作中の任意の時点でおこなうことを特徴とする請求項7記載の情報処理装置のアドレス制御方法。   8. The address control method for an information processing apparatus according to claim 7, wherein the step of generating a mask value by the arbitrary value generator is performed at an arbitrary time when the central processing unit is operating.
JP2004343648A 2004-11-29 2004-11-29 Information processing apparatus and address control method thereof Expired - Fee Related JP4664655B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004343648A JP4664655B2 (en) 2004-11-29 2004-11-29 Information processing apparatus and address control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004343648A JP4664655B2 (en) 2004-11-29 2004-11-29 Information processing apparatus and address control method thereof

Publications (2)

Publication Number Publication Date
JP2006155140A JP2006155140A (en) 2006-06-15
JP4664655B2 true JP4664655B2 (en) 2011-04-06

Family

ID=36633377

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004343648A Expired - Fee Related JP4664655B2 (en) 2004-11-29 2004-11-29 Information processing apparatus and address control method thereof

Country Status (1)

Country Link
JP (1) JP4664655B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465822B (en) * 2022-04-08 2022-07-22 北京网藤科技有限公司 Automatic generation method and system for attack vector of PLC (programmable logic controller)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11203237A (en) * 1998-01-16 1999-07-30 Toshiba Corp Semiconductor integrated circuit
JP2001195555A (en) * 2000-01-12 2001-07-19 Hitachi Ltd Ic card and microcomputer
JP2002328845A (en) * 2001-05-07 2002-11-15 Fujitsu Ltd Semiconductor integrated circuit and method for protecting security of ic card
JP2003516071A (en) * 1999-12-02 2003-05-07 インフィネオン テクノロジーズ アクチェンゲゼルシャフト Microprocessor device having encryption function
JP2003296104A (en) * 2002-04-05 2003-10-17 Hitachi Ltd Processor and assembler/compiler
JP2004126841A (en) * 2002-10-01 2004-04-22 Renesas Technology Corp Method for mounting program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11203237A (en) * 1998-01-16 1999-07-30 Toshiba Corp Semiconductor integrated circuit
JP2003516071A (en) * 1999-12-02 2003-05-07 インフィネオン テクノロジーズ アクチェンゲゼルシャフト Microprocessor device having encryption function
JP2001195555A (en) * 2000-01-12 2001-07-19 Hitachi Ltd Ic card and microcomputer
JP2002328845A (en) * 2001-05-07 2002-11-15 Fujitsu Ltd Semiconductor integrated circuit and method for protecting security of ic card
JP2003296104A (en) * 2002-04-05 2003-10-17 Hitachi Ltd Processor and assembler/compiler
JP2004126841A (en) * 2002-10-01 2004-04-22 Renesas Technology Corp Method for mounting program

Also Published As

Publication number Publication date
JP2006155140A (en) 2006-06-15

Similar Documents

Publication Publication Date Title
US10430565B2 (en) Securing microprocessors against information leakage and physical tampering
Saputra et al. Masking the energy behavior of DES encryption [smart cards]
US6345359B1 (en) In-line decryption for protecting embedded software
US7949883B2 (en) Cryptographic CPU architecture with random instruction masking to thwart differential power analysis
US7194633B2 (en) Device and method with reduced information leakage
US6691921B2 (en) Information processing device
JP4683442B2 (en) Processing apparatus and integrated circuit
EP1256202A2 (en) Method and system for resistance to statistical power analysis
JP4199937B2 (en) Anti-tamper encryption method
JP2006203564A (en) Microprocessor, node terminal, computer system and program execution certification method
JP2010011353A (en) Arithmetic processing unit
WO2016190924A2 (en) Side channel analysis resistant architecture
WO2014172062A2 (en) Secure computing
US20170046280A1 (en) Data processing device and method for protecting a data processing device against attacks
Cyr et al. Low-cost and secure firmware obfuscation method for protecting electronic systems from cloning
JP2004054834A (en) Program development method, program development support device, and program packaging method
CN108959129B (en) Embedded system confidentiality protection method based on hardware
JP2004109420A (en) Method and apparatus for generating random number
JP2004126841A (en) Method for mounting program
TWI439101B (en) Apparatus and method for generating an authentication code
JP2005149262A (en) Information processor
JP4664655B2 (en) Information processing apparatus and address control method thereof
JP2006146608A (en) Memory information protection system and method
Hossain et al. Hexon: Protecting firmware using hardware-assisted execution-level obfuscation
KR20100015077A (en) Apparatus and method for encryption in system on chip

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071120

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071120

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100510

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101001

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101012

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101206

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: 20101221

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: 20110107

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140114

Year of fee payment: 3

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

LAPS Cancellation because of no payment of annual fees