This invention discloses a probabilistic input difference
system optimization method for Keccak internal
difference analysis. The method includes: offline construction of a k-local cost table to
record the candidate input difference space, linear constraint representation, and corresponding cost corresponding to the S-box output difference of Keccak; querying the k-local cost table based on the target output difference to select candidate input difference spaces and their linear constraint representations, and constructing a probabilistic input difference
system; performing consistency judgment, rank calculation, degree of freedom evaluation, and complexity evaluation on the probabilistic input difference
system, and outputting candidate constraint combinations that meet preset conditions and their corresponding probabilistic input difference systems. Compared with existing technologies, this invention reduces invalid candidate enumeration during the construction of probabilistic input difference systems, improves the
automation efficiency of selecting candidate input difference spaces and their linear constraint representations, solves the problems of lack of global evaluation in candidate
linearization constraint selection, and excessively high rank of capacity constraints or insufficient message
degrees of freedom.