Patent ID: 9374218
Filing Date: 2016-06-21
CPC Classification: G09C,H04L

Claim Text:
1. A data encryption and decryption method using a symmetric cryptographic algorithm to reduce hardware resource occupied for implementing the symmetric cryptographic algorithm, comprising: once S boxes are needed to be used to perform table lookup in the symmetric cryptographic algorithm, determining types of all S boxes needed to be used; for each type of S boxes, determining N reusing at least one type of S boxes, for which the reusing condition is satisfied, in the data encryption and decryption using the symmetric cryptographic algorithm; wherein at least one S box of one type that satisfies the reusing condition is used as one table lookup unit, each table lookup unit corresponds to one hardware module in hardware implementation; for any algorithm subunit, once S boxes used by the algorithm subunit are reused selectively, the table lookup unit corresponding to the algorithm subunit is determined according to reuse situation, and the algorithm subunit uses the corresponding table lookup unit to perform table lookup, comprising: determining a maximum length h of input data of the table lookup unit according to the number of S boxes for the table lookup unit and a length of input data of each S box; dividing the input data for table lookup performed by the algorithm subunit through using the table lookup unit into k data segments according to a total length executing table lookup operation for k times in a way of, for each time performing the table lookup operation, dividing an input data segment into data units based on the length of input data of the S box, feeding each data unit into the corresponding S box according to a predetermined correspondence relationship to perform the table lookup, and determining output information of the table lookup operation according to the predetermined relationship; and cascading the output information from the k executions of the table lookup to acquire a table lookup result.