[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ Skip to main content
Log in

Unified and optimized linear collision attacks and their application in a non-profiled setting: extended version

  • CHES 2012
  • Published:
Journal of Cryptographic Engineering Aims and scope Submit manuscript

Abstract

Side-channel collision attacks are one of the most investigated techniques allowing the combination of mathematical and physical cryptanalysis. In this paper, we discuss their relevance in the security evaluation of leaking devices with two main contributions. On one hand, we suggest that the exploitation of linear collisions in block ciphers can be naturally re-written as a Low Density Parity Check Code decoding problem. By combining this re-writing with a Bayesian extension of the collision detection techniques, we improve the efficiency and error tolerance of previously introduced attacks. On the other hand, we provide various experiments in order to discuss the practicality of such attacks compared to standard differential power analysis (DPA). Our results exhibit that collision attacks are less efficient in classical implementation contexts, e.g. 8-bit microcontrollers leaking according to a linear power consumption model. We also observe that the detection of collisions in software devices may be difficult in the case of optimized implementations, because of less regular assembly codes. Interestingly, the soft decoding approach is particularly useful in these more challenging scenarios. Finally, we show that there exist (theoretical) contexts in which collision attacks succeed in exploiting leakages, whereas all other non-profiled side-channel attacks fail.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (United Kingdom)

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3

Similar content being viewed by others

Notes

  1. Actually this corresponds to the square root of the Euclidean distance but the root does not alter the ordering hence there is no reason to consider it.

  2. Since the Bayesian extension does not modify the ordering of the scores, using it only makes sense when applying the LDPC decoding algorithm.

  3. Increasing the basis with non-linear elements would not allow solving this issue as long as only non-profiled attacks are considered. It would lead to more precise leakage models both for the correct key candidates and the wrong ones, by over-fitting.

References

  1. Bennata, A., Burshtein, D.: Design and analysis of nonbinary LDPC codes for arbitrary discrete-memoryless channels. IEEE Trans. Inform. Theory 52, 549–583 (2006)

    Article  MathSciNet  Google Scholar 

  2. Bogdanov, A.: Improved side-channel collision attacks on AES. In: Adams, C.M., Miri, A., Wiener, M.J. (eds.) Selected Areas in Cryptography-SAC 2007, vol. 4876 of LNCS, pp. 84–95. Springer, Heidelberg (2007)

  3. Bogdanov, A.: Multiple-differential side-channel collision attacks on AES. In: Oswald, E., Rohatgi, P. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2008, vol. 5154 of LNCS, pp. 30–44. Springer, Heidelberg (2008)

  4. Bogdanov, A., Kizhvatov, I.: Beyond the limits of DPA: combined side-channel collision attacks. IEEE Trans. Comput. 61(8), 1153–1164 (2011)

    Google Scholar 

  5. Brier, E., Clavier, C., Olivier, F.: Correlation power analysis with a leakage model. In: Joye, M., Quisquater, J.-J. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2004, vol. 3156 of LNCS, pp. 16–29. Springer, Heidelberg (2004)

  6. Chari, S., Rao, J.R., Rohatgi, P.: Template attacks. In: Kaliski, B., Koç, C.K., Paar, C. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2002, vol. 2523 of LNCS, pp. 13–28. Springer, Heidelberg (2003)

  7. Clavier, C., Feix, B., Gagnerot, G., Roussellet, M., Verneuil, V.: Improved collision-correlation power analysis on first order protected AES. In: Preneel, B., Takagi, T. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2011, vol. 6917 of LNCS, pp. 49–62. Springer, Heidelberg (2011)

  8. Doget, J., Prouff, E., Rivain, M., Standaert, F.-X.: Univariate side channel attacks and leakage modeling. J. Cryptogr. Eng. 1(2), 123–144 (2011)

    Article  Google Scholar 

  9. Gallager, R.G.: Low density parity check codes. Trans. IRE Prof. Group Inform. Theory IT. 8, 21–28 (1962)

    Article  MathSciNet  MATH  Google Scholar 

  10. Gérard, B., Standaert, F.-X.: Unified and optimized linear collision attacks and their application in a non-profiled setting. In: Prouff, E., Schaumont, P. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2012, vol. 7428 of LNCS, pp. 175–192. Springer, Heidelberg (2012)

  11. Kocher, P.C., Jaffe, J., Jun, B.: Differential power analysis. In: Wiener, M.J. (ed.) Advances in Cryptology-CRYPTO 1999, vol. 1666 of LNCS, pp. 388–397. Springer, Heidelberg (1999)

  12. Ledig, H., Muller, F., Valette, F.: Enhancing collision attacks. In: Joye, M., Quisquater, J.-J. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2004, vol. 3156 of LNCS, pp. 176–190. Springer, Heidelberg (2004)

  13. Lomne, V., Roche, T.: Collision-correlation attack against some 1st-order Boolean masking schemes in the context of secure devices. In: Prouff, E. (ed.) Constructive Side-Channel Analysis and Secure Design: COSADE, LNCS. Springer (2013, to appear)

  14. Mangard, S.: Hardware countermeasures against DPA? a statistical analysis of their effectiveness. In: Okamoto, T. (ed.) Topics in Cryptology-CT-RSA 2004, vol. 2964 of LNCS, pp. 222–235. Springer, Heidelberg (2004)

  15. Moradi, A., Mischke, O., Eisenbarth, T.: Correlation-enhanced power analysis collision attack. In: Mangard, S., Standaert, F.-X. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2010, vol. 6225 of LNCS, pp. 125–139. Springer, Heidelberg (2010)

  16. Moradi, A.: Statistical tools flavor side-channel collision attacks. In: Johansson, T., Pointcheval, D. (eds.) Advances in Cryptology-EUROCRYPT 2012, vol. 7237 of LNCS, pp. 428–445. Springer, Heidelberg (2012)

  17. Poettering, B.: Fast AES implementation for Atmel’s AVR microcontrollers. http://point-at-infinity.org/avraes/

  18. Renauld, M., Standaert, F.-X., Flandre, D.: Information theoretic and security analysis of a 65-nanometer DDSLL AES S-box. In: Preneel, B., Takagi, T. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2011, vol. 6917 of LNCS, pp. 223–239. Springer, Heidelberg (2011)

  19. Schindler, W., Lemke, K., Paar, C.: A stochastic model for differential side channel cryptanalysis. In: Rao, J., Sunar, B. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2005, vol. 3659 of LNCS, pp. 30–46. Springer, Heidelberg (2005)

  20. Schramm, K., Leander, G., Felker, P., Paar, C.: A collision-attack on AES: Combining side channel and differential-attack. In: Joye, M., Quisquater, J.-J. (eds.) Cryptographic Hardware and Embedded Systems-CHES 2004, vol. 3156 of LNCS, pp. 163–175. Springer, Heidelberg (2004)

  21. Schramm, K., Wollinger, T.J., Paar, C.: A new class of collision attacks and its application to DES. In: Johansson, T. (ed.) Fast Software Encryption-FSE 2003, vol. 2887 of LNCS, pp. 206–222. Springer, Heidelberg (2003)

  22. Standaert, F.-X., Malkin, T., Yung, M.: A unified framework for the analysis of side-channel key recovery attacks. In: Joux, A. (ed.) Advances in Cryptology-EUROCRYPT 2009, vol. 5479 of LNCS, pp. 443–461. Springer, Heidelberg (2009)

  23. Veyrat-Charvillon, N., Gérard, B., Renauld, M., Standaert, F.-X: An optimal key enumeration algorithm and its application to side-channel attacks. In: Knudsen, L.R., Wu, H. (eds.) Selected Areas in Cryptolography-SAC 2012, vol. 7707 of LNCS, pp. 390–406. Springer, Heidelebrg (2012)

  24. Veyrat-Charvillon, N., Gérard, B., Standaert, F.-X.: Security evaluations beyond computing power: how to analyze side-channel attacks you cannot mount? To be published at EUROCRYPT (2013) (Preliminary work can be found at http://eprint.iacr.org/2012/578)

  25. Veyrat-Charvillon, N., Standaert, F.-X.: Generic side-channel distinguishers: Improvements and limitations. In: Rogaway, P. (ed.) Advances in Cryptology-CRYPTO 2011, vol. 6841 of LNCS, pp. 354–372. Springer, Heidelberg (2011)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Benoît Gérard.

Additional information

Part of this work has been done as a postdoctoral researcher supported by Walloon region MIPSs project. Associate researcher of the Belgian Fund for Scientific Research (FNRS-F.R.S.). This work has been funded in part by the ERC project 280141 (acronym CRASH).

Appendices

Appendix A: Proof of Lemma 2

We want to express the mean and the variance of a mixture of two distributions as a function of the means and variances of these distributions. Let us recall that \(\mathcal D \) is a mixture of two distributions \(\mathcal D _\mathrm{c}\) and \(\mathcal D _\mathrm{nc}\) with respective weights \(2^{-8}\) and \(1-2^{-8}\). We denote by \(\mu \) and \(\sigma ^2\) the expected value and variance of \(\mathcal D \), by \((\mu _\mathrm{c},\sigma ^2_\mathrm{c})\) the expected value and variance of \(\mathcal D _\mathrm{c}\), and by \((\mu _\mathrm{nc},\sigma ^2_\mathrm{nc})\) the expected value and variance of \(\mathcal D _\mathrm{nc}\). Let \(X_\mathrm{c}\) and \(X_\mathrm{nc}\) be respectively drawn according to \(\mathcal D _\mathrm{c}\) and \(\mathcal D _\mathrm{nc}\) and \(X\) be the mixture \(2^{-8} X_\mathrm{c} + (1-2^{-8})X_\mathrm{nc}\). Then, due to the linearity of the operator, \(\mathbb{E }\left(X\right)=\mathbb{E }\left(2^{-8} X_\mathrm{c} + (1-2^{-8})X_\mathrm{nc}\right)=2^{-8}\mu _\mathrm{c}+(1-2^{-8})\mu _\mathrm{nc}\). Thus, it follows that \(\mu _\mathrm{nc}= \frac{\mu -2^{-8}\mu _\mathrm{c}}{1-2^{-8}}\). Concerning the variance, a slightly more difficult calculus leads to the claimed result. First, we use the relationship \(\mathbb V \left(X\right) = \mathbb{E }\left(X^2\right) - \mathbb{E }\left(X\right)^2\) and we develop its first term in:

$$\begin{aligned} \mathbb{E }\left(X^2\right)&= \mathbb{E }\left(2^{-16}X_\mathrm{c}^2 + 22^{-8}(1-2^{-8})X_\mathrm{c}X_\mathrm{nc}\right)\\&\quad +{ (1-2^{-8})^2X_\mathrm{nc}^2}. \end{aligned}$$

Since \(X_\mathrm{c}\) and \(X_\mathrm{nc}\) are independent variables, we have:

$$\begin{aligned} \mathbb{E }\left(X^2\right)&= 2^{-16}\mathbb{E }\left(X_\mathrm{c}^2\right) + 2^{-7}(1-2^{-8})\mathbb{E }\left(X_\mathrm{c}\right)\mathbb{E }\left(X_\mathrm{nc}\right)\\&\quad +(1-2^{-8})^2\mathbb{E }\left(X_\mathrm{nc}^2\right). \end{aligned}$$

We then notice that \(\mathbb{E }\left(X_\mathrm{c}^2\right) = \sigma ^2_\mathrm{c}+\mu _\mathrm{c}^2\) (the same holds for \(\mathbb{E }\left(X_\mathrm{nc}^2\right)\)). Hence:

$$\begin{aligned} \mathbb{E }\left(X^2\right)&= 2^{-16}(\sigma ^2_c+\mu _c^2) + 2^{-7}(1-2^{-8})\mu _\mathrm{c}\mu _\mathrm{nc}\\&\quad +(1-2^{-8})^2(\sigma ^2_\mathrm{nc}+\mu _\mathrm{nc}^2). \end{aligned}$$

Now returning to \(\mathbb V \left(X\right) = \mathbb{E }\left(X^2\right) - \mathbb{E }\left(X\right)^2\), we finally observe that many terms in \(\mu \) vanish to yield \(\mathbb V \left(X\right) = 2^{-16}\sigma ^2_\mathrm{c}+(1-2^{-8})^2\sigma ^2_\mathrm{nc}\).

Appendix B: Additional details about the target implementations

Our experiments are based on two different implementations of the AES: a reference one that has been designed such that S-boxes’ look-ups have similar leakage functions, and the furious implementation. Codes corresponding to one look-up are presented in Table 1 and commented below.

Table 1 S-box code for used AES implementations

We observed that the most leaking operation in the S-box computation was the mov operation, that stores the input of the S-box in the ZL register. Hence, in the reference implementation, we first copy intermediate values in a register SR, that is the same for all 16 S-boxes computations. Then, SR is updated and the output is copied back to the initial state register. On the contrary, we can see that in the furious implementation, the ZL register is directly updated from the state register (here ST22), and the answer directly goes back to the state register. In addition, the furious implementation combines the S-box layer with the ShiftRows operation. It explains why the output is stored in ST21 and not ST22. The optimizations in the furious implementation are the main reason of the poor results of the attacks performed. As a simple illustration, we plotted the templates of the leakage points used in the attacks for different S-boxes in Fig. 4 (for the reference implementation) and Fig. 5 (for the furious one).

Fig. 4
figure 4

Leakage functions for the reference implementation

Fig. 5
figure 5

Leakage functions for the furious implementation

Appendix C: Discussion on parameters for list decoding

In this section we discuss two parameters for the list decoding procedure presented in Sect. 4.4 namely the application of belief propagation and the information set choice.

Using belief propagation in the procedure Choosing an information set and using it to enumerate codewords seems to be not optimal since we actually do not benefit from information contained in other positions (redundancy). Note that this is not obvious when different information sets are used and when the overall probability of a codeword is computed using the 120 positions. However, in the case we consider a single information set is used and codewords are enumerated according to a partial probability computed from the 15 chosen positions.

To take profit of redundancy in this situation, the application of the belief propagation step should be used to propagate information according to the linear constraints of the code. The question is then how many iterations should we perform?

We performed experiments for 0 (no application), 1 and 2 iterations and obtained results in favor of the application of the belief propagation. We do not provide results obtained for correlation coefficient since in both standard and Bayesian cases applying twice the propagation step led to better results. This is not so clear for Euclidean distance as can be seen in Figs. 6 and 7.

Fig. 6
figure 6

Median ranks using Euclidean distance metric with different number of belief propagation steps

Indeed, we see that for the Bayesian extension of the Euclidean distance, performing belief propagation alters results as soon as the number of traces are available reaches some point (between 100 and 250 traces depending on the number of iterations considered).

Fig. 7
figure 7

Median ranks using Bayesian Euclidean distance metric with different number of belief propagation steps

Such degradation of performances may be due to the fact that in the context of Furious implementation the base hypothesis from which we built the Bayesian extension is not fulfilled anymore. The extension for correlation coefficient seems to be not (or at least less) impacted. This difference may comes from the nature of hypotheses: for Euclidean distance an hypothesis is made for the behavior of (infrequent and informative) colliding events while for correlation coefficient the hypothesis refers to (less informative) non-colliding events.

Choice of the information set The second important point in the procedure is the choice of the information set. Ideally we would like to chose the least faulty positions.

One may assume that when a position is faulty (due to the lack of information) the corresponding distribution looks “more uniform” than a position where the correct value has a good rank. This heuristic can be partially confirmed as positions depending on the two particular S-boxes have a larger entropy than others.

This remark implies that to overcome the problem encountered when attacking the Furious implementation, one could try to detect such error prone S-boxes, remove them from the analysis and use the single output decoding algorithm.

Since a list-decoding algorithm also aims at trading data for computation time, the former remark does not mean that such algorithm is useless. Hence we investigated the use of entropy to choose the information set.

We previously saw that applying belief propagation improved attacks we ran. Thus, the question is should we consider entropy posterior or prior to this step? Intuitively, applying the belief propagation should correct errors or confirm good positions thanks to redundancy. Thus, it is expected that positions having small entropy after the belief propagation steps are less faulty than the ones before.

This is confirmed by experiments where the choice of information set with prior entropies shows median larger ranks with a typical (and significant) factor of \(2^5\).

Appendix D: About time complexity

Metrics used in Sect. 5 for analyzing experiments only consider the success rate of the attacks as a function of their data complexity. We consider the time complexity of the proposed collision attack in this section. When attacking \(n_\mathrm{s}\) S-boxes processing \(n_\mathrm{b}\)-bit words, these complexities for our different procedures are:

ComputeStatistics

\(O\left(n_\mathrm{s}^2n_t^2m\right)\)

ExtractDistributions

\(O\left(n_\mathrm{s}^2 (n_t^2 + 2^{n_\mathrm{b}}) \right)\)

LDPCDecode

\(O\left(n_\mathrm{s}^2n_\mathrm{b}2^{n_\mathrm{b}}\right)\)

When using the pre-processing technique that has a cost \(\Theta \left(n_\mathrm{s}n_tm\right)\), the complexity of the procedure ComputeStatistics is decreased to \(O\left(n_\mathrm{s}^2 2^{2n_\mathrm{b}}m\right)\). Hence, it turns out that, in realistic contexts, collision attacks can be performed in a negligible time compared to the on-line acquisition and the final key search phases (a similar comment applies to stochastic attacks). Furthermore, by carefully profiling the number of cycles needed to perform the different steps of the attacks, we observed that the slight time overhead induced by the use of a Bayesian extension and/or an LDPC decoding algorithm is positively balanced by the reduction of the data complexity, hence leading to globally more efficient attacks.

We stress that no precise timing is given here because the core of the attacks performed took less than a single second on a traditional PC. Hence we consider that such information is not relevant regarding the time spent to read traces from the drive or to perform enumeration/rank estimation.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Gérard, B., Standaert, FX. Unified and optimized linear collision attacks and their application in a non-profiled setting: extended version. J Cryptogr Eng 3, 45–58 (2013). https://doi.org/10.1007/s13389-013-0051-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13389-013-0051-9

Keywords

Navigation