CN101840325B - 椭圆曲线上的抗故障计算 - Google Patents
椭圆曲线上的抗故障计算 Download PDFInfo
- Publication number
- CN101840325B CN101840325B CN201010134178.7A CN201010134178A CN101840325B CN 101840325 B CN101840325 B CN 101840325B CN 201010134178 A CN201010134178 A CN 201010134178A CN 101840325 B CN101840325 B CN 101840325B
- Authority
- CN
- China
- Prior art keywords
- mod
- elliptic curve
- result
- integer
- cryptographic calculation
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/60—Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
- G06F7/72—Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
- G06F7/724—Finite field arithmetic
- G06F7/725—Finite field arithmetic over elliptic curves
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2207/00—Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F2207/72—Indexing scheme relating to groups G06F7/72 - G06F7/729
- G06F2207/7219—Countermeasures against side channel or fault attacks
- G06F2207/7271—Fault verification, e.g. comparing two values which should be the same, unless a computational fault occurred
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
- Examining Or Testing Airtightness (AREA)
Abstract
本发明提供了一种用于检验在椭圆曲线上的加密运算的正确性的装置,该装置包括椭圆曲线上Q=kP的抗故障计算。由中国剩余给出(110)椭圆曲线并且其中r是整数。在中形成(120)点P^=CRT(P(mod p),R(mod r2));P^在中简化为P并且在中简化为R。在中计算(130)Q^=kP^。然后在中验证(140)是否Q^三kR(mod r2),并且如果是,则输出Q=Q^mod p,否则返回“错误”。本发明还提供一种设备(200)以及计算机程序产品(240)。
Description
技术领域
本发明一般地涉及加密技术,并且具体地涉及对抗故障攻击的椭圆曲线加密算法。
背景技术
本节旨在向读者介绍与下面描述和/或要求保护的本发明各方面相关的现有技术。相信该讨论有助于向读者提供背景信息以便于更好地理解本发明的各方面。因此,应当从这个角度来理解这些声明,而不是把他们当做对现有技术的承认。
故障攻击在加密计算期间引入错误以获得加密秘密的一个或者更多比特,比如私有解密密钥。在“The Sorcerer’s Apprentice Guide toFault Attacks”,by Hagai Bar-EI,Hamid Choukri,David Naccache,Michael Tunstall,and Claire Whelan,Proceedings of the IEEE,94(2):370-382,2006(Proc.Of FDTC 2004中的较早版本)以及在“ASurvey On Fault Attacks”by Christophe Giraud and Hugues Thiebeauld,in J.-J.Quisquater,P.Paradinas,Y.Deswarte,and A.A.EI Kalam,editors,Smart Card Research and Advanced Applications VI(CARDIS 2004),pages 159-176,Kluwer,2004中研究了发动故障攻击的实际方式。
RSA(Rivest-Shamir-Adleman)求幂包括在中的输入x以及私有指数d上将x提升至d次幂,其中是整数环(ring of integers)模N,并且N=pq是两个大素数的乘积。Adi Shamir在“How to CheckModular Exponentiation”,presented at the rump session ofEUROCRYPT’97,Konstanz,Germany,May 13,1997中提供了一种对抗故障攻击的良好对策。该对策是:
1、对于(小)的随机整数r,计算y′=xd mod rN
2、计算z=xd mod r,
3、检验是否y′≡z(mod r),以及
如果是,则输出y=y′mod N;
否则,返回“错误”。
典型地,r是64比特整数。Shamir的方法的正确性是中国剩余定理(CRT)的应用。当计算正确时,显然y′≡y(mod N)并且y′≡z(mod r)。在故障存在的情况中,y′≡z(mod r)的概率大约是1/r。当r是64比特值时,这意味着检测不到故障的概率是大约2-64。r的值越大意味着需要以更多的计算来得到更高的检测概率。
可以采用Shamir的方法以当在CRT模式中评估时保护RSA求幂;即,当通过xd mod p以及xd mod q评估y=xd mod N时。在“SecureEvaluation of Modular Functions”by Marc Joye,Pascal Paillier,andSung-Ming Yen,in R.J.Hwang and C.K.Wu,editors,2001 InternationalWorkshop on Cryptology and Network Security,pages 227-229,Taipei,Taiwan,September 2001中讨论了对Shamir的对策的进一步归纳和扩展。
David Vigilant在“RSA With CRT:A New Cost-Effective Solution toThwart Fault Attacks”,in E.Oswald and P.Rohatgi,editors,Cryptographic Hardware and Embedded Systems-CHES 208,volume5154 of Lecture Notes in Computer Science,pages 230-145,Springer,2008中提出了备选的解决方案。该解决方案是:
1、针对(小)随机整数r,形成X=CRT(x(mod N),1+r(mod r2))
2、计算y′=xd mod r2N;
3、检验是否y′≡1+dr(mod r2),以及
如果是,则输出y=y′mod N;
否则,返回“错误”。
在步骤1中,CRT代表中国剩余定理的应用;即,如此获得的X满足X≡x(mod N)以及X≡1+r(mod r2)。因此,当计算无故障时,得到y′≡xd(mod N)以及y′≡(1+r)d(mod r2)。步骤3的正确性遵循二项式定理。得到 其中代表二项式系数。通过模r2来简化该等式得到(1+r)d≡1+dr(mod r2),从而当计算无故障时,y′≡1+dr(mod r2)。未检测出故障的概率预期是大约1/r2。因此,在Vigilant的方法中r的32比特值应当提供与Shamir的方法中r的64比特值相同的安全级别。
Vigilant的方法相对于Shamir的方法具有几个优点。具体地,Vigilant的方法将求幂z=xd mod r换为更快的乘法1+dr mod r2,然而应当理解,假如的值是已知的,则可以将Shamir的方法中的z的评估加速为(其中代表欧拉函数)。此外,Vigilant的方法应用于CRT模式中的RSA。
利用Shamir以及Vigilant的对策向RSA的应用来描述了这些对策。然而,应当理解由于对于相同的所推测的安全级别来说密钥更短,因此椭圆曲线加密(ECC)是相对于RSA的感兴趣的备选。
在ECC中,给定椭圆曲线E上的点P以及整数k,基本运算包含计算标量乘法kP,即,P+P+…+P(k次),其中+代表E上的群运算。攻击者的目的是通过引起故障来恢复k的值(或者其一部分)。
尽管Shamir的对策推广至椭圆曲线标量乘法(参见例如JohannesMartin Otto,and Jean-Pierre Seifert:“Sign Change Fault Attackson Elliptic Curve Cryptosystems”.In L.Breveglieri,I.Koren,D.Naccache,and J.-P.Seifert,editors,Fault Diagnosis and Tolerance inCryptography--FDTC 2006,volume 4236 of Lecture Notes in ComputerScience,pages 36-52.Springer-Verlag,2006.),由于不存在二项式定理的等价物,所以Vigilant的方法并没有容易地适于推广至椭圆曲线标量乘法。
因此应当理解需要一种解决方案,该解决方案提供对抗ECC上的故障攻击的备选对策。本发明提供了这样的解决方案。
发明内容
第一方面,本发明提出了一种检验在第一椭圆曲线上的加密运算的正确性的方法。处理器从所述第一椭圆曲线以及第二椭圆曲线获得由中国剩余给出的第三椭圆曲线其中r是整数;在上执行运算以获得第一结果;在上执行运算以获得第二结果,其中代表中以r为模简化至上的单位元的点的子集;在中验证所述第一结果和所述第二结果是否相等;以及如果相等,则以p为模而简化的形式来输出所述运算的所述第一结果。
在第一优选实施例中,所述加密运算是中的标量乘法,用于椭圆曲线上的Q=kP的抗故障计算。在中形成点P^=CRT(P(mod p),R(mod r2)),使得P^在中简化为P并且在中简化为R,其中CRT代表中国剩余方法。在中计算Q^=kP^并且在中验证是否Q^≡kR(mod r2)并且仅当在Q^≡kP(mod r2)的情况下输出Q=Q^mod p。
在第二优选实施例中,随机地选择所述整数r。
在第三优选实施例中,所述整数r具有预定的值。
有利地,所述整数r是素数。
在另一个优选实施例中,将所述椭圆曲线表示为Edwards曲线或者表示为Jacobi曲线。
第二方面,本发明提供了一种用于检验在第一椭圆曲线上的加密运算的正确性的设备。所述设备包括用于执行以下操作的装置:从所述第一椭圆曲线以及第二椭圆曲线获得由中国剩余给出的第三椭圆曲线其中r是整数;在上执行运算以获得第一结果;在上执行运算以获得第二结果,其中代表了中以r为模简化至上的单位元的点的子集;在中验证所述第一结果和所述第二结果是否相等;以及如果相等,则以p为模而简化的形式输出所述运算的所述第一结果。
在第一优选实施例中,所述加密运算是中的标量乘法,用于椭圆曲线上Q=kP的抗故障计算。所述设备包括用于执行以下操作的装置:在中形成点P^=CRT(P(mod p),R(mod r2)),使得P^在中简化为P并且在中简化为R,其中CRT代表中国剩余方法;在中计算Q^=kP^;在中验证是否Q^≡kR(mod r2)并且仅当在Q^≡kR(mod r2)的情况下输出Q=Q^mod p。
第三方面,本发明提供了一种计算机程序产品,在所述计算机程序产品上存储有指令,当由处理器执行所述指令时,所述指令执行根据第一方面的任意一个实施例所述的方法。
附图说明
现在将参考附图通过非限制性示例来描述本发明的优选特征,其中:
图1示出了根据本发明的优选实施例的抗故障方法的流程图;
图2示出了根据本发明的优选实施例的用于执行抗故障椭圆曲线加密计算的设备。
具体实施方式
如果是,则输出Q=Q^mod p;
否则,返回“错误”。
此外,可以以若干种方式来执行步骤4;具体地,可以使用所谓的感染计算(infective computation)来实施步骤4以避免显式的分支指令。在“RSA Speedup With Chinese Remainder Theorem Immune AgainstHardware Fault Cryptanalysis”by Sung-Ming Yen,Seungjoo Kim,Seongan Lim,and Sang-Jae Moon;IEEE Transactions on Computers,52(4):461-472,2003;(Proc.of ICISC 2001中的较早版本)以及在“SignChange Fault Attacks On Elliptic Curve Cryptosystems”by JohannesMartin Otto,and Jean-Pierre Seifert;in L.Breveglieri,I.Koren,D.Naccache,and J.-P.Seifert,editors,Fault Diagnosis and Tolerance inCryptography--FDTC 2006,volume 4236 of Lecture Notes in ComputerScience,pages 36-52;Springer-Verlag,2006中对感染计算进行了描述。
此外,可以用不同的方式来表示椭圆曲线。由于单位元不需要特殊的处理,因此具体感兴趣的是所谓的完整模型。该曲线的示例是Edwards曲线(由Daniel J.Bernstein和Tanja Lange在“Faster Additionand Doubling on Elliptic Curves”,in K.Kurosawa,editor,Advances inCryptology--ASIACRYPT 2008,volume 4833 of Lecture Notes inComputer Science,pages 29-50;Springer,2007中描述的)以及Jacobi曲线(由Olivier Billet和Marc Joye在“The Jacobi Model of An EllipticCurve and Side-Channel Analysis”,in M.Fossorier,T.Hoholdt,and A.Poli,editors,Applied Algebra,Algebraic Algorithms and Error-CorrectingCodes(AAECC-15),volume 2643 of Lecture Notes in Computer Science,pages 34-42;Springer,2003中描述的)。
图2示出了根据本发明的优选实施例的设备。该设备200包括适于与其它设备(图中未示出)进行通信的至少一个接口单元210、至少一个处理器220以及适于存储数据的至少一个存储器230(如,累加器和中间计算结果)。处理器220适用于根据如本文之前描述的本发明方法的任意一个实施例来计算求幂。一种计算机程序产品240(如,CD-ROM或者DVD)包括所存储的指令,当由处理器220执行该指令时,该指令执行根据本发明的任意一个实施例所述的方法。
可以以独立或者以任何恰当的组合的形式来提供在说明书和(恰当的地方)和权利要求以及附图中公开的每一个特征。以硬件来实现的特征也可以采用软件来实现,反之亦然。出现在权利要求中的参考数字仅作为说明之用并且不应当对权利要求的范围起到任何限制作用。
Claims (9)
3.根据权利要求1所述的方法,其中,所述整数r是随机地选择的。
4.根据权利要求1所述的方法,其中,所述整数r具有预定的值。
5.根据权利要求3和4中任一项所述的方法,其中,所述整数r是素数。
7.根据权利要求1或2所述的方法,其中所述椭圆曲线表示为Edwards曲线或者表示为Jacobi曲线。
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP09305236.3 | 2009-03-13 | ||
EP09305236 | 2009-03-13 | ||
EP09165551A EP2228715A1 (en) | 2009-03-13 | 2009-07-15 | Fault-resistant calculcations on elliptic curves |
EP09165551.4 | 2009-07-15 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101840325A CN101840325A (zh) | 2010-09-22 |
CN101840325B true CN101840325B (zh) | 2014-05-21 |
Family
ID=41162302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010134178.7A Expired - Fee Related CN101840325B (zh) | 2009-03-13 | 2010-03-10 | 椭圆曲线上的抗故障计算 |
Country Status (5)
Country | Link |
---|---|
US (1) | US8457303B2 (zh) |
EP (2) | EP2228715A1 (zh) |
JP (1) | JP5528848B2 (zh) |
CN (1) | CN101840325B (zh) |
AT (1) | ATE536584T1 (zh) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5326715B2 (ja) * | 2009-03-24 | 2013-10-30 | 富士通株式会社 | 楕円曲線暗号を用いた認証処理に対する故障利用攻撃を検知する認証用媒体 |
US8817974B2 (en) * | 2011-05-11 | 2014-08-26 | Nxp B.V. | Finite field cryptographic arithmetic resistant to fault attacks |
EP2535804A1 (en) * | 2011-06-17 | 2012-12-19 | Thomson Licensing | Fault-resistant exponentiation algorithm |
CN102547694A (zh) * | 2012-02-20 | 2012-07-04 | 上海电力学院 | 一种传感器网络中基于中国剩余定理的组密钥建立方法 |
FR2992084B1 (fr) * | 2012-06-19 | 2015-07-24 | Logiways France | Procede de protection d'un circuit de cryptographie et systeme correspondant |
JP6095584B2 (ja) * | 2014-01-15 | 2017-03-15 | 日本電信電話株式会社 | マルチパーティ計算システム、秘匿計算装置、マルチパーティ計算方法及びプログラム |
KR102423885B1 (ko) | 2015-05-08 | 2022-07-21 | 한국전자통신연구원 | 연산 에러 검출이 가능한 준동형 암호 방법 및 그 시스템 |
DE102016013692A1 (de) * | 2016-11-16 | 2018-05-17 | Giesecke+Devrient Mobile Security Gmbh | Punktmultiplikation auf einer Erweiterung einer elliptischen Kurve |
US10541866B2 (en) | 2017-07-25 | 2020-01-21 | Cisco Technology, Inc. | Detecting and resolving multicast traffic performance issues |
DE102017117899A1 (de) * | 2017-08-07 | 2019-02-07 | Infineon Technologies Ag | Durchführen einer kryptografischen Operation |
US10601578B2 (en) * | 2017-10-26 | 2020-03-24 | Nxp B.V. | Protecting ECC against fault attacks |
EP3503459B1 (en) * | 2017-12-22 | 2021-04-21 | Secure-IC SAS | Device and method for protecting execution of a cryptographic operation |
CN110798305B (zh) * | 2019-09-24 | 2023-05-30 | 瓦戈科技有限公司 | 一种故障分析防御方法、电子设备、可读存储介质 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1297635A (zh) * | 1998-02-18 | 2001-05-30 | 西门子公司 | 用于在计算机上借助于椭圆曲线加密处理的方法和装置 |
CN1625104A (zh) * | 2004-12-09 | 2005-06-08 | 中国电子科技集团公司第三十研究所 | 一种用于椭圆曲线密码算法芯片的倍点运算电路 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5991415A (en) * | 1997-05-12 | 1999-11-23 | Yeda Research And Development Co. Ltd. At The Weizmann Institute Of Science | Method and apparatus for protecting public key schemes from timing and fault attacks |
KR101527867B1 (ko) * | 2007-07-11 | 2015-06-10 | 삼성전자주식회사 | 타원 곡선 암호 시스템에 대한 부채널 공격에 대응하는방법 |
US7503192B1 (en) * | 2007-09-12 | 2009-03-17 | Pai Lung Machinery Mill Co., Ltd | Corduroy fabric |
EP2154604A1 (en) * | 2008-08-06 | 2010-02-17 | Gemalto SA | Countermeasure securing exponentiation based cryptography |
-
2009
- 2009-07-15 EP EP09165551A patent/EP2228715A1/en not_active Withdrawn
-
2010
- 2010-02-16 JP JP2010031482A patent/JP5528848B2/ja not_active Expired - Fee Related
- 2010-03-01 AT AT10155001T patent/ATE536584T1/de active
- 2010-03-01 EP EP10155001A patent/EP2228716B1/en not_active Not-in-force
- 2010-03-10 CN CN201010134178.7A patent/CN101840325B/zh not_active Expired - Fee Related
- 2010-03-12 US US12/661,246 patent/US8457303B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1297635A (zh) * | 1998-02-18 | 2001-05-30 | 西门子公司 | 用于在计算机上借助于椭圆曲线加密处理的方法和装置 |
CN1625104A (zh) * | 2004-12-09 | 2005-06-08 | 中国电子科技集团公司第三十研究所 | 一种用于椭圆曲线密码算法芯片的倍点运算电路 |
Also Published As
Publication number | Publication date |
---|---|
JP5528848B2 (ja) | 2014-06-25 |
JP2010217880A (ja) | 2010-09-30 |
ATE536584T1 (de) | 2011-12-15 |
EP2228716A1 (en) | 2010-09-15 |
CN101840325A (zh) | 2010-09-22 |
US8457303B2 (en) | 2013-06-04 |
US20100232599A1 (en) | 2010-09-16 |
EP2228716B1 (en) | 2011-12-07 |
EP2228715A1 (en) | 2010-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101840325B (zh) | 椭圆曲线上的抗故障计算 | |
Bernstein | Curve25519: new Diffie-Hellman speed records | |
Clavier et al. | Horizontal correlation analysis on exponentiation | |
Walter | Sliding windows succumbs to big mac attack | |
Joye et al. | On second-order differential power analysis | |
CN107040362B (zh) | 模乘设备和方法 | |
Feix et al. | Side-channel analysis on blinded regular scalar multiplications | |
Amiel et al. | Power analysis for secret recovering and reverse engineering of public key algorithms | |
EP2332040B1 (en) | Countermeasure securing exponentiation based cryptography | |
KR20140046568A (ko) | 단순 전력 파형 분석 및 오류 주입 분석을 방지하는 타원곡선 암호화 방법 및 그 시스템 | |
EP3242202A1 (en) | Countermeasure to safe-error fault injection attacks on cryptographic exponentiation algorithms | |
EP3503459B1 (en) | Device and method for protecting execution of a cryptographic operation | |
Karakoyunlu et al. | Efficient and side-channel-aware implementations of elliptic curve cryptosystems over prime fields | |
KR20100113130A (ko) | 비대칭 암호화를 위한 대응조치 방법 및 디바이스 | |
CN102779022B (zh) | 抗边信道攻击的模幂方法和设备 | |
Hanley et al. | Using templates to distinguish multiplications from squaring operations | |
US20140129604A1 (en) | Cryptographic method comprising a modular exponentiation operation | |
US8014520B2 (en) | Exponentiation ladder for cryptography | |
Courrege et al. | Simple power analysis on exponentiation revisited | |
Fouque et al. | Defeating countermeasures based on randomized BSD representations | |
Hedabou et al. | A comb method to render ECC resistant against Side Channel Attacks | |
Bae et al. | Instruction fault attack on the miller algorithm in a pairing-based cryptosystem | |
Cao et al. | Two lattice-based differential fault attacks against ECDSA with w NAF algorithm | |
EP2473912B1 (en) | Modular exponentiation resistant against skipping attacks | |
Le et al. | On double exponentiation for securing RSA against fault analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140521 Termination date: 20170310 |
|
CF01 | Termination of patent right due to non-payment of annual fee |