2. 密码科学技术国家重点实验室, 北京 100878
2. State Key Laboratory of Cryptology, Beijing 100878, China
为了验证Midori算法[1]的安全性,研究人员对Midori算法进行了许多密码分析。文献[2]提出对Midori64算法的14轮相关密钥不可能差分分析,共猜测了84 bit密钥。文献[3]提出对Midori64算法的12轮中间相遇攻击,该攻击的时间复杂度为2125.5次12轮加密,数据复杂度为255.5个64 bit分组。文献[4]提出对Midori64算法的11轮不可能差分分析,该攻击的时间复杂度为2121.6次11轮加密,数据复杂度为262.3个64 bit分组。文献[5]对文献[4]的不可能差分分析进行优化,时间复杂度为
文献[10]建立零相关区分器与积分区分器之间的等价关系[11-12],证明从零相关路线
本文对Midori64算法的积分攻击问题进行研究,给出算法的6轮零相关区分器,得到相应的6轮积分区分器,向前扩展1轮得到7轮积分区分器,在此基础上,分别研究针对10轮、11轮Midori64算法的积分攻击。
1 预备知识 1.1 符号说明本文的符号说明如下:
Midori算法于2015年由BANIK等人在ASIACRYPT会议上提出[1],其采用SPN
$ {{\mathit{\boldsymbol{\boldsymbol{S}}}}}=\left[\begin{array}{cccc}{S}_{0}& {S}_{4}& {S}_{8}& {S}_{12}\\ {S}_{1}& {S}_{5}& {S}_{9}& {S}_{13}\\ {S}_{2}& {S}_{6}& {S}_{10}& {S}_{14}\\ {S}_{3}& {S}_{7}& {S}_{11}& {S}_{15}\end{array}\right] $ | (1) |
其中,
Midori64算法轮变换作用在状态矩阵上,由S盒
Midori64算法的密钥长度为128 bit,将密钥的高64 bit记为
Midori64算法使用的非线性S盒取值如表 1所示,S盒具有对合性质,即
![]() |
下载CSV 表 1 Midori64算法的S盒 Table 1 S-box of Midori64 |
重新排列状态矩阵中16个单元的位置称为置换,置换及逆置换分别如式(2)和式(3)所示:
$ \left[\begin{array}{cccc}{S}_{0}& {S}_{4}& {S}_{8}& {S}_{12}\\ {S}_{1}& {S}_{5}& {S}_{9}& {S}_{13}\\ {S}_{2}& {S}_{6}& {S}_{10}& {S}_{14}\\ {S}_{3}& {S}_{7}& {S}_{11}& {S}_{15}\end{array}\right]\stackrel{\mathrm{S}\mathrm{C}}{\to }\left[\begin{array}{cccc}{S}_{0}& {S}_{14}& {S}_{9}& {S}_{7}\\ {S}_{10}& {S}_{4}& {S}_{3}& {S}_{13}\\ {S}_{5}& {S}_{11}& {S}_{12}& {S}_{2}\\ {S}_{15}& {S}_{1}& {S}_{6}& {S}_{8}\end{array}\right] $ | (2) |
$ \left[\begin{array}{cccc}{S}_{0}& {S}_{4}& {S}_{8}& {S}_{12}\\ {S}_{1}& {S}_{5}& {S}_{9}& {S}_{13}\\ {S}_{2}& {S}_{6}& {S}_{10}& {S}_{14}\\ {S}_{3}& {S}_{7}& {S}_{11}& {S}_{15}\end{array}\right]\stackrel{\mathrm{S}{\mathrm{C}}^{-1}}{\to }\left[\begin{array}{cccc}{S}_{0}& {S}_{5}& {S}_{15}& {S}_{10}\\ {S}_{7}& {S}_{2}& {S}_{8}& {S}_{13}\\ {S}_{14}& {S}_{11}& {S}_{1}& {S}_{4}\\ {S}_{9}& {S}_{12}& {S}_{6}& {S}_{3}\end{array}\right] $ | (3) |
以almost MDS[1]矩阵M左乘更新状态矩阵称为列混淆,如式(4)所示,其中,矩阵M如式(5)所示,矩阵M满足
$ \left[\begin{array}{cccc}{S}_{0}& {S}_{4}& {S}_{8}& {S}_{12}\\ {S}_{1}& {S}_{5}& {S}_{9}& {S}_{13}\\ {S}_{2}& {S}_{6}& {S}_{10}& {S}_{14}\\ {S}_{3}& {S}_{7}& {S}_{11}& {S}_{15}\end{array}\right]\stackrel{\mathrm{M}\mathrm{C}}{\to }{\mathit{\boldsymbol{M}}}•\left[\begin{array}{cccc}{S}_{0}& {S}_{4}& {S}_{8}& {S}_{12}\\ {S}_{1}& {S}_{5}& {S}_{9}& {S}_{13}\\ {S}_{2}& {S}_{6}& {S}_{10}& {S}_{14}\\ {S}_{3}& {S}_{7}& {S}_{11}& {S}_{15}\end{array}\right] $ | (4) |
$ {\mathit{\boldsymbol{M}}}=\left[\begin{array}{cccc}0& 1& 1& 1\\ 1& 0& 1& 1\\ 1& 1& 0& 1\\ 1& 1& 1& 0\end{array}\right] $ | (5) |
Midori64算法在加密过程中使用64 bit白化密钥
Midori64算法在解密过程中使用64 bit白化密钥
Midori64算法的加密流程如图 1所示,在第1轮之前添加使用白化密钥的密钥加,第1轮~第15轮使用轮密钥
![]() |
Download:
|
图 1 Midori64算法的加密流程 Fig. 1 The encryption procedure of Midori64 |
Midori64算法的解密流程如图 2所示,在第1轮之前添加使用白化密钥的密钥加,第1轮~第15轮使用
![]() |
Download:
|
图 2 Midori64算法的解密流程 Fig. 2 The decryption procedure of Midori64 |
零相关线性分析由BOGDANOV和RIJMEN[16]于2012年提出,攻击使用分组密码算法中以概率
函数
$ {C}_{h}({\mathit{\boldsymbol{\alpha }}}, {\mathit{\boldsymbol{\beta }}})=\frac{1}{{2}^{n}}\sum\limits _{{\mathit{\boldsymbol{x}}}\in {F}_{2}^{n}}^{}{(-1)}^{{\mathit{\boldsymbol{\alpha }}}\cdot {\mathit{\boldsymbol{x}}}\oplus {\mathit{\boldsymbol{\beta }}}\cdot h\left({\mathit{\boldsymbol{x}}}\right)} $ |
其中,
命题1(线性映射的相关度)[17]对于线性映射
零相关区分器是指在输入掩码与输出掩码作用下,目标输入与输出比特的线性相关度为0的一类线性区分器。根据命题1进行自动化搜索,可以得到大量Midori64算法的5轮零相关区分器,按输入掩码权重与输出掩码权重进行分类,零相关区分器的个数统计结果如表 2所示。
![]() |
下载CSV 表 2 Midori64算法的5轮零相关区分器个数统计 Table 2 Number statistics of Midori64 5-round zero-correlation discriminator |
取3个输入掩码权重为7且输出掩码权重为1的5轮零相关区分器,然后对输出掩码部分继续扩展1轮,得到6轮零相关区分器。令:
$ {{\mathit{\boldsymbol{\alpha }}}}_{1}={{\mathit{\boldsymbol{a}}}}_{0}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {{\mathit{\boldsymbol{a}}}}_{3}\Vert {{\mathit{\boldsymbol{a}}}}_{4}\Vert {\bf{0}}\Vert {{\mathit{\boldsymbol{a}}}}_{6}\Vert {\bf{0}}\Vert {{\mathit{\boldsymbol{a}}}}_{8}\Vert {{\mathit{\boldsymbol{a}}}}_{9}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {{\mathit{\boldsymbol{a}}}}_{12}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}} $ |
$ {{\mathit{\boldsymbol{\beta }}}}_{1}=0\Vert {{\mathit{\boldsymbol{d}}}}_{0}\Vert {{\mathit{\boldsymbol{d}}}}_{0}\Vert {{\mathit{\boldsymbol{d}}}}_{0}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert 0\Vert {\bf{0}}\Vert {\bf{0}}\Vert 0 $ |
$ {{\mathit{\boldsymbol{\beta }}}}_{2}={{\mathit{\boldsymbol{d}}}}_{5}\Vert {{\mathit{\boldsymbol{d}}}}_{5}\Vert {\bf{0}}\Vert {{\mathit{\boldsymbol{d}}}}_{5}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}} $ |
$ {{\mathit{\boldsymbol{\beta }}}}_{3}={{\mathit{\boldsymbol{d}}}}_{15}\Vert {{\mathit{\boldsymbol{d}}}}_{15}\Vert {{\mathit{\boldsymbol{d}}}}_{15}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}}\Vert {\bf{0}} $ |
其中,
![]() |
Download:
|
图 3 Midori64算法的6轮零相关区分器 Fig. 3 6-round zero-correlation discriminator of Midori64 |
积分攻击是一种选择明文攻击,最先应用于Square分组密码分析,其基本思想是通过分析一系列中间状态的和具有概率为1的性质,得出不能通过检测的密钥都是错误密钥,从而利用淘汰法直接恢复出正确密钥。积分攻击的主要环节是寻找积分区分器,积分区分器可以分为如下2类:
1)一系列中间状态的和遍历所有可能取值,且每个可能取值的出现次数相同,该类积分区分器称为平衡积分区分器。
2)一系列中间状态的异或和为零,该类积分区分器称为零和积分区分器。
当选择特定的输入集合(输入的部分比特固定为常数,其余比特遍历所有可能)时,经过几轮算法加密后,输出的某些比特存在概率为1的分布特性,输出目标值异或和为0时,为零和积分区分器;输出目标值均匀遍历所有可能时,为平衡积分区分器。实际上,平衡积分区分器与零相关区分器之间存在一定的等价关系[10],任意的零相关区分器都可以转化成一个平衡积分区分器,本文利用文献[10]中给出的两区分器等价性进行积分区分器构造。
若所有原像集的势都相同,则函数
命题2[10]对于函数
记集合
令
$ {E}_{\mathrm{K}\mathrm{e}\mathrm{y}}^{6}:{F}_{2}^{r}\times {F}_{2}^{s}\to {F}_{2}^{t}\times {F}_{2}^{u}, {E}_{\mathrm{K}\mathrm{e}\mathrm{y}}^{6}\left({\mathit{\boldsymbol{x}}}, {\mathit{\boldsymbol{y}}}\right)=\left(\begin{array}{c}{h}_{1}\left({\mathit{\boldsymbol{x}}}, {\mathit{\boldsymbol{y}}}\right)\\ {h}_{2}\left({\mathit{\boldsymbol{x}}}, {\mathit{\boldsymbol{y}}}\right)\end{array}\right) $ |
定理1 当输入为
证明 加密函数
6轮零和积分区分器如图 4所示。
![]() |
Download:
|
图 4 Midori64算法的6轮零和积分区分器 Fig. 4 6-round zero-sum integral discriminator of Midori64 |
在6轮积分区分器的前面解密1轮可以得到7轮积分区分器。对6轮积分区分器的输入
$ {{\mathit{\boldsymbol{S}}}}_{\mathrm{i}\mathrm{n}}^{\mathrm{*}}=\left\{{\mathit{\boldsymbol{y}}}=\mathrm{S}{\mathrm{B}}^{-1}\left(\mathrm{S}{\mathrm{C}}^{-1}\left(\mathrm{M}{\mathrm{C}}^{-1}\left({\mathit{\boldsymbol{x}}}\right)\right)\right)\left|{\mathit{\boldsymbol{x}}}\in \right.{{\mathit{\boldsymbol{S}}}}_{\mathrm{i}\mathrm{n}}\right\} $ |
其中,列混淆、置换和S盒都是可逆变换,复合变换
在7轮积分区分器的后面加密3轮可以得到10轮积分区分器,如图 5所示。
![]() |
Download:
|
图 5 Midori64算法的10轮密钥恢复攻击 Fig. 5 10-round key recovery attack of Midori64 |
为降低密钥的猜测量,本文利用等价密钥技术[19],该技术结合Midori64算法,将列混淆MC与密钥加KA进行位置交换,其中,线性等价的轮密钥加记为
利用部分和技术[17],Midori64算法的128 bit密钥恢复过程具体如下:
步骤1 选择一个明文集合
步骤2 猜测第10轮等价轮密钥
步骤3 猜测第9轮等价轮密钥
步骤4 由
步骤5 针对上述48 bit密钥,选取m组
步骤6 重复上述步骤,第9轮猜测12 bit密钥,第10轮猜测20 bit密钥,选择n组
步骤7 使用2组明密文对进行剩余正确密钥的穷搜猜测。
4.1.1 数据复杂度分析为了平衡总时间复杂度与数据复杂度,取m=12,n=4。10轮积分攻击的数据复杂度为
10轮积分攻击的步骤1复杂度为选择明文的复杂度,计算
综上,10轮积分攻击的总时间复杂度为
利用快速Walsh-Hadamard变换技术[20-21]对Midori64进行11轮积分攻击,具体步骤如下:
步骤1 选择一个明文集合
步骤2 猜测第10轮等价轮密钥
步骤3
步骤4 选取m组
步骤5 使用猜测等价轮密钥加密
步骤6 由上述恢复的等价轮密钥计算密钥。
4.2.1 数据复杂度分析为了平衡总时间复杂度与数据复杂度,取m=17,11轮积分攻击的数据复杂度为
11轮积分攻击的步骤1复杂度为选择明文的复杂度,平均重复17次,时间复杂度为
综上,11轮积分攻击的时间复杂度为
将本文积分攻击与已有Midori64算法的积分攻击进行性能对比,结果如表 3所示,从表 3可以看出,本文积分攻击的轮数相比文献[7]积分攻击提高2轮。与文献[15]相比,本文找到的路线输入集合大小为
![]() |
下载CSV 表 3 Midori64算法的密钥恢复攻击对比 Table 3 Comparison of key recovery attacks of Midori64 |
本文构建6轮零相关区分器,利用零相关区分器与平衡积分区分器之间的等价关系,将6轮零相关区分器转换为6轮平衡积分区分器,然后将3个6轮平衡积分区分器合成为一个性能优良的6轮零和积分区分器,向前扩展1轮得到一个7轮零和积分区分器。将该7轮零和积分区分器向后扩展3轮,对10轮Midori64算法实施密钥恢复攻击,攻击的数据复杂度约为
[1] |
BANIK S, BOGDANOV A, ISOBE T, et al. Midori: a block cipher for low energy[M]. Berlin, Germany: Springer, 2014.
|
[2] |
REN Yaoyao, ZHANG Wenying. Related-key differential analysis of Midori64[J]. Application Research of Computers, 2018, 35(6): 1800-1802. (in Chinese) 任瑶瑶, 张文英. Midori64的相关密钥不可能差分分析[J]. 计算机应用研究, 2018, 35(6): 1800-1802. DOI:10.3969/j.issn.1001-3695.2018.06.045 |
[3] |
LIN Li, WU Wenling. Meet-in-the-middle attacks on reduced-round Midori64[EB/OL]. [2020-02-05]. https://eprint.iacr.org/2015/1165.pdf.
|
[4] |
YU Zheng, MAO Ming, LI Yanjun. Impossible differential analysis of 11-round Midori64 based on method of step-key-guessing[J]. Application Research of Computers, 2018, 35(9): 2777-2780. (in Chinese) 于政, 毛明, 李艳俊. 基于轮密钥分步猜测方法的Midori64算法11轮不可能差分分析[J]. 计算机应用研究, 2018, 35(9): 2777-2780. DOI:10.3969/j.issn.1001-3695.2018.09.050 |
[5] |
LI Mingming, GUO Jiansheng, CUI Jingyi, et al. Truncated impossible differential cryptanalysis of Midori-64[J]. Journal of Software, 2019, 30(8): 2337-2348. (in Chinese) 李明明, 郭建胜, 崔竞一, 等. Midori-64算法的截断不可能差分分析[J]. 软件学报, 2019, 30(8): 2337-2348. |
[6] |
CHENG Lu, WEI Yuechuan, LI Anhui, et al. Multi-dimensional zero-correlation linear cryptanalysis on Midori[J]. Journal of Shandong University (Natural Science), 2018, 53(2): 88-94. (in Chinese) 程璐, 魏悦川, 李安辉, 等. Midori算法的多维零相关线性分析[J]. 山东大学学报(自然科学版), 2018, 53(2): 88-94. |
[7] |
LIAN Chuang. Integral cryptanalysis of lightweight block ciphers[D]. Xi'an: Xidian University, 2018. (in Chinese) 连闯. 轻量级分组密码的积分分析[D]. 西安: 西安电子科技大学, 2018. |
[8] |
GUO J, JEAN J, NIKOLIC I, et al. Invariant subspace attack against Midori64 and the resistance criteria for S-box designs[J]. IACR Transactions on Symmetric Cryptology, 2016, 1: 33-56. |
[9] |
TODO Y, LEANDER G, SASAKI Y. Nonlinear invariant attack: practical attack on full SCREAM, iSCREAM, and Midori64[J]. Journal of Cryptology, 2019, 32(4): 1383-1422. DOI:10.1007/s00145-018-9285-0 |
[10] |
BOGDANOV A, LEANDER G, NYBERG K, et al. Integral and multidimensional linear distinguishers with correlation zero[C]//Proceedings of ASIACRYPT'12. Berlin, Germany: Springer, 2012: 244-261.
|
[11] |
WEN L, WANG M. Integral zero-correlation distinguisher for ARX block cipher, with application to SHACAL-2[C]//Proceedings of Australasian Conference on Information Security and Privacy. Berlin, Germany: Springer, 2014: 454-461.
|
[12] |
CHEN Huaifeng. Study on several cryptanalysis models on block ciphers[D]. Jinan: Shandong University, 2017. (in Chinese) 陈怀凤. 分组密码算法几种分析模型的研究[D]. 济南: 山东大学, 2017. |
[13] |
BING S, LIU Z, RIJMEN V, et al. Links among impossible differential, integral and zero correlation linear cryptanalysis[C]//Proceedings of CRYPTO'15. Berlin, Germany: Springer, 2015: 95-115.
|
[14] |
TODO Y, MORⅡ M. Bit-based division property and application to simon family[C]//Proceedings of International Conference on Fast Software Encryption. Berlin, Germany: Springer, 2016: 125-136.
|
[15] |
ZHANG W, RIJMEN V. Division cryptanalysis of block ciphers with a binary diffusion layer[J]. IET Information Security, 2018, 13(2): 87-95. |
[16] |
BOGDANOV A, RIJMEN V. Linear hulls with correlation zero and linear cryptanalysis of block ciphers[J]. Designs Codes & Cryptography, 2014, 70(3): 369-383. |
[17] |
WANG Meiqin, WEN Long. Research on zero-correlation linear cryptanalysis[J]. Journal of Cryptologic Research, 2014, 1(3): 296-310. (in Chinese) 王美琴, 温隆. 零相关线性分析研究[J]. 密码学报, 2014, 1(3): 296-310. |
[18] |
SUN Ling, CHEN Huaifeng, WANG Meiqin. Zero-correlation attacks: statistical models independent of the number of approximations[J]. Designs, Codes and Cryptography, 2018, 86(9): 1923-1945. DOI:10.1007/s10623-017-0430-9 |
[19] |
ISOBE T, SHIBUTANI K. Generic key recovery attack on feistel scheme[C]//Proceedings of International Cryptology Conference. Washington D.C., USA: IEEE Press, 2013: 464-485.
|
[20] |
COLLARD B, STANDAERT F, QUISQUATER J. Improving the time complexity of Matsui's linear cryptanalysis[C]//Proceedings of ICISC'07. Berlin, Germany: Springer, 2007: 77-88.
|
[21] |
TODO Y, AOKI K. FFT key recovery for integral attack[C]//Proceedings of International Conference on Cryptology and Network Security. Berlin, Germany: Springer, 2014: 64-81.
|
[22] |
CHEN Zhan, WANG Xiaoyun. Impossible differential cryptanalysis of Midori[C]//Proceedings of International Conference on Mechatronics and Automation Engineering. Washington D.C., USA: IEEE Press, 2016: 535-543.
|