Patent ID: 8175264

Claim:
A method for an encryption and decryption processing in SMS4 cryptographic procedure, in which a repeating encryption and decryption data processing procedure is comprised, the procedure comprising: arranging a data width and a data depth of a first constant array and storing the first constant array; outputting registered external data at least one of a rising edge or a falling edge of a first clock period; providing a first data conversion processing procedure for first data in a first row of the stored first constant array with the registered external data in the first clock period to obtain first conversion data of the first clock period; providing a second data conversion processing procedure for a second data in the first row of the stored first constant array with the first conversion data of the first clock period to obtain a second conversion data of the first clock period; providing a third data conversion processing procedure for all remaining data in the first row of the stored first constant array in a sequence to obtain conversion-processing remaining data of the first clock period; registering the conversion-processing data of the first clock period at least one of a rising edge or a falling edge of a second clock period; providing a fourth data conversion processing procedure for first data in a second row of the stored first constant array with the registered conversion-processing remaining data of the first clock period in the second clock period to obtain first conversion data of the second clock period; providing a fifth data conversion processing procedure for a second data in the second row of the stored first constant array with the first conversion data of the second clock period to obtain second conversion data of the second clock period; providing a sixth data conversion processing procedure for remaining data in the second row of the stored first constant array in a sequence to obtain a conversion-processing remaining data of the second clock period; and repeating at least one of the first through third data conversion processing procedures or the fourth through sixth data conversion processing procedures for remaining rows of the first constant array until a completion of the repeating data conversion processing procedure, wherein a particular number of the at least one of the first through third or the fourth through sixth data conversion processing procedures during the repeating data conversion processing procedure being the value of the data depth so as to obtain a result of the repeating encryption and decryption processing procedure.