WO2010045843A1 - 抵御差分能量攻击的aes加密方法 - Google Patents

抵御差分能量攻击的aes加密方法 Download PDF

Info

Publication number
WO2010045843A1
WO2010045843A1 PCT/CN2009/074386 CN2009074386W WO2010045843A1 WO 2010045843 A1 WO2010045843 A1 WO 2010045843A1 CN 2009074386 W CN2009074386 W CN 2009074386W WO 2010045843 A1 WO2010045843 A1 WO 2010045843A1
Authority
WO
WIPO (PCT)
Prior art keywords
box
encryption
aes
round
random number
Prior art date
Application number
PCT/CN2009/074386
Other languages
English (en)
French (fr)
Inventor
张翌维
郑新建
彭波
谢华
徐非
Original Assignee
国民技术股份有限公司
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 国民技术股份有限公司 filed Critical 国民技术股份有限公司
Publication of WO2010045843A1 publication Critical patent/WO2010045843A1/zh

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]
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms

Definitions

  • the present invention relates to AES (Advanced Encryption Standard) symmetric block cipher technology in the field of information security technology, and in particular to an AES implementation technology that considers side channel security, which can effectively resist differential energy attacks against integrated circuits.
  • AES Advanced Encryption Standard
  • the hardware is based on a semiconductor series.
  • the logic gate is composed of a large number of transistors. When a discharge phenomenon occurs on the logic gate, electrons flow through the silicon substrate, consume energy, and generate electromagnetic radiation.
  • Energy analysis is the monitoring of hardware power consumption or changes in energy information such as electromagnetic radiation. The collected side information is analyzed using statistical methods and attack experience. There are four main types of energy analysis techniques: Simple Power Analysis, Simple Electromagnetic Analysis, and the corresponding Differential Power Analysis and Differential Electromagnetic Analysis (Differential). Electromagnetic Analysis).
  • Simple energy analysis is a direct analysis of the order of instruction execution or circuit transistor flipping based on the characteristics of power consumption or electromagnetic radiation curve and the attack experience. It is often used to crack the cryptographic algorithm related to the execution order and certain data. Differential energy analysis can analyze the required confidential information from the small differential signal of power consumption or electromagnetic radiation curve, but need to collect a large amount of information, and collect multiple sets of energy curves and the plaintext and ciphertext records corresponding to each curve, usually need Certain simple energy analysis experience and long-term calculations, right The equipment requirements of the analysis platform are also relatively high. Currently, energy analysis techniques, especially differential energy analysis, have been widely used to steal data protected by cryptographic electronics.
  • Jiang Huiping is in the literature "an improved DES algorithm for anti-differential power attack and its hardware implementation" (see Jiang Huiping, Mao Zhigang, a kind Improved DES algorithm for anti-differential power attack and its hardware implementation, Journal of Computers, 27 (3): 334-338, 2004. ) It is recommended to use a random sequence to encrypt the key in the Data Encryption Standard (DES) algorithm. Intermediate results are masked, and In the inquiry S box The memory unit is inverted before, and the input data is restored. This midway solution is still dangerous.
  • DES Data Encryption Standard
  • H. CHANG In order to reduce storage space and hardware processing load, H. CHANG is in the paper "A study on Securing AES against Diferential Power Analysis" (see H. CHANG. A study on Securing AES against Diferential Power Analysis [EB/OL], http: // Caislab. icu. kr I pub I down I 2004 I w20022122_chs. p. 16 of pdf, 2003.) suggests a fixed value masking method, which is essentially random in the q set of fixed masks. Select 1 group and then mask the intermediate variables of the encryption process.
  • the implementation method uses multiple sets of S-boxes, which requires more storage space.
  • S box lookup table After each round of byte substitution (S box lookup table), the data is restored to normal values, ie with AES
  • the intermediate results of the quasi-algorithm are consistent.
  • the incomplete masking in this round exposes many standard intermediate results to the energy information and is unable to resist differential energy attacks against Hamming's weight.
  • the Chinese invention patent application CN1761 185 discloses an out-of-order execution data stream AES encryption circuit structure, which is integrated on a chip and includes: an input part; an output part; a key expansion and a key expansion ring.
  • the wheel key is subjected to a bitwise mixing operation with random state information, a line shift operation, a column hybrid transform operation, and a round iterative operation to obtain a ciphertext and then output through the output portion.
  • This circuit structure reduces the power consumption differential ratio by 66% and increases the difficulty of the attack.
  • the technical problem to be solved by the present invention is to avoid the deficiencies of the above prior art and propose a kind of The AES encryption method for the differential energy attack, using the encryption method, the hardware implementation is low in cost, the software implementation is relatively simple, and the energy security is high, and the differential spike corresponding to the correct round key is completely flattened, and the energy consumption is high.
  • the correlation between the weights is completely removed and easy to popularize and promote.
  • An AES encryption method against differential energy attack is proposed.
  • two encryption paths are used, and the intermediate results of all encryption intermediate results in each encryption path are different from those of the AES standard algorithm. Randomly varies in different batches, and the operation result of the two encryption paths is restored to the AES standard round operation result only at the end of the round.
  • each wheel key is XORed with the random number ⁇ , and is replaced by an equal-order, box-like equal-order byte, then row shift and column confusion, and two-way encryption after the last round of shift
  • the random number
  • the N (N may be 10, 12 or 14) round AES encryption method against the differential energy attack, the encryption step is as follows:
  • the two data paths are used for processing, that is, the box and the box are respectively used for table lookup, and the row shift and the column confusion are performed;
  • the result of the processing of the data path XOR obtains the result of the current round of AES encryption;
  • D If it is the last round (ie, the Nth round) encryption processing, the two data paths are used for processing, that is, the si box and the box are respectively used to perform table lookup and then perform row shift; and one round of data path processing is performed.
  • the round key is added and XORed with another data path to obtain the final encrypted result.
  • the present invention has the following technical effects: 1.
  • the hardware implementation complexity is low, and the circuit structure only needs to be slightly modified.
  • the software implementation steps are simple, the basic operation of the bottom layer does not need to be changed, and it is easy to maintain.
  • Energy information and AES standard intermediate results The correlation between the Hamming weight and the energy data generated by the method (including power consumption, electromagnetic radiation) is completely removed, and there is a good side channel in the case where the processing step is not increased much. safety.
  • FIG. 1 is a schematic diagram of a single-round AES encryption process in the first N-1 round of the first embodiment of the method of the present invention
  • FIG. 2 is a schematic diagram of an AES encryption process in the Nth round of the method of the present invention
  • FIG. 4 is a schematic diagram of an AES encryption processing flow of the second round of the second embodiment of the method of the present invention
  • FIG. 5 is a schematic diagram of the AES decryption processing flow of the method of the present invention
  • Figure 6 is a schematic flow chart of the AES standard encryption algorithm
  • Figure 7 is a schematic flow chart of the AES standard decryption algorithm
  • FIG. 8 is a schematic diagram of a fixed value masking process of an AES cipher machine in the prior art
  • Figure 9 is a power consumption difference graph implemented by the existing AES encryption method
  • Figure 10 is a graph showing the power consumption difference curve implemented by the AES encryption method of the present invention. Detailed ways
  • Figure 6 and Figure 7 are block diagrams of the normal AES standard algorithm flow.
  • the round key is added first, then the 8-bi t input 8-bi t output S box lookup table, after the table is checked, the data is stored as a 4*4 byte data space.
  • the last round of encryption requires replacing the column confusion with the round key plus.
  • decryption is the inverse of encryption, including retrograde shifting, inverse S-boxing for decryption, inverse column confusion, and round key addition.
  • the method of the present invention comprehensively takes into account the shortcomings of the standard processing flow and the existing anti-differential energy attack technique while ensuring the correctness of the calculation.
  • the method of the invention adopts two-way encryption path in a batch of AES addition and decryption, and all the encrypted intermediate results in each encryption path are different from the AES algorithm intermediate results, and randomly change in different batches, only in the round At the end of the second, the operation result of the two encryption paths is restored to the round operation result of the AES standard.
  • the key expansion method is consistent with the conventional AES algorithm, and the main technical points are in the process of encryption and decryption.
  • each wheel key is XORed with the random number r, and the equivalent table lookup operation (byte substitution) is performed separately by using the above two equal-order ', box properties, but after the table lookup operation It does not directly use the XOR operation to restore, but continues to store the two sets of data paths as a 4*4 byte matrix, respectively performing row shift and column confusion, and then returning the two channels to the normal round after XOR. Encrypt the result.
  • the Nth round encryption process is shown in Figure 2. In the last round of encryption, the corresponding adjustment is needed, that is, the column confusion is not performed after the row shift, but the round key is added to one channel of data, and the other data is XORed to obtain the final encryption result.
  • the reusability in the implementation of the integrated circuit is not considered, and the row shift and the column confusion process are performed simultaneously using two sets of data paths; in the second embodiment, the reusability can be used for timing folding. , through the same data path twice.
  • the second embodiment is shown in Figure 3 and Figure 4.
  • the specific processing procedure is as follows:
  • the first N-1 round of AES encryption processing is shown in Figure 3.
  • the memory unit is cleared, and each wheel key is XORed with the random number ⁇ , using two equal-order ', box properties, respectively Equivalent lookup table operation (byte substitution), after the table lookup operation, first perform row shift and column confusion on the data in path 1, and store it in the memory unit after XOR with the zero vector; then the data in path 2 ⁇ Use the same module for row shift and column confusion, and update the memory unit after XORing with the vector in the memory unit.
  • the vector in the memory unit is the round encryption result.
  • the encryption process is described in detail above. According to the encryption process, the inverse S-box initialization is also required before the bulk data is decrypted.
  • the specific process is the same as the encryption, and the true random number r is also generated, and two equal-order inverses are generated. The box is satisfied! ⁇ ⁇ ⁇ ⁇ ).
  • the N round decryption process is shown in Figure 5.
  • the specific process is:
  • the power consumption data of the cipher machine can be obtained by measuring the current during the encryption operation of the processor.
  • the AES encryption is performed on the 5000 sets of random plaintext using the 128-bit key "0x000102030405060708090a0b0c0d0f".
  • the difference result of the 4th S-box for the first round of encryption indicates:
  • the 8-bit key segment associated with the S-box is "0x03" (ie, the fourth 8-bit key segment)
  • an obvious power consumption difference result is obtained, as shown in FIG. 9, as can be seen from the figure.
  • a very obvious spike which indicates that the round key segment guessed by this group is correct and the attack is successful.
  • the power consumption differential curve is as shown in FIG. 10, and the correct key is known.
  • the 8-bit key segment associated with the fourth S-box is still "0x03"
  • the differential spike is completely absent. Appeared, effectively covered up.

