Paper 2022/1399

Low-latency implementation of the GIFT cipher on RISC-V architectures

Gheorghe Pojoga, University of Amsterdam
Kostas Papagiannopoulos, University of Amsterdam
Abstract

Lightweight cryptography is a viable solution for constrained computational environments that require a secure communication channel. To standardize lightweight primitives, NIST has published a call for algorithms that address needs like compactness, low-latency, low-power/energy, etc. Among the candidates, the GIFT family of block ciphers was utilized in various NIST candidates due to its high-security margin and small gate footprint. As a result of their hardware-oriented design, software implementations of GIFT require additional optimization techniques such as bitslicing and fixslicing to achieve optimal performance. Even though the performance of these methods has been assessed for several ISA families such as x86 and ARM, there is currently a lack of data with regards to their acceleration capabilities for RISC-V. Since this ISA is an important element of the growing open-hardware movement, our goal is to address this knowledge gap. Therefore, we have developed several assembly implementations for both GIFT-64 and GIFT-128, using the RV32I ISA, and performed a quantitative assessment of their performance using a physical board i.e., Hifive1 Rev B. Our study has shown that by using bitslicing the number of clock cycles can be reduced by 69.33% for GIFT-64 and 71.38% for GIFT-128, compared to a naive assembly implementation, while fixslicing decreases the number of clock cycles by 85.7% (GIFT-64) and 81.28% (GIFT-128). Nonetheless, the preferred technique is fixslicing with key pre-computation, which can achieve a reduction of 88.69% (GIFT-64) and 95.05% (GIFT-128), while maintaining relatively low memory requirements of 938 bytes (GIFT-64) and 1388 bytes (GIFT-128), respectively.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Published elsewhere. dl.acm.org
DOI
10.1145/3528416.3530996
Keywords
GIFT RISC-V implementation bitslicing fixslicing
Contact author(s)
gheorghe pojoga @ os3 nl
k papagiannopoulos @ uva nl
History
2022-10-23: approved
2022-10-15: received
See all versions
Short URL
https://ia.cr/2022/1399
License
Creative Commons Attribution-NonCommercial-ShareAlike
CC BY-NC-SA

BibTeX

@misc{cryptoeprint:2022/1399,
      author = {Gheorghe Pojoga and Kostas Papagiannopoulos},
      title = {Low-latency implementation of the {GIFT} cipher on {RISC}-V architectures},
      howpublished = {Cryptology {ePrint} Archive, Paper 2022/1399},
      year = {2022},
      doi = {10.1145/3528416.3530996},
      url = {https://eprint.iacr.org/2022/1399}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.