The field of lightweight cryptography has been gaining popularity as traditional cryptographic techniques are challenging to implement in resource-limited environments. This research paper presents an approach to utilizing the ESP32 microcontroller as a hardware platform to implement a lightweight cryptographic algorithm. Our approach employs KATAN32, the smallest block cipher of the KATAN family, with an 80-bit key and 32-bit blocks. The algorithm requires less computational power as it employs an 80 unsigned 64-bit integer key for encrypting and decrypting data. During encryption, a data array is passed into the encryption function with a key, which is then used to fill a buffer with an encrypted array. Similarly, the decryption function utilizes a buffer to fill an array of original data in 32 unsigned 64-bit integers. This study also investigates the optimal implementation of cryptography block ciphers, benchmarking performance against various metrics, including memory requirements (RAM), throughput, power consumption, and security. Our implementation demonstrates that data can be securely transmitted end-to-end with good throughput and low power consumption.
翻译:轻量级密码学领域近年来日益受到关注,因为传统密码技术在资源受限环境中难以实现。本研究提出了一种以ESP32微控制器为硬件平台实现轻量级密码算法的方法。我们采用KATAN族中最小的分组密码KATAN32,使用80位密钥和32位分组。该算法使用80位无符号64位整数密钥进行数据加解密,因此计算开销较低。加密时,数据数组与密钥一同传入加密函数,然后用加密数组填充缓冲区;相应地,解密函数利用缓冲区将原始数据填充为32个无符号64位整数数组。本研究还探讨了密码分组密码的最优实现方式,通过内存需求(RAM)、吞吐量、功耗及安全性等多维度指标进行性能基准测试。实验结果表明,该实现能够在保持良好吞吐量和低功耗的前提下,实现数据的端到端安全传输。