Paper 2023/1134
Randomness Generation for Secure Hardware Masking - Unrolled Trivium to the Rescue
Abstract
Masking is a prominent strategy to protect cryptographic implementations against side-channel analysis. Its popularity arises from the exponential security gains that can be achieved for (approximately) quadratic resource utilization. Many variants of the countermeasure tailored for different optimization goals have been proposed. The common denominator among all of them is the implicit demand for robust and high entropy randomness. Simply assuming that uniformly distributed random bits are available, without taking the cost of their generation into account, leads to a poor understanding of the efficiency vs. security tradeoff of masked implementations. This is especially relevant in case of hardware masking schemes which are known to consume large amounts of random bits per cycle due to parallelism. Currently, there seems to be no consensus on how to most efficiently derive many pseudo-random bits per clock cycle from an initial seed and with properties suitable for masked hardware implementations. In this work, we evaluate a number of building blocks for this purpose and find that hardware-oriented stream ciphers like Trivium and its reduced-security variant Bivium B outperform most competitors when implemented in an \emph{unrolled} fashion. Unrolled implementations of these primitives enable the flexible generation of many bits per cycle, which is crucial for satisfying the large randomness demands of state-of-the-art masking schemes. According to our analysis, only Linear Feedback Shift Registers (LFSRs), when also unrolled, are capable of producing long non-repetitive sequences of random-looking bits at a higher rate per cycle for the same or lower cost as Trivium and Bivium B. Yet, these instances do not provide black-box security as they generate only linear outputs. We experimentally demonstrate that using multiple output bits from an LFSR in the same masked implementation can violate probing security and even lead to harmful randomness cancellations. Circumventing these problems, and enabling an independent analysis of randomness generation and masking, requires the use of cryptographically stronger primitives like stream ciphers. As a result of our studies, we provide an evidence-based estimate for the cost of securely generating $n$ fresh random bits per cycle. Depending on the desired level of black-box security and operating frequency, this cost can be as low as $20n$ to $30n$ ASIC gate equivalent (GE) or $3n$ to $4n$ FPGA look-up tables (LUTs), where $n$ is the number of random bits required. Our results demonstrate that the cost per bit is (sometimes significantly) lower than estimated in previous works, incentivizing parallelism whenever exploitable. This provides further motivation to potentially move low randomness usage from a primary to a secondary design goal in hardware masking research.
Metadata
- Available format(s)
-
PDF
- Category
- Implementation
- Publication info
- Published by the IACR in CIC 2024
- Keywords
- Hardware MaskingRandomnessSide-Channel AnalysisTrivium
- Contact author(s)
-
gaetan cassiers @ uclouvain be
loic masure @ uclouvain be
charles momin @ uclouvain be
thorben moos @ uclouvain be
amir moradi @ rub de
fstandae @ uclouvain be - History
- 2024-06-17: revised
- 2023-07-20: received
- See all versions
- Short URL
- https://ia.cr/2023/1134
- License
-
CC BY
BibTeX
@misc{cryptoeprint:2023/1134, author = {Gaëtan Cassiers and Loïc Masure and Charles Momin and Thorben Moos and Amir Moradi and François-Xavier Standaert}, title = {Randomness Generation for Secure Hardware Masking - Unrolled Trivium to the Rescue}, howpublished = {Cryptology {ePrint} Archive, Paper 2023/1134}, year = {2023}, url = {https://eprint.iacr.org/2023/1134} }