JPH118616A - Ic card having provision against attack taking advantage of failure - Google Patents
Ic card having provision against attack taking advantage of failureInfo
- Publication number
- JPH118616A JPH118616A JP9159992A JP15999297A JPH118616A JP H118616 A JPH118616 A JP H118616A JP 9159992 A JP9159992 A JP 9159992A JP 15999297 A JP15999297 A JP 15999297A JP H118616 A JPH118616 A JP H118616A
- Authority
- JP
- Japan
- Prior art keywords
- error
- digital signature
- card
- error detection
- detection code
- 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
- 238000004364 calculation method Methods 0.000 claims abstract description 26
- 238000000034 method Methods 0.000 claims abstract description 11
- 238000001514 detection method Methods 0.000 claims description 19
- 230000004044 response Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明はRSA公開鍵暗号方
式の暗号化/復号化機能を有する冪乗剰余計算を高速に
処理するコプロセッサを搭載したICカードに係り、特
にICカードに対して外部から物理的刺激を与え、IC
カードの演算結果に対して故意に誤りを発生させ、その
誤りを利用して秘密情報を解析しようとする故障利用攻
撃への対策を施したICカードに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an IC card equipped with a coprocessor having an encryption / decryption function of RSA public key cryptosystem and capable of processing a modular exponentiation calculation at a high speed. Gives a physical stimulus from the IC
The present invention relates to an IC card in which an error is intentionally generated with respect to a calculation result of a card, and a countermeasure against a failure use attack in which secret information is analyzed by using the error.
【0002】[0002]
【従来の技術】公開鍵暗号方式は、一対の暗号化鍵と復
号化鍵が異なり、暗号化鍵を公開し、復号化鍵を秘密に
する方式で、通信相手が増えても各利用者は自分だけの
1種類の復号化鍵を保持すればよいという利点を有して
いる。また、送信者が自分だけが知っている秘密鍵で署
名し、受信者が公開鍵で署名の検査をし、送信された通
信文の送信者が偽者でないこと、および送信された通信
文への改竄の有無を受信者が確認できる認証通信(ディ
ジタル署名通信)が可能である。このような認証通信機
能を備えた公開鍵暗号の代表例としてRSA公開鍵暗号
方式が知られている。2. Description of the Related Art In a public key cryptosystem, a pair of an encryption key and a decryption key are different, and the encryption key is made public and the decryption key is kept secret. This has the advantage that only one kind of decryption key for oneself needs to be stored. In addition, the sender signs with the private key that only he knows, the receiver checks the signature with the public key, and confirms that the sender of the transmitted message is not a fake, Authentication communication (digital signature communication) in which the receiver can confirm whether or not tampering has occurred is possible. The RSA public key cryptosystem is known as a representative example of the public key cryptosystem having such an authentication communication function.
【0003】RSA公開鍵暗号方式は、暗号化鍵を
(e,n)の組、復号化鍵を(d,n)の組とし、eと
n(乱数)は公開鍵で、dは秘密鍵である。公開鍵は、
任意の相異なる2つの大きな素因数p,qを選び、その
積n=pqを計算してnからeを生成し、生成した公開
鍵から秘密鍵dを生成している。RSA暗号によるディ
ジタル署名作成は、秘密鍵指数dを用いた冪乗剰余計算
によって行うが、冪乗剰余計算の法nの素因数p,qを
用いて計算量を減らし、高速に処理する方法が知られて
いる(J.J.Quisquater and C.Couvreur,"Fast Decipher
ment Algorithm forRSA Public-Key Cryptosystem",Ele
ctronics Letters Volume.18(1982)No.21,pp.905-90
7)。In the RSA public key cryptosystem, an encryption key is a set of (e, n), a decryption key is a set of (d, n), e and n (random numbers) are public keys, and d is a secret key. It is. The public key is
Any two different prime factors p and q are selected, the product n = pq is calculated, e is generated from n, and the secret key d is generated from the generated public key. The creation of a digital signature by the RSA encryption is performed by modular exponentiation using a secret key exponent d. A method of reducing the amount of computation using prime factors p and q of the modulus n of modular exponentiation and performing high-speed processing is known. (JJ Quisquater and C. Couvreur, "Fast Decipher
ment Algorithm forRSA Public-Key Cryptosystem ", Ele
ctronics Letters Volume.18 (1982) No.21, pp.905-90
7).
【0004】冪乗剰余計算を高速に処理するコプロセッ
サを搭載し、RSA暗号によるディジタル署名の作成を
高速で行うICカードについて説明する。図5に示すよ
うに、リーダ/ライタ1とICカード2とは相互に通信
可能であり、リーダ/ライタ1からICカード2に対し
てディジタル署名作成のコマンド名とともに、メッセー
ジCを与えると、ICカードでは後述するような冪乗剰
余計算を行ってディジタル署名Mを作成し、リーダ/ラ
イタ1へレスポンスとして返す。An IC card equipped with a coprocessor that performs high-speed modular exponentiation calculation at a high speed and that creates a digital signature by RSA encryption at a high speed will be described. As shown in FIG. 5, the reader / writer 1 and the IC card 2 can communicate with each other. When a message C is given from the reader / writer 1 to the IC card 2 together with a command name for creating a digital signature, the IC The card generates a digital signature M by performing modular exponentiation calculation as described later, and returns the digital signature M to the reader / writer 1 as a response.
【0005】図6に示すように、ICカード2は、CP
U2aの他に、冪乗剰余計算を高速で行うハードロジッ
クからなるコプロセッサ2bを有しており、ディジタル
署名作成時に、CPUからの命令で演算を実行する。ま
た、ICカード2のROM2cには、コマンドの実行手
順が格納され、また、冪乗剰余計算を行うための必要な
変数がEEPROM2dに記憶される。[0005] As shown in FIG.
In addition to U2a, it has a coprocessor 2b composed of hard logic for performing modular exponentiation calculation at high speed, and executes an operation by an instruction from the CPU when creating a digital signature. The command execution procedure is stored in the ROM 2c of the IC card 2, and variables required for performing modular exponentiation are stored in the EEPROM 2d.
【0006】次に、上記ICカードによるディジタル署
名の高速処理について説明する。いま、 C:署名対象のメッセージ・ダイジェスト d:秘密鍵指数 M:作成されたディジタル署名 としたとき、 M=Cd mod n ……(1) の冪乗剰余計算(Cd をnで割った余りがM)でディジ
タル署名Mを作成する。この冪乗剰余計算の法nは、例
えば10進で数100桁もの非常に大きい値を使用する
ので、ICカードで(1)式の計算をそのまま行うと大
きな処理時間を要する。Next, a description will be given of high-speed digital signature processing by the IC card. Here, C: message digest to be signed d: secret key exponent M: created digital signature, M = C d mod n (1) modular exponentiation calculation (C d divided by n The remainder is M), and a digital signature M is created. Since the modulus n of the modular exponentiation calculation uses a very large value of, for example, several hundred digits in decimal, a large processing time is required if the calculation of the expression (1) is directly performed by the IC card.
【0007】そこで、まず、署名作成者本人はn=pq
の素因数p、qを知っておくことができるので、あらか
じめ dp =dmod (p−1 ) ……(2) dq =dmod (q−1 ) ……(3) a=q-1mod p ……(4) を計算し、ICカードのEEPROM2dに記憶してお
く。ここで(4)式のaはaq≡1mod (p)を満たす
qの乗法逆元である。Therefore, first, the signature creator himself is n = pq
Since the prime factors p and q can be known, d p = d mod (p−1) (2) d q = d mod (q−1) (3) a = q −1 mod p (4) is calculated and stored in the EEPROM 2d of the IC card. Here, a in equation (4) is a multiplicative inverse of q that satisfies aq≡1mod (p).
【0008】次に、以下のステップ1〜3で、nの代わ
りに長さがnの半分であるpとqを用いて剰余計算を行
い、これにより(1)式をそのまま計算する場合よりも
高速に処理できる。 ステップ1:Cp =Cmod p 、Cq =Cmod q ……(5) ステップ2:Mp =Cp x mod p 、Mq =Cq y mod q ……(6) ここに、x=dp 、y=dqを計算する。ステップ2で
の計算は、p、q各々についての通常のRSA復号化計
算である。この結果を用いると、(1)式は次の連立合
同式に帰着する。 M≡Mp (mod p) ……(7) M≡Mq (mod q) ……(8) (7)式はM−Mp がpで割り切れ、(8)式はM−M
q がqで割り切れることを表している。 ステップ3:中国人剰余定理より、 M={a(Mp −Mq )mod p}*q+Mq ……(9) の計算でディジタル署名Mが求められる。Next, in the following steps 1 to 3, a remainder calculation is performed by using p and q whose lengths are half of n instead of n, which makes it possible to calculate equation (1) as it is. Can be processed at high speed. Step 1: C p = Cmod p, C q = Cmod q ...... (5) Step 2: M p = C p x mod p, M q = C q y mod q ...... (6) Here, x = d Calculate p , y = d q . The calculation in step 2 is a normal RSA decoding calculation for each of p and q. Using this result, equation (1) results in the following simultaneous equation. M≡M p (mod p) (7) M≡M q (mod q) (8) In equation (7), M−M p is divisible by p, and equation (8) is M−M
It means that q is divisible by q. Step 3: from the Chinese remainder theorem, M = {a (M p -M q) mod p} * q + M q digital signature M in the calculation of ... (9) is obtained.
【0009】図7は上記した手順で高速でディジタル署
名Mを作成する処理フローを示している。ICカード2
がディジタル署名のコマンドを受け取ると(実際にはコ
マンド名を受け取り、コマンド名に対応するコマンドを
ROMから読みだす)、ICカードではあらかじめEE
PROMに記憶してあるdp 、dq 、aを読み出すとと
もに、コマンドとともに送られてくるメッセージを読み
込む(ステップ1〜2)。次いで、(5)式によりCmo
d p、Cmod qを計算してCp 、Cq を求め(ステップ
3〜4)、次いで、Cp 、Cq 、dp 、dq 、p、qを
用い、(6)式でMp 、Mq を計算する(ステップ5〜
6)。次いで、中国人剰余定理により(9)式を用いて
ディジタル署名Mを作成し、作成したディジタル署名M
をレスポンスとしてリーダ/ライタ1へ返す。FIG. 7 shows a processing flow for creating a digital signature M at a high speed by the above-described procedure. IC card 2
Receives a digital signature command (actually, it receives the command name and reads the command corresponding to the command name from the ROM).
D p which is stored in the PROM, d q, reads the a, reads the message sent with the command (step 1-2). Next, Cmo is calculated according to equation (5).
d p and C mod q are calculated to obtain C p and C q (steps 3 and 4). Then, using C p , C q , d p , d q , p and q, M p is calculated by the equation (6). calculates the M q (step 5
6). Next, a digital signature M is created by using the Chinese remainder equation using equation (9), and the created digital signature M is created.
Is returned to the reader / writer 1 as a response.
【0010】このように、nに対して半分の桁数のp、
qによる剰余計算となるため、(1)式の計算に比して
計算量がほぼ1/4となり、処理を高速化できる。Thus, p, which is half the number of digits for n,
Since the remainder calculation is performed by q, the amount of calculation is approximately 1/4 compared to the calculation of the equation (1), and the processing can be speeded up.
【0011】ところで故障利用攻撃では、ディジタル署
名を作成するICカードに対して、外部から物理的刺激
(熱、圧力、放射線、電圧等)を加えることにより、I
Cカードのメモリやレジスタ上のビットパターンの一部
に故意に誤りを発生させる。例えば、前記ステップ2の
(6)式の計算途中で、故意に誤りを発生させ、Mpま
たはMq のどちらか一方の値を誤らせる。ここでは、M
p の計算結果が誤っているとしてそれをMp ′とし、M
q は正しく求められているとする。Mp ′、Mq を
(9)式に適用して求めた署名Mも誤っていることにな
るから、それをM′とする。By the way, in a failure attack, a physical stimulus (heat, pressure, radiation, voltage, etc.) is externally applied to an IC card for creating a digital signature.
An error is intentionally generated in a part of the bit pattern on the memory or the register of the C card. For example, in the intermediate calculation of the Step 2 (6), intentionally generate an error, misleading either the value of M p or M q. Here, M
Assuming that the calculation result of p is incorrect, it is set to M p ', and M
It is assumed that q is correctly obtained. Since the signature M obtained by applying M p ′ and M q to the equation (9) is also incorrect, it is defined as M ′.
【0012】このとき、署名対象データCと公開されて
いる法nの値を使って、 gcd((M′)e −C,n)(gcd:最大公約数) ……(10) によって秘密に保つべきnの素因数qが求められてしま
う(Marc Joye and Jean-Jacques Quisquater;"Attacks
on system using Chinese remaindering" November 1
1,1996 この論文はhttp://www.dice.ucl.ac.be/crypto/
techreports.htmlにて公開されている)。なぜならば、
Mが正しいとすると Me ≡C(mod n) ……(11) が成立するが、Mp ′に誤りがあるため成立しない。そ
して Mp ′≡Cp x (mod p)(x=dp ) なので、 (M′)e ≡C(mod q) ……(12) である。すなわち、(M′)e −Cとn(=pq)との
最大公約数はqである。こうして、qが分かるとpも分
かり、その結果、すべての秘密情報が分かってしまうこ
とになる。At this time, using the data C to be signed and the value of the published modulus n, secretly by gcd ((M ′) e −C, n) (gcd: greatest common divisor) (10) The prime factor q of n to be kept is found (Marc Joye and Jean-Jacques Quisquater; "Attacks
on system using Chinese remaindering "November 1
1,1996 This paper is http://www.dice.ucl.ac.be/crypto/
techreports.html). because,
M is correct that when M e ≡C (mod n) ...... (11) is satisfied, but not satisfied because there is an error in M p '. And 'So ≡C p x (mod p) ( x = d p), (M' M p a) e ≡C (mod q) ...... (12). That is, the greatest common divisor of (M ') e- C and n (= pq) is q. Thus, if q is known, p is also known, and as a result, all secret information is known.
【0013】[0013]
【発明が解決しようとする課題】このように、故障攻撃
により秘密情報が解析されるため、中国人剰余定理を利
用して計算したディジタル署名Mが正しいか否かを確認
する必要があるが、確認するには、作成されたディジタ
ル署名を署名作成者自ら検証してみる必要があった。す
なわち、署名作成者の公開鍵eを用いてMe ≡C(mod
n)を検証する必要があった。As described above, since secret information is analyzed by a failure attack, it is necessary to confirm whether or not the digital signature M calculated using the Chinese remainder theorem is correct. To confirm, it was necessary to verify the created digital signature by the signature creator himself. That is, using the public key e of the signature creator, Me e C (mod
It was necessary to verify n).
【0014】ところで、冪乗剰余計算を高速に処理する
コプロセッサを搭載したICカードの場合、コプロセッ
サによる冪乗剰余計算の対象となる整数の大きさはハー
ドウェア的に制限がある。前述したように、高速処理の
ためにディジタル署名の作成において冪乗剰余計算の法
nの素因数p、qを用いるので、p、qの大きさをコプ
ロセッサで扱える限度いっぱいまでとると、p、qの積
であるnはコプロセッサで扱える限度を超えてしまう。
署名の検証はe,nのみ用いてMe ≡C(modn)を
コプロセッサで演算して行うが、この演算を行うことが
できなくなってしまう。一方、CPUの命令を用いてソ
フトウエアでの処理により検証すると、署名の作成本体
処理よりもはるかに多くの時間を要するため、故障利用
攻撃を受けたかどうかの検証を実用的なレスポンス時間
内に行うことができない。そのため、nの大きさがコプ
ロセッサで扱える限度を超える場合には、作成した署名
の検証を行わないことが一般的であり、故障利用攻撃を
許してしまう結果となっていた。By the way, in the case of an IC card equipped with a coprocessor for performing the modular exponentiation calculation at high speed, the size of the integer to be subjected to the modular exponentiation calculation by the coprocessor is limited in hardware. As described above, the prime factors p and q of the modulus n of the modular exponentiation are used in the creation of a digital signature for high-speed processing. Therefore, when the sizes of p and q are taken to the limit that can be handled by the coprocessor, p, The product n of q exceeds the limit that can be handled by the coprocessor.
Verification of the signature is performed by using only e and n to calculate Me e C (modn) by a coprocessor, but this operation cannot be performed. On the other hand, verification by software processing using CPU instructions requires much more time than signature processing itself. Can't do it. For this reason, if the size of n exceeds the limit that can be handled by the coprocessor, it is common to not verify the created signature, resulting in a failure use attack.
【0015】本発明は上記課題を解決するためのもの
で、メッセージ作成者本人がRSA秘密鍵を用いてディ
ジタル署名を作成する際に、中国人剰余定理を利用して
高速に署名作成処理をするICカードに対して、中国人
剰余定理の途中結果に計算誤りを発生させ、誤ったディ
ジタル署名を作らせることによって、秘密情報を得よう
とする故障利用攻撃に対する安全性を高めることを目的
とするものである。The present invention has been made to solve the above-mentioned problem. When a message creator himself / herself creates a digital signature using an RSA private key, the message creator performs a high-speed signature creation process using the Chinese remainder theorem. The purpose is to increase the security against failure-based attacks that attempt to obtain confidential information by causing an IC card to make a calculation error in the middle result of the Chinese Remainder Theorem and create an erroneous digital signature. Things.
【0016】[0016]
【課題を解決するための手段】本発明は、コプロセッサ
を搭載し、ディジタル署名の作成を行う冪乗剰余計算を
RSA公開鍵暗号方式の公開鍵nの素因数を用いて中国
人剰余定理により高速で処理するようにしたICカード
において、中国人剰余定理による計算過程において生成
されるデータとともに、該データについてのエラー検出
符号を同時に計算して記憶しておき、ディジタル署名の
作成時に、前記データのエラー検出符号を再度計算し、
記憶しておいたエラー検出符号と照合するようにしたこ
とを特徴とする。また、本発明は、エラー検出符号の照
合で誤りが検出されないことを条件に、ディジタル署名
を作成してレスポンスとして出力し、エラー検出符号の
照合で誤りが検出されたことを条件に、エラーステータ
スワードを出力して処理を終了することを特徴とする。According to the present invention, a co-processor is mounted, and a modular exponentiation calculation for generating a digital signature is performed at high speed by a Chinese remainder theorem using a prime factor of a public key n of an RSA public key cryptosystem. In the IC card, the error detection code for the data is simultaneously calculated and stored together with the data generated in the calculation process according to the Chinese remainder theorem. Calculate the error detection code again,
It is characterized in that it is collated with the stored error detection code. The present invention also provides a digital signature created and output as a response on the condition that no error is detected in the verification of the error detection code, and an error status on the condition that the error is detected in the verification of the error detection code. The method is characterized in that a word is output and the processing is terminated.
【0017】[0017]
【発明の実施の形態】以下、本発明の実施の形態につい
て説明する。図1、図2は本発明による故障利用攻撃へ
の対策を施したICカードを説明する図、図3、図4は
本発明のディジタル署名作成処理フローを説明する図で
ある。本発明は、図5、図6で説明したICカードを使
用し、(1)式のディジタル署名を、(2)〜(9)式
に示す処理により行う点は従来のものと同じである。し
たがって、以下ではこれらの式を援用して説明し、すで
に説明した変量の定義等については適宜説明を省略す
る。前述したように、故障利用攻撃では、(2)〜
(9)式によりRSA復号化計算を高速で行うICカー
ドに対して、外部から物理的刺激(熱、圧力、放射線、
電圧等)を加えることにより、ICカードのメモリやレ
ジスタ上のビットパターンの一部に故意に誤りを発生さ
せている。Embodiments of the present invention will be described below. FIGS. 1 and 2 are diagrams for explaining an IC card in which a countermeasure against a failure use attack according to the present invention is taken, and FIGS. 3 and 4 are diagrams for explaining a digital signature creation processing flow of the present invention. The present invention is the same as the conventional one in that the digital signature of the expression (1) is performed by the processing shown in the expressions (2) to (9) using the IC card described in FIGS. Therefore, the following description will be made with reference to these equations, and the description of the already-defined variables and the like will be omitted as appropriate. As described above, in the failure use attack, (2) to
An external physical stimulus (heat, pressure, radiation,
By applying a voltage or the like, an error is intentionally generated in a part of the bit pattern on the memory or the register of the IC card.
【0018】そこで、中国人剰余定理を用いてディジタ
ル署名を作成する途中の、ステップ1やステップ2の
(5)式、(6)式におけるCp =Cmod p 、Cq
=Cmodq、Mp =Cp x mod p(x=dp )、Mq =
Cq y mod q(y=dq )の各々の計算後に、それぞれ
についてエラー検出符号を計算しておき、メモリまたは
レジスタ中にCp 、Cq 、Mp 、Mq と同時に記憶して
おく。Therefore, C p = C mod p, C q in equations (5) and (6) in steps 1 and 2 during the creation of a digital signature using the Chinese Remainder Theorem.
= Cmodq, M p = C p x mod p (x = d p), M q =
After calculating each of C q y mod q (y = d q ), an error detection code is calculated for each, and stored in a memory or a register at the same time as C p , C q , M p , and M q. .
【0019】こうして記憶させたCp 、Cq 、Mp 、M
q を用いて(9)式を用いてディジタル署名を計算する
際に、再びCp 、Cq 、Mp 、Mq のエラー検出符号を
計算し、先に記憶しておいたエラー検出符号と照合す
る。照合の結果、Cp 、Cq 、Mp 、Mq にビットエラ
ーが発生していないことを確認してから、Cp 、Cq 、
Mp 、Mq を使用する。照合の結果、Cp 、Cq 、
Mp 、Mq にビットエラーが発生している場合には、エ
ラーのステータスワードをリーダ/ライタに対して返し
て処理を終了する。このようにすれば、故障利用攻撃を
受けても、誤ったディジタル署名をレスポンスとして返
すことはない。C p , C q , M p , M
when calculating a digital signature used in the equation (9) using q, again C p, C q, calculates an error detecting code of M p, M q, and the error detection code has been stored previously Collate. After checking that no bit error has occurred in C p , C q , M p , and M q , C p , C q ,
Mp and Mq are used. As a result of the comparison, C p , C q ,
If a bit error has occurred in M p and M q , an error status word is returned to the reader / writer, and the process is terminated. In this way, an erroneous digital signature will not be returned as a response even if a failure use attack is received.
【0020】図1はエラー検出符号としてCRC(Cycl
ic Redundancy Check )コードを用いた例を示してい
る。図1は、(5)式、(6)式により演算したCp 、
Cq 、Mp 、Mq をメモリ或いはレジスタにビットパタ
ーンとして格納した状態を示しており、同時にこれらの
CRCコードを生成して書き込んでおく。ICカードに
データを書き込むときに通常エラーチェックコードが付
加され、ICカードにおいては一般的にISO−CCI
TTの規格に基づくCRCコードが使用されている。C
RCコードは、書き込むデータに基づいて所定のアルゴ
リズムの論理演算を行って発生させ、データとともに書
き込まれる。例えば、ISO−CCITTの規格に基づ
くCRCコードは、書き込み対象であるデータを所定の
値、例えば、2進数で「10001000000100
001」なる17ビットの数で割ったときの余りとして
定義されている。FIG. 1 shows a CRC (Cycl) as an error detection code.
ic Redundancy Check) code. FIG. 1 shows C p calculated by equations (5) and (6),
This shows a state in which C q , M p , and M q are stored in a memory or a register as a bit pattern. At the same time, these CRC codes are generated and written. When writing data to an IC card, an error check code is usually added.
A CRC code based on the TT standard is used. C
The RC code is generated by performing a logical operation of a predetermined algorithm based on data to be written, and is written together with the data. For example, a CRC code based on the ISO-CCITT standard specifies that data to be written has a predetermined value, for example, "100010000000100" in binary.
001 ”is defined as the remainder when divided by the 17-bit number.
【0021】こうして生成した各Cp 、Cq 、Mp 、M
q に対するCRCコードX(Cp )、X(Cq )、X
(Mp )、X(Mq )を同時に記憶しておく。そして、
ディジタル署名を作成する段階で、再びCRCコードX
(Cp )′、X(Cq )′、X(Mp )′、X
(Mq )′を計算し、先に記憶しておいたCRCコード
X(Cp)、X(Cq )、X(Mp )、X(Mq )と照
合する。照合の結果、Cp 、Cq、Mp 、Mq にビット
エラーが発生していないことを確認してから、Cp 、C
q、Mp 、Mq を使用してディジタル署名Mを作成す
る。Cp 、Cq 、Mp 、Mqにビットエラーが発生して
いれば、エラーのステータスワードを返して処理を終了
する。Each of the generated C p , C q , M p , M
CRC code X for q (C p), X ( C q), X
(M p ) and X (M q ) are stored simultaneously. And
At the stage of creating a digital signature, the CRC code X
( Cp ) ', X ( Cq )', X ( Mp ) ', X
(M q ) ′ is calculated and compared with the previously stored CRC codes X (C p ), X (C q ), X (M p ), and X (M q ). After checking that no bit error has occurred in C p , C q , M p , M q , C p , C p
Create a digital signature M using q , M p , M q . If a bit error has occurred in C p , C q , M p , and M q , an error status word is returned, and the processing is terminated.
【0022】図2はエラー検出符号としてパリティ符号
を用いた例を示している。図2は(5)式、(6)式に
より演算したCp 、Cq 、Mp 、Mq をメモリ或いはレ
ジスタにビットパターンとして格納した状態を示してお
り、同時にCp 、Cq 、Mp 、Mq の各バイトについて
ビット毎に排他的論理和をとり、水平パリティP
(Cp )、P(Cq )、P(Mp )、P(Mq )を計算
し、同時に記憶しておく。そして、ディジタル署名を作
成する段階で、再び水平パリティP(Cp)′、P(C
q )′、P(Mp )′、P(Mq )′を計算し、先に記
憶しておいた水平パリティP(Cp )、P(Cq )、P
(Mp )、P(Mq )と照合する。照合の結果、Cp 、
Cq 、Mp 、Mq にビットエラーが発生していないこと
を確認してから、Cp 、Cq 、Mp 、Mq を使用してデ
ィジタル署名Mを作成する。Cp 、Cq 、Mp 、Mq に
ビットエラーが発生していれば、エラーのステータスワ
ードを返して処理を終了する。FIG. 2 shows an example in which a parity code is used as an error detection code. FIG. 2 shows a state in which C p , C q , M p , and M q calculated by the equations (5) and (6) are stored in a memory or a register as a bit pattern, and at the same time, C p , C q , M An exclusive OR is calculated for each byte of p and Mq for each bit, and the horizontal parity P
( Cp ), P ( Cq ), P ( Mp ), and P ( Mq ) are calculated and stored at the same time. Then, at the stage of creating the digital signature, the horizontal parity P (C p ) ′, P (C
q ) ', P (M p )', P (M q ) 'and calculate the previously stored horizontal parities P (C p ), P (C q ), P (C q )
(M p ) and P (M q ). As a result of the comparison, C p ,
C q, M p, confirm that the bit error has not occurred in the M q, to create a digital signature M using C p, C q, M p , M q. If a bit error has occurred in C p , C q , M p , and M q , an error status word is returned, and the processing is terminated.
【0023】次に、図3、図4により本発明によるディ
ジタル署名作成処理フローを説明する。ICカードがデ
ィジタル署名のコマンドを受け取ると、ICカードでは
あらかじめEEPROMに記憶してあるdp 、dq 、a
を読み出すとともに、コマンドとともに送られてくるメ
ッセージを読み込む(ステップ11〜12)。次いで、
(5)式によりCmod pを計算してCp を求めるととも
に、Cp のCRCコードX(Cp )を計算して記憶する
(ステップ13)。同様に、Cmod qを計算してCq を
求めるとともに、Cq のCRCコードX(Cq )を計算
して記憶する(ステップ14)。また、(6)式で
Mp 、Mq を計算するとともに、Mp 、Mq のCRCコ
ードX(Mp )、X(Mq )を計算してそれぞれ記憶す
る(ステップ15、16)。次いで、ディジタル署名を作
成する段階で、再びCp 、Cq 、Mp 、Mq のCRCコ
ードを計算し、記憶しておいたCRCコードX
(Cp )、X(Cq )、X(Mp )、X(Mq )とそれ
ぞれ照合する(ステップ17〜20)。Next, the flow of the digital signature creation processing according to the present invention will be described with reference to FIGS. When the IC card receives the digital signature command, the IC card uses d p , d q , a
As well as the message sent with the command (steps 11 to 12). Then
(5) with determining the C p by calculating the Cmod p using equation calculates and stores the C p of CRC code X (C p) (step 13). Similarly, with determining the C q by calculating the Cmod q, calculates and stores the CRC code X (C q) of C q (step 14). Further, (6) with computing the M p, M q in formula, M p, M q of CRC code X (M p), and stores each calculate the X (M q) (step 15, 16). Next, at the stage of creating a digital signature, CRC codes of C p , C q , M p , and M q are calculated again, and the stored CRC code X
(C p), X (C q), X (M p), X (M q) and matching each (step 17-20).
【0024】この照合は、図4に示すように、記憶して
おいたCRCコードX(Y)と、計算したYのCRCコ
ードTとを比較し、両者が一致すれば正常終了、一致し
なければ異常終了とする。図3のステップ17〜20の
どの段階で異常終了となっても、その時点でエラーのス
テータスワードをリーダ/ライタに返して処理を終了す
る。ステップ17〜20がすべて正常終了の場合、ディ
ジタル署名を作成して、これをレスポンスとして返す
(ステップ21、22)。In this comparison, as shown in FIG. 4, the stored CRC code X (Y) is compared with the calculated CRC code T of Y, and if both match, the process ends normally. If it ends abnormally. Regardless of the abnormal termination at any of steps 17 to 20 in FIG. 3, an error status word is returned to the reader / writer at that point, and the processing is terminated. If all of steps 17 to 20 are completed normally, a digital signature is created and returned as a response (steps 21 and 22).
【0025】[0025]
【発明の効果】以上のように本発明によれば、nの大き
さがコプロセッサで扱える限度を超える場合にも、作成
した署名の検証を短時間で行うことができるので、故障
利用攻撃を受けても、誤ったディジタル署名をレスポン
スとして返してしまう可能性を減らすことができる。故
障利用攻撃によって、エラー検出符号そのものに誤りが
発生したり、エラー検出符号の誤り検出能力を超える範
囲の誤りが発生する可能性が全くないとはいえないが、
ほとんどの場合において故障利用攻撃を受けたことを検
出することが可能である。As described above, according to the present invention, even when the size of n exceeds the limit that can be handled by the coprocessor, the created signature can be verified in a short time, so that a failure use attack can be prevented. Even if received, the possibility of returning an incorrect digital signature as a response can be reduced. Although there is no possibility that an error occurs in the error detection code itself or an error in a range exceeding the error detection capability of the error detection code due to a failure use attack,
In most cases, it is possible to detect that a failure use attack has been received.
【図1】 エラー検出符号としてCRCコードを用いた
例を説明する図である。FIG. 1 is a diagram illustrating an example in which a CRC code is used as an error detection code.
【図2】 エラー検出符号としてパリティチェックを用
いた例を説明する図である。FIG. 2 is a diagram illustrating an example in which a parity check is used as an error detection code.
【図3】 本発明のディジタル署名作成処理フローを説
明する図である。FIG. 3 is a diagram illustrating a digital signature creation processing flow according to the present invention.
【図4】 CRC照合処理を説明する図である。FIG. 4 is a diagram illustrating a CRC matching process.
【図5】 リーダ/ライタとICカードとの通信を説明
する図である。FIG. 5 is a diagram illustrating communication between a reader / writer and an IC card.
【図6】 ICカードの説明図である。FIG. 6 is an explanatory diagram of an IC card.
【図7】 従来のディジタル署名作成処理フローの説明
図である。FIG. 7 is an explanatory diagram of a conventional digital signature creation processing flow.
1…リーダ/ライタ、2…ICカード、2a…CPU、
2b…コプロセッサ、2c…ロム、2d…EEPRO
M。1 ... reader / writer, 2 ... IC card, 2a ... CPU,
2b: Coprocessor, 2c: ROM, 2d: EEPRO
M.
───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 FI H04L 9/32 H04L 9/00 673E ──────────────────────────────────────────────────の Continued on the front page (51) Int.Cl. 6 Identification code FI H04L 9/32 H04L 9/00 673E
Claims (2)
号方式のディジタル署名の作成を行う冪乗剰余計算を公
開鍵nの素因数を用いて中国人剰余定理により高速で処
理するようにしたICカードにおいて、 中国人剰余定理による計算過程において生成されるデー
タとともに、該データについてのエラー検出符号を同時
に計算して記憶しておき、ディジタル署名の作成時に、
前記データのエラー検出符号を再度計算し、記憶してお
いたエラー検出符号と照合するようにした故障利用攻撃
対応ICカード。1. An IC card equipped with a coprocessor and processing a modular exponentiation calculation for generating a digital signature of an RSA public key cryptosystem at high speed by a Chinese remainder theorem using a prime factor of a public key n. At the same time, along with the data generated in the calculation process by the Chinese remainder theorem, an error detection code for the data is calculated and stored at the same time, and when the digital signature is created,
An IC card for failure use attack, wherein the error detection code of the data is calculated again and collated with the stored error detection code.
ラー検出符号の照合で誤りが検出されないことを条件
に、ディジタル署名を作成してレスポンスとして出力
し、エラー検出符号の照合で誤りが検出されたことを条
件に、エラーステータスワードを出力して処理を終了す
ることを特徴とするICカード。2. The IC card according to claim 1, wherein a digital signature is created and output as a response on condition that no error is detected by the error detection code collation, and the error is detected by the error detection code collation. An IC card which outputs an error status word on condition that the processing is terminated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP9159992A JPH118616A (en) | 1997-06-17 | 1997-06-17 | Ic card having provision against attack taking advantage of failure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP9159992A JPH118616A (en) | 1997-06-17 | 1997-06-17 | Ic card having provision against attack taking advantage of failure |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH118616A true JPH118616A (en) | 1999-01-12 |
Family
ID=15705644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP9159992A Pending JPH118616A (en) | 1997-06-17 | 1997-06-17 | Ic card having provision against attack taking advantage of failure |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH118616A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4872748A (en) * | 1985-02-18 | 1989-10-10 | U.S. Philips Corporation | Projection-lens system |
JP2002536875A (en) * | 1999-01-27 | 2002-10-29 | フランス テレコム | Authentication or signature process with reduced computational set |
JP2003501698A (en) * | 1999-06-09 | 2003-01-14 | マイクロソフト コーポレイション | Generating parameters using basic register operations |
JP2003051817A (en) * | 2001-08-08 | 2003-02-21 | Toshiba Corp | Encryption/decryption device, digital signature generating/verifying device, method and program |
KR100431047B1 (en) * | 2002-02-26 | 2004-05-12 | 주홍정보통신주식회사 | Digital signature method using RSA public-key cryptographic based on CRT and apparatus therefor |
JP2006504361A (en) * | 2002-10-24 | 2006-02-02 | テレフオンアクチーボラゲット エル エム エリクソン(パブル) | Message authentication code based on error correction code |
US7388957B2 (en) | 2003-01-28 | 2008-06-17 | Matsushita Electric Industrial Co., Ltd. | Elliptic curve exponentiation apparatus that can counter differential fault attack, and information security apparatus |
JP2009502070A (en) * | 2005-07-19 | 2009-01-22 | ジェムプリュス | Permanent data hardware integrity |
JP2009259126A (en) * | 2008-04-18 | 2009-11-05 | Dainippon Printing Co Ltd | Method for detecting fault attack and security device |
JP2011072040A (en) * | 2002-07-09 | 2011-04-07 | Axalto Sa | Method for protecting electronic circuit against fault-based attacks |
JP2016009114A (en) * | 2014-06-25 | 2016-01-18 | ルネサスエレクトロニクス株式会社 | Data processing apparatus and decryption processing method |
JP2016008994A (en) * | 2014-06-23 | 2016-01-18 | 大日本印刷株式会社 | Modular exponentiation arithmetic unit, ic card, modular exponentiation arithmetic method, and modular exponentiation arithmetic program |
-
1997
- 1997-06-17 JP JP9159992A patent/JPH118616A/en active Pending
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4872748A (en) * | 1985-02-18 | 1989-10-10 | U.S. Philips Corporation | Projection-lens system |
JP2002536875A (en) * | 1999-01-27 | 2002-10-29 | フランス テレコム | Authentication or signature process with reduced computational set |
USRE42517E1 (en) | 1999-01-27 | 2011-07-05 | Phentam Dire Nv, Llc | Authenticating or signature method with reduced computations |
JP2003501698A (en) * | 1999-06-09 | 2003-01-14 | マイクロソフト コーポレイション | Generating parameters using basic register operations |
JP2003051817A (en) * | 2001-08-08 | 2003-02-21 | Toshiba Corp | Encryption/decryption device, digital signature generating/verifying device, method and program |
KR100431047B1 (en) * | 2002-02-26 | 2004-05-12 | 주홍정보통신주식회사 | Digital signature method using RSA public-key cryptographic based on CRT and apparatus therefor |
JP2011072040A (en) * | 2002-07-09 | 2011-04-07 | Axalto Sa | Method for protecting electronic circuit against fault-based attacks |
JP2006504361A (en) * | 2002-10-24 | 2006-02-02 | テレフオンアクチーボラゲット エル エム エリクソン(パブル) | Message authentication code based on error correction code |
US7388957B2 (en) | 2003-01-28 | 2008-06-17 | Matsushita Electric Industrial Co., Ltd. | Elliptic curve exponentiation apparatus that can counter differential fault attack, and information security apparatus |
JP2009502070A (en) * | 2005-07-19 | 2009-01-22 | ジェムプリュス | Permanent data hardware integrity |
JP4766285B2 (en) * | 2005-07-19 | 2011-09-07 | ジェムアルト エスアー | Permanent data hardware integrity |
JP2009259126A (en) * | 2008-04-18 | 2009-11-05 | Dainippon Printing Co Ltd | Method for detecting fault attack and security device |
JP2016008994A (en) * | 2014-06-23 | 2016-01-18 | 大日本印刷株式会社 | Modular exponentiation arithmetic unit, ic card, modular exponentiation arithmetic method, and modular exponentiation arithmetic program |
JP2016009114A (en) * | 2014-06-25 | 2016-01-18 | ルネサスエレクトロニクス株式会社 | Data processing apparatus and decryption processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8850221B2 (en) | Protection against side channel attacks with an integrity check | |
US5414772A (en) | System for improving the digital signature algorithm | |
Tuyls et al. | RFID-tags for anti-counterfeiting | |
Boneh et al. | On the importance of eliminating errors in cryptographic computations | |
CN1842757B (en) | Method and apparatus for incremental code signing | |
US5955717A (en) | Transaction verification protocol for Smart Cards | |
US20020174339A1 (en) | Data card verification system | |
JPH09128507A (en) | Mutual certifying method | |
US7000110B1 (en) | One-way function generation method, one-way function value generation device, proving device, authentication method, and authentication device | |
JPH06348202A (en) | Method and device for validating at least one identifying device with confirming device | |
EP3742662A1 (en) | Method for securing against fault attacks a verification algorithm of a digital signature of a message | |
JPH118616A (en) | Ic card having provision against attack taking advantage of failure | |
US7227947B2 (en) | Cryptographic method and cryptographic device | |
JP2011530093A (en) | Solutions to protect power-based encryption | |
US20090034717A1 (en) | Method of processing data protected against attacks by generating errors and associated device | |
US7454625B2 (en) | Method and apparatus for protecting a calculation in a cryptographic algorithm | |
US7496758B2 (en) | Method and apparatus for protecting an exponentiation calculation by means of the chinese remainder theorem (CRT) | |
US20040184604A1 (en) | Secure method for performing a modular exponentiation operation | |
EP1501236B1 (en) | Error correction for cryptographic keys | |
US6928163B1 (en) | Methods, systems and computer program products for generating user-dependent RSA values without storing seeds | |
JP2003255831A (en) | Elliptic curve scalar multiplication calculation method and apparatus | |
CN100588155C (en) | Method for implementing cryptographic algorithm used for finding public exponent in electronic component | |
AU2003269005B2 (en) | Cryptographic method and devices for facilitating calculations during transactions | |
JP2003051817A (en) | Encryption/decryption device, digital signature generating/verifying device, method and program | |
Horng | A secure server-aided RSA signature computation protocol for smart cards |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040512 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060824 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060830 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061030 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20061220 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070219 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20070403 |
|
A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20070720 |