Score:2

How to find the optimal trail in linear cryptanalysis

in flag

I'm reading and implementing this tutorial, the author explains everything pretty clearly, the only thing I'm missing is how he decides which trail to use (pg. 12). I understand that one should prefer trails with the least amount of active S-Box and maximize the bias of the trail (in fact, finding the optimal trail seems to be the most important step when trying to apply linear cryptanalysis to a symmetric encryption algorithm).

It seems to me like some sort of dynamic programming problem, but I wonder if there is a general algorithm to solve the problem of finding the optimal trail (or at least, a series of candidate trails).

Score:2
ru flag

People use Matsui's "Best Path Search Algorithm" which is indeed a dynamic programming approach. The resource costs hard to anticipate and so branch and bound variations are employed in practice.

A skeletal outline can be found on slides 14-17 of Matsui's retrospective talk on linear cryptanalysis at Asicrypt 2018.

A more formal description and some variants can be found in Ji, Zhang and Ding's 2019 paper "Improving Matsui’s Search Algorithm for the Best Differential/Linear Trails and its Applications for DES, DESL and GIFT"

Score:1
in flag

Matsui's method is the classical one, but nowadays the trend is towards MILP/SAT/SMT-based search. The correctness of the trail and its link with the transition probability is encoded into the system and is then optimized to minimize the total probability (for SAT/SMT binary search can be used, for MILP the optimization is native).

Some examples (most of the research is for differential attacks though, but it typically translated to linear attacks):

kelalaka avatar
in flag
I thinks this answer needs some links to those...
kodlu avatar
sa flag
SAT=satisfiability, MILP = mixed integer linear programming, SMT? Please don't use undefined acryonyms that are not so common and reduce an answer's usefullness
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.