Criptoprocesador ligero en RISC-V de 32 bits basado en ASCON



Criptoprocesador ligero en RISC-V de 32 bits basado en ASCON

Alberto Josué Ortiz Rosales
 

Texto completo de la Tesis     

 



Resumen

El creciente desarrollo del Internet de las Cosas ha generado interés en muchas áreas, en particular en la seguridad. La característica principal de los dispositivos del internet de las cosas es contar con recursos restringidos, sin embargo, de alguna manera deben garantizar la seguridad de la información que procesan. Es de interés trabajar con la ISA RISC-V, ya que, en los últimos años se ha incrementado su popularidad frente otras arquitecturas por su practicidad, modularidad, simplicidad, personalización, sobre todo por ser abierta. Dependiendo de las instrucciones que se implementen de RISC-V esta arquitectura es funcional como plataforma para los dispositivos del Internet de las Cosas. En el presente año el algoritmo ASCON ganó la competencia de estandarización como algoritmo de cifrado autenticado con datos asociados para criptografía ligera. Esta rama de la criptografía se centraliza en la protección de los dispositivos del Internet de las Cosas. A partir de estas bases, la presente tesis presenta el diseño de un criptoprocesador basado en ASCON y su integración como coprocesador acoplado a un núcleo RISC-V por medio de sus instrucciones disponibles en la ISA. El hardware es capaz de realizar los modos de operación del algoritmo ASCON, ASCON-128, ASCON-HASH y otras primitivas de seguridad propuestas. Estos modos dan soporte a la generación de números pseudoaleatorios, enmascaramiento de llaves y generación de llaves. De esta manera se proporcionan los servicios de confidencialidad, autenticación, integridad, aleatoriedad y protección de llaves con criptografía ligera a una arquitectura RISC-V. El diseño fue descrito con Chisel3 e implementado en la placa de desarrollo Arty A7. El análisis del desempeño del hardware contra el software muestra un aumento en la aceleración desde 50x hasta 160x. Así como una reducción del código en memoria para realizar los algoritmos. Hay un aumento del 22% en LUTs totales y 29% en los FFs del SoC con el coprocesador con una ronda por ciclo en comparación al SoC por defecto, la versión con tres rondas aumenta a 28% la utilización dejando el mismo porcentaje de FFs.

 

Abstract

The rising development of the Internet of Things has gained the interest of many areas, in particular the security area. The main feature of the internet of thing devices is having constrained resources, however, these devices must ensure the security of the data they process. The RISC-V ISA results an interesting topic, given that in recent years its popularity has grown against other architectures, mainly because of its practicality, modularity, simplicity, and customization, specially due to its openness. According to the implemented instructions, RISC-V is possible to be used as a platform for the Internet of Things devices. Recently, the ASCON algorithm has won the standardization competition for the authenticated encryption with associated data algorithm in lightweight cryptography. This cryptography branch focuses on the protection of these devices. From these premises, the current thesis presents the design of a cryptoprocessor based on the algorithm ASCON and its integration as a coprocessor coupled with a RISC-V core via the available instructions in RISCV ISA. The designed hardware can perform the modes of operations of the Ascon algorithms, ASCON-128, ASCON-HASH, as well as other proposed security primitives. These operation modes support pseudorandom number generation, key wrapping, and key generation. Therefore, the cryptoprocessor offers the services of confidentiality, authentication, integrity, randomness, and key protection with lightweight cryptography on a RISC-V architecture. The design was described in Chisel3 and implemented in the Arty A7 development board. The analysis of the performance showed an acceleration increase from 50x to 160x. Also, a reduction of the code size of the algorithms in the memory. There is a 22% increase in the LUT’s usage and 29% increase in the FF’s usage in the SoC with the coprocessor performing one round per cycle against the default Soc solution, in the 3-round version the LUT’s utilization grows to 28% and the FF’s percentage remained the same. v