Security research with Square attack to a variant Camellia cipher

Xiangyang XU , Guangsheng ZHANG

Front. Electr. Electron. Eng. ›› 2010, Vol. 5 ›› Issue (4) : 482 -487.

PDF (140KB)
Front. Electr. Electron. Eng. ›› 2010, Vol. 5 ›› Issue (4) : 482 -487. DOI: 10.1007/s11460-010-0095-x
RESEARCH ARTICLE
RESEARCH ARTICLE

Security research with Square attack to a variant Camellia cipher

Author information +
History +
PDF (140KB)

Abstract

This paper investigates the relation between the choice of S-boxes and Square attack. A variant Camellia, which uses only a single S-box instead of four, is proposed. The security of the variant Camellia against Square attack is studied in detail. Result shows that it needs only 28 chosen plaintexts to recover a byte of the 6th round-key of variant Camellias, while the original Camellia needs either 28 chosen plaintexts to recover a byte of the 6th round-key and a byte of some constant or 216 chosen plaintexts to recover a byte of the 6th round-key. Furthermore, Square attacks on other round-reduced variant Camellia are proposed, and the time complexity of 11-round attack is reduced from 2250 to 2225.5. The weaker variant Camellia indicates that the choice of S-box and the order of different S-boxes have influence on Square attack.

Keywords

block cipher / Camellia / Square attack

Cite this article

Download citation ▾
Xiangyang XU, Guangsheng ZHANG. Security research with Square attack to a variant Camellia cipher. Front. Electr. Electron. Eng., 2010, 5(4): 482-487 DOI:10.1007/s11460-010-0095-x

登录浏览全文

4963

注册一个新账户 忘记密码

Introduction

Square attack, proposed by Ref. [1], considers the propagation of sums of (many) ciphertexts with special inputs. It was first applied to the Square cipher that is of substitution permutation network structured (SPN-structured). Reference [2] first applied Square attack, employing a different term “saturation attack” to Feistel cipher. The so-called multiset attack, proposed by Ref. [3], is another name of Square attack. In fact, all of these attacks belong to the integral cryptanalysis [4], proposed by Knudsen et al., at FSE 2002.

Integrals exploit the simultaneous relationship between many encryptions, in contrast to differential cryptanalysis where only pairs of encryptions are considered. This feature makes it especially well-suited in analyzing ciphers with primarily bijective components that are not vulnerable to differential and linear cryptanalysis. This feature also makes integral an increasingly popular tool in the recent cryptanalysis works. At FSE 2008, Ref. [5] proposed the bit-pattern-based integral attack that can be seen as a complement of the traditional integral attack proposed in Ref. [4], since the traditional ones can only be applied to byte (word)-oriented ciphers, while the bit-pattern based ones can only be applied to bit-oriented ciphers.

Camellia [6] is a 128-bit block cipher proposed by NTT and Mitsubishi in 2000 and supports 128/192/256-bit keys. The design of Camellia is based on the Feistel structure with an SPN-structured round function, and the number of rounds is 18 for 128-bit key version and 24 for 192/256-bit key version. An FL/FL-1 function layer is inserted in every six rounds in order to thwart future unknown attacks. Before the first round and after the last round, there are pre- and post-whitening layers, respectively. Camellia had been submitted to the standardization and the evaluation projects, such as ISO/IEC JTC 1/SC 27, CRYPTREC, and NESSIE. It is one of the winners of the NESSIE project.

Since its publication, Camellia has been widely analyzed. In Ref. [7], the security against truncated differential cryptanalysis is studied, and it has been proved that 11 rounds are enough to make Camellia resilient to the byte-character-based truncated differential attacks. In Ref. [8], empowered by computer aids, security against higher order differential attack was studied. He and Qing found that 6-round Camellia is breakable by Square attack [9]. Reference [10] improved the known result about Square attack. Later, Ref. [11] adopted the equivalent structure of Feistel cipher that improved the known results of Square attack on Camellia. Reference [12] gave an efficient collision attack on Camellia, and later in Ref. [13], some nontrivial 8-round impossible differential was given; based on which, Ref. [14] gave an effective attack on Camellia with up to 14 rounds.

To date, there are many ciphers that adopt multi-S-boxes instead of single S-box, and Camellia is one of them. Another example that adopts multi-S-boxes is ARIA [15], which is a 128-bit block cipher designed by a group of Korean experts in 2003. ARIA is an SPN cipher. To make the encryption and decryption alike, the designers of ARIA adopted two S-boxes, which are denoted by S1 and S2, as well as their inversions S1-1 and S2-1 to make the cipher involutional.

