Area efficient cryptographic method and apparatus
A method of improving the efficiency of an encryption/decryption process implementing the NIST FIPS 197 standard which includes a substitution box (S-box) and an inverse substitution (inverse S-box), comprises concatenating the S-box and inverse S-box to form a combined lookup table, and folding the concatenated table to generate a folded lookup table. The folded lookup table may be indexed for an encryption operation and for a decryption operation using a signal indicative of whether encryption or decryption is used.
1. A method of improving efficiency of encryption/decryption process that includes a substitution box (S-box) implemented as a first lookup table and an inverse substitution box (inverse S-box) implemented as a second lookup table, said method comprising generating a combined lookup table by comparing the two lookup tables and inserting within the combined lookup table a value from the lookup tables when the value matches and a polarity for a control bit when the values are different.
2. The method of claim 1 which includes indexing the combined lookup table for an encryption operation and for a decryption operation using a signal indicative of whether encryption or decryption is used.
3. The method of claim 1 in which the combined lookup table is responsive to said index to provide a first output value for a first operation, and a second different output value for a second other operation.
4. The method of claim 1 which includes inserting within an output value one of a fixed value and a calculated value, the calculated value being based on a control bit, and the output value comprising symbols including at least one fixed value and at least one calculated value.
5. An encryption/decryption system that includes a second lookup table, said system comprising a memory containing a combined lookup table formed by comparing the two lookup tables and inserting within the combined lookup table a value from the lookup tables when the value matches and a polarity for a control bit when the values are different to produce a combined lookup table that is smaller than the combination of the first and second lookup table, and a processor adapted to encrypt and decrypt data according using said combined table.
6. The system of claim 5 in which said combined lookup table is indexed using a signal indicative of whether encryption or decryption is to be performed.
7. The system of claim 5 which includes a cipher circuit comprising a memory having the combined lookup table stored therein; an indexing circuit for retrieving from the combined lookup table, a lookup table value used to form at least part of an output value, the lookup table value comprising a plurality of symbols; and a processing circuit for processing some of the plurality of symbols within the output value based on a present operation, such that a value is associated with the symbols within the output value to provide different output values for a same index for different present operations.
8. The system of claim 5 in which the combined lookup table includes variable values dependent on the encryption or decryption operation being performed, and fixed values that are fixed for each operation.