eprint.iacr.org will be offline for approximately an hour for routine maintenance again at 10pm UTC on Wednesday, April 17.

Paper 2019/1212

Swap and Rotate: Lightweight linear layers for SPN-based blockciphers

Subhadeep Banik, Fatih Balli, Francesco Regazzoni, and Serge Vaudenay


In CHES 2017, Jean et al. presented a paper on ``Bit-Sliding'' in which the authors proposed lightweight constructions for SPN based block ciphers like AES, PRESENT, and SKINNY. The main idea behind these constructions was to reduce the length of the datapath to 1 bit and to reformulate the linear layer for these ciphers so that they require fewer scan flip-flops (which have built-in multiplexer functionality and so larger in area as compared to a simple flip-flop). In this paper, we develop their idea even further in few separate directions. First, we prove that given an arbitrary linear transformation, it is always possible to construct the linear layer using merely 2 scan flip-flops. This points to an optimistic venue to follow to gain further GE reductions, yet the straightforward application of the techniques in our proof to PRESENT and GIFT leads to inefficient implementations of the linear layer, as reducing ourselves to 2 scan flip-flops setting requires thousands of clock cycles and leads to very high latency. Equipped with the well-established formalism on permutation groups, we explore whether we can reduce the number of clock cycles to a practical level, i.e. few hundreds, by adding few more pairs of scan flip flops. For PRESENT, we show that 4 (resp. 8, 12) scan flip-flops are sufficient to complete the permutation layer in 384 (resp. 256, 128) clock cycles. For GIFT, we show that 4 (resp. 8, 10) scan flip flops correspond to 320 (resp. 192, 128) clock cycles. Hence our results give a good balance between throughput and circuit area, that is, we are able to construct circuits with reasonable throughput (by increasing the latency to threefold at most) and smaller than the state-of-the-art implementations of PRESENT and GIFT. Finally, in order to provide the best of the two worlds (i.e. circuit area and latency), we push our scan flip-flop choices even further to completely eliminate the latency incurred by the permutation layer, without compromising our stringent GE budget. We show that not only 12 scan flip flops are sufficient to execute PRESENT permutation in 64 clock cycles, but also the same scan flip flops can be used readily in a combined encryption decryption circuit. Our final design of PRESENT and GIFT beat the record of Jean et al. and Banik et al. in both latency and in circuit-size metric. We believe that the techniques presented in our work can also be used at choosing bit-sliding-friendly linear layer permutations for the future SPN-based designs.

Available format(s)
Publication info
Preprint. MINOR revision.
Lightweight circuitPRESENTGIFTFLIPpermutation layer
Contact author(s)
fatih balli @ epfl ch
subhadeep banik @ epfl ch
regazzoni @ alari ch
serge vaudenay @ epfl ch
2019-10-16: received
Short URL
Creative Commons Attribution


      author = {Subhadeep Banik and Fatih Balli and Francesco Regazzoni and Serge Vaudenay},
      title = {Swap and Rotate: Lightweight linear layers for SPN-based blockciphers},
      howpublished = {Cryptology ePrint Archive, Paper 2019/1212},
      year = {2019},
      note = {\url{https://eprint.iacr.org/2019/1212}},
      url = {https://eprint.iacr.org/2019/1212}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.