Although many ciphers adopt multi-S-boxes, however, how the multi-S-boxes influence the security of ciphers remains undiscovered. Reference [7] investigated truncated differentials and found that for byte-character-based truncated differentials, the multi-S-boxes case can decrease the truncated differential probabilities, thus making the cipher stronger against truncated differential attack. Reference [16] investigated the security of ARIA against integral attack and suggested that if the cipher adopts only single S-box or different order of the multi-S-boxes, security margins are different. The basic technique of Ref. [16] is a counting method: if different values of a set appear even times, the sum of all element of the correspondence set is zero; in other words, the set is balanced.

This paper focuses on how multi-S-boxes and their order will influence the security of Camellia against Square attack. Our results show that if Camellia adopts single S-box, the security margin will be decreased to design a cipher using multi-S-boxes, the order of these S-boxes should be chosen carefully; otherwise, the security of the ciphers with different orders against Square attack might be compromised.

The rest of this paper is organized as follows: Section 2 briefly describes the Camellia cipher, its variant (Camellia*), and the basis of Square attack. Section 3 focuses on finding Square distinguisher of Camellia*. In Sect. 4, Square attacks on some round-reduced Camellia* are presented. Finally, Sect. 5 concludes the paper.

Preliminaries

Description of Camellia

Camellia is an iterative block cipher with Feistel structure. Let the ith round input and output be (Li-1, Ri-1) and (Li, Ri), then
{Li=F(kiLi-1)Ri-1,Ri=Li-1,
where F is the round function, and ki is the round key, which is generated from a master key through the key schedule.

An FL/FL-1 function is inserted every six rounds in order to thwart future unknown attack, and the FL function is defined as follows:
yR=((xLklL)<<<1)xR,yL=(yRklR)xL,
where is the bit-wise and operation, while is the bit-wise or operation.

The round function F function contains three transformations, namely, key-addition, S-function, and P-function. S-function contains four types of nonlinear S-boxes s1, s2, s3, and s4, where s2, s3, and s4 are variations of s1. S-function maps (x1,x2,,x8)F288 to (y1,y2,,y8)F288, which is defined as
(y1,y2,y3,y4,y5,y6,y7,y8)=(s1(x1),s2(x2),s3(x3),s4(x4),s2(x5),s3(x6),s4(x7),s1(x8)).
P-function maps (y1,y2,,y8)F288 to (z1,z2,,z8)F288:
z1=y1y3y4y6y7y8,z2=y1y2y4y5y7y8,z3=y1y2y3y5y6y8,z4=y2y3y4y5y6y7,z5=y1y2y6y7y8,z6=y2y3y5y7y8,z7=y3y4y5y6y8,z8=y1y4y5y6y7.

Obviously, P is a linear transformation, and it can be easily computed that P-1, the inverse of the P-function, is defined as
y1=z2z3z4z6z7z8,y2=z1z3z4z5z7z8,y3=z1z2z4z5z6z8,y4=z1z2z3z5z6z7,y5=z1z2z5z7z8,y6=z2z3z5z6z8,y7=z3z4z5z6z7,y8=z1z4z6z7z8.

Since we assume that the round keys are independent with each other, the key schedule of Camellia is omitted, and we refer to Ref. [15] for more details.

To evaluate the influence of four S-boxes and different order of these S-boxes being used, we analyze the case where only single S-box is used, and this variant is all Camellia* whose S-function is replaced by
(y1,y2,y3,y4,y5,y6,y7,y8)=(s(x1),s(x2),s(x3),s(x4),s(x5),s(x6),s(x7),s(x8)),
where s is one of s1, s2, s3, and s4, and the FL/FL-1 is omitted. Other parts of Camellia and Camellia* are the same.

Basis of Square attack

The following definitions are essential when applying an integral attack.

Let a Λ-set be a set of 256 states that are all different in some of the state bytes (the active) and all equal in the other state bytes (the passive). We have
x=(x1,x2,,xn),y=(y1,y2,,yn)Λ:{xiyiif xi is active,xi=yielse.

Let Γ-set (balanced set) be a set of 256 states that are all equal to zero in summation (the balanced). We have
xΓx=0.

Applying the S-function or key-addition on a Λ-set results in a Λ-set with the positions of the active bytes unchanged. The result set of applying P-function to a Λ-set is not always a Λ-set but always a Γ-set.

In practice, if a balanced set comes with a nonlinear transformation, the finding process is stopped. Thus, the determination of the property of balanced set after it passed through a nonlinear transformation is very important in finding integral distinguishers. Reference [16] determined the property of balanced set after it passes through a nonlinear by determining that different values in the set appear even times; thus, the corresponding set is a balanced one.

4.5-round Square distinguisher of Camellia*

Let the input and output of the ith round be (Li-1, Ri-1) and (Li, Ri), respectively, and the output of S-function and P-function be Zi and Yi, respectively. Let Xi,j denote the jth byte of Xi, where X can represent L, R or Z, Y.

Assume that the input to Camellia* is
{PL=(c,c,c,c,c,c,c,c),PR=(x,c,c,c,c,c,c,c),
where c denotes some constant value in F28 (which are not necessarily equal to each other at different positions). Thus
Z2=(s(xt1)t2,c,c,c,c,c,c,c),
where t1 and t2 are some unknown constants in F28. Let f(x)=s(xt1)t2. Since S(x) is a one-to-one map, so is f(x). After the P-function, we have
Y2=(f(x)α1,f(x)α2,f(x)α3,α4,f(x)α5,α6,α7,f(x)α8),
where α1,α2,,α8 are some unknown constants.

Similarly, we have
Z3=(s(f(x)β1),s(f(x)β2),s(f(x)β3),β4,s(f(x)β5),β6,β7,s(f(x)β8)),
where β1,β2,,β8 are also some unknown constants.

Based on above, we can compute the expression of Y3 and L3 = R4. Since each byte of L3 is a sum of some active bytes and each byte of L3 is balanced, this supports Ref. [7]’s claim as the 4-round Square distinguisher of Camellia.

After computing the expression of L3, we can find that the 8th byte of L3 satisfies
L3,8=s(f(x)β1)s(f(x)β5)γ,
where γ is a constant.

Let f(x)β1=y, thus
L3,8=s(y)s(yβ1β5)β.

If β1β5=0, L3,8=γ is a constant; if β1β50, we have
s(y)s(yβ1β5)γ=s(y)s(yβ1β5)γ,
where y=yβ1β5y. Since L3=R4, the following theorem holds.

Theorem 1 Assuming Camellia* is defined as above, if all the bytes of the left half of the input to Camellia* are fixed, and in the right half, all the bytes are fixed except the first one is active, then all the bytes of the right half of the output of the 4th round are balanced, besides, the times that different values appear at the 8th byte, i.e., Z4,8, are even integers.

According to Theorem 1, the times that different values of L3,8 appear are even integers, Because the S-box is a bijective map, the times that different values of Z4,8 appear are even integers. Thus, Z4,8 is a balanced byte. Also, because Z4,8 is the output of S-box, rather than a full round, the distinguisher shown in Theorem 1 is called a 4.5-round Square distinguisher of Camellia*.

In the original Camellia, we have
R4,8=s1(y)s2(yβ1β5)γ,
by which we can only determine that R4,8 is a balanced byte. If one wants to determine whether the times that different values of R4,8 appear is even or odd, it is enough that the S-boxes at positions 1 and 5 are the same.

Reference [8] evaluated the security of Camellia against higher order differential attacks. According to the definition of higher order differences and by aid of computers, some higher order differences of round-reduced Camellia were found. In fact, the result of Theorem 1 will also be found by computers.

The results in this section show that, when a cipher adopts multi-S-boxes, in order to improve the immunity against Square attack, the designers must choose the order of the S-boxes carefully.

We can simply denote the Square distinguisher shown in Theorem 1 by (PR,1, Z4,8), which means that if only PR,1 is active and other bytes are constants, Z4,8 is a balanced byte. By the same techniques, we can find the following Square distinguishers of Camellia*: (PR,2, Z4,5), (PR,3, Z4,6), and (PR,4, Z4,7). Details of the proofs are omitted.

Square attacks on Camellia*

Square attack on 6-round Camellia*

To apply a 6-round Square attack, we adopt the method that has been used in Ref. [8] (See Fig. 1).

First, we have
PLY2Y4Y6=CL.
Thus,
PLCL=Y2Y4Y6=P(Z2Z4Z6),
which means that
P-1(PLCL)=Z2Z4Z6.
Thus, we have
PR,1P-1(PLCL)8=PR,1P-1(CL)8=PR,1(Z2Z4Z6)8=PR,1Z2,8PR,1Z4,8PR,1Z6,8=PR,1Z6,8,
according to which we have the following attack on 6-round Camellia*.

Step 1 Choose plaintexts with the following form where c is some constant not necessarily equal to each other at different positions, and x takes all value of F28:
{PL=(c,c,c,c,c,c,c,c),PR=(x,c,c,c,c,c,c,c),
the corresponding ciphertexts are denoted by (CL(x), CR(x)). Then, compute
sum=x(P-1(CL(x)))8.

Step 2 Guess k6,8 of the 6th round key and compute
sum=xs(CR,8k6,8).
If sum=sum, keep k6,8 as a candidate of the right subkey; otherwise, it is rejected.

Step 3 If necessary, repeat Steps 1 and 2 until the value of k6,8 is uniquely determined.

For a wrong key, with probability 2-8, sum=sum holds. Thus, after choosing a structure of plaintexts, there are (28-1)×2-8≈1 wrong keys that can pass the test. To uniquely determine the correct key, two structures are sufficient. Therefore, the data complexity of the above attack is 2×28=29 chosen plaintexts. Accordingly, the time complexity of the attack is about 28×28+2×28 times lookup tables, and since there are 6×8 S-boxes in 6-round Camellia*, the time complexity is about (28×28+2×28)/(6×8) ≈210.4 encryptions. Since the structure must be stored, the space complexity of the attack is 28 plaintext/ciphertext pairs.

Square attack on 7-round Camellia*

The 7-round attack is based on the 6-round attack with additional one round at the beginning.

Step 1 Choose plaintexts with the left half being
PL=(x,c,c,c,c,c,c,c),
where c is some constant not necessarily equal to each other at different positions; guess a value for k1,1, and compute
PR=P(S(xk1,1),c,c,c,c,c,c,c).
Then, compute the corresponding ciphertext of (PL, CR), say, (CL, CR), and last, compute
sum=x(P-1CL)8.
.

Step 2 Guess a value for k7,8, then compute
sum=xs(CR,8k7,8).
If sum=sum, put (k1,1, k6,8) as a candidate of the right keys; otherwise, it is rejected.

Step 3 If necessary, repeat Steps 1 and 2 until the value of (k1,1, k6,8) is uniquely determined.

If k1,1 is the correct value, the output of the first round is
{L1=(c,c,c,c,c,c,c,c),R1=(y,c,c,c,c,c,c,c),
thus the 6-round attack can be applied to the following 6-round cipher. Because a wrong value for k7,8 can pass the test with probability 2-8, three different structures of PL will be needed to uniquely determine (k1,1, k6,8). Thus, the data complexity of the attack is 217.6 chosen plaintexts, time complexity is (2×28×28×28+28×28+2×28)/(8×7)≈219.2 encryptions, space complexity of the attack is 28 plaintext/ciphertext pairs, and 28 keys are candidates after analyzing the first structure.

This attack is valid even if an FL/FL-1 is inserted.

In fact, if there is no FL/FL-1 transformation, (P-1CL)8, we only need to know five bytes of (CL)8, thus when FL/FL-1 is added, we need to guess another 5×8 bits of kl and 8 bits of kr, where kl and kr stand for the left and right halves of the correspondence subkey. Therefore, the number of structures must satisfy
(23×8×25×8×28-1)×(2-8)N<1
which tells that N=9 is enough. Therefore, the data complexity is 216×9219.1 chosen plaintexts, and the time complexity is 218.2×26×8=266.2 encryptions.

Square attack on 11-round Camellia*

The 11-round attack is based on the 6-round attack with additional two rounds at the beginning and three rounds at the end. In the two rounds at the beginning, it needs to guess six bytes subkeys; and in the three rounds at the end, it needs to guess 22 bytes subkeys.

Step 1 Guess a value for k2,1, and
PL=(s(xk2,1),s(xk2,1),s(xk2,1),c,s(xk2,1),c,c,s(xk2,1)),
then guess k1,1, k1,2, k1,3, k1,5, k1,8 and compute
PR=P(s(s(xk2,1)k1,1),s(s(xk2,1)k1,2),s(s(xk2,1)k1,3),c,s(s(xk2,1)k1,5),c,c,s(s(xk2,1)k1,8)).

Step 2 Guess all bytes of the 11th round-key (eight bytes) and compute (L10, R10), then guess all bytes of the 10th round-key (8 bytes) and compute (L9,8, R9); guess k9,1, k9,4, k9,5, k9,6, k9,7 and compute (L8,(1,4,5,6,7), R8,8); guess k8,8 and check whether the following equation holds:

xs(R8,8k8,8)=x(L8,1L8,4L8,5L8,6L8,7).
If the equation does not hold, the combination of the correspondence subkeys is a wrong one.

Step 3 If necessary, repeat Steps 1 and 2 until the combination of the subkeys is uniquely determined.

To uniquely determine the candidates, it needs 29 different structures of PL. Thus, the data complexity of the attack is 29×28×240≈252.9 chosen plaintexts; the time complexity is (28×28×240×222×8+···)/(8×11)≈2225.5 encryptions; and the space complexity is 2216.

Conclusion

This paper primarily investigated the relationship between the order of S-boxes and immunity of ciphers against Square attack. Results in this paper show that, if Camellia adopts only a single S-box instead of four S-boxes, the security of Camellia against Square attack decreased dramatically. Also, if the order of the four S-boxed is changed, the security of Camellia against Square attack is also decreased. See Table 1 for the comparison of these results. In the design of a cipher, multi-S-boxes can improve the security of the cipher, given that one can carefully chooses the order of the S-boxes being used.

References

[1]

Daemen J, Knudsen L R, Rijmen V. The block cipher Square. In: Proceedings of the 4th International Workshop on Fast Software Encryption. Lecture Notes in Computer Science, 1997, 1267: 149–165

[2]

Lucks S. The saturation attack—a bait for Twofish. In: Proceedings of the 8th International Workshop on Fast Software Encryption. Lecture Notes in Computer Science, 2002, 2355: 1–15

[3]

Biryukov A, Shamir A. Structural cryptanalysis of SASAS. In: Proceedings of the International Conference on the Theory and Application of Cryptographic Techniques: Advances in Cryptology. Lecture Notes in Computer Science, 2001, 2045: 395–405

[4]

Knudsen L R, Wagner D. Integral cryptanalysis. In: Proceedings of the 9th International Workshop on Fast Software Encryption. Lecture Notes in Computer Science, 2002, 2365: 112–127

[5]

Reza Z’aba M, Raddum H, Henricksen M, Dawson E. Bit-pattern based integral attack. In: Proceedings of the 15th International Workshop on Fast Software Encryption. Lecture Notes in Computer Science, 2008, 5086: 363–381

[6]

Aoki K, Ichikawa T, Kanda M, Matsui M, Moriai S, Nakajima J, Tokita T. Camellia: a 128-bit block cipher suitable for multiple platforms—design and analysis. In: Proceedings of the 7th Annual International Workshop on Selected Areas in Cryptography. Lecture Notes in Computer Science, 2001, 2012: 39–56

[7]

Kanda M, Matsumoto T. Security of Camellia against truncated differential cryptanalysis. In: Proceedings of the 8th International Workshop on Fast Software Encryption. Lecture Notes in Computer Science, 2002, 2355: 286–299

[8]

Hatano Y, Sekine H, Kaneko T. Higher order differential attack of Camellia (II). In: Proceedings of the 9th Annual International Workshop on Selected Areas in Cryptography, Lecture Notes in Computer Science, 2003, 2595: 129–146

[9]

He Y P, Qing S H. Square attack on reduced Camellia cipher. In: Proceedings of the 3rd International Conference on Information and Communications Security. Lecture Notes in Computer Science, 2001, 2229: 238–245

[10]

Yeom Y, Park S, Kim I. On the security of Camellia against the Square attack. In: Proceedings of the 9th International Workshop on Fast Software Encryption. Lecture Notes in Computer Science, 2002, 2365: 89–99

[11]

Lei D, Chao L, Feng K Q. New observation on Camellia. In: Proceedings of the 12th International Workshop on Selected Areas in Cryptography. Lecture Notes in Computer Science, 2006, 3897: 51–64

[12]

Wu W L, Feng D G. Collision attack on reduced-round Camellia. Science in China, Series F: Information Sciences, 2005, 48(1): 78–90

[13]

Wu W L, Zhang W T, Feng D G. Impossible differential cryptanalysis of reduced-round ARIA and Camellia. Journal of Compute Science and Technology, 2007, 22(3): 449–456

[14]

Lu J Q, Kim J, Keller N, Dunkelman O. Improving the efficiency of impossible differential cryptanalysis of reduced Camellia and MISTY1. In: Proceedings of the Cryptopgraphers’ Track at the RSA conference on Topics in cryptology. Lecture Notes in Computer Science, 2008, 4964: 370–386

[15]

Kwon D, Kim J, Park S, Sung S H, Sohn Y, Song J H, Yeom Y, Yoon E-J, Lee S, Lee J, Chee S, Han D, Hong J. New block cipher: ARIA. In: Proceedings of the 6th International Conference on Information Security and Cryptology. Lecture Notes in Computer Science, 2004, 2971: 432–445

[16]

Li P, Sun B, Li C. Integral cryptanalysis of ARIA. In: Proceedings of Information Security and Cryptology—Inscrypt2009

RIGHTS & PERMISSIONS

Higher Education Press and Springer-Verlag Berlin Heidelberg

AI Summary AI Mindmap
PDF (140KB)

945

Accesses

0

Citation

Detail

Sections
Recommended

AI思维导图

/