CN110098916A - 一种基于软件指令定位的高阶侧信道分析方法 - Google Patents

一种基于软件指令定位的高阶侧信道分析方法 Download PDF

Info

Publication number
CN110098916A
CN110098916A CN201910276140.4A CN201910276140A CN110098916A CN 110098916 A CN110098916 A CN 110098916A CN 201910276140 A CN201910276140 A CN 201910276140A CN 110098916 A CN110098916 A CN 110098916A
Authority
CN
China
Prior art keywords
order
power consumption
multiple channel
analysis method
curve
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.)
Granted
Application number
CN201910276140.4A
Other languages
English (en)
Other versions
CN110098916B (zh
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.)
Beijing Research Institute Of Information Science And Technology
Wuhan University WHU
Original Assignee
Beijing Research Institute Of Information Science And Technology
Wuhan University WHU
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 Beijing Research Institute Of Information Science And Technology, Wuhan University WHU filed Critical Beijing Research Institute Of Information Science And Technology
Priority to CN201910276140.4A priority Critical patent/CN110098916B/zh
Publication of CN110098916A publication Critical patent/CN110098916A/zh
Application granted granted Critical
Publication of CN110098916B publication Critical patent/CN110098916B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • H04L9/003Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种基于软件指令定位的高阶侧信道分析方法,包括基于软件指令定位的特征点选取和高阶侧信道分析两个步骤;通过定位与敏感信息相关的指令,可以确定高阶掩码方案中每个秘密共享因子对应功耗出现的具体位置,从而降低后续高阶分析方法的时间复杂度。对于一个有n个秘密共享因子的高阶掩码方案,可以将高阶分析方法的时间复杂度水平从功耗曲线点数的n次方降低到线性水平,大大提高了高阶分析方法的效率。本发明实用性强,实现简单,适用于不同芯片及软件平台,可以作为针对掩码方案软件实现的高阶功耗分析的第一步,从而能够和各种高效的高阶功耗分析结合使用,具有很高的通用性。

Description

