
Universidade Estadual de Campinas Instituto de Computação INSTITUTO DE COMPUTAÇÃO Luan Cardoso dos Santos Software implementation of authenticated encryption algorithms on ARM processors Implementação em software de cifradores autenticados para processadores ARM CAMPINAS 2018 Luan Cardoso dos Santos Software implementation of authenticated encryption algorithms on ARM processors Implementação em software de cifradores autenticados para processadores ARM Dissertação apresentada ao Instituto de Computação da Universidade Estadual de Campinas como parte dos requisitos para a obtenção do título de Mestre em Ciência da Computação. Thesis presented to the Institute of Computing of the University of Campinas in partial fulfillment of the requirements for the degree of Master in Computer Science. Supervisor/Orientador: Prof. Dr. Julio César López Hernández Este exemplar corresponde à versão final da Dissertação defendida por Luan Cardoso dos Santos e orientada pelo Prof. Dr. Julio César López Hernández. CAMPINAS 2018 Agência(s) de fomento e nº(s) de processo(s): Não se aplica. Ficha catalográfica Universidade Estadual de Campinas Biblioteca do Instituto de Matemática, Estatística e Computação Científica Ana Regina Machado - CRB 8/5467 Santos, Luan Cardoso dos, 1993- Sa59s SanSoftware implementation of authenticated encryption algorithms on ARM processors / Luan Cardoso dos Santos. – Campinas, SP : [s.n.], 2018. SanOrientador: Julio César López Hernández. SanDissertação (mestrado) – Universidade Estadual de Campinas, Instituto de Computação. San1. Microprocessadores ARM. 2. Arquitetura de computador. 3. Criptografia de dados (Computação). 4. Engenharia de software. 5. Engenharia de software - Medidas de segurança. 6. Software - Medidas de segurança. I. López Hernández, Julio César, 1961-. II. Universidade Estadual de Campinas. Instituto de Computação. III. Título. Informações para Biblioteca Digital Título em outro idioma: Implementação em software de cifradores autenticados para processadores ARM Palavras-chave em inglês: ARM microprocessors Computer architecture Data encryption (Computer science) Software engineering Software engineering - Safety measures Software – Safety measures Área de concentração: Ciência da Computação Titulação: Mestre em Ciência da Computação Banca examinadora: Júlio Cesar López Hernández Marcos Antonio Simplicio Junior Diego de Freitas Aranha Data de defesa: 12-06-2018 Programa de Pós-Graduação: Ciência da Computação Powered by TCPDF (www.tcpdf.org) Universidade Estadual de Campinas Instituto de Computação INSTITUTO DE COMPUTAÇÃO Luan Cardoso dos Santos Software implementation of authenticated encryption algorithms on ARM processors Implementação em software de cifradores autenticados para processadores ARM Banca Examinadora: • Prof. Dr. Julio César López Hernández IC - UNICAMP • Prof. Dr. Marcos Antônio Simplicio Junior LARC - USP • Prof. Dr. Diego de Freitas Aranha IC - UNICAMP A ata da defesa com as respectivas assinaturas dos membros da banca encontra-se no processo de vida acadêmica do aluno. Campinas, 12 de junho de 2018 Dedicatória Dedicated to I dedicate this work to my father, Devaldite, who will always be in my heart, and will always be my inspiration to walk forward, to be a good man like him. Eu dedico esse trabalho a meu pai, Devaldite, que sempre está em meu coração, e que sempre será minha inspiração para seguir em frente, ser um homem bom como ele. The secret to doing anything is believing that you can do it. Anything that you believe you can do strong enough, you can do. Anything. As long as you believe. – Bob Ross Acknowledgements I want to thank all my friends, for their company helped me continue walking forward, even in hard times. My laboratory friends, who helped me with both life and research, always by my side. Some names to cite are Hayato and Renna, Camila and Klairton, Samuel and Fabianna, Amanda, Alisson, Rafael, Marcelo, Armando, Sheila, Renan, so many wonderful people I met in Unicamp –So many that it is impossible to type them all– they will always have a special place in my memory. And I thank my old friends as well, for Guilherme, Victor and Zé Lourenço were always there for me. I thank my family, for trusting in me, and staying by my side, even if the distance and time make the contact difficult. Enezina, Gabriel, Bruno, familia é para sempre, e para sempre amo vocês. I thank my teachers, Julio and Diego, which whom I worked closely, and learned a lot with. I have to thank you for helping me grow as a student, scientist, and most importantly, as a person. And I also thank all the teachers I had, even if our time was short, every lesson was important. I also thank LGE, and it’s team, for financing the research, and directly helping me, financially and technically with this Master’s Degree. And a very special thanks to Michael Trautsch, a great friend, that adopted me as his little brother, and who helped me and guided me through hard times. And also a very special thanks to his parents, Ute and Winfried, for they received me with open arms, as part of their family. Mike, Ute, Winfried, Ihr seid meine zweite Familie; mein zweites Zuhause. Ich werde immer dafür dankbar sein, Euch in meinem Leben zu haben. And to all those that I may not have mentioned by name, but were with me during these years, my sincere thank you. Resumo Algoritmos de cifração autenticada são ferramentas usadas para proteger dados, de forma a garantir tanto sigilo quanto autenticidade e integridade. Implementações criptográficas não possuem apenas exatidão e eficiência como seus principais objetivos: sistemas computacionais podem vazar informação sobre seu com- portamento interno, de forma que uma má implementação pode comprometer a segu- rança de um bom algoritmo. Dessa forma, esta dissertação tem o objetivo de estudar as formas de implementar corretamente algoritmos criptográficos e os métodos para optimizá-los sem que percam suas características de segurança. Um aspecto impor- tante a ser levado em consideração quando implementando algoritmos é a arquitetura alvo. Nesta dissertação concentra-se na família de processadores ARM. ARM é uma das arquiteturas mais utilizadas no mundo, com mais de 100 bilhões de chips vendidos. Esta dissertação foca em estudar e implementar duas famílias de cifradores auten- ticados: NORX e Ascon, especificamente para processadores ARM Cortex-A de 32 e 64 bits. Descrevemos uma técnica de optimização orientada a pipeline para NORX que possui desempenho melhor que o atual estado da arte, e discutimos técnicas utilizadas em uma implementação vetorial do NORX. Também analisamos as características de uma implementação vetorial do Ascon, assim como uma implementação vetorial de múltiplas mensagens. Abstract Authenticated encryption algorithms are tools used to protect data, in a way that guar- antees both its secrecy, authenticity, and integrity. Cryptographic implementations do not have only correctness and efficiency as its main goals: computer systems can leak information about their internal behavior, and a bad implementation can compromise the security of a good algorithm. Therefore, this dissertation aims to study the forms of correctly and efficiently implementing crypto- graphic algorithms and the methods of optimizing them without losing security char- acteristics. One important aspect to take into account during implementation and opti- mization is the target architecture. In this dissertation, the focus is on the ARM family of processors. ARM is one of the most widespread architectures in the world, with more than 100 billion chips deployed. This dissertation focus on studying and implementing two different families of au- thenticated encryption algorithms: NORX and Ascon, targeting 32-bits and 64-bits ARM Cortex-A processors. We show a pipeline oriented technique to implement NORX that’s faster than the current state-of-art; and we also discuss the techniques used on a vectorial implementation of NORX. We also describe and analyze the characteristics of a vectorial implementation of Ascon, as well as a multiple message vectorial imple- mentation. List of Figures 2.1 The basic design of a sponge function .................... 23 2.2 The basic design of a duplexed sponge .................... 23 2.3 Basic block design of AEAD .......................... 24 2.4 Basic block diagram of a E&M authenticated mode of operation. ..... 25 2.5 Basic block diagram of a EtM authenticated mode of operation. ..... 25 2.6 Basic block diagram of a MtE authenticated mode of operation. ..... 26 2.7 Conceptual layout of a NEON instruction .................. 35 3.1 The layout of NORX with parallelism degree p = 2 ............. 42 3.2 The layout of NORX with parallelism degree p = 1 ............. 42 3.3 Column and diagonal steps of NORX .................... 43 3.4 Overheads for NORX 3261 running on a Cortex-A15(32-bit processor) . 52 3.5 Overheads for NORX 6461 running on a Cortex-A53(64-bit processor) . 53 3.6 Pipeline/instruction parallelism ........................ 54 3.7 2× optimization of the NORX F function .................. 55 3.8 4× optimization of the NORX F function .................. 56 3.9 Transformations needed for the diagonal step. ............... 58 3.10 Cycles per byte results for NORX3261 on Cortex A15. ........... 66 3.11 Cycles per byte results for NORX6461 on Cortex A53. ........... 67 3.12 Cycles per byte results for BLAKE2s on Cortex A15. ............ 70 4.1 Ascon mode of operation ........................... 73 4.2 Ascon Sbox ................................... 79 4.3 Scopes in
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages123 Page
-
File Size-