As a fully homomorphic encryption friendly symmetric-key primitive, DASTA was invented by Hebborn at Fast Software Encryption 2020. A new fixed linear layer design concept is introduced in the DASTA stream cipher so that its AND depth and the number of ANDs per encrypted bit are quite small. Currently, the security of the DASTA stream cipher has received extensive attention. Note that the best-known attack (i.e., algebraic attack) on DASTA still has a very high data complexity. It appears to be an important task to reduce the data complexity of the attack on DASTA. In this article, a new algebraic attack on DASTA is proposed. More specifically, the key feed-forward operation, the properties of the nonlinear layer and the invariance from the linear layer are successfully utilized in the attack. In particular, the nonlinear relation of internal states in DASTA is linearized effectively. In this case, more secret key bit equations with low algebraic degrees are collected by fixing the bit. It is illustrated that four -round instances of the DASTA cipher family are theoretically broken by the attack, where r is the iterative number of round operations. Compared with the results of previous algebraic attacks, our approach achieves more favorable data complexity.
With the emergence and rapid development of cloud computation, fog computation and edge computation, multiparty secure computation and fully homomorphic encryption [17] play vitally important roles in ciphertext data searching and processing. Correspondingly, new requirements and challenges for the performance of cryptographic algorithms have been proposed and are receiving attention. For a good cryptographic primitive, executing efficiently on software and hardware scenarios and possessing high security are essential characteristics. However, in fully homomorphic encryption, the cost of executing the AND operation is usually higher than that of the XOR operation. In this case, in addition to the traditional performance described above, the cryptographic algorithm should also realize minimizing the number of AND operations. Therefore, the design of cryptographic primitives with efficiency, high security and a bare minimum number of AND operations is a trending issue in the area of cryptography.
During the past six years, many symmetric primitives applied to fully homomorphic encryption have been proposed, such as LowMC [2], Kreyvium [5], FLIP [16], RASTA [8], Mimc [1], HADES [12], and Ciminion [9]. In particular, LowMC, Kreyvium and FLIP encryption algorithms achieve outstanding implementation and minimize the number of AND operations since the designers adopted the strategies of reducing AND depth (i.e., number of rounds) or the number of ANDs per encrypted bit. More concretely, the minimal AND depth of LowMC (or Kreyvium) is 11, and the number of ANDs per encrypted bit is only 3 or 4. On the other hand, the AND depth of FLIP is quite small, i.e., 4, but its number of ANDs per encrypted bit reaches 1072. Actually, both the minimal AND depth and the number of ANDs per encrypted bit of these encryption primitives cannot be simultaneously optimal. To trade off these two parameters, Leander designed RASTA [8], a stream cipher based on the ASASA structure [4]. Clearly, the key feed-forward operation is utilized in RASTA, and the linear layer and nonlinear layer are selected alternately. In particular, RASTA achieved d AND depth and d ANDs per bit at the same time, where . Since this novel design concept can reduce these two parameters simultaneously and effectively, RASTA has received extensive attention. However, one issue is that all linear layers of RASTA are generated by KECCAK [20], which is quite time-consuming. To further solve this issue, Hebborn and Leander proposed the DASTA cipher [14], whose linear layer is replaced by a combination of an ever-changing bit-wise permutation and a deterministic linear transformation. Such a new construction has made DASTA 100× times faster than RASTA in offline settings.
DASTA is a streaming cipher, and the ciphertext stream is generated by the XORing plaintext stream and key stream. The novelty of DASTA is that the plaintext stream is divided first into N blocks: ; then, the i-th ciphertext block is generated by , where is the i-th key block, and the block size is denoted as n there in after. Therefore, the generating method of key block from master key is the core technique of DASTA. As shown in Fig. 1, passes through the i-th key block generator to generate the i-th key block which can be represented as (1). Additionally, the i-th ciphertext , , where i refers to the block counter and N is also the number of times the master key can be used. To protect DASTA against algebraic attacks, the designers imposed a restriction that , where s is the security level.
where , L is a linear transformation, is a bit-wise permutation, χ is a nonlinear transformation, and r is the number of rounds. The details of L, , and χ are provided in Section 2.
The designers of DASTA recommend that a master key can be used to encrypt at most plaintext blocks, this allows DASTA to effectively resist attacks that need to collect a large number of plaintext and ciphertext pairs under a single key model, such as differential analysis and cube attack. On the other hand, since the nonlinear layer χ is a quadratic function, the designers deduced that the upper bound of the algebraic degree of r-round DASTA reaches . Correspondingly, if DASTA is analyzed by algebraic cryptanalysis, the upper bound of the number of monomials in algebraic equations is . In this case, the designers believe the algebraic cryptanalysis can be effective only if the time complexity is less than , i.e., , where the exponent of the Gaussian elimination method is fixed to 2.37. However, low algebraic order equations can be further derived by combining the property of χ, the key feed-forward operation, and one bit information of so that the time complexity of algebraic attack can be reduced to in [15]. Thus, four instances of DASTA cipher family will be broken if they are reduced to round. In fact, only one algebraic equation can be attained in one block counter by the method in [15]; thus, the data complexity of this attack is very high.
In this article, an algebraic attack on the DASTA cipher with lower data complexity is proposed. The key feed forward operation, the properties of the nonlinear layer and the invariance of the linear transformation in the linear layer are successfully utilized in our attack. In particular, one bit of is first fixed and then combined with three relations between the input and output of the χ operation [13,15,19], two or three equations can be collected. Since more equations are attained from one plaintext–ciphertext pair , the data complexity is effectively reduced. Based on this method, three different attack models are proposed, namely, Model 1, Model 2, and Model 3.
Model 1. In the counter where the fixed bit of is not equivalent to , three linearly independent equations in terms of can be attained from the relations between the input and output of the last χ operation. An equation system will be formed by such equations that are obtained in these kinds of counters so that an algebraic attack on DASTA can be implemented.
Model 2. Note that in the counter where the fixed bit of is equivalent to , one of the relations between the input and output of the last χ operation is invalid; however, other relations are always valid. In Model 2, the invalid relation is abandoned, and two linearly independent equations in terms of can be attained from other two relations in any counter. This means that there is no constraint condition on the plaintext–ciphertext pair in Model 2.
Model 3. A flexible strategy is adopted in Model 3. Specifically, in the counter where the fixed bit of is not equivalent to , three linearly independent equations in terms of are attained from the three relations between the input and output of the last χ operation; in the counter where the fixed bit of is equivalent to , two linearly independent equations are collected from the always valid relations. Note that there is also no constraint condition on the plaintext–ciphertext pair in Model 3. However, compared to Model 2, the relations between the input and output of the last χ operation are utilized more effectively in Model 3.
Under the assumption that the plaintext–ciphertext pair satisfies the constraint condition, the data complexity of our attack model named Model 1 is 66.67% less compared to that of [15]. Under the assumption that plaintext–ciphertext pair is arbitrary, the data complexities of our attack models named Model 2 and Model 3 can be respectively decreased to and . It is illustrated that four -round instances of DASTA cipher family are broken, two -round instances and one -round instance are broken by our attack, where r is the iterative number of round operations.
The structure of this paper is given below. In Section 2, the concept of algebraic attack and the details of DASTA are introduced. In Section 3, the method that attains more algebraic equations with low algebraic degrees is investigated. Based on this method, different algebraic attack models on DASTA are proposed in Section 4 and Section 5. Section 6 offers a summary.
Generation of key stream of DASTA.
Preliminaries
Algebraic attack
The algebraic attack is a classic method used to analyze the security of stream ciphers, and its core concept can be described as follows. Let the master key of a given cipher be . Assume the opponent can establish an equation system in terms of below:
where is polynomial in terms of . Clearly, once this multiple polynomial system is solved, then will be attained. Note that if the algebraic degree of a multiple polynomial system with n variables is d, then there are at most monomials in this system.
During the past two decades, many techniques looking for the solution of multiple polynomial systems have been discussed since algebraic attacks were proposed, e.g., the linearization method [3], the guessing and determination method [18], the F4/F5 algorithm [10,11] and the XL algorithm [6]. Due to its convenience in implementation and evaluation, the linearization method has been widely used in the analysis of various classic cryptographic algorithms [7,13,19]. In fact, there are two important steps in the linearization method. First, each monomial in system (2) is renamed with a new variable, which can convert system (2) into a linear system. Moreover, the Gaussian elimination method is utilized to solve the new linear system. Essentially, the complexity of attack is determined by the complexity of the Gaussian elimination to solve the linear system. Let the exponent of Gaussian elimination be ω, the number of new variables be U, and the number of binary operations required to encrypt a plaintext be denoted by V. Then, there are two approaches for evaluating the time complexity T of attack, i.e., (if ) and (if ).
The components of DASTA
The basic structure of DASTA is depicted in Section 1, the components of in the key stream generator are introduced below. As described in (1), is a composition of round functions, . Specifically,
where L is a linear transformation, is a bite-wise permutation, and χ is a nonlinear transformation.
The matrix of L is the transposition of the generation matrix of the BCH code, and since the details of L do not affect the effect of our attack, they will not be repeated here. The nonlinear transformation χ is the nonlinear component used in KECCAK, and the relationship between the input () and the output () of χ can be described as follows:
where the indices are considered within modulo n. χ is reversible only if the number of input variables is odd, which implies that the block size of DASTA should also be odd.
The bit-wise permutations adopted in DASTA can be represented as the multiplication of mutually disjoint rotations. In particular, the types of these rotations are consistent, which can be described via an instance . The designers of DASTA represented the bit-wise permutation as product of cycles. For example,
Such a bit-wise permutation is denoted as , and simplified further as in [14]. (Note that τ is not the bit-wise permutation used in DASTA.)
There are seven DASTA instances in total, and the parameters are represented as , where n is the block size, r is the number of iterations for each key block generator, and s is the security level. The designers specified that the master key can encrypt up to plaintext blocks and denote as N. The parameters and bit-wise permutations of seven instances are provided in the Appendix.
Linearization and algebraic attack on DASTA
The states of the master key in the i-th block counter can be illustrated below:
Clearly, χ is the only nonlinear operation in the encryption function. Note that the low-degree algebraic equations derived from χ will be successfully exploited in the attack. Let be the input of χ in the -th round, where is polynomial in terms of with algebraic degree. Similarly, let be the output of χ in the -th round. The i-th key block can be derived by (1), i.e., . On the other hand, , and thus , where is the i-th plaintext block and is the i-th ciphertext block. Since L is linear, we have
Moreover, is a linear function in terms of since is a constant and is a bit-wise permutation .
The input and output of χ in the -th round.
In brief, based on the key feed-forward operation in DASTA, the nonlinear component χ in the -th round is utilized to attain Equation , where is a polynomial in terms of with algebraic degree, is a linear function in terms of , .
In the implementation of an algebraic attack on DASTA, Liu observed that there is a relation between bit of input of χ and bit of output as follows [15]:
where the indices are considered within modulo n.
In practical collision attacks against round-reduced SHA-3 (χ is also the core component of the round function of SHA-3), Guo adopted the relation between and as follows [13]:
When researching the inverse operation of χ, Rajasree found another relation between and [19]:
Note that if , then the upper bounds of the algebraic degrees of (5) and (6) are ; and if , then the upper bound of the algebraic degree of (7) is .
While generating the key stream, the same linear transformation L is used for different counters; thus, is invariant. Let ; then, is a linear combination of and . According to (4) and Fig. 2, , . Therefore, if the -th bit of σ is fixed, then the -th bit of is fixed correspondingly, and the value of can be determined via the plaintext–ciphertext pair in the i-th block counter. Furthermore, the corresponding fixed bit of can be determined by permutation . Assuming that the fixed bit of is the -th bit , then i.e. is fixed and its value can be calculated by . It is not difficult to find that if , then the upper bounds of the algebraic degrees of (5), (6) and (7) are reduced to ; if , then the upper bounds of the algebraic degrees of (5) and (7) are reduced to , but (6) is invalid. In summary, by fixing one bit of , the equations in terms of can be attained from (5), (6) and (7) except when (6) is invalid, and the algebraic degrees of these equations are at most . When enough equations are obtained in different counters, they can form an equation system with an algebraic degree of at most , and then an algebraic attack can be implemented by linearizing this equation system. It is the core technique adopted in Model 1, Model 2 and Model 3.
The algebraic attack for certain plaintext–ciphertext pairs
Based on the method described in Section 3, an algebraic attack for certain plaintext–ciphertext pairs is proposed, namely, Model 1. The core concept of Model 1 is choosing the proper plaintext–ciphertext pair to ensure the validity of (6) and obtaining an equation in terms of with degree from (5), (6) and (7). Note that (6) will be invalid if , and if and only if . Thus, if the plaintext–ciphertext pair satisfies , then we have . We choose the proper counters to ensure that the plaintext–ciphertext pair satisfies this constraint condition; then, three linearly independent equations can be obtained by (5), (6) and (7) as follows:
When , the upper bounds of the algebraic degrees of equations above are all ; thus, there are at most monomials, i.e., at most new variables will exist in the linearized equations. In this case, the attacker has to collect at least equations, denoted by . Although a large number of equations can be obtained by this method, we only discuss the case in which the number of equations is equal to the number of new variables, which implies storage complexity . Note that three linearly independent equations can be obtained in the block counter where , and the probability of is 0.5; thus, the data complexity . Since only one bit of is guessed, if , then the time complexity ; if , then , where R is the number of attacked rounds. The designers of DASTA recommend that the master key can encrypt up to plaintext blocks; thus, is the necessary condition that the attack can be implemented. According to this rule, at most equations can be collected; if the time complexity is , then the cipher is not secure. More concretely, for the standard r-round DASTA, four -round instances will be broken, two -round instances will be broken, and one -round instance will also be broken by utilizing this attack model (see Table 1).
The data complexity of attack Model 1 (for certain plaintext–ciphertext pairs)
R, M, D and T denote the number of attacked rounds, memory complexity, data complexity and time complexity, respectively.
* means that the corresponding time complexity exceeds the claimed security level.
Similar to the discussion proposed in [15], the time complexity and storage complexity of attack Model 1 are the same as those of attack in [15] (the same results can be applied to Model 2 and Model 3). However, the data complexity of our attack can be further decreased to of the data complexity of the attack in [15] (also see Table 1). Actually, ; if the data complexity of [15] is , then the data complexity of this model will be . It is illustrated that the data complexity can be effectively reduced by choosing proper plaintext–ciphertext pairs (i.e., choosing a proper block counter).
(Attack Model 1 (for certain plaintext–ciphertext pairs)).
Let ;
In the i-th block counter (i starts at 0), fix the -th bit of ;
Compute the value of the fixed bit of ;
If , then , and repeat 2, 3;
If , then three equations can be obtained:
,
,
;
,
If , then repeat 2 to 4;
If , then combine these equations into a system, and solve this system.
Algebraic attacks for arbitrary plaintext–ciphertext pairs
The core concept of Model 1 is to obtain equations in terms of only when . As described in Section 4, if and only if the plaintext–ciphertext pair satisfies ; this restriction results in the data complexity of Model 1 being less than 66.67% compared to that of [15]. In this section, two different attack models are adopted to eliminate this restriction, and the data complexity is further reduced.
Model 2
The implementation of Model 2 is also based on the method described in Section 3; however, (6) is abandoned in this model, and only (5) and (7) are used to obtain equations in terms of . Specifically, if , then two linearly independent equations can be derived below.
If , then there are another two linearly independent equations:
Similar to the discussion in attack Model 1, the attacker has to obtain at least equations. Since two linearly independent equations can be collected in one block counter, the data complexity . Only one bit of is guessed; if , then the time complexity ; if , then , where R is the number of attacked rounds. The designers of DASTA recommend that the master key can encrypt up to plaintext blocks; thus, is the necessary condition under which the attack can be implemented. According to this rule, at most equations can be collected; if the time complexity , then the cipher is not secure. It is illustrated that for the standard r-round DASTA, four -round instances(DASTA80-4, DASTA128-4, DASTA256-6, DASTA256-5) will be broken, two -round instances (DASTA128-6, DASTA128-5) will be broken, and one -round instance(DASTA80-6) will also be broken by utilizing this attack model.
Note that two equations can be collected from arbitrary plaintext–ciphertext pairs; thus, the data complexity can be further decreased to of the data complexity in [15] (see Table 2). Since , if the data complexity in [15] is , then the data complexity of this model will be . It is illustrated that the data complexity can be further reduced by utilizing equations that are always effective. The specific procedure is shown in Algorithm 2.
(Attack Model 2 (for arbitrary plaintext–ciphertext pair)).
Let ;
In the i-th block counter (i starts at 0), fix the -th bit of ;
Compute the value of fixed bit of ;
If , then two equations can be obtained:
,
;
If , then another two equations can be obtained:
,
;
,
If , then repeat 2 to 4;
If , then combine these equations into a system, and solve this system.
Model 3
This model is still basesd on the method described in Section 3, differing from Model 2, a flexible strategy to use (5), (6) and (7) is adopted in Model 3. Specifically, we only use (5) and (7) if , since (6) is invalid in this kind of counter. We use (5), (6) and (7) if , since they are always valid. Specifically, if , then two linearly independent equations can be derived:
If , then there are another three linearly independent equations:
The data complexity of attack Model 2 (for arbitrary plaintext–ciphertext pair)
Similarly, the attacker has to obtain at least equations. Since two linearly independent equations can be collected in the block counter where , three linearly independent equations can be collected in the block counter where , and the probabilities of being either 0 or 1 are 0.5; thus, the data complexity . Since only one bit of is guessed; if let , then the time complexity ; if let , then , where R is the number of attacked rounds. The designers of DASTA recommend that the master key can encrypt up to plaintext blocks; thus, is the necessary condition under which the attack can be implemented. According to this rule, at most equations can be collected; if the time complexity , then the cipher is not secure. It is illustrated that for the standard r-round DASTA, four -round instances (DASTA80-4, DASTA128-4, DASTA256-6, DASTA256-5) will be broken, two -round instances (DASTA128-6, DASTA128-5) will be broken, and one -round instance (DASTA80-6) will also be broken by utilizing this attack model.
To summarize, by collecting two equations in the block counter where and three equations in the block counter where , the data complexity can be further decreased to of the data complexity of attack in [15] (see Table 3). Since , if the data complexity in [15] is , then the data complexity of this attack model will be . The data complexity can be significantly reduced by using this flexible collecting strategy. The specific procedure is shown in Algorithm 3.
The data complexity of attack Model 3 (for arbitrary plaintext–ciphertext pair)
(Attack Model 3 (for arbitrary plaintext–ciphertext pair)).
Let ;
In the i-th block counter (i starts at 0), fix the -th bit of ;
Compute the value of fixed bit of ;
If , then two equations can be obtained:
,
;
If , then three equations can be obtained:
,
,
;
, if , then ; if , then .
If , then repeat 2 to 4;
If , then combine these equations into a system, and solve this system.
Conclusions
In this article, the security of fully homomorphic encryption friendly symmetric-key primitives DASTA is evaluated by using a new algebraic attack with three different models. The key feed-forward operation, the properties of the nonlinear layer and the invariance of the linear transformation in the linear layer are successfully utilized in this attack. In particular, the data complexity of this attack can be effectively reduced. Compared with the previous best known result, the data complexity of our attack Model 1 is reduced by ; the data complexity of our attack Model 2 is reduced by ; and the data complexity of our attack Model 3 is reduced by . It is illustrated that four -round instances of the seven instances in the DASTA cipher family are broken, two -round instances and one -round instance are also broken by this attack.
Conflict of interest
None to report.
Footnotes
DASTA instances
The DASTA cipher family
Instance
Permutation
DASTA 80-6
DASTA 80-4
DASTA 128-6
DASTA 128-5
DASTA 128-4
DASTA 256-6
DASTA 256-5
i, , , , , are determined by N: , where , .
References
1.
M.R.Albrecht, L.Grassi, C.Rechbergeret al., Mimc: Efficient encryption and cryptographic hashing with minimal multiplicative complexity, in: ASIACRYPT 2016, Springer, 2016, pp. 191–219. doi:10.1007/978-3-662-53887-6_7.
2.
M.R.Albrecht, C.Rechberger, T.Schneideret al., Ciphers for MPC and FHE, in: EUROCRYPT 2015, Springer, 2015, pp. 46–48.
3.
F.Armknecht, A linearization attack on the bluetooth key stream generator, 13 December 2002, http://eprint.iacr.org/2002/191/.
4.
A.Biryukov, C.Bouillaguet and D.Khovratovich, Cryptographic schemes based on the ASASA structure: Black-box, white-box, and public-key (extended abstract), in: ASIACRYPT 2014, Springer, 2014, pp. 63–84.
5.
A.Canteaut, S.Carpov, C.Fontaineet al., Stream ciphers: A practical solution for efficient homomorphic-ciphertext compression, in: The 23rd International Conference on Fast Software Encryption, Springer, 2016, pp. 313–333. doi:10.1007/978-3-662-52993-5_16.
6.
N.T.Courtois, A.Klimov, J.Patarinet al., Efficient algorithms for solving overdefined systems of multivariate polynomial equations, in: EUROCRYPT 2000, Springer, 2000, pp. 14–18.
7.
N.T.Courtois and W.Meier, Algebraic attacks on stream ciphers with linear feedback, in: EUROCRYPT 2003, Springer Press, Warsaw, 2003, pp. 345–359.
8.
C.Dobraunig, M.Eichlseder, L.Grassiet al., RASTA: A cipher with low ANDdepth and few ANDs per bit, in: CRYPTO 2018, Springer, 2018, pp. 662–692. doi:10.1007/978-3-319-96884-1_22.
9.
C.Dobraunig, L.Grassi, A.Guinetet al., Ciminion: Symmetric encryption based on Toffoli-gates over large finite fields, in: EUROCRYPT 2021, Springer, 2021, pp. 3–34. doi:10.1007/978-3-030-77886-6_1.
10.
J.C.Faugere, A new efficient algorithm for computing Gröbner bases (F4), Journal of Pure and Applied Algebra139 (1999), 61–88. doi:10.1016/S0022-4049(99)00005-5.
11.
J.C.Faugere, A new efficient algorithm for computing Gröbner bases without reduction to zero F5, in: International Symposium on Symbolic and Algebraic Computation Symposium – ISSAC 2002, ACM, 2002, pp. 75–83. doi:10.1145/780506.780516.
12.
L.Grassi, R.Lüftenegger, C.Rechbergeret al., On a generalization of substitution-permutation networks: The HADES design strategy, in: EUROCRYPT 2020, Springer, 2020, pp. 674–704. doi:10.1007/978-3-030-45724-2_23.
13.
J.Guo, G.H.Liao, G.Z.Liuet al., Practical collision attacks against round-reduced SHA-3, Journal of Cryptology33 (2019), 228–270. doi:10.1007/s00145-019-09313-3.
14.
P.Hebborn and G.Leander, DASTA – Alternative linear layer for RASTA, IACR Transactions on Symmetric Cryptology3 (2020), 46–86. doi:10.13154/tosc.v2020.is.46-86.
15.
F.K.Liu, T.Isobe and W.Meier, Algebraic attacks on RASTA and DASTA using low-degree equations, in: ASIACRYPT 2021, Springer, 2021, pp. 214–240. doi:10.1007/978-3-030-92062-3_8.
16.
P.Meaux, A.Journault, F.Standaertet al., Towards stream ciphers for efficient FHE with low-noise ciphertexts, in: EUROCRYPT 2016, Springer, 2016, pp. 311–343. doi:10.1007/978-3-662-49890-3_13.
17.
S.Mittal and K.R.Ramkumar, Research perspectives on fully homomorphic encryption models for cloud sector, Journal of Computer Security29 (2021), 135–160. doi:10.3233/JCS-219001.
18.
E.Pasalic, On guess and determine cryptanalysis of LFSR-based stream ciphers, IEEE Transactions on Information Theory55 (2009), 3398–3406. doi:10.1109/TIT.2009.2021316.
19.
M.S.Rajasree, Cryptanalysis of round-reduced KECCAK using non-linear structures, in: INDOCRYPT 2019, Springer, 2019, pp. 175–192. doi:10.1007/978-3-030-35423-7_9.
20.
SHA-3 standard: Permutation-based hash and extendable-output functions, (NIST FIPS)-202, 2014.