一种基于软件指令定位的高阶侧信道分析方法
技术领域
本发明属于信息安全技术领域,涉及一种新型高阶侧信道分析方法,尤其涉及一种基于软件指令定位的特征点选取方法,该方法可用于高阶侧信道分析,有效提高高阶分析方法的效率。
背景技术
侧信道分析(Side-channel Analysis,SCA)可以利用一个密码设备运行过程中泄漏的时间、功耗以及电磁等物理特征([文献1-6])来恢复秘密信息,已经成为密码设备安全的一个严重威胁。
面对侧信道分析时,掩码防护是一种非常常用的防护方法。在掩码方案中,密码算法中的每一个敏感变量都被拆分成一个随机的掩码序列([文献7])。目前的掩码方案已经发展到了高阶掩码防护方案[文献8-15]。高阶掩码防护方案的主要思想是将密码算法中任意一个敏感变量x拆分成n个随机的秘密共享因子xi。在一个d+1阶掩码方案中,任意d个中间变量值的联立都和敏感变量相互独立。
高阶侧信道分析是目前针对高阶掩码方案最为有效的分析方法。然而,目前的高阶分析方法仍有一些局限性,难以在掩码方案的阶数较高时使用。要提高高阶分析的效率,需要分别针对高阶分析的两个阶段进行分析。第一个阶段是寻找与敏感中间变量相关的功耗点位置。这些功耗点位置通常称为特征点。这个过程可以被称为特征点选取过程。第二阶段就是将特征点进行联立,通过选择合适的联立函数,使特征点的联立与敏感信息具有尽可能高的相关性([文献16])。由于掩码方案的源码和运行平台很有可能是公开的([文献13]),因此假设攻击者知道算法源码和处理器进行的操作是很合理的。然而,即使在这个前提下,现有的特征点选取方法依然是高阶分析方法中最耗时的阶段([文献10])。在安全评估时,由于测评机构需要在一定时间内完成安全评估([文献17]),因此分析方法的时间消耗是安全评估有效的最重要因素之一。
[文献1]P.Kocher.Timing attacks on implementations of Diffie-Hellmann,RSA,DSS,and other systems.CRYPTO’96,LNCS 1109,pp.104-113,1996.
[文献2]Eli Biham,Adi Shamir.Differential Fault Analysis of Secret KeyCryptosystems.CRYPT0'97
[文献3]P.Kocher,J.Jaffe,and B.Jun.Differential Power Analysis[A].CRYPTO 1999[C],Berlin Heidelberg:Springer-Verlag,1999:388–397.
[文献4]Quisquater J.J,Samyde D.Electromagnetic analysis(EMA):Measuresand countermeasures for smart cards.Cannes,France:ACM 2001
[文献5]E.Brier,C.Clavier,and F.Olivier.Correlation Power Analysiswith a Leakage Model[A].CHES 2004[C],Berlin Heidelberg:Springer-Verlag,2004:16–29.
[文献6]B.Gierlichs,L.Batina,P.Tuyls,and B.Preneel.Mutual InformationAnalysis[A].CHES 2008[C],Berlin Heidelberg:Springer-Verlag,2008:426-442.
[文献7]S.Mangard,E.Oswald,and T.Popp,Power analysis attacks:Revealingthe secrets of smart cards vol.31.New York,USA:Springer Science&BusinessMedia,2008.
[文献8]M.Rivain,E.Dottax,and E.Prouff.Block ciphers implementationsprovably secure against second order side channel analysis.Proceedings of theInternational Workshop on Fast Software Encryption,Lausanne,Switzerland,2008,127-143.
[文献9]H.Kim,S.Hong,and J.Lim."A fast and provably secure higher-order masking of AES S-box,"Proceedings of the International Workshop onCryptographic Hardware and Embedded Systems,Nara,Japan,2011,95-107.
[文献10]C.Carlet,L.Goubin,E.Prouff,M.Quisquater,and M.Rivain,"Higher-order masking schemes for s-boxes,"Proceedings of the Fast SoftwareEncryption,Washington,USA,2012,366-384.
[文献11]M.Rivain and E.Prouff,"Provably secure higher-order maskingof AES,"Proceedings of the International Workshop on Cryptographic Hardwareand Embedded Systems,Santa Barbara,USA,2010,413-427.
[文献12]A.Roy and S.Vivek,"Analysis and improvement of the generichigher-order masking scheme of FSE 2012,"Proceedings of the InternationalWorkshop on Cryptographic Hardware and Embedded Systems,Santa Barbara,USA,2013,417-434.
[文献13]J.-S.Coron,E.Prouff,M.Rivain,and T.Roche,"Higher-order sidechannel security and mask refreshing,"Proceedings of the InternationalWorkshop on Fast Software Encryption,Singapore,2013,410-424.
[文献14]J.-S.Coron,"Higher order masking of look-up tables,"Proceedings of the Annual International Conference on the Theory andApplications of Cryptographic Techniques,Copenhagen,Denmark,2014,441-458.
[文献15]V.Grosso,E.Prouff,and F.-X.Standaert,"Efficient masked s-boxes processing–a step forward,"Proceedings of the International Conferenceon Cryptology in Africa,Dakar,Senegal,2014,251-266.
[文献16]E.Prouff,M.Rivain,and R.Bevan,"Statistical analysis of secondorder differential power analysis,"IEEE Transactions on computers,2009,58:799-811
[文献17]N.Veyrat-Charvillon and F.-X.Standaert,"Generic side-channeldistinguishers:Improvements and limitations,"in Annual Cryptology Conference,Santa Barbara,CA,USA,2011,354-372.
发明内容
本发明以高阶掩码方案的侧信道分析方法为研究目标,提出了一种基于软件指令定位的特征点选取方法,旨在找到一种高效分析方法,使高阶功耗分析的时间复杂度不再和掩码阶数相关,提高安全测试的效率,从而推动现有可证明安全的掩码方案在软件平台上的安全实现方案的发展。
本发明所采用的技术方案是:一种基于软件指令定位的高阶侧信道分析方法,其特征在于,包括以下步骤:
步骤1:基于软件指令定位的特征点选取;
以NT条包含MT个样本点的建模功耗曲线Ti、NP条包含MP个样本点的采集功耗曲线Pi、概率阈值t为输入,得到n个位置的输出L;其中,Ti表示为了建立指令的模板所采集建模功耗曲线,i∈[1,NT];Pi表示匹配时采集的功耗曲线集合,i∈[1,NP];L表示被选为候选位置次数最多的n个位置的集合;
具体实现包括以下子步骤:
步骤1.1:对每一条建模功耗曲线Ti进行降维处理,得到降维后的曲线T’;
步骤1.2:利用降维后得到的曲线T’建立模板,建模均值向量记为Q,协方差矩阵记为C;
步骤1.3:用整数i,k作为循环变量,初始值为1;
步骤1.4:将Pi作为输入,对Pi[k,k+MT]进行降维处理,得到降维曲线Pk’;将得到的降维曲线Pk’作为输入,计算得到概率Prk;将循环变量k增加1,即令k=k+1;若k≤MP-MT,则回转执行步骤1.4;
步骤1.5:将循环变量i增加1,即令i=i+1;若i≤NP,则回转执行步骤1.4;
步骤1.6:选出I中被选中次数最多的前m个位置的下标k,将每个位置对应的下标k存入集合L中;
步骤1.7:输出L;
步骤2:高阶侧信道分析;
本发明的特点与优势:
(1)本发明提出了一种基于软件指令定位的特征点选取方法,使得高阶功耗分析的时间复杂度不再和掩码阶数相关;
(2)本发明可有效降低高阶功耗分析的时间复杂度,提高安全测试的效率;
(3)本发明适用于不同芯片及软件平台,基于软件指令定位的特征点选取方法可以作为针对掩码方案软件实现的高阶功耗分析的第一步,从而能够和各种高效的高阶功耗分析结合使用,具有很高的通用性。
附图说明
图1为本发明实施例的流程示意图。
具体实施方式
为了便于本领域普通技术人员理解和实施本发明,下面结合附图及实施例对本发明作进一步的详细描述,应当理解,此处所描述的实施示例仅用于说明和解释本发明,并不用于限定本发明。
本发明提供的一种基于软件指令定位的高阶侧信道分析方法,包括以下步骤:
步骤1:基于软件指令定位的特征点选取;
本发明提出一种基于软件指令定位的特征点选取方法,称为IR-PoIS(Instruction Recognition-based Points of Interest Selection),来准确地定位出掩码方案中每个秘密共享因子,以有效提高高阶掩码方案实现的功耗分析效率。
本实施例以NT条包含MT个样本点的建模功耗曲线Ti、NP条包含MP个样本点的采集功耗曲线Pi、概率阈值t为输入,得到n个位置的输出L;其中,Ti表示为了建立指令的模板所采集建模功耗曲线,i∈[1,NT];Pi表示匹配时采集的功耗曲线集合,i∈[1,NP];L表示被选为候选位置次数最多的n个位置的集合;
请见图1,具体实现包括以下子步骤:
步骤1.1:对每一条建模功耗曲线Ti进行降维处理,得到降维后的曲线T’;
本实施例使用的降维算法为主成分分析(Principal Component Analysis,PCA);
步骤1.2:利用降维后得到的曲线T’建立模板,建模均值向量记为Q,协方差矩阵记为C;
本实施例的建模过程,是以降维后得到的曲线T’为输入,根据建模规则,得到建模均值向量Q和协方差矩阵C;其中,
步骤1.3:用整数i,k作为循环变量,初始值为1;
步骤1.4:将Pi作为输入,对Pi[k,k+MT]进行降维处理,得到降维曲线Pk’;将得到的降维曲线Pk’作为输入,计算得到概率Prk;将循环变量k增加1,即令k=k+1;若k≤MP-MT,则回转执行步骤1.4;
本实施例中,概率计算,对于曲线x,
步骤1.5:将循环变量i增加1,即令i=i+1;若i≤NP,则回转执行步骤1.4;
步骤1.6:选出I中被选中次数最多的前m个位置的下标k,将每个位置对应的下标k存入集合L中;
步骤1.7:输出L;
步骤2:高阶侧信道分析。
本发明通过定位与敏感信息相关的指令,可以确定高阶掩码方案中每个秘密共享因子对应功耗出现的具体位置,从而降低后续高阶分析方法的时间复杂度。对于一个有n个秘密共享因子的高阶掩码方案,可以将高阶分析方法的时间复杂度水平从功耗曲线点数的n次方降低到线性水平,大大提高了高阶分析方法的效率。并且由于目标CPU的指令集是已知的,攻击者可以事先对敏感指令进行建模。本发明实用性强,实现简单,适用于不同芯片及软件平台,可以作为针对掩码方案软件实现的高阶功耗分析的第一步,从而能够和各种高效的高阶功耗分析结合使用,具有很高的通用性。
应当理解的是,本说明书未详细阐述的部分均属于现有技术。
应当理解的是,上述针对较佳实施例的描述较为详细,并不能因此而认为是对本发明专利保护范围的限制,本领域的普通技术人员在本发明的启示下,在不脱离本发明权利要求所保护的范围情况下,还可以做出替换或变形,均落入本发明的保护范围之内,本发明的请求保护范围应以所附权利要求为准。

