Paper 2020/836

Assembly or Optimized C for Lightweight Cryptography on RISC-V?

Fabio Campos, RheinMain University of Applied Sciences
Lars Jellema, Radboud University Nijmegen
Mauk Lemmen, Radboud University Nijmegen
Lars Müller, RheinMain University of Applied Sciences
Amber Sprenkels, Radboud University Nijmegen
Benoit Viguier, Radboud University Nijmegen

A major challenge when applying cryptography on constrained environments is the trade-off between performance and security. In this work, we analyzed different strategies for the optimization of several candidates of NIST's lightweight cryptography standardization project on a RISC-V architecture. In particular, we studied the general impact of optimizing symmetric-key algorithms in assembly and in plain C. Furthermore, we present optimized implementations, achieving a speed-up of up to 81% over available implementations, and discuss general implementation strategies.

Note: This version of the contribution has been accepted for publication, after peer review (when applicable) but is not the Version of Record and does not reflect post-acceptance improvements, or any corrections. The Version of Record is available online at: Use of this Accepted Version is subject to the publisher’s Accepted Manuscript terms of use

Available format(s)
Publication info
Published elsewhere. CANS 2020: Cryptology and Network Security
implementation RISC-V lightweight cryptography software optimization NIST
Contact author(s)
campos @ sopmac de
lars jellema @ gmail com
M Lemmen @ student ru nl
mail @ lars-mueller com
amber @ electricdusk com
b viguier @ cs ru nl
2022-12-16: revised
2020-07-12: received
See all versions
Short URL
Creative Commons Attribution


      author = {Fabio Campos and Lars Jellema and Mauk Lemmen and Lars Müller and Amber Sprenkels and Benoit Viguier},
      title = {Assembly or Optimized C for Lightweight Cryptography on RISC-V?},
      howpublished = {Cryptology ePrint Archive, Paper 2020/836},
      year = {2020},
      doi = {10.1007/978-3-030-65411-5_26},
      note = {\url{}},
      url = {}
Note: In order to protect the privacy of readers, does not use cookies or embedded third party content.