Skip to main content

Fast AES Implementation Using ARMv8 ASIMD Without Cryptography Extension

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNSC,volume 11975))

Abstract

While the ARMv8-A ISA allows for hardware accelerated cryptographic instructions, such extension is not available for every device, being added at the discretion of the CPU manufacturer. Prime examples of ARMv8 devices without this support are the low cost Raspberry Pi 3B/3B+/4 single board computers. This work presents an optimized AES implementation targeting CPUs without Cryptography Extension instructions, relying only on ASIMD operations. We show a new implementation that processes four blocks at the same time, which requires block permutations and modified versions of the main layers. In particular, we provide a new efficient formula for computing the MixColumns layer. The time performance our AES implementation outperforms the current ASIMD implementation found in the Linux Kernel by about 5%.

The authors gracefully acknowledge financial support from the São Paulo Research Foundation (FAPESP), under the “Segurança e Confiabilidade da Informação: Teoria e Aplicações” Thematic Project no. 2013/25.977-7.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    See: https://www.bbc.co.uk/blogs/thereporters/rorycellanjones/2011/05/a_15_computer_to_inspire_young.html.

  2. 2.

    See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/crypto/aes-neon.S.

References

  1. Bernstein, D.J.: The Salsa20 family of stream ciphers. In: Robshaw, M., Billet, O. (eds.) New Stream Cipher Designs. LNCS, vol. 4986, pp. 84–97. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-68351-3_8

    Chapter  Google Scholar 

  2. Bernstein, D.J., Schwabe, P.: NEON crypto. In: Prouff, E., Schaumont, P. (eds.) CHES 2012. LNCS, vol. 7428, pp. 320–339. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33027-8_19

    Chapter  Google Scholar 

  3. Biesheuvel, A.: Accelerated AES for the Arm64 Linux kernel, January 2017. https://www.linaro.org/blog/accelerated-aes-for-the-arm64-linux-kernel/

  4. blu: How ARM Nerfed NEON Permute Instructions in ARMv8, August 2017. https://www.cnx-software.com/2017/08/07/how-arm-nerfed-neon-permute-instructions-in-armv8/

  5. Bogdanov, A., Isobe, T., Tischhauser, E.: Towards practical whitebox cryptography: optimizing efficiency and space hardness. In: Cheon, J.H., Takagi, T. (eds.) ASIACRYPT 2016. LNCS, vol. 10031, pp. 126–158. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53887-6_5

    Chapter  Google Scholar 

  6. Cho, J., Choi, K.Y., Dinur, I., Dunkelman, O., Keller, N., Moon, D., Veidberg, A.: WEM: a new family of white-box block ciphers based on the even-mansour construction. In: Handschuh, H. (ed.) CT-RSA 2017. LNCS, vol. 10159, pp. 293–308. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-52153-4_17

    Chapter  Google Scholar 

  7. Crowley, P., Biggers, E.: Adiantum: length-preserving encryption for entry-level processors. IACR Trans. Symmetric Cryptol. 2018(4), 39–61 (2018)

    Google Scholar 

  8. Daemen, J., Rijmen, V.: The Design of Rijndael. Springer, Heidelberg (2002). https://doi.org/10.1007/978-3-662-04722-4

    Book  MATH  Google Scholar 

  9. Gouvêa, C.P.L., López, J.: Implementing GCM on ARMv8. In: Nyberg, K. (ed.) CT-RSA 2015. LNCS, vol. 9048, pp. 167–180. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-16715-2_9

    Chapter  Google Scholar 

  10. Hamburg, M.: Accelerating AES with vector permute instructions. In: Clavier, C., Gaj, K. (eds.) CHES 2009. LNCS, vol. 5747, pp. 18–32. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04138-9_2

    Chapter  Google Scholar 

  11. Käsper, E., Schwabe, P.: Faster and timing-attack resistant AES-GCM. In: Clavier, C., Gaj, K. (eds.) CHES 2009. LNCS, vol. 5747, pp. 1–17. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04138-9_1

    Chapter  Google Scholar 

  12. Krovetz, T., Rogaway, P.: The software performance of authenticated-encryption modes. In: Joux, A. (ed.) FSE 2011. LNCS, vol. 6733, pp. 306–327. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21702-9_18

    Chapter  MATH  Google Scholar 

  13. Maximov, A.: AES MixColumn with 92 XOR gates. Cryptology ePrint Archive, Report 2019/833 (2019). https://eprint.iacr.org/2019/833

  14. NIST: Announcing the Advanced Encryption Standard (AES). U.S. Department of Commerce/National Institute of Standards and Technology (2001). Federal Information Processing Standards Publication 197. http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf

  15. Osvik, D.A., Shamir, A., Tromer, E.: Cache attacks and countermeasures: the case of AES. In: Pointcheval, D. (ed.) CT-RSA 2006. LNCS, vol. 3860, pp. 1–20. Springer, Heidelberg (2006). https://doi.org/10.1007/11605805_1

    Chapter  Google Scholar 

  16. Rodrigues, F.C., Fujii, H., Zoppi Serpa, A.C., Sider, G., Dahab, R., López, J.: Fast white-box implementations of dedicated ciphers on the ARMv8 architecture. In: Schwabe, P., Thériault, N. (eds.) LATINCRYPT 2019. LNCS, vol. 11774, pp. 341–363. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30530-7_17

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hayato Fujii .

Editor information

Editors and Affiliations

Appendix A: Illustrations of ARMv8 ASIMD Instructions

Appendix A: Illustrations of ARMv8 ASIMD Instructions

Figures 4 and 5 in this appendix presents illustrations of some ARMv8 ASIMD instructions summarized in Sect. 3.1.

Fig. 4.
figure 4

Usage of the tbl instruction to substitute or permute the input vector vn. Results written on register vd.

Fig. 5.
figure 5

Usage of the ext instruction to extract words or execute rotations a 128-bit word.

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Fujii, H., Rodrigues, F.C., López, J. (2020). Fast AES Implementation Using ARMv8 ASIMD Without Cryptography Extension. In: Seo, J. (eds) Information Security and Cryptology – ICISC 2019. ICISC 2019. Lecture Notes in Computer Science(), vol 11975. Springer, Cham. https://doi.org/10.1007/978-3-030-40921-0_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-40921-0_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-40920-3

  • Online ISBN: 978-3-030-40921-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics