The invention relates to an instruction optimization method for an Sbox
generation process in an AES (
Advanced Encryption Standard)
encryption algorithm and a design of an
instruction set processor model thereof. In order to accelerate the Sbox
generation process in the AES
algorithm, the invention designs three new extended instructions: (1) ifand(src1),(src2),(xor_src1),(xor_src2), for accelerating in-domain multiplication operation in the Sbox
generation process; (2) getbit(dest)=(src),(bitpos), for accelerating bit-getting operation in the affine transformation process; and (3) xor5(dest)=(src1),(src2),(src3),(src4),(src5), for accelerating quinary exclusive-or operation in the affine transformation process. The three instructions are completed within one
clock cycle; but in the traditional ARM (Advanced RISC Machines) processor, the three instructions respectively need multiple
clock cycles. Thus, the new instructions achieve the accelerating effect. The invention also designs a special instruction
processor model (SASIP) corresponding to the new
instruction set according to the new extended instructions. The
processor model realizes the extended instructions on hardware logic, thereby being a processor model specializing in AES-Sbox acceleration.