Landscapes

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

Description

抵御差分能量攻击的 AES加密方法 技术领域
本发明涉及信息安全技术领域中的 AES (高级加密标准)对称分组密码技术, 尤其涉及一种考虑侧信道安全的 AES 实现技术, 釆用该方法能够有效抵御针对 集成电路的差分能量攻击。 背景技术
当前的信息安全领域中, 各种密码分析手段不断涌现。 与针对安全算法的 常规密码分析方式不同, 侧信道分析更加关注安全算法在硬件中运行时的特征, 通过以功耗、 电磁辐射、 错误诱导等方式所泄露的信息, 极大限度地获得与安 全算法有关的机密数据。
力口密硬件以半导体 辑为基础, 逻辑门由大量晶体管构成, 当逻辑门上发 生放电现象时, 电子从硅衬底流过、 消耗能量, 同时产生电磁辐射。 而能量分 析就是监测硬件的功耗或者电磁辐射等能量信息的变化, 利用统计方法和攻击 经验对收集到的边信息进行分析。 能量分析技术主要有以下四种: 简单功耗分 析(Simple Power Analysis) , 简单电磁賴射分析(Simple Electromagnetic Analysis)以及相对应的差分功耗分析(Differential Power Analysis)和差分 电磁賴射分析 (Differential Electromagnetic Analysis)。
简单能量分析是根据功耗或电磁辐射曲线的特征及攻击经验直观地分析出 指令执行或电路晶体管翻转的顺序, 常被用来破解执行顺序与某些数据有关的 密码算法。 差分能量分析可从功耗或电磁辐射曲线微小的差分信号分析出所需 的机密信息, 但需要搜集大量的信息, 并采集多组能量曲线以及每条曲线对应 的明文、 密文记录, 通常需要一定的简单能量分析经验和较长时间的运算, 对 分析平台的设备要求也比较高。 目前, 能量分析技术尤其是差分能量分析已被 广泛使用以窃取密码电子器件所保护的数据。
由于涉及能量分析的侧信道攻击已经触及并正在越来越深的影响到银行、 金融、 工商业和人民日常生活。 国内外关于能量攻击防御方面的研究报道也逐 步出现, 其主流技术包括: 算法及其硬件实现中的掩码技术、 时钟扰乱技术等。 其中掩码方法由于实现代价可控且不影响数字电路的工作特性, 已经受到广泛 关注。
S. Chari在 1999年首次提出了抗 DPA (Differential Power Analysis, 差分功耗分析)分析的掩码技术(见 S. Chari, C. Jut la, J. R. Rao, P. Rohatgi, A Cautionary Note Regarding Evaluation of AES Candidates on Smart-Cards. Proc. of the 2nd AES Candidate Conference, Rome, Italy, P.133-147, 1999. ), 通过对加密操作中的中间结果进行掩盖的方法使差分功 耗分析变得十分困难, 通过这种掩盖, 往往使 DPA 的区分函数对功耗曲线的划 分 "出错", 从而使差分后的结果无法正确地显示出高的相关优度。 通常的掩码 做法是, 对加密过程中的一段敏感硬件电路或软件程序 = FW ,设输入信号为 X , 掩码为 则掩盖和解扰步骤为: U ) Χ' = ΧΘΓ ; ( 2 ) = ^ 和 r' = F(r') ; ( 3 ) > = (Br'。 S. Chari认为 (见 S. Chari, C. S. Jutla, J. R. Rao and P. Rohatgi, Towards Sound Approaches to Counteract Power-Analysis At tacks, Proc. of Advances in Cryptology (CRYPTO' 99), LNCS1666, Spr inger-Ver lag, pp. 398-412, 1999.) , 即使采用了部分随机掩码或数据汉明平衡技术, 一个聪明的 攻击者能够消除掉能量中隐藏的虛假信息, 除非对加密处理中的所有中间变量 进行拆裂。 蒋惠萍在文献 "一种抗差分功耗攻击的改进 DES算法及其硬件实现" (见蒋惠萍 毛志刚, 一种抗差分功耗攻击的改进 DES 算法及其硬件实现, 计算 机学报, 27 (3): 334-338, 2004. )中建议采用随机序列对数据加密标准 DES (Data Encryption Standard) 算法中密钥扩展后的中间结果进行掩盖, 并在查询 S盒 存储单元之前求逆, 还原了输入数据, 这种中途的解掩盖仍然是危险的。
新的研究表明加密中每一轮都会受到能量分析的威胁, 即使采用了部分随 机掩码或数据汉明平衡技术, 一个聪明的攻击者能够消除掉能量中的隐藏的虛 假信息, 除非对加密处理中的所有中间变量进行拆裂, 而对加密中所有中间过 程的掩盖需要不断地在掩盖一解掩盖间反复操作, 这往往需要消耗十分大的硬 件存储空间, 若釆用 VLSI (超大规模集成电路) 实现会使关键路径延迟增长。
Messerges在文献 "Securing the AES Finalists Against Power Analysis Attacks" (见 T. S. Messerges, Securing the AES Finalists Against Power Analysis Attacks, Proc. of Fast Software Encryption (FSE2000) , LNCS1978, Springer-Verlag, pp. 293-301, 2000. ) 中提出了一种 AES处理引擎, 将随机 掩码用于 AES 算法, 并设计了微处理器, 将电路中所有逻辑运算以算术运算替 代, 并釆用随机数进行掩盖获得了良好的功耗安全性。 然而釆用算术运算去等 效逻辑运算大大降低处理效率, 例如异或操作被逐位的模 2 加法替代, 这需要 的步骤远多于简单的异或。
为了减少存储空间和硬件处理负荷, H. CHANG在论文 "A study on Securing AES against Diferential Power Analysis" (见 H. CHANG. A study on Securing AES against Diferential Power Analysis [EB/OL] , http: //caislab. icu. ac. kr I pub I down I 2004 I w20022122_chs. pdf, 2003.)中第 16 页建议了固 定值掩码(Fixed Value Masking)方法, 其实质是, 在 q组固定掩码中随机的选 择 1组, 然后对加密过程的中间变量进行掩盖。 固定值掩码方法有两种: 1)对 于一组固定值, 每个加密轮次都使用不同的掩盖次序; 2) 对于一组固定值, 一 次加密中的所有轮次都使用相同的掩盖次序, 而每次加密使用不同的掩盖次序。 对于 AES硬件电路的固定值掩码过程如图 8所示。
然而, 从图 8中可以看出, 该实现方法采用多组 S盒,需占用较多的存储空 间。 特别是在每轮的字节替代(S盒查表)后数据被还原为正常值, 即与 AES标 准算法的中间结果一致, 这种轮次中不完整的掩盖使许多标准的中间运算结果 暴露于能量信息中, 无法抵抗针对汉明重量的差分能量攻击。
中国发明专利申请 CN1761 185公开了一种乱序执行的数据流 AES加密电路 结构, 该电路结构集成在一个芯片上共包含: 输入部分; 输出部分; 完成密钥 扩展和密钥扩展环。 对轮密钥进行与随机状态信息的逐位混合运算、 行移位运 算、 列混合变换运算以及轮迭代运算, 以得到密文后通过输出部分输出。 该电 路结构使功耗差分比降低了 66 % , 提高了攻击的难度。 但是从电路结构的随机 处理方式来规避能量风险很难推广到其他实现领域 (如软件方式), 且对原有结 构的改进将十分困难, 必须根据该结构重新设计电路, 方可引入到系统中。 此 外, 这种乱序处理方式抵抗差分能量分析的落脚点为: 使反复加密过程中的相 同操作的能量曲线无法在时域进行对准。 这与时钟加扰的作用是类似的, 从差 分比降低 66 %的结果看来, 仍无法从根本上抵御差分能量攻击。
综上所述, 现有技术所存在的不足具体如下:
a) 未能掩盖密码操作中的所有运算步骤, 仅掩盖以 S盒为主体的密码非线 性操作部分, 由于存在未掩盖的部分, 且未掩盖的行移位与列混淆执行时间往 往比较长, 消耗能量比较大, 所以对于未掩盖操作的差分能量攻击依然会成功。
b) 未能有效的破坏差分能量分析中的汉明重量模型, 能量消耗与汉明重量 间的相关性未能完全解除。
c) 采用逻辑运算与算术运算互换原则, 对 AES所有步骤掩码, 虽然取得了 良好的抗差分分析效果, 但处理效率大大降低, 且使用算术运算去等效逻辑运 算若采用 VLS I实现, 实现代价也会大大提高, 无法满足当前商用密码的普及需 求。 发明内容
本发明要解决的技术问题在于避免上述现有技术的不足之处而提出一种抵 御差分能量攻击的 AES加密方法, 使用该加密方法, 硬件实现代价低、 软件实 现相对简单且能量安全性高, 能够使正确轮密钥所对应的差分尖峰 1 00%完全削 平, 能量消耗与汉明重量间的相关性完全被解除, 易于普及和推广。
本发明解决所述技术问题可以通过采用以下技术方案来实现:
提出一种抵御差分能量攻击的 AES加密方法, 在一个批次的 AES加、 解密 中, 釆用两路加密路径, 每路加密路径中所有加密中间结果与 AES 标准算法的 中间结果均不同, 且在不同批次中随机变化, 仅在轮次结束时将两路加密路径 的运算结果还原为 AES标准的轮次运算结果。
在进行一个批量 AES加密前, 先进行如下密码初始化运算:
① 生成随机数 r ;
② 设 AES算法中 s盒查表操作满足 y = s(x) , 根据相同的输入输出 和 y与 随机数 得出 ·τ盒满足 y = s'(x © ;
③ 采用真随机数发生器产生一个随机数查表矩阵作为 盒(元素为 8位 2 进制数),计算 盒满足 = 5' θ ,即将 ·τ盒与 盒中对应位置元素相异或得到 盒, 即两个等阶 、 盒满足 y = 5*i( e r) e ¾ (n) ;
加密时, 每一轮子密钥与随机数 ^进行异或, 分别采用等阶 、 盒进行等 阶字节替代, 然后进行行移位和列混淆, 在最后一轮行移位后对两路加密数据 流进行还原操作, 得到正常的加密结果。
所述抵御差分能量攻击的 N ( N可为 10、 12或 14 ) 轮次 AES加密方法, 加密步骤具体如下:
A. 子密钥与随机数 进行异或操作;
B. 进行轮密钥加;
C. 如果不是最后一轮 (即前 N-1 轮)加密处理, 则采用两路数据路径进 行处理, 即分别采用 盒、 盒进行查表后进行行移位和列混淆; 并将该两路 数据路径的处理结果异或得到本轮 AES加密结果; D. 如果是最后一轮 (即第 N轮)加密处理, 则采用两路数据路径进行处 理, 即分别采用 si盒、 盒进行查表后进行行移位; 并对其中一轮数据路径的 处理结果进行轮密钥加后与另一路数据路径异或得到最后加密结果。
本发明方法, 在一个加、 解密轮次内所有中间运算结果与 AES标准算法的 中间运算结果都不相同, 且对应中间结果的汉明距离也随明文的变化发生随机 变化。 与现有技术相比, 本发明具有以下技术效果: 1. 硬件实现复杂度低, 电 路结构仅需稍加修改。 2. 软件实现步骤简单, 底层基本操作无须变动, 易于维 护。 3. 能量信息与 AES标准中间结果汉明重量与本方法所产生能量数据 (包括 功耗、 电磁辐射) 间的相关性被完全解除, 在处理步骤增加不多的情况下, 具 有良好的侧信道安全性。 附图说明
图 1是本发明方法实施例一前 N-1轮的单轮 AES加密处理流程示意图; 图 2是本发明方法实施例一第 N轮的 AES加密处理流程示意图; 图 3是本发明方法实施例二前 N-1轮的单轮 AES加密处理流程示意图; 图 4是本发明方法实施例二第 N轮的 AES加密处理流程示意图; 图 5是本发明方法的 AES解密处理流程示意图;
图 6是 AES标准加密算法流程示意图;
图 7是 AES标准解密算法流程示意图;
图 8是现有技术中 AES密码机的固定值掩码过程示意图;
图 9是采用现有 AES加密方法实现的功耗差分曲线图;
图 10是采用本发明 AES加密方法实现的功耗差分曲线图。 具体实施方式
以下结合附图所示之最佳实施例作进一步详述。 图 6、 图 7是正常 AES标准算法流程框图。 如图 6所示, 在加密过程中, 首 先进行轮密钥加, 然后是 8-bi t输入 8-bi t输出的 S盒查表, 查表后数据存储 为 4*4 字节的数据空间进行行移位、 列混淆, 从而完成一轮加密。 最后一轮加 密需将列混淆替换为轮密钥加。 如图 7 所示, 解密是加密的逆过程, 包括逆行 移位、 解密用逆 S盒、 逆列混淆和轮密钥加。
在保证计算正确性的前提下, 本发明方法比较全面地考虑到了标准处理流 程和现有抗差分能量攻击技术中的缺点。 本发明方法是在一个批次的 AES 加、 解密中, 采用两路加密路径, 每路加密路径中所有加密中间结果与 AES 算法中 间结果均不同, 且在不同批次中随机变化, 仅在轮次结束时将两路加密路径的 运算结果还原为 AES标准的轮次运算结果。
本发明实施例一现详述如下:
密钥扩展方法与常规 AES算法一致, 主要技术要点在加解密过程中。
在进行一个批量 AES加密前, 进行一系列密码初始化运算, 前 N-1轮的每 轮 AES加密处理如图 1所示:
① 生成随机数 ;
② 设 AES算法中 S盒查表操作满足 = S(X) ,根据相同的输入输出 和 y与 随机数 ^, 得出 S '盒满足; F = ^( © r) ;
③ 釆用真随机数发生器产生一个 16*16字节的随机数查表矩阵作为 S;盒, 计算 盒满足 = S ' ® , 即将 ^盒与 盒中对应位置元素相异或得到 16*16字 节的 盒。
如此, 两个等阶 '、 盒满足; ^ = ( ④ ㊉ ( ㊉ r)。
在加密过程中,每一轮子密钥都与随机数 r进行异或,利用上述两个等阶 '、 盒的性质, 分别进行等价查表操作 (字节替代), 但在查表操作后并不直接采 用异或运算进行还原, 而继续分两组数据通路存储为 4*4 字节的矩阵, 分别进 行行移位和列混淆, 其后将两路数据异或后还原为正常的轮加密结果。 第 N轮加密处理如图 2所示。 在最后一轮加密中, 需要进行相应调整, 即 在行移位后不进行列混淆, 而是对一路数据进行轮密钥加后与另一路数据异或 得到最终加密结果。
上述实施例一在等阶 、 盒查表后, 未考虑集成电路实现中的复用性, 行移位和列混淆过程采用两组数据路径同时进行; 实施例二考虑复用性可进行 时序折叠, 分两次通过同一数据路径。 实施例二如图 3、 图 4所示, 具体处理过 程为:
前 N-1轮的 AES加密处理如图 3所示, 首先对记忆单元清零, 将每一轮子 密钥都与随机数 ^进行异或, 利用两个等阶 '、 盒的性质, 分别进行等价查表 操作 (字节替代), 在查表操作后先对路径 1中的数据进行行移位和列混淆, 与 零向量异或后存入记忆单元中; 然后对路径 2 中的数据釆用相同模块进行行移 位和列混淆, 与记忆单元中的向量异或后更新记忆单元, 此时记忆单元中的向 量即为轮加密结果。
最后一轮即第 N轮加密流程仅需用轮密钥加替换列混淆即可, 其他操作及 顺序保持不变, 如图 4所示。
以上对加密过程进行了详细描述, 依照加密过程, 在批量数据解密前也需 进行逆 S盒初始化, 具体过程与加密时相同, 也需产生真随机数 r , 并产生的两 个等阶逆 、 盒满足!^ ^ ㊉ ㊉^^ ㊉ )。
N轮解密过程如图 5所示, 具体过程为:
1. 采用 AES标准算法进行密钥扩展;
2. 在首轮加密中, 将子密钥与真随机数 进行异或, 然后与明文做轮密钥 加;
3. 逆行移位后, 分两路采用 、 盒进行字节替代;
4. 替代后其中一路做轮密钥加, 然后两路分别进行列混淆;
5.将两路列混淆结果与真随机数 r做三输入异或运算; 6. 返回步骤 3, 直到第 N-l轮完成;
7. 最后一轮先做逆行移位, 处理结果分别对 、 :2盒进行字节替代 (查 表), 最后将两路查表结果与末轮密钥异或完成解密。
由于芯片流过的电流与其消耗的功耗成正比, 所以通过对处理器进行加密 操作时电流的测量, 可以得到密码机工作时的功耗数据。 釆用 AES 标准算法加 密和本发明方法加密实验结果如下:
首先釆用标准 AES 算法和 32 位微处理器运行环境, 采用 128-bit 密钥 "0x000102030405060708090a0b0c0d0f" 对 5000组随机明文进行 AES加密, 针 对首轮加密的第 4个 S盒的差分结果表明: 当猜测与该 S盒相关的 8-bit密钥 段为 "0x03" 时 (即第 4个 8-bit密钥段), 得到明显的功耗差分结果, 如图 9 所示, 从图中可以看出一个很明显的尖峰, 这说明本组猜测的轮密钥段正确, 攻击成功。
而采用本发明方法时, 功耗差分曲线如图 10所示, 设正确密钥已知, 当与 第 4个 S盒相关的 8-bit 密钥段仍为 "0x03" 时, 差分尖峰完全不显现, 被有 效掩盖。

