Patent ID: 8416947

Claim:
A method comprising: receiving an input block; receiving a plurality of sub-keys; receiving a user specification of a level of security; determining a number of rounds of computation to perform based on the user specification; performing, by a processing device, the determined number of rounds of computation on the input block, wherein a different sub-key is used for each round of computation, at least some rounds of computation comprising: performing a nonlinear substitution on a portion of the input block, wherein performing the nonlinear substitution comprises computing a product of the portion of the input block and one of the plurality of sub-keys over a finite field of even characteristic, modulo a fixed primitive polynomial to obtain a substituted portion, wherein the substituted portion is equal in size to the portion of the input block; performing an exclusive-or (XOR) operation using the substituted portion and a second portion of the input block; performing a permutation on the input block; and generating an output block based on the input block when the determined number of rounds of computation on the input block are complete.