Claims (4)

1.一种基于软件指令定位的高阶侧信道分析方法,其特征在于,包括以下步骤:
步骤1:基于软件指令定位的特征点选取;
以NT条包含MT个样本点的建模功耗曲线Ti、NP条包含MP个样本点的采集功耗曲线Pi、概率阈值t为输入,得到n个位置的输出L;其中,Ti表示为了建立指令的模板所采集建模功耗曲线,i∈[1,NT];Pi表示匹配时采集的功耗曲线集合,i∈[1,NP];L表示被选为候选位置次数最多的n个位置的集合;
具体实现包括以下子步骤:
步骤1.1:对每一条建模功耗曲线Ti进行降维处理,得到降维后的曲线T’;
步骤1.2:利用降维后得到的曲线T’建立模板,建模均值向量记为Q,协方差矩阵记为C;
步骤1.3:用整数i,k作为循环变量,初始值为1;
步骤1.4:将Pi作为输入,对Pi[k,k+MT]进行降维处理,得到降维曲线Pk’;将得到的降维曲线Pk’作为输入,计算得到概率Prk;将循环变量k增加1,即令k=k+1;若k≤MP-MT,则回转执行步骤1.4;
步骤1.5:将循环变量i增加1,即令i=i+1;若i≤NP,则回转执行步骤1.4;
步骤1.6:选出I中被选中次数最多的前m个位置的下标k,将每个位置对应的下标k存入集合L中;
步骤1.7:输出L;
步骤2:高阶侧信道分析。
2.根据权利要求1所述的基于软件指令定位的高阶侧信道分析方法,其特征在于:步骤1.1中,使用主成分分析方法对每一条建模功耗曲线Ti进行降维处理。
3.根据权利要求1所述的基于软件指令定位的高阶侧信道分析方法,其特征在于:步骤1.2中所述建模过程,是以降维后得到的曲线T’为输入,根据建模规则,得到建模均值向量Q和协方差矩阵C;其中,
4.根据权利要求1所述的基于软件指令定位的高阶侧信道分析方法,其特征在于:步骤1.4中所述概率计算,对于曲线x,
CN201910276140.4A 2019-04-08 2019-04-08 一种基于软件指令定位的高阶侧信道分析方法 Active CN110098916B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910276140.4A CN110098916B (zh) 2019-04-08 2019-04-08 一种基于软件指令定位的高阶侧信道分析方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910276140.4A CN110098916B (zh) 2019-04-08 2019-04-08 一种基于软件指令定位的高阶侧信道分析方法