Claims

权 利 要 求 书
1. 一种 4)U卸差分能量攻击的 AES加密方法,其特征在于:在一个批次的 AES 加、 解密中, 采用两路加密路径, 每路加密路径中所有加密中间结果与 AES 标 准算法的中间结果均不同, 且在不同批次中随机变化, 仅在轮次结束时将两路 加密路径的运算结果还原为 AES标准的轮次运算结果。
2. 根据权利要求 1所述的抵御差分能量攻击的 AES加密方法,其特征在于: 在进行一个批次 AES加密前, 先进行如下密码初始化运算:
① 生成随机数 r;
② 设 AES算法中 s盒查表操作满足 y = s( ), 其中表输入为 、 输出为 根 据随机数 r, 得出 盒满足 r = S'(H);
③ 采用真随机数发生器产生一个随机数查表矩阵作为 盒, 计算 盒满足
S2' =S'®S[ , 即将 '盒与 盒中对应位置元素相异或得到 盒, 即两个等阶 、 S2' ^l)^I^Y = S[(X®r)®S2' (X® ) ;
加密时, 每一轮子密钥与随机数 r进行异或, 分别采用等阶 、 盒进行等 阶字节替代, 然后进行行移位和列混淆, 在最后一轮行移位后对两路加密数据 流进行还原操作, 得到正常的加密结果。
3. 根据权利要求 2所述的抵御差分能量攻击的 AES加密方法,其特征在于: 加密步骤具体如下:
A. 子密钥与随机数 r进行异或操作;
B. 进行轮密钥加;
C. 如果不是最后一轮加密处理, 采用两路数据路径进行处理, 即分别采用 S;盒、 盒进行查表后进行行移位和列混淆; 并将该两路数据路径的处理结果 异或得到本轮 AES加密结果;
D. 如果是最后一轮加密处理, 采用两路数据路径进行处理, 即分别采用 盒、 盒进行查表后进行行移位; 并对其中一轮数据路径的处理结果进行轮密 钥加后与另一路数据路径异或得到最后加密结果。
4. 根据权利要求 3所述的抵御差分能量攻击的 AES加密方法,其特征在于: 所述步骤 C中所述的采用 盒、 盒进行查表后进行行移位和列混洧,是在 盒、 s2'盒进行查表后, 釆用两组数据路径同时进行行移位和列混淆。
5. 根据权利要求 3所述的抵御差分能量攻击的 AES加密方法,其特征在于: 所述步骤 C中所述的采用 盒、 盒进行查表后进行行移位和列混淆,是在 盒、 盒进行查表后, 先对第一路径的数据进行行移位和列混淆, 再对第二路径的 数据进行行移位和列混淆。
6. 根据权利要求 2所述的抵御差分能量攻击的 AES加密方法,其特征在于: 随机数生成采用数模混合电路得到的 8 -b i t真随机数 r;设常规 s盒规模为 16*16 字节, 且查表操作满足 = s(;q, 则首先计算规模同样为 16*16 字节的等阶 盒 满足 y = 15'(JT0r) , 计算方法为:
For i = 0 to 15
For j = 0 to 15 temp = Dec2bin(i * 16 + j) Declbin表示将 10进制数转化为 8位二进制数。
S'(temp) = Sitemp Θ r) ;
End For
End For
然后, 采用真随机数发生器产生一个 16*16 字节的随机数查表矩阵作为 盒, 计算 盒满足 s^s'®^, 即将 盒与 si盒中对应位置元素相异或得到 16*16 字节的 盒。
PCT/CN2009/074386 2008-10-23 2009-10-10 抵御差分能量攻击的aes加密方法 WO2010045843A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 200810216907 CN101729241B (zh) 2008-10-23 2008-10-23 抵御差分能量攻击的aes加密方法
CN200810216907.6 2008-10-23

Publications (1)

Publication Number Publication Date
WO2010045843A1 true WO2010045843A1 (zh) 2010-04-29

Family

ID=42118948

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/074386 WO2010045843A1 (zh) 2008-10-23 2009-10-10 抵御差分能量攻击的aes加密方法

Country Status (2)

Country Link
CN (1) CN101729241B (zh)
WO (1) WO2010045843A1 (zh)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376046A (zh) * 2014-08-06 2016-03-02 国家电网公司 一种分组密码防攻击的加解密方法和装置
CN107181586A (zh) * 2017-05-22 2017-09-19 芜湖职业技术学院 可重构s盒电路结构
CN110336658A (zh) * 2019-07-01 2019-10-15 武汉能钠智能装备技术股份有限公司 基于aes算法的加密方法、用户设备、存储介质及装置
CN110908634A (zh) * 2019-11-13 2020-03-24 北京中电华大电子设计有限责任公司 一种随机序列产生装置及其控制方法
CN112152780A (zh) * 2020-10-29 2020-12-29 深圳安捷丽新技术有限公司 一种防sema攻击的待测电路安全仿真分析方法和装置
CN113645615A (zh) * 2021-08-12 2021-11-12 衡阳师范学院 轻量级分组密码加密及解密方法
CN114297642A (zh) * 2022-01-05 2022-04-08 桂林电子科技大学 一种基于数据聚合的侧信道攻击方法
US11418339B2 (en) * 2011-09-13 2022-08-16 Combined Conditional Access Development & Support, Llc (Ccad) Preservation of encryption
CN116232561A (zh) * 2023-05-09 2023-06-06 杭州海康威视数字技术股份有限公司 抵抗差分故障攻击的冗余加密优化方法、装置及设备

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447556A (zh) * 2010-10-14 2012-05-09 上海华虹集成电路有限责任公司 一种基于随机偏移的抗差分功耗分析des加密方法
CN102970132B (zh) * 2011-08-31 2015-02-18 北京中电华大电子设计有限责任公司 一种防止对分组算法进行功耗分析和电磁辐射分析的防护方法
CN102752103B (zh) * 2012-07-26 2015-01-28 上海爱信诺航芯电子科技有限公司 一种抗des功耗攻击的增强型mask掩码方法
CN103684748B (zh) * 2012-09-26 2017-02-08 上海复旦微电子集团股份有限公司 对称式加解密方法、对称式加解密系统
CN103067155A (zh) * 2012-12-27 2013-04-24 东南大学 一种防止基于功耗分析的des算法攻击的方法及测试电路
US10142099B2 (en) 2013-01-11 2018-11-27 Qualcomm Incorporated Method and apparatus for a computable, large, variable and secure substitution box
CN103647639A (zh) * 2013-12-03 2014-03-19 北京中电华大电子设计有限责任公司 一种对称密码算法抵抗侧信道分析的方法
CN103905462B (zh) * 2014-04-16 2017-05-17 深圳国微技术有限公司 可抵御差分功耗分析攻击的加密处理装置及方法
CN104092533B (zh) * 2014-07-02 2017-07-14 上海交通大学 一种抵御能量分析攻击的aes对称互补型硬件实现方法
CN105809063B (zh) * 2014-12-29 2019-01-15 联想(北京)有限公司 一种数据处理方法及安全芯片装置
CN105740721A (zh) * 2016-01-21 2016-07-06 浪潮电子信息产业股份有限公司 一种数据加解密处理的装置、方法及系统
EP3264311B1 (en) * 2016-06-28 2021-01-13 Eshard A protection method and device against a side-channel analysis
CN108964874B (zh) * 2017-05-17 2020-10-27 中国科学技术大学 抗路径差异攻击的aes加密方法
CN108173642A (zh) * 2018-03-21 2018-06-15 电子科技大学 一种抗高阶差分功耗攻击的aes硬件实现方法
CN108964872B (zh) * 2018-07-23 2020-05-26 武汉大学 一种基于aes的加密方法及装置
CN109450614B (zh) * 2018-09-20 2020-06-02 清华大学 一种适用于高速数据传输通路的加密和解密方法
CN111339577B (zh) * 2020-02-12 2022-06-07 南京师范大学 一种具有优良dpa抗性s盒的构造方法
CN111600873B (zh) * 2020-05-13 2023-03-10 江苏芯盛智能科技有限公司 防侧信道攻击方法及相关装置
CN112543094B (zh) * 2020-12-07 2022-09-27 山东华翼微电子技术股份有限公司 一种基于多随机数的des掩码抗侧信道攻击实现方法
CN113014377B (zh) * 2021-02-01 2022-07-22 中国科学院软件研究所 一种利用分组密码s盒双射特性的持久故障攻击防护方法和装置
CN115250172B (zh) * 2022-09-22 2022-12-27 千纳微电子技术(南通)有限公司 一种动态频率切换下的旁道保护方法及系统
CN117879789B (zh) * 2024-03-13 2024-05-14 数盾信息科技股份有限公司 基于高速加密的卫星通信报文数据传输方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0981223A2 (en) * 1998-08-20 2000-02-23 Kabushiki Kaisha Toshiba Encryption/decryption apparatus
CN101034978A (zh) * 2006-03-07 2007-09-12 捷讯研究有限公司 用于密码过程的表分裂
CN101196965A (zh) * 2006-12-07 2008-06-11 上海安创信息科技有限公司 防攻击高级加密标准的加密芯片的算法
CN101213512A (zh) * 2005-06-29 2008-07-02 皇家飞利浦电子股份有限公司 保护数据处理设备以抵御攻击或分析的装置和方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0981223A2 (en) * 1998-08-20 2000-02-23 Kabushiki Kaisha Toshiba Encryption/decryption apparatus
CN101213512A (zh) * 2005-06-29 2008-07-02 皇家飞利浦电子股份有限公司 保护数据处理设备以抵御攻击或分析的装置和方法
CN101034978A (zh) * 2006-03-07 2007-09-12 捷讯研究有限公司 用于密码过程的表分裂
CN101196965A (zh) * 2006-12-07 2008-06-11 上海安创信息科技有限公司 防攻击高级加密标准的加密芯片的算法

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11418339B2 (en) * 2011-09-13 2022-08-16 Combined Conditional Access Development & Support, Llc (Ccad) Preservation of encryption
CN105376046A (zh) * 2014-08-06 2016-03-02 国家电网公司 一种分组密码防攻击的加解密方法和装置
CN105376046B (zh) * 2014-08-06 2018-08-17 国家电网公司 一种分组密码防攻击的加解密方法和装置
CN107181586B (zh) * 2017-05-22 2023-09-15 芜湖职业技术学院 可重构s盒电路结构
CN107181586A (zh) * 2017-05-22 2017-09-19 芜湖职业技术学院 可重构s盒电路结构
CN110336658A (zh) * 2019-07-01 2019-10-15 武汉能钠智能装备技术股份有限公司 基于aes算法的加密方法、用户设备、存储介质及装置
CN110908634A (zh) * 2019-11-13 2020-03-24 北京中电华大电子设计有限责任公司 一种随机序列产生装置及其控制方法
CN110908634B (zh) * 2019-11-13 2023-07-07 北京中电华大电子设计有限责任公司 一种随机序列产生装置及其控制方法
CN112152780A (zh) * 2020-10-29 2020-12-29 深圳安捷丽新技术有限公司 一种防sema攻击的待测电路安全仿真分析方法和装置
CN112152780B (zh) * 2020-10-29 2024-02-27 深圳安捷丽新技术有限公司 一种防sema攻击的待测电路安全仿真分析方法和装置
CN113645615A (zh) * 2021-08-12 2021-11-12 衡阳师范学院 轻量级分组密码加密及解密方法
CN113645615B (zh) * 2021-08-12 2023-12-22 衡阳师范学院 轻量级分组密码加密及解密方法
CN114297642A (zh) * 2022-01-05 2022-04-08 桂林电子科技大学 一种基于数据聚合的侧信道攻击方法
CN114297642B (zh) * 2022-01-05 2024-03-22 桂林电子科技大学 一种基于数据聚合的侧信道攻击方法
CN116232561A (zh) * 2023-05-09 2023-06-06 杭州海康威视数字技术股份有限公司 抵抗差分故障攻击的冗余加密优化方法、装置及设备
CN116232561B (zh) * 2023-05-09 2023-08-25 杭州海康威视数字技术股份有限公司 抵抗差分故障攻击的冗余加密优化方法、装置及设备

Also Published As

Publication number Publication date
CN101729241A (zh) 2010-06-09
CN101729241B (zh) 2012-01-25

Similar Documents

Publication Publication Date Title
WO2010045843A1 (zh) 抵御差分能量攻击的aes加密方法
US20200195417A1 (en) Cryptography circuit particularly protected against information-leak observation attacks by the ciphering thereof
Li et al. Differential fault analysis on the ARIA algorithm
Kim et al. PIPO: A lightweight block cipher with efficient higher-order masking software implementations
US20130028412A1 (en) Method of counter-measuring against side-channel attacks
Karri et al. Concurrent error detection of fault-based side-channel cryptanalysis of 128-bit symmetric block ciphers
Biryukov et al. Side-channel attacks meet secure network protocols
Mozaffari-Kermani et al. A low-cost S-box for the advanced encryption standard using normal basis
Jain et al. A novel tampering attack on AES cores with hardware trojans
Li et al. Differential fault analysis on Camellia
Joshi et al. Implementation of S-Box for advanced encryption standard
WO2008064704A1 (en) Method and device for preventing information leakage attacks on a device implementing a cryptographic function
Saberi et al. Enhanced key expansion for AES-256 by using even-odd method
Sreehari et al. A Review on FPGA Implementation of Lightweight Cryptography for Wireless Sensor Network
Shende et al. FPGA based hardware implementation of hybrid cryptographic algorithm for encryption and decryption
Mestiri et al. Fault attacks resistant aes hardware implementation
US11201724B2 (en) Method to counter DCA attacks of order 2 and higher on table-based implementations
Thangarajan et al. High speed and low power implementation of AES for wireless sensor networks
Chou et al. A high performance, low energy, compact masked 128-bit AES in 22nm CMOS technology
Gupta et al. Correlation power analysis on KASUMI: attack and countermeasure
Li et al. Single byte differential fault analysis on the LED lightweight cipher in the wireless sensor network
Cui et al. Congruent Differential Cluster for Binary SPN Ciphers
Benhadjyoussef et al. Power-based side-channel analysis against aes implementations: Evaluation and comparison
CN114244495B (zh) 一种基于随机掩码感染机制的aes加密电路
Rahnama et al. Countering AES static S-box attack

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09821564

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01/09/2011)

122 Ep: pct application non-entry in european phase

Ref document number: 09821564

Country of ref document: EP

Kind code of ref document: A1