The invention discloses a multimode reconfigurable
encryption method based on an
advanced encryption standard (AES)
encryption algorithm. In the method, five operating
modes are provided for a user to select, and an all-random
S box generation way and a biased random
S box generation way are provided. The method comprises the following steps of: judging whether the operating mode and an
S box selected by the user are rational or not; if the selected operating mode and the selected S box are irrational, prompting the user to perform reselection; if the selected operating mode and the selected S box are rational, further calculating the smallest
encryption round number according to the differential uniformity and nonlinearity of the generated S box, and determining a final encryption round number according to the requirements of the user; selecting a source file for an encryption or decryption operation; and finally storing the encrypted or decrypted
data file, and providing the encrypted or decrypted
data file for the user to view. By the method, side channel attacks possibly on encryption realized by adopting hardware are effectively avoided, and an operating way of the reconfigurable encryption method is optimized; the method is applied to the configuration of a set of reconfigurable
software encryption system, and the reconfiguration and integration of block ciphers into the same
software system; and convenience is brought to operations and management.