Abstract
Lightweight cryptography is essential for securing resource-constrained devices. A critical component of these systems is the linear layer, which is typically optimized using 2-input XOR gates. This paper proposes a novel approach to construct lower-area implementations using $(n+1)$-input gates based on existing $n$-input gate designs. By developing search algorithms for $n=2$ and $n=3$, we efficiently convert 2-input and 3-input XOR implementations into more area-efficient 3-input and 4-input versions. Our methods achieve significant improvements across various block ciphers, including a record-breaking 243 GE implementation for AES MixColumns in the STM 130 nm library and an average 21% area reduction for a collection of 5,500 lightweight matrices.
Introduction: Beyond the 2-Input Bottleneck
In the design of lightweight cryptographic primitives for IoT and RFID applications, circuit area—measured in Gate Equivalents (GE)—is a primary constraint. Linear layers, composed of XOR operations, often dominate this area. Traditionally, optimization efforts have focused on minimizing the count of 2-input XOR gates. However, modern ASIC libraries provide dedicated 3-input and 4-input XOR gates that are more area-efficient than equivalent combinations of 2-input gates.
As shown in the table above, a 3-input XOR gate in the STM 130 nm library costs 4.66 GE, whereas two 2-input gates (providing the same functionality) cost 6.66 GE. Despite this clear advantage, the search space for multi-input gate arrangements is vast, making manual or exhaustive optimization difficult.
Methodology: Transform and Graph Extending Algorithms
To bridge this gap, we introduce two algorithms designed to systematically reduce hardware area:
- Transform Algorithm: This framework treats a circuit as a Directed Acyclic Graph (DAG). It identifies opportunities to merge $n$-input gates into $(n+1)$-input gates, effectively reducing the total GE cost by pruning the graph.
- Graph Extending Algorithm: This local optimization technique explores the topological ordering and reachability within the circuit's DAG. By generating massive sets of equivalent circuit variants, it identifies "redundant" nodes that standard reduction rules might overlook.
These algorithms were implemented as EGT2 (optimizing for 3-input gates) and EGT3 (optimizing for 4-input gates).
Key Results and Benchmarks
We evaluated our approach against 13 standard block cipher matrices and a dataset of 5,500 lightweight matrices.
Standard Block Ciphers
Our algorithms consistently outperformed previous state-of-the-art methods across multiple ciphers. Notably, for the AES MixColumns layer, we achieved a new record of 243 GE in the STM 130 nm library, improving upon the previous best result of 258.9 GE.
Large-Scale Optimization
For the 5,500 lightweight matrices proposed by Li et al. (FSE 2019), our algorithms found improved implementations for every single matrix. On average, the circuit area was reduced by 21%. Hardware synthesis in the UMC 55 nm library further confirmed that our "Ours" implementation for AES MixColumns (220.0 GE) offers superior area and power characteristics compared to standard synthesizer outputs.
Conclusion and Future Work
By moving beyond the traditional 2-input XOR paradigm, we have demonstrated that significant hardware efficiency remains to be unlocked in linear layer implementations. While our current focus is on area reduction, future work will explore multi-objective optimization to balance area with latency and power consumption. Additionally, investigating the benefits of 5-input or higher gates remains a promising avenue for further research.
Summary updated