FewMul 2017

There was an intellectual feast in Paris between April 25 and May 4 since EuroCrypt, EuroS&P and 17 other one or two day(s) events were co-located. Personally, I could only attend during the weekend which made me wish for multi-location ability considering the amount of interesting talks by the looks of the titles/abstracts. That said, I mainly followed the sessions of CrossFyre and FewMul. Even though this blog post is mainly dedicated to the talks in FewMul, I must say that the number of male participants, the discussion on male and female equality against positive discrimination and the nice support from senior researchers towards fresh female engineers made me proud of CrossFyre.

 

FewMul was the one-time workshop dedicated to Fewer Multiplications in Cryptography.

The story of looking at the gate/implementation properties of a symmetric-key algorithm goes back till the design of Data Encryption Standard (DES). The number of minterms necessary to implement a symmetric-key algorithm, especially its S-box which is typically the only nonlinear component, was taken as an early design consideration. Matyas and Meyer claimed that the number of minterms could be a heuristic metric for cryptographic strength [1] in addition to being an indication of implementation cost. Gate complexity which is defined as the number of 2-input logic gates was also taken as a metric to measure the efficiency of a design. Its more accurate extension on hardware is weighted gate complexity which gives a cost to each such logical gate. Today gate equivalence (GE), which corresponds to a gate’s size with respect to a NAND gate’s size, is widely acknowledged as a metric to measure the area efficiency on hardware. The GE of an XOR gate (i.e. addition in GF(2)) is typically bigger than an AND gate (i.e. multiplication in GF(2)) which might cause the naive assumption that optimizing for the number of XOR gates instead of AND gates is more efficient. On the other hand, when GF(2n) where n>1 is of concern, field multiplication is significantly more expensive than addition in both hardware and software. Moreover, with the latest needs on ultra-lightweight cryptography for the Internet of things, secure implementations against physical attacks, multi-party computation, homomorphic encryption and post-quantum cryptography, we see that the number of AND gates, and more generally the number of multiplications become the main concern. Presentations in FewMul and the following discussions were precisely on the different flavors of multiplication metric and specific needs of the aforementioned applications.

The traditional and maybe the most studied version of optimization for few multiplications is the AND-gate optimization of a circuit when only AND, XOR and NOT gates are used. Upper bound on the AND-gate complexity of all n-bit Boolean function is shown to be 2(n/2)+1-n/2-2 in 2000. However this bound can be improved significantly when specific Boolean functions are considered. Rene Peralta’s talk focused on the AND-gate complexity of some combinatorically interesting functions such as the majority, the threshold and the sum of all terms of degree k using n bits. The multiplicative complexity of the Hamming Weight (HW) of an n-bit number was particularly interesting since, unlike many others, it can be described with a nice formula on n: n-HW(n). Additionally, Rene gave bounds on the multiplicative complexity of n-bit Boolean functions for n<7. What seems particularly interesting for symmetric-key cryptography, and not necessarily computationally feasible at this very moment, is to extend this work to bijections which has been done only for n<5 so far. The talk was concluded with new results on circuit optimization including the AES S-box circuit using 125 2-input gates and GF(28) multiplication.

When it comes to side-channel analysis security, many countermeasures build upon a secure masked multiplication in GF(2n) and masked linear operations. Since the cost of a multiplication and a linear operation increase quadratically and linearly respectively as the security level increases, the minimization of multiplication becomes an important problem for this field too. In this respect, the community not only uses generic methods to minimize the number of AND-gates [2], which aligns with circuit minimization techniques, but also generic methods to minimize the number of multiplications [3]. On the other hand, countermeasures such as threshold implementation (TI) can be used to mask any function without the need to decompose it to smaller multiplications. However the cost of TI increases exponentially as the algebraic degree of the function increases. Therefore, TI focuses on decompositions based on smaller algebraic degree functions, not only multiplications. The first implementation results  of decomposing a high degree permutation into smaller quadratic permutations showing its efficiency was provided for 4-bit permutations [4,5]. This idea has then been extended to decompositions using any quadratic function for also bigger permutations [6]. All these different ways of decompositions (AND-gate, multiplication, quadratic permutation, quadratic function) nicely bring trade-offs between area, latency and randomness requirements of an implementation which I tried to elaborate on AES during my talk in FewMul. Moreover, these decompositions are not only used for side-channel security but also for multi-party computation (MPC) with similar trade-offs.

It became a true cliché to say that the world will be a better place if implementation aspects like the multiplicative complexity (or its variants depending on the targeted use case) is considered during the design process. From the above discussion, one might think that the smaller the multiplicative complexity is the better for cryptographic applications. However it has been shown that low multiplicative complexity can also lead to cryptanalytic weaknesses which need to be considered. Therefore, the designer needs to find the sweet spot between low multiplicative complexity, low multiplicative depth and security. Gladly, there were talks on MiMC, LowMC and FLIP like novel designs with low multiplicative complexity and depth and their usage in SNARK or MPC setting. It is interesting to see how these designs change the traditional SPN structure, for example, by not performing nonlinear operations on the entire state to minimize the multiplicative complexity or by performing a nonlinear low multiplicative depth operation on the entire state directly instead of small chunks of the state. What became clear during Tyge Tiessen’s talk was that we are still learning about different aspects of secure designs using FewMul and possible cryptanalysis against them.

I should thank Christian Rechberger for organizing this nice workshop and all the speakers for providing their slides which can be found on the FewMul website.

[1] C. H. Meyer and S. M. Matyas. Cryptography: A New Dimension in Computer Data Security. John Wiley & Sons, 1982.
[2] D. Goudarzi and M. Rivain. On the Multiplicative Complexity of Boolean Functions and Bitsliced Higher-Order Masking. CHES 2016.
[3] J.-S. Coron, A.Roy, S. Vivek. Fast Evaluation of Polynomials over Binary Finite Fields and Application to Side-channel Countermeasures. CHES 2014
[4] B. Bilgin, S. Nikova, V. Nikov, V. Rijmen, N. Tokareva, and V. Vitkup. Threshold Implementations of Small S-boxes. Cryptography and Communications – Discrete Structures, Boolean Functions and Sequences, 2015.
[5] S. Kutzner, P. Nguyen and A. Poschmann. Enabling 3-share Threshold Implementations for any 4-bit S-box. eprint 2015.
[6] C. Carlet, E. Prouff, M. Rivain, T. Roche. Algebraic Decomposition for Probing Security. CRYPTO 2015.