Publications (2)

Publication Number Publication Date
CN110098916A true CN110098916A (zh) 2019-08-06
CN110098916B CN110098916B (zh) 2021-07-20

Family

ID=67444434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910276140.4A Active CN110098916B (zh) 2019-04-08 2019-04-08 一种基于软件指令定位的高阶侧信道分析方法

Country Status (1)

Country Link
CN (1) CN110098916B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112134729A (zh) * 2020-09-02 2020-12-25 上海科技大学 一种基于分治的程序高阶功耗侧信道安全性的证明方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120144205A1 (en) * 2004-06-08 2012-06-07 Hrl Laboratories, Llc Cryptographic Architecture with Instruction Masking and other Techniques for Thwarting Differential Power Analysis
CN108062477A (zh) * 2017-12-12 2018-05-22 北京电子科技学院 基于侧信道分析的硬件木马检测方法
KR101879809B1 (ko) * 2017-09-19 2018-08-16 국민대학교산학협력단 부채널 분석에 안전한 연산 장치 및 방법
CN109150491A (zh) * 2018-07-10 2019-01-04 武汉大学 一种移动便携式侧信道采集测试设备及其控制方法
CN109150506A (zh) * 2017-06-19 2019-01-04 深圳职业技术学院 一种彩虹签名的侧信道分析方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120144205A1 (en) * 2004-06-08 2012-06-07 Hrl Laboratories, Llc Cryptographic Architecture with Instruction Masking and other Techniques for Thwarting Differential Power Analysis
CN109150506A (zh) * 2017-06-19 2019-01-04 深圳职业技术学院 一种彩虹签名的侧信道分析方法及装置
KR101879809B1 (ko) * 2017-09-19 2018-08-16 국민대학교산학협력단 부채널 분석에 안전한 연산 장치 및 방법
CN108062477A (zh) * 2017-12-12 2018-05-22 北京电子科技学院 基于侧信道分析的硬件木马检测方法
CN109150491A (zh) * 2018-07-10 2019-01-04 武汉大学 一种移动便携式侧信道采集测试设备及其控制方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112134729A (zh) * 2020-09-02 2020-12-25 上海科技大学 一种基于分治的程序高阶功耗侧信道安全性的证明方法

