Abstract
Template attacks model side-channel leakage information using Gaussian multivariate distributions. They have been quite successful in directly reconstructing individual bits of 8-bit parallel buses and registers from power traces. However, extending their use directly to larger word sizes, such as 32-bit buses, becomes impractical. Here we show that it is possible to use an LDA-based stochastic model to independently build templates for just byte fragments of such a word, to predict the exact values of its four member bytes, instead of only overall Hamming weights. We demonstrate this technique to reconstruct the arbitrary-length inputs of SHA3-512 and some other Keccak sponge functions implemented on a 32-bit Cortex-M4 device. The quality of these templates was high enough such that remaining errors in their predictions could be eliminated via belief propagation on a factor-graph network (SASCA). In our experiments, we already reliably recovered SHA3-512 inputs up to 719 bytes long (10 invocations of the permutation), and reconstructing even longer inputs should be just a matter of making longer recordings.
S.-C. You—Supported by the Cambridge Trust and the Ministry of Education, Taiwan.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
\(\hat{\beta }'[i,j,k]\), \(\hat{\mathbf {C}}[i,k]\), \(\hat{\mathbf {D}}[i,k]\), \(\hat{\alpha }[i,j,k]\) here are equivalent to I, P, T, O, respectively in [7].
- 2.
Recall that Kannwischer et al.’s results [7] for their all-zero public input set, which is similar to our experiments with very short \(\text {Keccak}[c]\) input, were worse than those for their random public input set. We did not observe such variability in our setting, i.e. the success rates or the number of iterations required did not significantly vary with the input length of \(\text {Keccak}[c]\), even down to just one byte.
References
Atmel Corporation: AVR XMEGA Microcontrollers. http://www.atmel.com/products/microcontrollers/avr/avr_xmega.aspx. Accessed Mar 2014
Chari, S., Rao, J.R., Rohatgi, P.: Template attacks. In: Kaliski, B.S., Koç, K., Paar, C. (eds.) CHES 2002. LNCS, vol. 2523, pp. 13–28. Springer, Heidelberg (2003). http://doi.org/10.1007/3-540-36400-5_3
Choudary, M.O., Kuhn, M.G.: Efficient stochastic methods: profiled attacks beyond 8 bits. In: Joye, M., Moradi, A. (eds.) CARDIS 2014. LNCS, vol. 8968, pp. 85–103. Springer, Cham (2015). http://doi.org/10.1007/978-3-319-16763-3_6
Choudary, M.O., Kuhn, M.G.: Efficient, portable template attacks. IEEE Trans. Inf. Forensics Secur. 13(2), 490–501 (2018). http://doi.org/10.1109/TIFS.2017.2757440
CW1173: ChipWhisperer-Lite product data sheet, 13 February 2018. http://media.newae.com/datasheets/NAE-CW1173_datasheet.pdf
ChipWhisperer-Lite arm edition, schematic, rev 03. http://github.com/newaetech/chipwhisperer/raw/develop/hardware/capture/chipwhisperer-lite-32bit/cw-lite-arm-main.pdf
Kannwischer, M.J., Pessl, P., Primas, R.: Single-trace attacks on Keccak. IACR Trans. Crypt. Hardware Embed. Syst. 2020(3), 243–268 (2020). http://doi.org/10.13154/tches.v2020.i3.243-268
Kelsey, J., Chang, S., Perlner, R.: SHA-3 derived functions: cSHAKE, KMAC. TupleHash ParallelHash (2016). http://doi.org/10.6028/NIST.SP.800-185
Luo, P., Fei, Y., Fang, X., Ding, A.A., Kaeli, D.R., Leeser, M.: Side-channel analysis of MAC-Keccak hardware implementations. IACR Cryptology ePrint Archive 2015, 411 (2015). http://doi.org/10.1145/2768566.2768567
MacKay, D.J.C.: Information Theory, Inference and Learning Algorithms. Cambridge University Press, Cambridge (2003)
NI PXIe-5160. http://www.ni.com/en-gb/support/model.pxie-5160.html
NI PXIe-5423. http://www.ni.com/en-gb/support/model.pxie-5423.html
NIST: SHA-3 standard: permutation-based hash and extendable-output functions, August 2015. http://doi.org/10.6028/NIST.FIPS.202. FIPS PUB 202
O’Flynn, C., Chen, Z.D.: ChipWhisperer: an open-source platform for hardware embedded security research. In: Prouff, E. (ed.) COSADE 2014. LNCS, vol. 8622, pp. 243–260. Springer, Cham (2014). http://doi.org/10.1007/978-3-319-10175-0_17
Schindler, W., Lemke, K., Paar, C.: A stochastic model for differential side channel cryptanalysis. In: Rao, J.R., Sunar, B. (eds.) CHES 2005. LNCS, vol. 3659, pp. 30–46. Springer, Heidelberg (2005). http://doi.org/10.1007/11545262_3
Standaert, F.-X., Archambeau, C.: Using subspace-based template attacks to compare and combine power and electromagnetic information leakages. In: Oswald, E., Rohatgi, P. (eds.) CHES 2008. LNCS, vol. 5154, pp. 411–425. Springer, Heidelberg (2008). http://doi.org/10.1007/978-3-540-85053-3_26
Taha, M., Schaumont, P.: Differential power analysis of MAC-Keccak at any key-length. In: Sakiyama, K., Terada, M. (eds.) IWSEC 2013. LNCS, vol. 8231, pp. 68–82. Springer, Heidelberg (2013). http://doi.org/10.1007/978-3-642-41383-4_5
Taha, M., Schaumont, P.: Side-channel analysis of MAC-Keccak. In: 2013 IEEE International Symposium on Hardware-Oriented Security and Trust (HOST), pp. 125–130. IEEE (2013). http://doi.org/10.1109/HST.2013.6581577
Veyrat-Charvillon, N., Gérard, B., Standaert, F.-X.: Soft analytical side-channel attacks. In: Sarkar, P., Iwata, T. (eds.) ASIACRYPT 2014. LNCS, vol. 8873, pp. 282–296. Springer, Heidelberg (2014). http://doi.org/10.1007/978-3-662-45611-8_15
Extended Keccak code package. http://github.com/XKCP/XKCP. Accessed Apr 2019. lib/low/KeccakP-1600/Compact64/KeccakP-1600-compact64.c
You, S.-C., Kuhn, M.G.: A template attack to reconstruct the input of SHA-3 on an 8-bit device. In: Bertoni, G.M., Regazzoni, F. (eds.) COSADE 2020. LNCS, vol. 12244, pp. 25–42. Springer, Cham (2021). http://doi.org/10.1007/978-3-030-68773-1_2
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
You, SC., Kuhn, M.G. (2022). Single-Trace Fragment Template Attack on a 32-Bit Implementation of Keccak. In: Grosso, V., Pöppelmann, T. (eds) Smart Card Research and Advanced Applications. CARDIS 2021. Lecture Notes in Computer Science(), vol 13173. Springer, Cham. http://doi.org/10.1007/978-3-030-97348-3_1
Download citation
DOI: http://doi.org/10.1007/978-3-030-97348-3_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-97347-6
Online ISBN: 978-3-030-97348-3
eBook Packages: Computer ScienceComputer Science (R0)