Research Article

New Linear Cryptanalysis of Chinese Commercial Block Cipher Standard SM4

Algorithm 1

Search algorithm for iterative linear approximation of 3-round SM4.
  for   to 2  do
  for   to   do
    for all   do
      
      find all input masks indexed by from , and store in
      for   to   do
        
       find all input masks indexed by from , and store in
       for   to   do
         
         find all input masks indexed by from , and store in
         for   to   do
           
           for   to   do
             
           end for
           for   to   do
             
           end for
           
           
           
           
           
           
           if    then
             return  
             // 3-round iterative linear approximation
           else
             continue.
           end if
        end for
       end for
     end for
   end for
  end for
   
end for