Also Published As

Publication number Publication date
CN110098916B (zh) 2021-07-20

Similar Documents

Publication Publication Date Title
CN108604981B (zh) 用于估计秘密值的方法和设备
Batina et al. Mutual information analysis: a comprehensive study
Heuser et al. Good is not good enough: Deriving optimal distinguishers from communication theory
Oswald et al. Template attacks on masking—resistance is futile
Ding et al. A statistical model for higher order DPA on masked devices
Heuser et al. Lightweight ciphers and their side-channel resilience
Agrawal et al. Templates as master keys
Dabosville et al. A new second-order side channel attack based on linear regression
Bruneau et al. Stochastic collision attack
Maghrebi et al. There is wisdom in harnessing the strengths of your enemy: Customized encoding to thwart side-channel attacks
Levi et al. Garbled Circuits from an SCA Perspective: Free XOR can be Quite Expensive...
Yli-Mäyry et al. Improved power analysis on unrolled architecture and its application to PRINCE block cipher
CN110098916A (zh) 一种基于软件指令定位的高阶侧信道分析方法
Hajra et al. Reaching the limit of nonprofiling DPA
Ming et al. Revealing the weakness of addition chain based masked SBox implementations
Zhang On the exact relationship between the success rate of template attack and different parameters
Martinasek et al. Crucial pitfall of DPA Contest V4. 2 implementation
Le et al. Mutual information analysis under the view of higher-order statistics
Zhang et al. Template attack assisted linear cryptanalysis on outer rounds protected DES implementations
KR101941886B1 (ko) 블록 암호 알고리즘의 안전성 검증 장치 및 방법
Aljuffri et al. Balanced Dual-Mask Protection Scheme for GIFT Cipher Against Power Attacks
Bhasin et al. Practical evaluation of fse 2016 customized encoding countermeasure
Schramm et al. Embedded cryptography: Side channel attacks
Maghrebi et al. Revisiting higher-order computational attacks against white-box implementations
Oder et al. Secure implementation of lattice-based encryption schemes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant