International Association for Cryptologic Research

International Association
for Cryptologic Research

CryptoDB

Randomness Generation for Secure Hardware Masking – Unrolled Trivium to the Rescue

Authors:
Gaëtan Cassiers , Crypto Group, ICTEAM Institute, UCLouvain
Loïc Masure , Université de Montpellier, LIRMM, CNRS
Charles Momin , Crypto Group, ICTEAM Institute, UCLouvain
Thorben Moos , Crypto Group, ICTEAM Institute, UCLouvain
Amir Moradi , TU Darmstadt
François-Xavier Standaert , Crypto Group, ICTEAM Institute, UCLouvain
Download:
DOI: 10.62056/akdkp2fgx
URL: https://cic.iacr.org//p/1/2/4
Search ePrint
Search Google
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 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 equivalents (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.

BibTeX
@article{cic-2024-34397,
  title={Randomness Generation for Secure Hardware Masking – Unrolled Trivium to the Rescue},
  journal={cic},
  publisher={International Association for Cryptologic Research},
  volume={1, Issue 2},
  url={https://cic.iacr.org//p/1/2/4},
  doi={10.62056/akdkp2fgx},
  author={Gaëtan Cassiers and Loïc Masure and Charles Momin and Thorben Moos and Amir Moradi and François-Xavier Standaert},
  year=2024
}