This invention discloses a method, device, and medium for
security assessment of number-theoretical transformation modules based on bypass analysis. The method includes: collecting first and second bypass curves generated by the target device during number-theoretical transformation and subsequent polynomial multiplication, and constructing a leakage template accordingly; constructing a number-theoretical transformation
factor graph based on the inter-layer mapping relationship of butterfly operations from layer i to L of the number-theoretical transformation; obtaining first and second probability distributions through
template matching using the first and second bypass curves respectively; merging the two probability distributions as prior conditions to update and iterate the number-theoretical transformation
factor graph; constructing a
lookup table for the layer i butterfly operation; reversing the variable node values of the preceding butterfly operation based on the updated
factor graph, and recursively
backtracking to the first layer input to recover the key; and finally assessing the security of the number-theoretical transformation module based on the recovered key. This method combines number-theoretical transformation factor graphs, probability
inference, and
lookup table reverse reasoning, improving assessment efficiency and accuracy.