Paper 2019/936

SNEIK on Microcontrollers: AVR, ARMv7-M, and RISC-V with Custom Instructions

Markku-Juhani O. Saarinen

Abstract

SNEIK is a family of lightweight cryptographic algorithms derived from a single 512-bit permutation. The SNEIGEN ``entropy distribution function'' was designed to speed up certain functions in post-quantum and lattice-based public key algorithms. We implement and evaluate SNEIK algorithms on popular 8-bit AVR and 32-bit ARMv7-M (Cortex M3/M4) microcontrollers, and also describe an implementation for the open-source RISC-V (RV32I) Instruction Set Architecture (ISA). Our results demonstrate that SNEIK algorithms usually outperform AES and SHA-2/3 on these lightweight targets while having a naturally constant-time design and significantly smaller implementation footprint. The RISC-V architecture is becoming increasingly popular for custom embedded designs that integrate a CPU core with application-specific hardware components. We show that inclusion of two simple custom instructions into the RV32I ISA yields a radical (more than five-fold) speedup of the SNEIK permutation and derived algorithms on that target, allowing us to reach 12.4 cycles/byte SNEIKEN-128 authenticated encryption performance on PQShield's ``Crimson Puppy'' RV32I-based SoC. Our performance measurements are for realistic message sizes and have been made using real hardware. We also offer implementation size metrics in terms of RAM, firmware size, and additional FPGA logic for the custom instruction set extensions.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Preprint. MINOR revision.
Contact author(s)
mjos @ iki fi
History
2019-09-20: last of 4 revisions
2019-08-18: received
See all versions
Short URL
https://ia.cr/2019/936
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2019/936,
      author = {Markku-Juhani O.  Saarinen},
      title = {SNEIK on Microcontrollers: AVR, ARMv7-M, and RISC-V with Custom Instructions},
      howpublished = {Cryptology ePrint Archive, Paper 2019/936},
      year = {2019},
      note = {\url{https://eprint.iacr.org/2019/936}},
      url = {https://eprint.iacr.org/2019/936}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.